1

Here is my situation, when I try to send spoofed email of my website like info@mydomain.com to my gmail account it will be rejected due to DMARC policy.

Here is Undelivered Mail Returned to Sender:

This is the mail system at host emkei.cz.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

Host gmail-smtp-in.l.google.com[74.125.206.27] said:
    550-5.7.1 Unauthenticated email from mydomain.com is not accepted due to
    domain's 550-5.7.1 DMARC policy.

But if I try to send spoofed email of my website to the real address:

from info@mydomain.com to info@mydomain.com - the mail will be delivered successfully.

Received: from emkei.cz (emkei.cz [46.167.245.72])

This is my SPF record:

"v=spf1 mx a ip4:myip/32 a:mail.mydomain.com -all"

How can I reject if it's not sended from the same domain?

BTW: I'm running postfix and dovecot.

2

Defining DMARC or SPF policies on your DNS is one thing. If you want your mail system taking these into account receiving inbound messages, you'll need some additional configuration.

postfix-policyd-spf-python should be able to deal with SPF validation, while opendmarc should be able to cope with DMARC validation.

Using postfix and dovecot, this post should apply to your case:

  • Yes, I did it by following that website. Thank you. – user134969 Feb 28 '17 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.