assistanz
Assistanz

Mails from EXIM to gmail marked as spam

Mails from EXIM to gmail marked as spam

Mails from EXIM to gmail marked as spam

Sometimes it becomes complicated to manage mail deliveries in Exim due to recipient end spam filter settings. Most common issue is with Gmail marking the server mails as spam.

Follow the steps to overcome this issue:

If Gmail receives mail to junk folder, check the source of the email message in Junk folder to find the Received headers in the email.

In the header check for SPF and if spf=none or soft fail. You will need to add the SPF record with both IPv4 and IPv6 addresses: v=spf1 a mx ip4:xxx.xxx.xx.xx ip6:xxxx:xxx:x:xxx:x:x:x:x –all

Mails from EXIM to gmail marked as spam

Format for a SPF TXT record with both IPv4 and IPv6 addresses: v=spf1 a mx ip4:xxx.xxx.xx.xx ip6:xxxx:xxx:x:xxx:x:x:x:x –all

In some cases, the server (Exim) have both IPv4 and IPv6 configured locally, but there is no A record for the IPv4 address. Need to add an AAAA record in the server for IPv6 address, since that’s what Exim defaults to when sending email.

Once you have your TXT and AAAA records configured, test the response with:

dig +short example.com txt (for SPF)

Mails from EXIM to gmail marked as spam

dig +short example.com AAAA (for IPv6)

Mails from EXIM to gmail marked as spam

Make sure there are Reverse DNS entries for both your IPv4 and IPv6 addresses.

Send another email from the server to yourself, then view the raw source/headers.

If you still see that SPF is flagged as none, try restarting your mail service and check if the TXT record is propagated.

Now if you see that SPF is flagged as neutral or pass and still mail is considered as Spam, check if Exim is picking up the right hostname.

If Exim isn’t delivering with the right hostname, edit Exim configuration file by manually overriding the primary_hostname

vi /etc/exim.conf (on cpanel servers; other OSes may differ in the configuration path).

Uncomment the primary_hostname and set it to your server’s primary domain (should be same as Reverse DNS entry you added earlier).

Restart Exim for the change to takes effect.

service exim restart

After following through this entire process, you should see the as below

Mails from EXIM to gmail marked as spam

Note that these are the basic steps for getting emails with otherwise high-quality content delivered. If you have spammy message content (e.g. “Click this email link to win a million dollars!”), it’s very likely your message will get flagged as spam regardless of how well you set up your domain and email server.

For high volume of email delivery, DKIM record should also be added.

DirectAdmin Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk
$ 99 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • NDA & SLA
  • SLA Review Meetings
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation
  •  

Platinum Support

24/7 Proactive Support
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Support

$ 30 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response Time
  • 4 Hours Resolution time for the Possible Issues
  • Security and Performance Optimization
  • React to Customers queries
  • Simple SignUp Process
  • Instant Account Activation
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support