Community Discussions and Support
Bug? Undeliverable mail, invalid header

Ohhhh now I see what you guys are saying, Mercury is not adding the Date-header. Thank you for enlighting me!

Since this only happed once in the last 4-5 months, this is not a "huge" problem but I will look into the PHP script to see what I can do.

 

Thank you both for pointing this out to me,

Fred

<p>Ohhhh now I see what you guys are saying, Mercury is not adding the Date-header. Thank you for enlighting me! </p><p>Since this only happed once in the last 4-5 months, this is not a "huge" problem but I will look into the PHP script to see what I can do.</p><p> </p><p>Thank you both for pointing this out to me,</p><p>Fred </p>

I've got this weird problem:  Undeliverable mail, invalid header

I am using Mercury/32 v4.62. Below you see the answer from the receiving MTA that claims invalid header. If you take a look at the Date Header you see that there is a special character before time offset. The receiving MTA states that this is (char B8 hex):

Date: Mon, 01 Jun 2009 21:45:00 ¸0100

What might cause this?I would like to emphasize that this is the first time I've got this. We do send 20-30 e-mails a day normally without any problems at all.

In this case a PHP-script is sending the mail upon some action from a user. But again we do send 20-30 mail a day without this problem. 

TIA,

Fred

 

 -----------------------------------------------------------------------------------------------------------

Reply from the receiving MTA:

---------------------------- Original Message ----------------------------
Subject: Undeliverable mail, invalid header
From:    "Content-filter at mail.aaa.se" <postmaster@mail.aaa.se>
Date:    Mon, June 1, 2009 11:54 pm
To:      info@xxx.com
--------------------------------------------------------------------------

The message WAS NOT relayed to:
  <v-16123@mail.aaa.se>:
   554 5.6.0 Reject, id=16879-02 - BAD_HEADER: Non-encoded 8-bit data (char B8 hex): Date: Mon, 01 Jun 2009 21:45:00 \2700100\n

This nondelivery report was generated by the program amavisd-new at host mail.aaa.se. Our internal reference code for your message is
16879-02/ClVfEqaSV7q4

INVALID HEADER

  Non-encoded 8-bit data (char B8 hex): Date: Mon, 01 Jun 2009 21:45:00
    \2700100\n
 

 -----------------------------------------------------------------------------------------------------------

Headers from the original mail being sent from Mercury:

...

X-CLAMWALL: Passed through antiviral test by ClamWall 1.3.0.95 on xxx.com (99)
Received: from cartridge (192.168.3.211) by xxx.com (Mercury/32 v4.62) ID
 MG000FA6; 1 Jun 2009 21:45:00 +0200
Date: Mon, 01 Jun 2009 21:45:00 ¸0100
Subject: Order
From: "xxx.com" <info@xxx.com>
To: "Cecilia Svenson" <cissi.yyyy@lkpg.aaa.se>
MIME-Version: 1.0
X-Mailer: xxx Mailer
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

...

