0

I'm running a mail server and I'm having problem with sending mails to Google. Mails to other providers work fine.

I guess it may be related to my DNS settings, as I've read that Google is quite picky with correct MX and SPF records.

Here is what I have:

  • domain xx.yy.zz (it's a subdomain of yy.zz) has IPv4 and IPv6.
  • dig A xx.yy.zz and dig AAAA xx.yy.zz deliver the right IPs.
  • dig MX xx.yy.zz returns xx.yy.zz.
  • dig TXT xx.yy.zz returns "v=spf1 a mx ip4:xxx.xxx.xxx.xxx ip6:xxxx:xxxx:xxxx:xxxx::xxx ~all".
  • The mails that are delivered to providers other than Google show that the "from" entry in the mail header is [email protected].

Are there any other settings I should have a look at?

4
  • What do your logs say?
    – EEAA
    Feb 8, 2016 at 14:00
  • @EEAA unfortunately nothing: in /var/log/mail/* is no new entry. But I guess this is also because the server is outgoing only, so I don't receive any bounces.
    – bonanza
    Feb 8, 2016 at 14:19
  • Check the postmaster toolbox on postmaster.google.com
    – HBruijn
    Feb 8, 2016 at 14:44
  • Check the Return-Path: header. It must point to xx.yy.zz.
    – psusi
    Jun 11, 2017 at 2:43

2 Answers 2

1

You said that you're not sending from same server where you receive your mail.

If you have another server that you're using for sending (different ip from you A record), you need to add that ip in your spf record:

"v=spf1 a mx ip4:xxx.xxx.xxx.xxx ip4:yyy.yyy.yyy.yyy ip6:xxxx:xxxx:xxxx:xxxx::xxx ~all"

You should get either bounce message sent to your mail server defined with mx record or have errors in mail log in outgoing server. One of those should give you clue why are messages rejected.

In case they are rejected as spam, you can contact google and report it: https://support.google.com/mail/contact/gtag_headers?hl=en&bug_topic=69585&ctx=gtag_headers

If you send to google often, you might want to use Postmaster Tools and authenticate your domain. Steps are explained here: https://support.google.com/mail/answer/6227174?hl=en

0

Make sure you have reverse DNS for the IP address that is connecting to Google. That is your server hostname resolves to a IP, the same IP should resolve back to the server hostname. Usually Google act as a universal accepter, the just check basic setting of the server. Also you can use telnet & try sending email from your server to Google which could give you actual error

1
  • 1
    Google does not require a reverse DNS mapping to match.
    – psusi
    Jun 11, 2017 at 2:42

You must log in to answer this question.

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