[Postfixbuch-users] Einlieferung von Emails per Relayhost: 5.1.7 Bad sender address syntax

Christopher Mohr chris at themohr.com
Do Aug 29 14:52:32 CEST 2013


Hallo Listenmitglieder,

ich betreibe zwei Server. Einen reinen Webserver und einen reinen E-Mailserver.
Der Webserver soll zum Versenden von E-Mails (z.B. PHP-Skripte) per "relayhost"-Setting über den ansonsten funktionierenden Mailserver E-Mails versenden.
Auf beiden Servern läuft Postfix. 
Zurzeit werden E-Mails, die vom Webserver an den Mailserver gesendet werden, verworfen: "5.1.7 Bad sender address syntax (in reply to MAIL FROM command)".
Mich wundert der Log-Eintrag "from=<ICH at MAILSERVER_HOST.TLD:23568>" bereits. Der Port 23568 wurde früher mal für die Verbindung zum Mailserver genutzt, inzwischen aber nicht mehr.

Ich bin gespannt auf Eure Vorschläge!

Hier nun Log- und Konfigurationsdateien:

In der Log-Datei auf dem WEBSERVER tauchen folgende Einträge auf:
------------------------
Aug 29 12:59:15 WEBSERVER postfix/pickup[16977]: E9EB641B18: uid=1000 from=<ICH>
Aug 29 12:59:15 WEBSERVER postfix/cleanup[16991]: E9EB641B18: message-id=<20130829105915.E9EB641B18 at WEBSERVER_HOST.TLD>
Aug 29 12:59:15 WEBSERVER postfix/qmgr[16978]: E9EB641B18: from=<ICH at MAILSERVER_HOST.TLD:23568>, size=452, nrcpt=1 (queue active)
Aug 29 12:59:16 WEBSERVER postfix/smtp[16993]: E9EB641B18: to=<ICH at gmail.com>, relay=MAILSERVER_HOST.TLD[MAILSERVER_IP]:587, delay=0.06, delays=0.02/0/0.04/0.01, dsn=5.1.7, status=bounced (host MAILSERVER_HOST.TLD[MAILSERVER_IP] said: 501 5.1.7 Bad sender address syntax (in reply to MAIL FROM command))
Aug 29 12:59:16 WEBSERVER postfix/bounce[16994]: E9EB641B18: sender non-delivery notification: 03DEA41B19
Aug 29 12:59:16 WEBSERVER postfix/qmgr[16978]: E9EB641B18: removed
Aug 29 12:59:16 WEBSERVER postfix/cleanup[16991]: 03DEA41B19: message-id=<20130829105916.03DEA41B19 at WEBSERVER_HOST.TLD>
Aug 29 12:59:16 WEBSERVER postfix/bounce[16994]: E9EB641B18: sender non-delivery notification: 03DEA41B19
Aug 29 12:59:16 WEBSERVER postfix/qmgr[16978]: 03DEA41B19: from=<>, size=2352, nrcpt=1 (queue active)
Aug 29 12:59:16 WEBSERVER postfix/error[16995]: 03DEA41B19: to=<ICH at MAILSERVER_HOST.TLD:23568>, relay=none, delay=0.01, delays=0/0/0/0, dsn=5.1.3, status=bounced (bad address syntax)
Aug 29 12:59:16 WEBSERVER postfix/qmgr[16978]: 03DEA41B19: removed

Aug 29 12:59:15 WEBSERVER postfix/pickup[16977]: E9EB641B18: uid=1000 from=<ICH>
Aug 29 12:59:15 WEBSERVER postfix/cleanup[16991]: E9EB641B18: message-id=<20130829105915.E9EB641B18 at WEBSERVER_HOST.TLD>
Aug 29 12:59:15 WEBSERVER postfix/qmgr[16978]: E9EB641B18: from=<ICH at MAILSERVER_HOST.TLD:23568>, size=452, nrcpt=1 (queue active)
Aug 29 12:59:16 WEBSERVER postfix/smtp[16993]: E9EB641B18: to=<ICH at gmail.com>, relay=MAILSERVER_HOST.TLD[MAILSERVER_IP]:587, delay=0.06, delays=0.02/0/0.04/0.01, dsn=5.1.7, status=bounced (host MAILSERVER_HOST.TLD[MAILSERVER_IP] said: 501 5.1.7 Bad sender address syntax (in reply to MAIL FROM command))
Aug 29 12:59:16 WEBSERVER postfix/bounce[16994]: E9EB641B18: sender non-delivery notification: 03DEA41B19
Aug 29 12:59:16 WEBSERVER postfix/qmgr[16978]: E9EB641B18: removed
------------------------


In der Log-Datei auf dem MAILSERVER tauchen entsprechend folgende Einträge auf:
------------------------
Aug 29 12:59:16 MAILSERVER postfix/smtpd[10178]: connect from WEBSERVER_HOST.TLD[IP_WEBSERVER]
Aug 29 12:59:16 MAILSERVER postfix/smtpd[10178]: warning: Illegal address syntax from WEBSERVER_HOST.TLD[IP_WEBSERVER] in MAIL command: <ICH at MAILSERVER_HOST.TLD:23568>
Aug 29 12:59:16 MAILSERVER postfix/smtpd[10178]: disconnect from WEBSERVER_HOST.TLD[IP_WEBSERVER]
------------------------


Auszug aus der Konfiguration auf dem WEBSERVER:
------------------------
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = loopback-only
mailbox_size_limit = 0
mydestination = WEBSERVER_HOST.TLD, localhost.EINE_DOMAIN.TLD, localhost
myhostname = WEBSERVER_HOST.TLD
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = [MAILSERVER_HOST.TLD]:submission
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
------------------------


Auszug aus der Konfiguration auf dem MAILSERVER:
------------------------
postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
bounce_template_file = /etc/postfix/bounce-templates/bounce.de-DE.cf
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
delay_warning_time = 2h
disable_vrfy_command = yes
dovecot-spamass_destination_recipient_limit = 1
inet_interfaces = all
mailbox_size_limit = 0
message_size_limit = 83886080
milter_default_action = accept
milter_protocol = 6
minimal_backoff_time = 60s
mydestination = localhost.yourvserver.net, , localhost
myhostname = MAILSERVER_HOST.TLD
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 WEBSERVER_IP EIGENE_IP
myorigin = /etc/mailname
non_smtpd_milters = inet:localhost:20210
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps
queue_run_delay = 60s
readme_directory = no
recipient_delimiter = +
show_user_unknown_table_name = no
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks permit_sasl_authenticated
smtpd_milters = inet:localhost:20210
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination reject_unknown_sender_domain reject_unknown_recipient_domain reject_unlisted_recipient reject_rbl_client zen.spamhaus.org reject_rbl_client bl.spamcop.net reject_rbl_client dynablock.sorbs.net reject_rbl_client dnsbl.ahbl.org reject_rbl_client dnsbl.burnt-tech.com permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql_sender_login_maps.cf
smtpd_sender_restrictions = permit_mynetworks permit_sasl_authenticated reject_authenticated_sender_login_mismatch reject_unknown_sender_domain
smtpd_tls_CAfile = /etc/ssl/certs/valid/new_chain/startssl.chain.class1.server.crt
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/certs/valid/MAILSERVER_HOST.TLD.startssl.crt
smtpd_tls_key_file = /etc/ssl/certs/valid/MAILSERVER_HOST.TLD.startssl.key
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
strict_rfc821_envelopes = no
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/vmail/
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 112400000
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 104
virtual_transport = dovecot-spamass
virtual_uid_maps = static:5000
------------------------

Vielen Dank schon einmal,

Christopher Mohr


Mehr Informationen über die Mailingliste Postfixbuch-users