&lt;p&gt;I&#039;ve got this weird problem:&amp;nbsp; Undeliverable mail, invalid header&lt;/p&gt;&lt;p&gt;I am using Mercury/32 v4.62. Below you see the answer from the receiving MTA that claims invalid header. If you take a look at the Date Header you see that there is a special character before time offset. The receiving MTA states that this is (char B8 hex):&lt;/p&gt;&lt;p&gt;&lt;b&gt;Date: Mon, 01 Jun 2009 21:45:00 &cedil;0100&lt;/b&gt; &lt;/p&gt;&lt;p&gt;What might cause this?I would like to emphasize that this is the first time I&#039;ve got this. We do send 20-30 e-mails a day normally without any problems at all. &lt;/p&gt;&lt;p&gt;In this case a PHP-script is sending the mail upon some action from a user. But again we do send 20-30 mail a day without this problem.&amp;nbsp; &lt;/p&gt;&lt;p&gt;TIA,&lt;/p&gt;&lt;p&gt;Fred&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;----------------------------------------------------------------------------------------------------------- &lt;/p&gt;&lt;p&gt;Reply from the receiving MTA: &lt;/p&gt;&lt;p&gt;---------------------------- Original Message ---------------------------- Subject: Undeliverable mail, invalid header From:&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;Content-filter at mail.aaa.se&quot; &amp;lt;postmaster@mail.aaa.se&amp;gt; Date:&amp;nbsp;&amp;nbsp;&amp;nbsp; Mon, June 1, 2009 11:54 pm To:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; info@xxx.com -------------------------------------------------------------------------- The message WAS NOT relayed to: &amp;nbsp; &amp;lt;v-16123@mail.aaa.se&amp;gt;: &amp;nbsp;&amp;nbsp; 554 5.6.0 Reject, id=16879-02 - BAD_HEADER: Non-encoded 8-bit data (char B8 hex): Date: Mon, 01 Jun 2009 21:45:00 \2700100\n This nondelivery report was generated by the program amavisd-new at host mail.aaa.se. Our internal reference code for your message is 16879-02/ClVfEqaSV7q4 INVALID HEADER &amp;nbsp; Non-encoded 8-bit data (char B8 hex): Date: Mon, 01 Jun 2009 21:45:00 &amp;nbsp;&amp;nbsp;&amp;nbsp; \2700100\n &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;-----------------------------------------------------------------------------------------------------------&lt;/p&gt;&lt;p&gt;Headers from the original mail being sent from Mercury:&lt;/p&gt;&lt;p&gt;...&lt;/p&gt;&lt;p&gt;X-CLAMWALL: Passed through antiviral test by ClamWall 1.3.0.95 on xxx.com (99) Received: from cartridge (192.168.3.211) by xxx.com (Mercury/32 v4.62) ID &amp;nbsp;MG000FA6; 1 Jun 2009 21:45:00 +0200 Date: Mon, 01 Jun 2009 21:45:00 &cedil;0100 Subject: Order From: &quot;xxx.com&quot; &amp;lt;info@xxx.com&amp;gt; To: &quot;Cecilia Svenson&quot; &amp;lt;cissi.yyyy@lkpg.aaa.se&amp;gt; MIME-Version: 1.0 X-Mailer: xxx Mailer Content-Type: text/plain; charset=&quot;iso-8859-1&quot; Content-Transfer-Encoding: 7bit &lt;/p&gt;&lt;p&gt;... &lt;/p&gt;

[quote user="t90fpe"]

Headers from the original mail being sent from Mercury:

...

X-CLAMWALL: Passed through antiviral test by ClamWall 1.3.0.95 on xxx.com (99)
Received: from cartridge (192.168.3.211) by xxx.com (Mercury/32 v4.62) ID
 MG000FA6; 1 Jun 2009 21:45:00 +0200

[/quote]This is the header inserted by Mercury, and is in the correct format[quote]

Date: Mon, 01 Jun 2009 21:45:00 ¸0100

[/quote]This is written by your PHP script, which is what you need to correct.
[quote user=&quot;t90fpe&quot;]&lt;p&gt;Headers from the original mail being sent from Mercury:&lt;/p&gt;&lt;p&gt;...&lt;/p&gt;&lt;p&gt;X-CLAMWALL: Passed through antiviral test by ClamWall 1.3.0.95 on xxx.com (99) Received: from cartridge (192.168.3.211) by xxx.com (Mercury/32 v4.62) ID &amp;nbsp;MG000FA6; 1 Jun 2009 21:45:00 +0200&lt;/p&gt;&lt;p&gt;[/quote]This is the header inserted by Mercury, and is in the correct format[quote]&lt;/p&gt;&lt;p&gt;Date: Mon, 01 Jun 2009 21:45:00 &cedil;0100 &lt;/p&gt;[/quote]This is written by your PHP script, which is what you need to correct.

