• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Probleme mit Postfix Mail-Versand (1und1) über AWS EC2 Instance

Guten Tag liebe Gemeinde,
ich habe ein Problem mit dem Mail-Versand an 1und1 E-Mail Adressen. Ich habe hierzu schon mehrere Sachen gelesen, jedoch noch keine Antwort gefunden, die mein Problem gelöst hat.

Dies ist meine mail log:
Code:
[root@ip-172-31-25-66 ec2-user]# echo test mail | mail -s "test" test@email-adresse.de && sudo tail -f /var/log/maillog
Jul 11 12:14:33 ip-172-31-25-66 postfix/qmgr[23626]: C1CAC40AE5: from=<root@ip-172-31-25-66.eu-central-1.compute.internal>, size=526, nrcpt=1 (queue active)
Jul 11 12:14:33 ip-172-31-25-66 postfix/smtp[23635]: setting up TLS connection to mx00.kundenserver.de[212.227.15.41]:25
Jul 11 12:14:33 ip-172-31-25-66 postfix/smtp[23635]: Trusted TLS connection established to mx00.kundenserver.de[212.227.15.41]:25: TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Jul 11 12:14:34 ip-172-31-25-66 postfix/smtp[23635]: C1CAC40AE5: to=<test@email-adresse.de>, relay=mx00.kundenserver.de[212.227.15.41]:25, delay=0.23, delays=0.02/0.02/0.18/0.02, dsn=5.0.0, status=bounced (host mx00.kundenserver.de[212.227.15.41] said: 550-Requested action not taken: mailbox unavailable 550 invalid DNS MX or A/AAAA resource record (in reply to MAIL FROM command))
Jul 11 12:14:34 ip-172-31-25-66 postfix/cleanup[23633]: 06CD140AF6: message-id=<20160711121434.06CD140AF6@ip-172-31-25-66.eu-central-1.compute.internal>
Jul 11 12:14:34 ip-172-31-25-66 postfix/qmgr[23626]: 06CD140AF6: from=<>, size=2919, nrcpt=1 (queue active)
Jul 11 12:14:34 ip-172-31-25-66 postfix/bounce[23637]: C1CAC40AE5: sender non-delivery notification: 06CD140AF6
Jul 11 12:14:34 ip-172-31-25-66 postfix/qmgr[23626]: C1CAC40AE5: removed
Jul 11 12:14:34 ip-172-31-25-66 postfix/smtp[23635]: 06CD140AF6: to=<root@ip-172-31-25-66.eu-central-1.compute.internal>, relay=none, delay=0.01, delays=0/0/0.01/0, dsn=5.4.6, status=bounced (mail for ip-172-31-25-66.eu-central-1.compute.internal loops back to myself)
Jul 11 12:14:34 ip-172-31-25-66 postfix/qmgr[23626]: 06CD140AF6: removed
Jul 11 15:05:10 ip-172-31-25-66 postfix/pickup[23866]: 80CB340AF9: uid=0 from=<root>
Jul 11 15:05:10 ip-172-31-25-66 postfix/cleanup[24040]: 80CB340AF9: message-id=<20160711150510.80CB340AF9@ip-172-31-25-66.eu-central-1.compute.internal>
Jul 11 15:05:10 ip-172-31-25-66 postfix/qmgr[23626]: 80CB340AF9: from=<root@ip-172-31-25-66.eu-central-1.compute.internal>, size=526, nrcpt=1 (queue active)
Jul 11 15:05:10 ip-172-31-25-66 postfix/smtp[24042]: setting up TLS connection to mx00.kundenserver.de[212.227.15.41]:25
Jul 11 15:05:10 ip-172-31-25-66 postfix/smtp[24042]: Trusted TLS connection established to mx00.kundenserver.de[212.227.15.41]:25: TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)
Jul 11 15:05:10 ip-172-31-25-66 postfix/smtp[24042]: 80CB340AF9: to=<test@email-adresse.de>, relay=mx00.kundenserver.de[212.227.15.41]:25, delay=0.25, delays=0.02/0.01/0.19/0.02, dsn=5.0.0, status=bounced (host mx00.kundenserver.de[212.227.15.41] said: 550-Requested action not taken: mailbox unavailable 550 invalid DNS MX or A/AAAA resource record (in reply to MAIL FROM command))
Jul 11 15:05:10 ip-172-31-25-66 postfix/cleanup[24040]: BD18840AFA: message-id=<20160711150510.BD18840AFA@ip-172-31-25-66.eu-central-1.compute.internal>
Jul 11 15:05:10 ip-172-31-25-66 postfix/qmgr[23626]: BD18840AFA: from=<>, size=2919, nrcpt=1 (queue active)
Jul 11 15:05:10 ip-172-31-25-66 postfix/bounce[24043]: 80CB340AF9: sender non-delivery notification: BD18840AFA
Jul 11 15:05:10 ip-172-31-25-66 postfix/qmgr[23626]: 80CB340AF9: removed
Jul 11 15:05:10 ip-172-31-25-66 postfix/smtp[24042]: BD18840AFA: to=<root@ip-172-31-25-66.eu-central-1.compute.internal>, relay=none, delay=0.01, delays=0/0/0.01/0, dsn=5.4.6, status=bounced (mail for ip-172-31-25-66.eu-central-1.compute.internal loops back to myself)
Jul 11 15:05:10 ip-172-31-25-66 postfix/qmgr[23626]: BD18840AFA: removed

