bugSpamAssassin Milter Plugin - Bugs: bug #29550, Generated Received header has...


bug #29550: Generated Received header has incorrect Date

Submitted by:  Stuart Schneider <helpdesk>
Submitted on:  Wed 14 Apr 2010 04:32:11 AM UTC  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Fri 21 May 2010 12:00:57 PM UTC, comment #6:

The `b' macro is supposed to be updated by sendmail whenever a new SMTP connection starts or when it does a queue run.

I'm struggling to conceive how it could be that far out. Perhaps it would be better, at least in your case, to avoid the use of the `b' macro altogether and just use localtime() instead?

Paul Howarth <pghmcfc>
Fri 21 May 2010 03:22:28 AM UTC, comment #5:

I've been able to log the value of the "b" macro and localtime from a milter.

A quick summary of the 41k+ total messages logged from two different servers: 2800+ (almost 7%) have the value of the b macro 2+ days prior to localtime (the difference is at least 2.1 days to as much as 5.8 days). The difference between the b macro and localtime for the remainder (93%) of the messages is less than 230 seconds.

Doing a spot-check of the final Received header generated by sendmail (after the emails have been forwarded on to an internal Exchange server) shows that the date is within a couple seconds of localtime.

I am unable to determine any pattern for why the b macro is so far off. From a spot-check, the majority of the messages with the largest difference are all valid (ham) emails.

I can potentially upload a CSV file showing the dates and ident if it would be helpful. Any suggestions on how to further track this problem down? It almost appears to be a bug within sendmail's milter system, but that is beyond what I would be able to troubleshoot.

Stuart Schneider <helpdesk>
Wed 05 May 2010 10:45:30 AM UTC, comment #4:

The code in spamass-milter is basically this:

So you want to check the state of the `b' macro and the value of localtime and see if either or both look suspicious.

Paul Howarth <pghmcfc>
Tue 20 Apr 2010 09:32:57 PM UTC, comment #3:

That comment was from me - I've apparently rememberd the original account I had setup here.

Stuart Schneider <helpdesk>
Tue 20 Apr 2010 09:30:41 PM UTC, comment #2:

Yes, this is in my sendmail.mc (which builds the sendmail.cf):

define(`confMILTER_MACROS_ENVRCPT',confMILTER_MACROS_ENVRCPT`, b, r, v, Z')dnl

That generates this in the sendmail.cf:

O Milter.macros.envrcpt={rcpt_mailer}, {rcpt_host}, {rcpt_addr}, b, r, v, Z

I have a few milters which I wrote some time ago that use the other macros.

Sendmail is sendmail-8.13.8-2.el5 - the most recent RPM version from the official CentOS repository.

I'll see if I can cobble together a milter to log the value of the b macro for each message. Other than that - any suggestions for what additional information would be useful to collect?

Stuart <schneis>
Mon 19 Apr 2010 08:35:43 PM UTC, comment #1:

Do you have the `b' macro included in confMILTER_MACROS_ENVRCPT? If so, the milter gets the date from sendmail via that macro, else it generates it from the local time on the machine.

Paul Howarth <pghmcfc>
Wed 14 Apr 2010 04:32:11 AM UTC, original submission:

Had originally thought that this was a bug with SpamAssassin until testing finally showed that the date in the Received header by the milter is incorrect.

Full details are in the SA bug here:

Essentially, on some emails the date in the Received header that SpamAssassin sees is off by several days.

The version of spamass-milter is the most recent from RPMforge/DAG (spamass-milter-0.3.1-1.el5.rf).

Stuart Schneider <helpdesk>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by schneis (Posted a comment)
  • -unavailable- added by pghmcfc (Posted a comment)
  • -unavailable- added by helpdesk (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    No Changes Have Been Made to This Item

    Back to the top

    Powered by Savane 3.1-cleanup1