1

I've installed Postfix on Ubuntu 14.04 with the defaults. I then configured some virtual aliases to forward email from a few addresses to various personal (mostly Gmail) accounts. This is just to make these addresses all connect cosmetically to the domain on the website we are hosting.

Unfortunately, in a short amount of time Gmail has started rate blocking the forwarded emails due to spam. Apparently, Postfix is rewriting the headers in a way that makes Gmail think all the spam is originating with our server. Google refers to this article for information on how to best forward to them. In it, they say:

We recommend that you do not change the envelope sender when forwarding email to Gmail. Sometimes, when forwarding email, the envelope sender gets changed to your domain. When this happens, Gmail may learn that your domain is sending spam, and will treat other emails from this domain as spam as well.

This make sense, but it would still seem that Gmail would have to see the IP and hostname of our mail server and register it as a source of spam. But this is what they say and I've found nothing on point anywhere.

I even tried using Mailgun to filter the forwards as they provide spam blocking, but within a day they deactivated the domain and are being rather slow to respond to my inquiries. Any help is appreciated. I would like to avoid a full fledged mail server setup just to handle a few rarely used forwards.

Update: My original assumption was incorrect in that Postfix is not rewriting the headers, however the original issue remains. Gmail is rate limiting forwards due to excessive spam. It would be understandable if they limited the servers that are actually sending the email, and these are listed in the headers as part of the delivery chain.

David Rahrer
  • 103
  • 8
  • 1
    By default, postfix **doesn't** rewrite envelope sender unless you tell it to do so. Edit the question and add the output of `postconf -n` – masegaloeh Jan 09 '15 at 09:48
  • Your postconf output doesn't indicate that postfix **doesn't rewrite envelope sender**. Show us the evidence that postfix do header rewriting – masegaloeh Jan 09 '15 at 22:54
  • When testing this further, I can't see any headers being rewritten as was described. The only reference to my server is the placement in the chain of delivery. I sense there is more to this and that my original question is probably not useful. How should I deal with that? – David Rahrer Jan 12 '15 at 01:00
  • So (1) your assumption about *postfix modifying headers* was false and (2) the issue about *GMAIL rate limiting* still exist then? – masegaloeh Jan 12 '15 at 01:21
  • Yes, that is correct. My original assumption about headers being modified was due to the information from Gmail docs, along with some other research and assumptions. It would appear that Gmail is limiting even good email that is forwarded through my Postfix installation, which I assume is because it sees this as all coming from that one source (my server) and not various other senders. Since I can't actually as Google about this and expect an answer, I'm left confused. – David Rahrer Jan 12 '15 at 01:56
  • I should add that the setup through mailgun and using them to forward various emails seems to be working now that they have tweaked the settings on their end. The logs show Gmail only rate limiting actual spam, while good email goes through. However, as I feel mailgun could shut the domains down at any point automatically again, I would rather be able to use postfix only. – David Rahrer Jan 12 '15 at 01:59
  • 1
    You can edit the question add the statement that the initial assumption was false but the problem still exist. Also, don't forget to edit the title too for obvious reason :) – masegaloeh Jan 12 '15 at 08:55

1 Answers1

4

Short answer

Do not forward spam. Reject it or Drop it before forwarding.

Long answer

GMail hates spam as much as you do. So Gmail began to rate limiting your server because your server who throwing the spam upon them.

The article that you refer to was talking about domain not IP address. Both was different factors to consider when comes to email reputation.

  • Sender domain: This factor is easily forged. However when the domain was valid and sending spam then the domain came into blacklist.
  • Client IP address: This factor was considered because this server who send forward spam to us.

Just because you don't become source of spam, it doesn't mean you may forward spam. Spam should be terminated in the first place. Forwarding spam to other server (without filtering it) was looks like putting your responsible to other.

You can always be part of spam solution. See our canonical QA about fighting spam: Fighting Spam - What can I do as an: Email Administrator, Domain Owner, or User?

masegaloeh
  • 17,978
  • 9
  • 56
  • 104