2

I am using mailgun under the domain 'mg.mydomain.org' but I want emails send to be authenticated to my domain, lets say its 'mydomain'.

The settings below dont seem to work at all and I am still seeing the 'via' in gmail. Ive looked over the gmail docs and not got any further.

I am not experienced in setting up this type of configuration so if any more information is required to help ill be happy to provide

Dmarc record is currently : 
"v=DMARC1; p=none; rua=mailto:postmaster@mg.mydomain.com"

SPF record:
"v=spf1 include:mailgun.org ~all"

DKIM record is generated from the mail client
"k=xxx; p=xxxxxx"

Thanks,

M

Marc C
  • 317
  • 1
  • 4
  • 17
  • You'll want to eventually switch the `p=none` to `p=reject` - keeping it as none just allows you to get informational reports. I'm not sure if your example is a typo, but if your domain `mg.mydomain.org` and your dmarc rua domain is `mg.mydomain.com` - notice the .org and .com as the difference. This is going to require setting up a special DMARC record on the .com domain. You can test to ensure you have everything set up right by using [mailtest](https://www.unlocktheinbox.com/email-authentication.html) or something similar. – Henry Apr 05 '16 at 18:28
  • Hi Henry, yeah was just a typo. Thanks for the point on p=reject. Will keeping it as none cause any issues or overheads if i am generating information reports? – Marc C Apr 06 '16 at 08:16
  • There is no overhead on your side, only the ESP side that honor's the Record will have to do extra processing to evaluate and send the reports to you. – Henry Apr 06 '16 at 14:15

1 Answers1

1

Typically the "via" flag appears in gmail when the "From:" header in an email doesn't match the sending domain.

If you're using the Mailgun API, check that you're using the right sending domain.

Example:

curl -s --user 'api:key-abcd1234' \
https://api.mailgun.net/v3/mg.mydomain.org/messages \
-F from='Me <me@mydomain.org>' \
-F to='my.account@gmail.com' \
-F subject='Hello' \
-F text='Testing'

In the example, the from domain is just the mydomain.org. Gmail should still render it without the "via".

Jesse Spears
  • 136
  • 9