Bug 235136 - cron email header has bogus date value
Summary: cron email header has bogus date value
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.2-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2019-01-22 18:54 UTC by Mike Lempriere
Modified: 2019-01-22 18:54 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lempriere 2019-01-22 18:54:42 UTC
Obscure problem with 'cron'.

I have a script that fires hourly, normally producing no output, thus no email.  It has started reporting a problem (nothing to do with FreeBSD), thus is now emailing me output hourly.

The problem is that the email coming through my 'spamassassin' filter, is getting flagged as 'DATE_IN_FUTURE'_*.  (This forces it into the "probably spam" range.)  As time goes by, this will go up from '_06_12' to '_12_24', etc.

Looking at the Recieved: headers, it appears that the email arrives from 'localhost' with a time setting that does not change, regardless of the time the 'cron' job fired.

And, in fact, the time appears to be pretty close to the boot time of the system.

My guess is that when 'cron' builds the header of the email, for the "Date:" it's using the start time of the 'cron' daemon, instead of properly using the time of this 'cron' job.  I guess I would expect it should be using the time _now_, as opposed to the time the job was started, but I'll let you figure that out.