Public bug reported: This was previous reported on bug 1956850 (recently closed)
Although the original author of that bug thought it was fixed in GNU mail 3.14 (and GNU mail maintainers also likely thought this was fixed there), the latest activity on the upstream bug (https://savannah.gnu.org/bugs/?61239) was in 2024-10, the actual fix seems to be on 3.18. Here is what I've reproduced on Ubuntu Noble / 24.04. On an openstack VM, configured with timezone of Pacific/Auckland (ie UTC+12 in winter, UTC+13 in summer), `date; echo "Test email body"|mail -s testemailsubject [email protected]`. That command outputs the timestamp (eg Thu Jul 3 09:48:16 NZST 2025), and sends an email. The bug is that my email client displays this email as being sent from the future, and my work's mailserver marks the email as spammy/suspicious by virtue of the same. In the email headers I can see the 'Sent Datestamp' has exactly the same: * day-of-week, * date-of-month,\ * month, * year, * hour, * minute, and * second as the output by `date`, _but_ the timezone has been mangled from +1200, to -1200 ("Date: Thu, 3 Jul 2025 09:27:03 -1200") In contrast: the following command works exactly as you would expect. `date; echo "Test email body"|TZ="UTC" mail -s testemailsubject [email protected]`. In this later example, the email shows the sent date in UTC, but (accounting for timezones), that's correctly describing the moment when the email was sent. My email client shows that it was sent 'just now', and the mailserver hasn't given it a 'from-the-future' spam score. It isn't necessary to set the TZ to UTC to clear this bug (anything less than +12 seems to do the trick). I've also tested it just now by setting TZ="Australia/Sydney" (ie UTC+10 right now), and the problem doesn't exhibit then either. After midday (local time), the bug stops exhibiting, even with timezone set to Pacific/Auckland. I assume this is related to the fact that local time, and UTC have come onto the same day. Although this sounds like an unlikely bug to exhibit for 2+ years without correction, I suspect that it would affect all Ubuntu Jammy and Noble users in New Zealand, along with any others in UTC+12, UTC+12:45, and UTC+13. From asking around, it seems likely that a widespread workaround is to use a different mail sending tool than the rest of the world (bsd-mailx?) Thanks for taking a look. Kind regards, Pete. ** Affects: mailutils (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2115833 Title: mailutils mangles send time if timezone >=UTC+12 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mailutils/+bug/2115833/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
