Apologies if this is a repost, it looks like launchpad ate my last post: This is still an issue for me on Ubuntu Noble.
Although the original author of this bug thought it was fixed in GNU mail 3.14 (and GNU mail maintiners also likely thought this was fixed there), the latest activity on the upstream bug (https://savannah.gnu.org/bugs/?61239) was in 2024-10, indicating the fix would be in a later version than 3.14. To speak to the issue here's what I've reproduced on Ubuntu Noble / 24.04. This is on an openstack VM, configured with timezone of Pacific/Auckland (ie UTC+12 in winter, UTC+13 in summer). The following command exhibits the bug: `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: by setting the TZ to UTC, 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 a very unlikely bug, 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. 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. Because it relates to the same upstream bug, is it more relevant to reopen this bug, or create a new one? Kind regards, Pete. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1956850 Title: Please upgrade to GNU mailutils 3.14 to fix incorrect time zones in Date headers of sent messages To manage notifications about this bug go to: https://bugs.launchpad.net/mailutils/+bug/1956850/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
