Skip to content

datemail.1

Manvendra Bhangui edited this page Feb 25, 2024 · 3 revisions

NAME

datemail - insert local time in RFC 822 Date header before injecting mail

SYNOPSYS

datemail

qmail uses Greenwich Mean Time (GMT), instead of the local timezone, in any timestamps it creates. This is indicated by the "-0000" at the end of the date specification. It means "no offset from GMT". (Eastern Standard Time has an offset of "-0500" which means five hours before GMT.)

qmail uses GMT for two reasons: first, it makes it easier to track messages that pass through multiple timezones, and second, converting to the local timezone requires linking with the standard C runtime library, which DJB has gone to great lengths to avoid since it can be a source of security and reliability problems.

There are two headers fields where qmail puts a time: Received and Date.

qmail will only add a Date field to locally-injected (not SMTP) messages that don't already have a Date field. If you don't like the Date header qmail adds, either configure your mail user agent (MUA) to add them, or use the "datemail" command to inject messages instead of qmail-inject. Some people even replace /usr/bin/sendmail with a symbolic link to datemail.

Received fields are always stamped in UTC. Changing this would require a source code patch, and would be ill-advised for the reasons stated above.

SEE ALSO

predate(1)

Clone this wiki locally