I am sorry but I am not sure what you are pointing out here.

  1. The PHP script is a "client" and sending the email to the mail server, which is Mercury
  2. Mercury is sending this email
  3. The receiving MTA is complaining about invalid header.

As I wrote before, we are sending 20-30 e-mails every day, and been doing this for quite some time (months). I don't see how the PHP script need to be corrected since this is the first action in the list above.

The headers I listed before are the headers of the e-mail at the receiving MTA in action 3, so the headers are actually the headers sent from Mercury.

 

 

 

 

 

&lt;p&gt;I am sorry but I am not sure what you are pointing out here.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;The PHP script is a &quot;client&quot; and sending the email to the mail server, which is Mercury &lt;/li&gt;&lt;li&gt;Mercury is sending this email &lt;/li&gt;&lt;li&gt;The receiving MTA is complaining about invalid header. &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;As I wrote before, we are sending 20-30 e-mails every day, and been doing this for quite some time (months). I don&#039;t see how the PHP script need to be corrected since this is the first action in the list above. &lt;/p&gt;&lt;p&gt;The headers I listed before are the headers of the e-mail at the receiving MTA in action 3, so the headers are actually the headers sent from Mercury.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;/p&gt;

[quote user="t90fpe"]

I am sorry but I am not sure what you are pointing out here.

1.  The PHP script is a "client" and sending the email to the mail server, which is Mercury.
But Mercury does NOT add a Date: line header to the RFC 2822 e-mail message.  The sending client may add it or some other server along the line may add it but Mercury does not.
2.  Mercury is sending this email
Mercury is transferring a RFC 2822 message body as received and only adding the received lines among other things.  The Date: line is not touched.
The receiving MTA is complaining about invalid header.
Correctly, it's invalid

As I wrote before, we are sending 20-30 e-mails every day, and been doing this for quite some time (months). I don't see how the PHP script need to be corrected since this is the first action in the list above.

Check it out.  Turn session logging in MercuryS to see exactly what is being received by MercuryS from the PHP script.

The headers I listed before are the headers of the e-mail at the receiving MTA in action 3, so the headers are actually the headers sent from Mercury.

Agreed, but they do not originate there.  They are either in the original message or added by some SMTP host after being sent by MercuryC.

 

 

 

 

 

[/quote]
&lt;blockquote&gt;[quote user=&quot;t90fpe&quot;]&lt;p&gt;I am sorry but I am not sure what you are pointing out here.&lt;/p&gt;&lt;blockquote&gt;1.&amp;nbsp; The PHP script is a &quot;client&quot; and sending the email to the mail server, which is Mercury.&lt;/blockquote&gt;&lt;/blockquote&gt;But Mercury does NOT add a Date: line header to the RFC 2822 e-mail message.&amp;nbsp; The sending client may add it or some other server along the line may add it but Mercury does not. &lt;blockquote&gt;2.&amp;nbsp; Mercury is sending this email &lt;/blockquote&gt;Mercury is transferring a RFC 2822 message body as received and only adding the received lines among other things.&amp;nbsp; The Date: line is not touched. &lt;blockquote&gt;The receiving MTA is complaining about invalid header. &lt;/blockquote&gt;Correctly, it&#039;s invalid &lt;blockquote&gt;&lt;p&gt;As I wrote before, we are sending 20-30 e-mails every day, and been doing this for quite some time (months). I don&#039;t see how the PHP script need to be corrected since this is the first action in the list above. &lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Check it out.&amp;nbsp; Turn session logging in MercuryS to see exactly what is being received by MercuryS from the PHP script. &lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;The headers I listed before are the headers of the e-mail at the receiving MTA in action 3, so the headers are actually the headers sent from Mercury.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Agreed, but they do not originate there.&amp;nbsp; They are either in the original message or added by some SMTP host after being sent by MercuryC. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;/p&gt;[/quote]
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft