PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Postfix Mailversand schlägt fehl



downtown
15.08.04, 14:58
Guten Nachmittag miteinander ;)

Ich versuche immer noch erfolglos meinen Mailserver aufzusetzen.
Ich möchte mit Postfix den SMTP-Server von GMX (mail.gmx.net) verwenden und alle Mails dort rüber schicken.

Dazu habe ich Postfix 1.1.11-0.woody3 und Postfix-tls Version 1.1.11+tls0.7.15-0.woody1 via apt-get von Debain woody installiert.

Das Problem liegt beim Absenden von Emails. Beispiel:
Der Apache (www-data) sendet ein Mail, welches nie ankommt. Die Log (/var/log/mail.info) sagt folgendes:

Aug 15 14:31:16 roman-linux postfix/smtp[10602]: 96A8618036: to=<....@gmx.ch>, relay=mail.gmx.net[213.165.64.20], delay=0, status=deferred (Authentication failed: cannot SASL authenticate to server mail.gmx.net[213.165.64.20]: no mechanism available)

Ich habe die main.cf wie folgt:

# Do not change these directory settings - they are critical to Postfix
# operation.
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
program_directory = /usr/lib/postfix

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
setgid_group = postdrop
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no
myhostname = romank.servebeer.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = romank.servebeer.com, roman-linux, localhost.localdomain, localhost, 127.0.0.1
relayhost = mail.gmx.net
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +



smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_pass
smtp_sasl_security_options = noanonymous

mail_name = romank.servebeer.com Mailer Daemon

Die master.cf:

# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (50)
# ================================================== ========================
smtp inet n - - - - smtpd -v
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - - 300 1 qmgr
#qmgr fifo n - - 300 1 nqmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
flush unix n - - 1000? 0 flush
smtp unix - - - - - smtp
showq unix n - - - - showq
error unix - - - - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
# The Cyrus deliver program has changed incompatibly.
#
cyrus unix - n n - - pipe
flags=R user=cyrus argv=/usr/sbin/cyrdeliver -e -m ${extension} ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -d -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}

# only used by postfix-tls
#smtps inet n - n - - smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#587 inet n - n - - smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes

und in der sasl_pass:

mail.gmx.net .....@gmx.ch:Passwort
Das Passwort ist unverschlüsselt drin und korrekt, gehasht habe ich die Datei auch.

Ich habe Postfix mehrmals neu gestartet, leider kein Erfolg.

Wo könnte das Problem liegen? Ich habe mehrere Tutorials angeschaut und momentan sicher eineinhalb Stunden das Problem gesucht...
Anscheinend haben das noch einige mehr gehabt, aber eine konkrete Lösung habe ich keine gefunden.

Danke
downtown

dipesh
15.08.04, 17:57
Könnte es eventuell daran liegen, dass gmx kein smtp_auth unterstuetzt? versuchs doch mal mit pop-before-smtp bzw. smtp_after_pop ...

whistle
15.08.04, 18:06
Hi,
hast du auch die anderen sasl-Pakete installiert? Es gibt da noch diverse libsasl- Pakete, vielleicht hilft das. Meine Konfiguration sieht ähnlich aus wie deine, und es geht.
Whistle

downtown
15.08.04, 18:11
@dipesh
Ich nutze momentan noch Outlook ( :rolleyes: ), da funktioniert es ohne Probleme.
In den Einstellungen von GMX ist SMTP-Auth aktiviert.

Edit:
@whistle
Ich habe postfix-tls installiert. Laut Beschreibung ist da SASL dabei...

Package: postfix-tls
Priority: extra
Section: mail
Installed-Size: 556
Maintainer: LaMont Jones <lamont@debian.org>
Architecture: i386
Version: 1.1.11+tls0.7.15-0.woody1
Depends: libc6 (>= 2.2.4-4), libdb3 (>= 3.2.9-16), libgdbmg1, libsasl7, libssl0.9.6, postfix, debconf, postfix (>= 1.1.11-0), postfix (<< 1.1.11.0-0)
Recommends: mail-reader, libsasl-digestmd5-des, libsasl-gssapi-mit | libsasl-gssapi-heimdal, sasl-bin, libsasl-modules-plain
Conflicts: postfix-snap-tls
Filename: pool/main/p/postfix-tls/postfix-tls_1.1.11+tls0.7.15-0.woody1_i386.deb
Size: 231018
MD5sum: d3db878fb4d0d2c623182d4b250cda32
Description: TLS and SASL support for Postfix
This package adds support for TLS (see RFC 2487) and SASL (see RFC 2554) to
Postfix.


Soll ich vielleicht mal "ein paar" von den Recommends installieren? (libsasl-digestmd5-des, libsasl-gssapi-mit | libsasl-gssapi-heimdal, sasl-bin, libsasl-modules-plain)

whistle
15.08.04, 18:30
Ich würde es jetzt einfach mal versuchen, ich hab leider kein Debian, da kann ich dir das leider nicht so genau sagen.
Whistle

downtown
15.08.04, 19:51
Ich habe nun die beiden Pakete sasl-bin und libsasl-modules-plain installiert. Die restlichen Pakete haben keine Änderung hervorgebracht.
Immerhin sieht es momentan so aus, als könne er sich bei GMX einloggen.

Allerdings scheint der Username nicht zum Absender zu passen. Natürlich blockt er da ab. Kann es sein, dass der qmgr die Adresse umändert?
Wenn ja, wie kann ich das abschalten? Relaying über meinen Server ist sowieso nicht erlaubt, sollte also unkritisch sein.

Hier noch die Logs:

Aug 15 19:25:03 roman-linux postfix/qmgr[11430]: 777ED18037: from=<www-data@romank.servebeer.com>, size=368, nrcpt=1 (queue active)
Aug 15 19:25:08 roman-linux postfix/smtp[11450]: warning: mail.gmx.net[213.165.64.20] offered AUTH option multiple times
Aug 15 19:25:11 roman-linux postfix/smtp[11450]: 777ED18037: to=<....@gmx.ch>, relay=mail.gmx.net[213.165.64.20], delay=8, status=bounced (host mail.gmx.net[213.165.64.
20] said: 550 5.7.0 {mp009} Sender address does not belong to logged in user)
Aug 15 19:25:11 roman-linux postfix/cleanup[11448]: 10C4518032: message-id=<20040815172511.10C4518032@romank.servebeer.com>
Aug 15 19:25:11 roman-linux postfix/qmgr[11430]: 10C4518032: from=<>, size=2222, nrcpt=1 (queue active)
Aug 15 19:25:11 roman-linux postfix/local[11453]: 10C4518032: to=<root@romank.servebeer.com>, relay=local, delay=0, status=sent ("|procmail -a "$EXTENSION"")

whistle
15.08.04, 21:14
Der Absender ist normalerweise der entsprechende Benutzer von deinem Server, hier anscheinden www-data@... Unter /etc/postfix sollte es eine Datei canonical geben, in der kannst du eintragen, wie die Absender-Adresse umgeschrieben werden soll, also in deine gmx-Adresse.
Bsp: www-data blub@gmx.net
Falls es den Eintrag in der main.cf noch nicht gibt, musst du noch es noch hinzufügen:
canonical_maps=hash:/etc/postfix/canonical
Gruß
Whistle

downtown
15.08.04, 21:33
Juhu!!

Vielen Dank! Klappt jetzt super!
Endlich mal einen "sauberen" Mailserver :D