How to configure Exim to forward to GMail properly

hmcp

Member
Feb 16, 2013
6
0
1
cPanel Access Level
Root Administrator
Hello,

is there a way to configure WHM/Exim to forward mail (eg. to GMail) keeping the original envelope-sender (was it that?), so that GMail does not perceive this cPanel server as the origin? The problem, as you may know, is with all the spam being forwarded, SPF failures, etc... GMail blocks the cPanel server's IP address because it thinks it's the origin of the spam...

I know about the POP3 feature of GMail accounts, but I'm looking for a way that would not include explaining to and pestering clients on how to configure their GMails for proper forwarding.

Many thanks!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
Hello :)

Right, it's better to simply address the source of the problem. If your server is detected as source of SPAM, you should ensure no SPAM is coming from your server. The following document is a good place to start:

cPanel - Prevent Email Abuse

Thank you.
 

hmcp

Member
Feb 16, 2013
6
0
1
cPanel Access Level
Root Administrator
Hello, thanks for your replies, but that doesn't answer my question. My server is not the source of spam. It is FORWARDING from an alias address to a GMail and is perceived by GMail as Spam originating from the FORWARDING server, ie. my server.

So, other than blocking forwarders completely, turning aliases into inboxes and asking clients to use their GMail POP3 options and fetch mail from those inboxes, is there anything I can do to configure the server to forward mail and not be perceived as the source of spam it forwards?

Thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
Google dictates how the incoming mail to it's servers is classified. There's no way to alter Google's policy, so it's typically better to review their guidelines and ensure you follow them as close as possible:

https://support.google.com/mail/answer/81126?hl=en

Thank you.
 

mtindor

Well-Known Member
Sep 14, 2004
1,511
136
343
inside a catfish
cPanel Access Level
Root Administrator
Hello,

is there a way to configure WHM/Exim to forward mail (eg. to GMail) keeping the original envelope-sender (was it that?), so that GMail does not perceive this cPanel server as the origin? The problem, as you may know, is with all the spam being forwarded, SPF failures, etc... GMail blocks the cPanel server's IP address because it thinks it's the origin of the spam...

I know about the POP3 feature of GMail accounts, but I'm looking for a way that would not include explaining to and pestering clients on how to configure their GMails for proper forwarding.

Many thanks!
To address SPF, etc with forwarded email, you should implement SRS in exim on your cPanel machine. Of course the only way [I know] to do this right now is to make a few changes in /etc/exim.conf. The problem is that each time cPanel updates Exim they overwrite that. cPanel is in the best position to implement SRS. I see no downsides to the implementation I'm using [which was done based upon some info somebody previously wrote up on another website].

Here is the feature request for SRS support: Built-in SRS support under Advanced Exim Configuration Editor in WHM. | cPanel Feature Requests

You might want to add your vote to that feature request.

As for forwarding spam, the only way you are going to minimize that is to (a) make sure any problematic forwarder has an actual email account added as well, (b) make sure Spamassassin is active on that domain, (c) make sure clamav is scanning your messages, and (d) use more than default spamassassin configuration [install Pyzor, Razor2, DCC, iXhash]. The goal is to minimize the chance that there will be any bonafide spam to forward in the first place.

There is no easy way out for this issue as a whole though.

M