Forward Mails to Gmail

5,638

Solution 1

Are you sending email back to the same gmail account that you are posting the email from?

If a message goes from [email protected] to def.whatever and then back to [email protected], gmail will not put the message in the inbox. https://support.google.com/mail/answer/6588?hl=en You can change this behavior by specifying the def@whatever as an alternate email address alias in your account options.

This troubleshooter might help you as well.
https://support.google.com/mail/troubleshooter/2935079?hl=en

Before you do all of this though, check your postfix logs at /var/log/maillog and make sure you are getting a positive response from gmail. Something similar to

status=sent (250 2.0.0 OK 1404098487 fv4si21511978pbb.224 - gsmtp)

If you're getting something else, ie:

status=SOFTBOUNCE (host gmail-smtp-in.l.google.com[74.125.25.27] said: 550-5.7.1 [107.161.16.11      12] Our system has detected that this message is 550-5.7.1 likely unsolicited mail.

Well, then, you know the problem.

Solution 2

"if a Gmail users sends a mail to my server which is then forwarded to Gmail again the mail never shows up in Gmail"

This is probably not a spam situation, but it may be a situation of how "mail routing loops" are being detected based upon your description.

Most email systems will have some form of "looping" detection in place, otherwise loops like this can digress into a "run away" situation where email systems are brought down to their knees. In those situations, the more powerful system will usually win with the "losing" system taking a pretty disruptive crash.

If you are sure that situations like those that you described to not involve any actual loops where the gmail sender is somehow copying back to themselves through your system, then you might consider contacting the Google folks directly for assistance. They may need to adjust their loop detection or may have some guidance around how your system can forward to theirs in a way that does not trip their loop detection incorrectly.

Share:
5,638

Related videos on Youtube

Peter
Author by

Peter

Updated on September 18, 2022

Comments

  • Peter
    Peter over 1 year

    I have a postfix mailserver running. Mails sent from users to Gmail are showing up in Gmail, so it works in general. Same for all other freemail hosts I know.

    The problem is that some users have no local mailbox but a forwarding to Gmail. If someone sends a mail to such a user my mail server forwards the mail to Gmail. This works, even if the original domain has a SPF record with "-all". But if a Gmail users sends a mail to my server which is then forwarded to Gmail again the mail never shows up in Gmail.

    I already tried: - Check the logs. Gmail SMTP just reports "OK" but the mail seems to get discarded in a later step. - Enable SRS. Still no mail in Gmail

    Anyone out there who has a running setup able to forward mails from Gmail to Gmail? Is there something I am missing that's causing Google to classify my mail as spam so badly that it doesn't even go to the Spam folder?

    • Admin
      Admin over 12 years
      I Peter, did you sort this out? We are facing the exact same problem: our LOGs show a 250 OK, which means that the email has been accepted at Gmail; but the email neves shows up in the Gmail's account inbox. Thank you.
  • lszrh
    lszrh over 12 years
    This is exactly what happend on my server. I can't send mails from my gmail account via relay to my gmail account. Tried it with another gmail account and everything works fine. Thank you!
  • user48838
    user48838 over 12 years
    Glad things worked out for you.