User-domain.tld@x.xxx.xx.x bounces - bad address syntax

Hello there!

I have a remaining problem with Dovecot or Postfix. I have searched the forums and searched the interwebs but nothing helped so far so I hope you guys may be able to help me.

I have a Virtualmin/Usermin/Webmin Server. It contains a number of subdomains and the corresponding email addresses connected to their users.
I have installed SSL Certificates and connected them to Dovecot and Postfix, I have also been able to connect now with an external mail client, I get the folders and their contents. I can send out emails, but

I cannot receive emails.
They don’t show up in the Webinterface.

This is the /etc/log/mail.log contents:

postfix/error[3178]: 9B19744BDD: to=<user-    domain.tld@x.xxx.xx.x>, orig_to=<user@domain.tld>, relay=none, delay=0.17, delays=0.08/0.05/0/0.04, dsn=5.1.3, status=bounced (bad address syntax)
postfix/cleanup[3177]: B6AE844C67: message-id=<20200303100208.B6AE944D47@pre.hostersdomainofserver.tld>
postfix/qmgr[909]: B6AE844C67: from=<>, size=6281, nrcpt=1 (queue active)
postfix/bounce[3179]: 9B19744BDD: sender non-delivery notification: B6AE844C67

x.xxx.xx.x is the ip address of my server

The /etc/postfix/main.cf is as follows:

# 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

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2



# TLS parameters
smtpd_tls_cert_file = /etc/postfix/postfix.cert.pem
smtpd_tls_key_file = /etc/postfix/postfix.key.pem
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 = pre.hostersdomainofserver.tld
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, pre.hostersdomainofserver.tld, localhost.anotherserverdomainofmyhoster.tld, x.xxx.xx.x, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
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
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtp_tls_security_level = dane
allow_percent_hack = no
sender_dependent_default_transport_maps = hash:/etc/postfix/dependent

My DNS entries:

*     A     x.xxx.xx.x
@     A     x.xxx.xx.x
@     MX 10 mail.domain.tld
mail  A     x.xxx.xx.x 
www   CNAME @

Any suggestions?

mydestination = $myhostname, pre.hostersdomainofserver.tld, localhost.anotherserverdomainofmyhoster.tld, x.xxx.xx.x, localhost

Hi,

Directive mydestination should not contain IP address but domain name.

Note: After editing configuration, don’t forget to apply it or restart Postfix service.

Hi Ilia!

Thanks for the post but I am still getting

> to=<user-domain.tld@x.xxx.xx.x>, orig_to=<user@domain.tld>, relay=none, delay=0.07, delays=0.03/0.02/0/0.02, dsn=5.1.3, status=bounced (bad address syntax)

After deleting the ip address from the line and restarting the server.

Any other ideas?

Is there anyone with some suggestions? I am not getting this to work :frowning:

Hey there… for who it may concern! :smiley: I’ve found the answer which is also connected to your answer Ilia! I had to put the following line into the main.cf to make the ip address readable, since I couldn’t change the routing towards the domain assigned by my provider:

resolve_numeric_domain = yes

This will take care of it and resolve my ip as well.

cheers :slight_smile: