On 2016-12-07 08:53, Nev Young wrote:
All of the above works fine for all sender addresses and recipient addresses *except* when the sender is <sender>@yahoo.co.uk and the recipient is <recipient>@live.co.uk
Hi Nev,
I'm no expert in this field, so take this mail with a pinch of salt. You are attempting to send a mail from your server to live.co.uk, with a sender address yahoo.co.uk. On the receiving server this is indistinguishable from a spam delivery attempt.
First, make sure your server is not listed at any RBL. If that is the case, address the underlying problem why you ended up in that list.
The admin on live.co.uk is free to implement any spam fighting mechanism they feel fit, but chances are that they implement a strict SPF+DMARC policy. The SPF policy for yahoo.co.uk [1] is "v=spf1 redirect=_spf.mail.yahoo.com", which redirects to a [2] with policy "v=spf1 ptr:yahoo.com ptr:yahoo.net ?all". The DMARC policy for yahoo.co.uk is [3] "v=DMARC1; p=reject; pct=100; rua=mailto:dmarc_y_rua@yahoo.com;". To sum up, your mail server is not in the SPF mandated networks yahoo.com or yahoo.net, and DMARC tells the receiving host to reject mails if the SPF test fails. So that could be the reason why live.co.uk won't accept your mails.
One way around this would be to send your mails with an envelope sender address using your domain. That is *not* the header From: address the user sees in his MUA, but it is the one that the MTAs use to send bounces to. SPF should validate the envelope sender address and not the From: header. This way the recipient of the mail still see the correct from address (the one from your web form) as the sender, but the receiving mail server will apply *your* SPF+DMAC policy if any, and not a 3rd party's one.
If you can't set the sender address, then you could use a noreply@your-domain.tld in the From: header and set the Reply-To: header to help the recipient to respond to the right address.
HTH, Thomas
[1] http://mxtoolbox.com/SuperTool.aspx?action=spf%3ayahoo.co.uk [2] http://mxtoolbox.com/SuperTool.aspx?action=spf%3a_spf.mail.yahoo.com [3] http://mxtoolbox.com/SuperTool.aspx?action=dmarc%3ayahoo.co.uk