Community Discussions and Support
Missing or invalid Date: header issue

I just talked with a support tech at our domain host. He was able to see some of the messages coming in without a date header but said they can't do anything about it.  His understanding is that the sending SMTP server should be adding a date header to any message submitted without one.  The organizations from which I receive these messages are huge companies running their own SMTP servers do there isn't any hope of me initiating a resolution. 

<p>I just talked with a support tech at our domain host. He was able to see some of the messages coming in without a date header but said they can't do anything about it.  His understanding is that the sending SMTP server should be adding a date header to any message submitted without one.  The organizations from which I receive these messages are huge companies running their own SMTP servers do there isn't any hope of me initiating a resolution.  </p>

A while ago I added a filter that would add a Date: header when one was missing from a message.  I have since modified the filters to include adding another date header when the date format was invalid.  In both cases I've used a future date (added header is Date: 31 Dec 2025 00:01 -0500).  I just tested the same rule in Pegasus Mail modified to utilize the ~y substitution for todays date and it works (Date: ~y). 

This is easy to test in Pegasus Mail by manipulating the date header of a .cnm file.  How can I test it in Mercury?

Does anyone know if it will even work?

<p>A while ago I added a filter that would add a Date: header when one was missing from a message.  I have since modified the filters to include adding another date header when the date format was invalid.  In both cases I've used a future date (added header is Date: 31 Dec 2025 00:01 -0500).  I just tested the same rule in Pegasus Mail modified to utilize the ~y substitution for todays date and it works (Date: ~y).  </p><p>This is easy to test in Pegasus Mail by manipulating the date header of a .cnm file.  How can I test it in Mercury? </p><p>Does anyone know if it will even work? </p>

Did you take this any further?

AFAIK Mercury will add a date header automatically if one is missing. 

<p>Did you take this any further?</p><p>AFAIK Mercury will add a date header automatically if one is missing. </p>

I have not pursued this any further leaving the filters in place that add a Date header with a future date.

Mercury does not add a Date header if one is missing.  

<p>I have not pursued this any further leaving the filters in place that add a Date header with a future date.</p><p>Mercury does not add a Date header if one is missing.   </p>

Last night I had a thought about how to test the ~y date substitution in Mercury so immediately tested it at the office this morning.  It works! 

Last night I had a thought about how to test the ~y date substitution in Mercury so immediately tested it at the office this morning.  It works! 

On real-world experience I have found that the added date header is not recognized by Pegasus Mail due to the ~y date substitution enclosing the date in quotation marks.  (eg: Date: "Wed, 16 Oct 2019 20:39:06 -0400")

On real-world experience I have found that the added date header is not recognized by Pegasus Mail due to the ~y date substitution enclosing the date in quotation marks.  (eg: Date: "Wed, 16 Oct 2019 20:39:06 -0400")

Hi Brian,

[quote]Mercury does not add a Date header if one is missing.[/quote]

My Mercury does - not only date. Rawtext:

From: LTO@wiwi.tu-dortmund.de
To: mail.wiwi.tu-dortmund.de

Device  ----------
...
Message ----------
Library Power Up
Comment: Date missing from received message, added by wiso.tu-dortmund.de.
Date: Thu, 31 Oct 2019 08:27:12 +0100
Comment: Message-ID missing from received message, added by wiso.tu-dortmund.de.
Message-ID: <3619EB1.5DBA9AE0.03E9@wiso.tu-dortmund.de>

The only problem is, that Mercury obviously writes added headers to the wrong position in the mail - after the mail body instead after headers. That's why Pegasus can't find the added header date - Mercury has mutated it to a bodydate ;-)

Bye    Olaf

P.S. It's a status message from my tape library. Library has very poor mail functions and doesn't have any date somewhere.

&lt;p&gt;Hi Brian, &lt;/p&gt;&lt;p&gt;[quote]Mercury does not add a Date header if one is missing.[/quote]&lt;/p&gt;&lt;p&gt;My Mercury does - not only date. Rawtext: &lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;From: LTO@wiwi.tu-dortmund.de To: mail.wiwi.tu-dortmund.de&lt;/p&gt;&lt;p&gt;Device&amp;nbsp; ---------- ... Message ---------- Library Power Up Comment: Date missing from received message, added by wiso.tu-dortmund.de. Date: Thu, 31 Oct 2019 08:27:12 +0100 Comment: Message-ID missing from received message, added by wiso.tu-dortmund.de. Message-ID: &amp;lt;3619EB1.5DBA9AE0.03E9@wiso.tu-dortmund.de&amp;gt; &lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;The only problem is, that Mercury obviously writes added headers to the &lt;b&gt;wrong position&lt;/b&gt; in the mail - &lt;b&gt;after the mail body instead after headers&lt;/b&gt;. That&#039;s why Pegasus can&#039;t find the added header date - Mercury has mutated it to a bodydate ;-)&lt;/p&gt;&lt;p&gt;Bye &amp;nbsp;&amp;nbsp; Olaf&lt;/p&gt;&lt;p&gt;P.S. It&#039;s a status message from my tape library. Library has very poor mail functions and doesn&#039;t have any date somewhere. &lt;/p&gt;

My Mercury definitely does not add a date header when one is missing from an incoming message.  I'm using MercuryD to retrieve messages from domain hosted mailboxes.  I wonder if that has anything to do with it.


&lt;p&gt;My Mercury definitely does not add a date header when one is missing from an incoming message.&amp;nbsp; I&#039;m using MercuryD to retrieve messages from domain hosted mailboxes.&amp;nbsp; I wonder if that has anything to do with it.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;

Hi Brian,

my tapelibrary sends directly to MercuryS. It seems to be the job of MercuryS (or more common: the SMTP-Interface of a mailhost) to add missing headers. MercuryS does and a mailhost running postfix does too (in a configuration used at my job).

In your case it should be the job of your providers mailhost holding your domain mailbox. Obviously his SMTP interface doesn't add missing headers. MercuryD at least is a POP-Client and those clients should not manipulate headers of mails.

bye    Olaf

&lt;p&gt;Hi Brian,&lt;/p&gt;&lt;p&gt;my tapelibrary sends directly to MercuryS. It seems to be the job of MercuryS (or more common: the SMTP-Interface of a mailhost) to add missing headers. MercuryS does and a mailhost running postfix does too (in a configuration used at my job). &lt;/p&gt;&lt;p&gt;In your case it should be the job of your providers mailhost holding your domain mailbox. Obviously his SMTP interface doesn&#039;t add missing headers. MercuryD at least is a POP-Client and those clients should not manipulate headers of mails.&lt;/p&gt;&lt;p&gt;bye &amp;nbsp;&amp;nbsp; Olaf &lt;/p&gt;
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