2

I'm having some strange problems with sending out emails.

I've run a number of tests using different From addresses, and some of them work fine, but others are rejected by the recipient mail server. Here are the results of 9 different From addresses:

Fail:

[email protected]

[email protected]

[email protected]

[email protected]

Succeeds:

[email protected]

[email protected]

[email protected]

[email protected] (same domain as site)

[email protected] (same domain as site)

[email protected]

They don't fail for all recipients - there are clear patterns about which succeed and which get rejected. Most of the main webmail services: gmail, yahoo, hotmail, etc are rejecting them. Lesser know mail servers (presumably with less stringent criteria) are accepting them.

Outbound Mail is set to mail().

Any one else had problems like this, or able to offer advice?

1 Answer 1

8

In general: you should NOT use a from address of a domain you do not control.

the smtp protocol does not care and you can send an email pretending to be whomever sender you want, but given how it has been abused by spamers, other protection layers were put in place (DKIM, SPF).

These basically white-list which servers are allowed to send emails on the behalf of a specific sender (domain). Each other server in the world can then look at these lists, and decide to accept or reject your email based on that.

So it's not a hard rule, and depending on what from email you put and to whom you send it and how the various email servers are setup, it will work... or won't.

And no matter what, it's likely that more and more domains will white-list what are the servers allowed to send on their behalf, and more and more mail servers will look at these list and reject "unauthorised" senders.

So consider an anomaly that you can still send as @me.com for instance, and that it will soon fail.

Use your own domain(s) for the from and do set up the needed dns records to white-list your civicrm server (and the other servers you use to send emails).

And yes, it's a bit of a pain to set up, I'd suggest you to use an external provider (sendgrid, mailjet...) to deal with that. they all have clear instructions on how to set it up.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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