SMTP Error (550): Failed to add recipient - 5.1.1 Recipient address rejected

1 post / 0 new
#1 Sat, 07/02/2016 - 01:20
Kryolyt

SMTP Error (550): Failed to add recipient - 5.1.1 Recipient address rejected

Hi,

I'm having trouble using Roundcube to send emails with my Virtualmin installation. Emails to other adresses inside my network work fine, but as soon as I try to send a Mail to, say, a gmail adress the following error message pops up:

SMTP Error (550): Failed to add recipient "myemail@gmail.com" (5.1.1 myemail@gmail.com: Recipient address rejected: gmail.com).

My Postfix Main.cf:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# 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

readme_directory = no

# 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:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_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.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = astra<censored>.server4you.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = astra<censored>.startdedicated.de, astra<censored>.server4you.com, localhost.server4you.com, localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
default_transport = error
relay_transport = error
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated check_policy_service inet:127.0.0.1:10023 permit_inet_interfaces
allow_percent_hack = no
milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891
smtp_sasl_auth_enable = yes

My Mail.log while trying to send the mail:

Jul  2 06:17:37 astra<censored> postfix/smtpd[7252]: connect from localhost[127.0.0.1]
Jul  2 06:17:37 astra<censored> postfix/smtpd[7252]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <mymail@gmail.com>: Recipient address rejected: gmail.com; from=<me@myserver.TLD> to=<mymail@gmail.com> proto=ESMTP helo=<myserver.TLD>
Jul  2 06:17:37 astra<censored> postfix/smtpd[7252]: disconnect from localhost[127.0.0.1]

I found a few other threads with similiar problems, but in those cases it was due to blacklisting or a faulty user creation, hence the user not being found. I can't figure out what postfix is having trouble with in my case.

Edit 1: I was able to send a mail by commenting out default_transport = error relay_transport = error

Google page 3 to the rescue. Though I am not quite sure why a fresh installation would make problems.

Edit 2: It seems the mails never arrive at the destination. Checked my gmail and gmx account and they never received any mails from me.

Edit 3: gmail now accepts my mails after I fixed a typo in the main.cf: "smtp_sasl_auth_enable = yes" to "smtpd_sasl_auth_enable = yes"

gmx says my PTR Record is bad an refuses to talk to postfix

Jul  2 07:24:12 astra<censored> postfix/smtp[13984]: 96B465E1725: host mx00.emig.gmx.net[212.227.15.9] refused to talk to me: 554-gmx.net (mxgmx007) Nemesis ESMTP Service not available 554-No SMTP service 554-Bad DNS PTR resource record. 554 For explanation visit http://postmaster.gmx.com/en/error-messages?ip=62.138.8.132&c=rdns
Jul  2 07:24:12 astra5078 postfix/smtp[13984]: 96B465E1725: to=<mymail@gmx.de>, relay=mx01.emig.gmx.net[212.227.17.5]:25, delay=1303, delays=1303/0/0.28/0, dsn=4.0.0, status=deferred (host mx01.emig.gmx.net[212.227.17.5] refused to talk to me: 554-gmx.net (mxgmx102) Nemesis ESMTP Service not available 554-No SMTP service 554-Bad DNS PTR resource record. 554 For explanation visit http://postmaster.gmx.com/en/error-messages?ip=62.138.8.132&c=rdns)

I'll work on the PTR record. I wonder why a fresh install of virtualmin had these issues without me messing with any config.