My desired Postfix configuration is to forward all incoming mails according to virtual aliases and be able to send outgoing mails via SMTP and TLS. Sending already works, but the forwarding does not.
When I send a mail from [email protected]
to [email protected]
it should be forwarded back to the Gmail account. However, I don't receive the mail in Gmail. I'm not completely sure how to read the log but it seems like the rewriting works and the mail was sent out as well.
/var/log/maillog
Jul 9 18:17:11 sXXXXXXXX postfix/postfix-script[17039]: starting the Postfix mail system
Jul 9 18:17:12 sXXXXXXXX postfix/master[17040]: daemon started -- version 2.6.6, configuration /etc/postfix
Jul 9 18:18:12 sXXXXXXXX postfix/smtpd[17061]: connect from mail-lb0-f169.google.com[209.85.217.169]
Jul 9 18:18:12 sXXXXXXXX postfix/smtpd[17061]: F2C3543B8114: client=mail-lb0-f169.google.com[209.85.217.169]
Jul 9 18:18:13 sXXXXXXXX postfix/cleanup[17066]: F2C3543B8114: message-id=<CAGRzetbJ85Ss5FdSn6g=HV5HrCO9=HnZTx1w+4qVfH-r0LfaOQ@mail.gmail.com>
Jul 9 18:18:13 sXXXXXXXX postfix/qmgr[17043]: F2C3543B8114: from=<[email protected]>, size=1672, nrcpt=1 (queue active)
Jul 9 18:18:13 sXXXXXXXX postfix/smtpd[17061]: disconnect from mail-lb0-f169.google.com[209.85.217.169]
Jul 9 18:18:13 sXXXXXXXX postfix/smtp[17067]: F2C3543B8114: to=<[email protected]>, orig_to=<[email protected]>, relay=gmail-smtp-in.l.google.com[64.233.166.27]:25, delay=0.53, delays=0.11/0.05/0.16/0.21, dsn=2.0.0, status=sent (250 2.0.0 OK 1436458693 ew5si6226110wid.61 - gsmtp)
Jul 9 18:18:13 sXXXXXXXX postfix/qmgr[17043]: F2C3543B8114: removed
/etc/postfix/main.cf
# ...
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_recipient_restrictions = permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination
smtp_use_tls = yes
smtp_tls_cert_file = /etc/postfix/certs/cert.pem
smtp_tls_key_file = /etc/postfix/certs/cert_key.pem
smtp_tls_CAfile = /etc/postfix/certs/cacert.pem
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/certs/cert.pem
smtpd_tls_key_file = /etc/postfix/certs/cert_key.pem
smtpd_tls_CAfile = /etc/postfix/certs/cacert.pem
tls_random_source = dev:/dev/urandom