PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Postfix SASL Konfig



Freehawk
26.03.08, 18:55
Hallo zusammen,

ich hoffe ihr könnt mir weiterhelfen. Ich habe mir daheim einen kleinen Server eingerichtet mit Apache, PHP und eben auch Postfix um die mail Funktion von PHP zu nutzen.

Ich habe Postfix mit SASL konfiguriert damit er alle Mail an den Relayhost weiterleitet.

Konfig:

# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

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

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = debian.mydomain.home
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = debian.mydomain.home, localhost.mydomain.home, localhost
#relayhost = 217.12.11.250
relayhost = [smtp.mail.yahoo.de]
mynetworks = 127.0.0.0/8, 192.168.2.0/24
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

# SASL Konfiguration eingefügt von Markus Rost
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password


Das Ganze hat nun auch ne Weile funktioniert, nur jetzt gehts nimmer. Ich habe das Gefühl, dass das Yahoo nicht mehr aktzepiert.

Hat mir jemand einen Tip, wie ich das wieder zum Laufen bekomme?

Hier noch den Auszug aus dem Logfile:

Mar 26 18:41:20 debian postfix/smtp[24872]: send attr action = failed
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr reason = host smtp.mail.yahoo.de[217.12.11.250] said: 553 From: address not verified; see http://help.yahoo.com/l/us/yahoo/mail/original/manage/sendfrom-07.html (in reply to MAIL FROM command)
Mar 26 18:41:20 debian postfix/smtp[24872]: private/bounce socket: wanted attribute: status
Mar 26 18:41:20 debian postfix/smtp[24872]: input attribute name: status
Mar 26 18:41:20 debian postfix/smtp[24872]: input attribute value: 0
Mar 26 18:41:20 debian postfix/smtp[24872]: private/bounce socket: wanted attribute: (list terminator)
Mar 26 18:41:20 debian postfix/smtp[24872]: input attribute name: (end)
Mar 26 18:41:20 debian postfix/smtp[24872]: ABF483678D: to=<markus_rost@yahoo.de>, relay=smtp.mail.yahoo.de[217.12.11.250]:25, delay=24, delays=0.48/0.19/23/0.07, dsn=5.0.0, status=bounced (host smtp.mail.yahoo.de[217.12.11.250] said: 553 From: address not verified; see http://help.yahoo.com/l/us/yahoo/mail/original/manage/sendfrom-07.html (in reply to MAIL FROM command))
Mar 26 18:41:20 debian postfix/smtp[24872]: smtp_get: EOF
Mar 26 18:41:20 debian postfix/smtp[24872]: name_mask: resource
Mar 26 18:41:20 debian postfix/smtp[24872]: name_mask: software
Mar 26 18:41:20 debian postfix/smtp[24872]: disposing SASL state information
Mar 26 18:41:20 debian postfix/smtp[24872]: deliver_request_final: send: "lost connection with smtp.mail.yahoo.de[217.12.11.250] while sending RCPT TO" 0
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr status = 4.4.2
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr diag_type =
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr diag_text =
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr mta_type =
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr mta_mname =
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr action =
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr reason = lost connection with smtp.mail.yahoo.de[217.12.11.250] while sending RCPT TO
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr status = 0
Mar 26 18:41:20 debian postfix/smtp[24872]: master_notify: status 1
Mar 26 18:41:20 debian postfix/smtp[24872]: connection closed
Mar 26 18:41:20 debian postfix/cleanup[24870]: B6C2C3678E: message-id=<20080326174120.B6C2C3678E@debian.mydomain.home>
Mar 26 18:41:20 debian postfix/qmgr[2442]: B6C2C3678E: from=<>, size=2608, nrcpt=1 (queue active)
Mar 26 18:41:20 debian postfix/bounce[24901]: ABF483678D: sender non-delivery notification: B6C2C3678E
Mar 26 18:41:20 debian postfix/qmgr[2442]: ABF483678D: removed
Mar 26 18:41:21 debian postfix/local[24902]: B6C2C3678E: to=<www-data@debian.mydomain.home>, relay=local, delay=0.37, delays=0.17/0.02/0/0.18, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
Mar 26 18:41:21 debian postfix/qmgr[2442]: B6C2C3678E: removed
Mar 26 18:43:00 debian postfix/smtp[24872]: idle timeout -- exiting
debian:/var/log#
debian:/var/log# tail -n 40 mail.log
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr original_recipient = markus_rost@yahoo.de
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr recipient = markus_rost@yahoo.de
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr offset = 759
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr dsn_orig_rcpt =
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr notify_flags = 0
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr status = 5.0.0
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr diag_type = smtp
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr diag_text = 553 From: address not verified; see http://help.yahoo.com/l/us/yahoo/mail/original/manage/sendfrom-07.html
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr mta_type = dns
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr mta_mname = smtp.mail.yahoo.de
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr action = failed
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr reason = host smtp.mail.yahoo.de[217.12.11.250] said: 553 From: address not verified; see http://help.yahoo.com/l/us/yahoo/mail/original/manage/sendfrom-07.html (in reply to MAIL FROM command)
Mar 26 18:41:20 debian postfix/smtp[24872]: private/bounce socket: wanted attribute: status
Mar 26 18:41:20 debian postfix/smtp[24872]: input attribute name: status
Mar 26 18:41:20 debian postfix/smtp[24872]: input attribute value: 0
Mar 26 18:41:20 debian postfix/smtp[24872]: private/bounce socket: wanted attribute: (list terminator)
Mar 26 18:41:20 debian postfix/smtp[24872]: input attribute name: (end)
Mar 26 18:41:20 debian postfix/smtp[24872]: ABF483678D: to=<markus_rost@yahoo.de>, relay=smtp.mail.yahoo.de[217.12.11.250]:25, delay=24, delays=0.48/0.19/23/0.07, dsn=5.0.0, status=bounced (host smtp.mail.yahoo.de[217.12.11.250] said: 553 From: address not verified; see http://help.yahoo.com/l/us/yahoo/mail/original/manage/sendfrom-07.html (in reply to MAIL FROM command))
Mar 26 18:41:20 debian postfix/smtp[24872]: smtp_get: EOF
Mar 26 18:41:20 debian postfix/smtp[24872]: name_mask: resource
Mar 26 18:41:20 debian postfix/smtp[24872]: name_mask: software
Mar 26 18:41:20 debian postfix/smtp[24872]: disposing SASL state information
Mar 26 18:41:20 debian postfix/smtp[24872]: deliver_request_final: send: "lost connection with smtp.mail.yahoo.de[217.12.11.250] while sending RCPT TO" 0
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr status = 4.4.2
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr diag_type =
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr diag_text =
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr mta_type =
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr mta_mname =
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr action =
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr reason = lost connection with smtp.mail.yahoo.de[217.12.11.250] while sending RCPT TO
Mar 26 18:41:20 debian postfix/smtp[24872]: send attr status = 0
Mar 26 18:41:20 debian postfix/smtp[24872]: master_notify: status 1
Mar 26 18:41:20 debian postfix/smtp[24872]: connection closed
Mar 26 18:41:20 debian postfix/cleanup[24870]: B6C2C3678E: message-id=<20080326174120.B6C2C3678E@debian.mydomain.home>
Mar 26 18:41:20 debian postfix/qmgr[2442]: B6C2C3678E: from=<>, size=2608, nrcpt=1 (queue active)
Mar 26 18:41:20 debian postfix/bounce[24901]: ABF483678D: sender non-delivery notification: B6C2C3678E
Mar 26 18:41:20 debian postfix/qmgr[2442]: ABF483678D: removed
Mar 26 18:41:21 debian postfix/local[24902]: B6C2C3678E: to=<www-data@debian.mydomain.home>, relay=local, delay=0.37, delays=0.17/0.02/0/0.18, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
Mar 26 18:41:21 debian postfix/qmgr[2442]: B6C2C3678E: removed
Mar 26 18:43:00 debian postfix/smtp[24872]: idle timeout -- exiting


Ich hoffe Ihr könnt mir irgendwie weiterhelfen

drcux
26.03.08, 19:09
From: address not verified; see http://help.yahoo.com/l/us/yahoo/mail/original/manage/sendfrom-07.html

Freehawk
26.03.08, 19:15
Hallo,

ich habe mal weitergesucht und glaube den Fehler gefunden. Postfix übergibt als Mail-From im Mail Header den Username und den Rechnername meines lokalen Rechners.

Den kennt Yahoo natürlich nicht.


Mar 26 19:04:42 debian postfix/smtp[26386]: > smtp.mail.yahoo.de[217.12.11.250]: MAIL FROM:<www-data@debian.mydomain.home> AUTH=<>


Was kann ich da tun, damit da meine Mail Addresse von Yahoo drin steht?

Gruß
Markus

unux
26.03.08, 23:43
Hi,

schonmal versucht der php mail() Funktion die Absenderadresse mitzugeben?

Greetz UnuX

Edit: Kann nicht direkt mitgegeben werden, aber in der php.ini findest du



; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

Freehawk
27.03.08, 17:08
Hallo,

also ich muss irgendiwe das MAIL FROM in dem Protokollbeispiel verändern.


Client Server Erklärung
220 mail.example.com SMTP Foo Mailserver Server begrüßt den Client
HELO client.example.org Client meldet sich an
250 Hello client.example.org, nice to meet you Server bestätigt Anmeldung. Wichtig ist, dass der Client jeweils auf die Antwort vom Server wartet.
MAIL FROM:<bar@example.org> Client gibt Absenderadresse an
250 Sender OK
RCPT TO:<foo@example.com>
250 Recipient OK
DATA Client möchte jetzt die Mail mitteilen
354 End data with <CR><LF>.<CR><LF>
From: <bar@example.org>
To: <foo@example.com>
Subject: Testmail
Date: Thu, 26 Oct 2006 13:10:50 +0200

Testmail
. Client schickt komplette Mail
Die Mail muss mit einer Zeile,
die nur einen Punkt enthält, abgeschlossen werden
250 Message accepted for delivery
QUIT Client meldet sich ab
221 See you later

Mit php kann ich nur das From anpassen.

Mit dem Sendmail_path hab ich keine Option gefunden wo ich das Mail_From ändern kann. Oder habe ich das etwas übersehen?

Gruß
Markus

Roger Wilco
29.03.08, 10:50
Mit dem Sendmail_path hab ich keine Option gefunden wo ich das Mail_From ändern kann. Oder habe ich das etwas übersehen?
Ja, hast du. Einfach den Parameter "-f <localpart@example.com>" (natürlich angepasst) anhängen. Das steht übrigens auch in den Kommentaren zu mail() in der PHP Dokumentation.

Freehawk
29.03.08, 12:55
Hi,

danke für das
"-f <localpart@example.com>".

Das hat geholfen. Jetzt siehts so aus als ob es wieder funktioniert.

DANKE an alle.

Gruß
Markus