I can send and receive mail using firstname.lastname@example.org, but system generated emails such as email@example.com bounce backup with an error:
May 1 03:14:52 mail postfix/smtp: 23CA4BD6B40: to=, relay=none, delay=0.01, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail for mail.example.com loops back to myself)
How do I fix this error?
Postfix did found a dns reply to your email server, but it hasn’t been configured to deal with address such as firstname.lastname@example.org. In other words, your server is configured to accept email@example.com but not as firstname.lastname@example.org. This is well known config problem with virtual domain. To fix this error either add system FQDN to mydestination or relay_domains. Postfix accepts mail for domain listed in virtual_mailbox_domains, virtual_alias_domains, and domains that resolve to IP addresses listed in inet_interfaces and proxy_interfaces. Update mydestination using postconf or by editing main.cf file:
mydestination = localhost.$mydomain, localhost, mail.example.com
Once done reload postfix:
# service postfix reload