meine Postfix main.cf sieht wie folgt aus:
Code:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
inet_interfaces = localhost
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.6.6/samples
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
delay_warning_time = 4h
myhostname = ip-***-**-**-**.eu-central-1.compute.internal
mydestination = , localhost.localdomain, localhost
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_alias_maps = hash:/etc/postfix/virtual_alias
smtpd_sasl_auth_enable = yes
smtp_sasl_password_maps =  hash:/etc/postfix/sasl_passwd
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, reject_unknown_recipient_domain,  permit_sasl_authenticated, reject_unauth_destination
smtpd_helo_restrictions = permit_mynetworks, reject_invalid_hostname, reject_non_fqdn_hostname, reject_unknown_hostname
smtpd_sender_restrictions = reject_unknown_sender_domain
smtpd_helo_required = yes
strict_rfc821_envelopes = yes
home_mailbox = Maildir/
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtp_tls_note_starttls_offer = yes
smtp_sasl_auth_enable = yes
smtp_use_tls = yes
smtp_sasl_security_options = noanonymous
smtpd_tls_key_file = /etc/pki/tls/private/smtp.key
smtpd_tls_cert_file = /etc/pki/tls/certs
smtp_tls_CAfile = /etc/ssl/certs/smtp.crt
smtp_tls_loglevel = 1
virtual_alias_maps = hash:/etc/postfix/virtual

Ich hoffe mir kann hier jemand helfen.
Vielen Dank schonmal.
 
mx00.kundenserver.de[212.227.15.41] said: 550-Requested action not taken: mailbox unavailable 550 invalid DNS MX or A/AAAA resource record (in reply to MAIL FROM command))
Deine Absende-Adresse löst nicht auf eine gültige Domain auf. Zumindest keine die der 1&1 Server über öffentliche DNS Abfragen auflösen könnte.
 
Also die richtige Empfänger Adresse hab ich oben durch test@ ersetzt.
Ich kriege jedoch Mails an yahoo und google Konten verschickt.
Wie kann man das beheben? A / MX Einträge checken?
 
myhostname = ip-***-**-**-**.eu-central-1.compute.internal
wird sicherlich nicht über öffentliches DNS (wie zB 8.8.8.8 von google) auflösen und wenn dann auf eine andere IP. Entweder konfigurierst Du postfix als smarthost oder satellite (siehe hier )oder Du besorgst dir eine Domain und läßt die entsprechend auflösen.
 
Bei den Postfix SMTPD Restriction Classes ist es sinnvoll nur die smtpd_recipient_restrictions zu verwenden. Diese sollten dann auch dem entsprechend gesetzt sein. Also erst alles unerwünschtes rejecten und dann erst das eigene Netzwerk und authentifizierte User zu lassen.

Du willst ja nicht noch eine weitere potentielle Spamschleuder ans Netz hängen oder?
 
Oben