0

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
3
  • Check in Spam, of course. Jul 9, 2015 at 17:01
  • @MichaelHampton I already did. Maybe it's a port issue? Or it's forcing TLS but it's not supported?
    – danijar
    Jul 9, 2015 at 17:05
  • Your mail was delivered to Gmail successfully. There is no "port issue" or "forcing TLS but it's not supported" to be concerned about. If the mail isn't visible to you, it's because Gmail did something to it. Jul 9, 2015 at 17:12

1 Answer 1

2

Looks like you have send email email with sender and 'final' recipient was same, i.e. your sender is [email protected] and the recipient (after aliasing) is [email protected] too. Based on this fact, perhaps your problem was related to this KB: Why do I not receive mail I send to myself via a forward or mailing list?

Gmail (and the gmail-based IU Umail system) has a rather annoying "feature" whereby it will not show you email you send yourself. This affects email you send via mailing lists, google groups, and email forwards (such as a .forward file in your SoIC Linux account). This feature is described in this gmail support page: Not receiving email from groups.

Technically, it will not show you messages you send when they arrive back at gmail with the same Message-ID. This is typically the case for mailing lists and .forward. If you are trying to test a .forward you should send a test message from an account other than the gmail that is the target of the forward.

2
  • I asked a friend to send me a test mail and it worked. Now I try to find out in which cases Gmail ignores the mails. For example, when I send from [email protected] to the very same address, it shows up in my inbox. From [email protected] to [email protected] does not even though it makes no sense to hide it when it's about two different addresses I would say.
    – danijar
    Jul 10, 2015 at 9:05
  • Well, from the quoted text above, gmail checks if Message-ID was same or not. Otherwise, you should ask google :)
    – masegaloeh
    Jul 10, 2015 at 13:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .