The get_arpa_date function in mail/fmail.cpp does not
check the return status of strftime(). But strftime can
fail: in case of trouble with the locale setting it
wants to
write a warning in place of the timezone, which takes a
string that is more than 50 characters long -
the size of the buffer used by get_arpa_date. Because
the error is not caught, mail with an invalid Date field
gets sent, and may be silently trashed by a server.
Here's a modified function that defaults to GMT if it
suspects a
timezone problem and puts an arbitrary date if all
else fails. In the latter case it also pups a warning.
modified get_arpa_date function