[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [msmtp-users] How is Date header supposed to be added?



On Thu, 16 Feb 2012 19:23:33 -0500, Joshua Pettett wrote:
> vixie-cron and mailx seem to expect the local MTA/MSA to add the
> Date: header to outgoing mail, as sendmail and ssmtp do.  Is there a
> way to get msmtp to do so, or a best practice I am missing here?

Currently msmtp does not do this; it assumes that either the user agent
or the MTA at the SMTP server does it (or that it is ok to not have
a Date header).

A wrapper script should work:
----------
#!/bin/sh
formail -b -f -a "Date: `date -R`" | msmtp "$@"
----------

Martin