1

Topic: Email Headers - 554 Message not allowed

I am trying to solve a problem with the automated emails. Some providers (mainly those using yahoo), often bounce the email with the message:
554 Message not allowed - Headers are not RFC compliant[291]

Looking at the message header I now see that there are two 'From' entries, one at the top of the header, and another between the Content-Transfer-Encoding and the Return-Path.

I figure that these are all controlled and populated in the includes/mail.inc, but i am struggling to see what I need to delete to get rid of the second 'From' entry.

Any pointers would be gratefully received.

Dave Slade
Senior IT & Records Officer,
13 St Andrews Crescent, Cardiff, CF14 3DB
www.sewbrec.org.uk, www.sewbrecord.org.uk

2

Re: Email Headers - 554 Message not allowed

Hi

I guess you are talking about emails sent by your Drupal site via your mail server here rather than by the Indicia warehouse.

You would be making your life a misery if you delete anything from mail.inc as it would be overwritten with every update.

Before anything, I would check your site email address in Configuration>System>Site Information. There is a note which says

The From address in automated e-mails sent during registration and new password requests, and other notifications. (Use an address ending in your site's domain to help prevent this e-mail being flagged as spam.)

Ensure it is so before doing anything else even if that means inventing an email address that does not exist. When I do this I use an address of no-reply@ my domain and it would be sensible if I added a note in the emails saying "Do not reply to this email address".

If you already have a valid site email address I would then start investigating other ways to control email headers such as https://www.drupal.org/project/mail_headers, for example.

Jim Bacon

3

Re: Email Headers - 554 Message not allowed

Hi Jim,
The email address being used is  'donotreply@sewbrecord.org.uk', so it does meet the criteria. Email sent to this address are forwarded to my work email address - which is why I have been able to view the rejected emails.

I'll have a bit more of a poke around and see if I can come up with something.

Dave

Dave Slade
Senior IT & Records Officer,
13 St Andrews Crescent, Cardiff, CF14 3DB
www.sewbrec.org.uk, www.sewbrecord.org.uk

4

Re: Email Headers - 554 Message not allowed

Well, it may not be the sensible option but I've been playing with edits to the mail.inc. I have found that commenting out line 150 works:
    //$headers['From'] = $headers['Sender'] = $headers['Return-Path'] = $default_from;

I've probably broken something else, but at least new password requests will get through to people!
Dave

Dave Slade
Senior IT & Records Officer,
13 St Andrews Crescent, Cardiff, CF14 3DB
www.sewbrec.org.uk, www.sewbrecord.org.uk