Hello tech@,

at present, a default welcome email is unreadable as you can check by
running 'mail -f /var/root/mail' after a fresh install, or 'mail -f
/usr/src/etc/root/root.mail'. The reason is a subtle date format bug
introduced[1] during 6.3->6.4 update, since according to RFC 4155[2],

> a timestamp indicating the UTC date and time when the message was
> originally received, conformant with the syntax of the traditional
> UNIX 'ctime' output sans timezone (note that the use of UTC
> precludes the need for a timezone indicator);

and ctime returns a string of exactly 26 bytes, and therefore requires
a space for dates with  1-9.

The attached patch fixes the bug (and also the day of the week, since Nov
1 2018 is a Thursday, not Sunday), making the welcome email readable again.

Ok?

PS. I'm pretty sure OpenBSD developers have more important fish to
fry, but I'm still excited about this "add-one-space" bug fix as my
first contribution to OpenBSD!

[1] 
https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/etc/root/root.mail.diff?r1=1.128&r2=1.129

[2] https://tools.ietf.org/rfc/rfc4155.txt

Index: etc/root/root.mail
===================================================================
RCS file: /cvs/src/etc/root/root.mail,v
retrieving revision 1.129
diff -u -p -u -r1.129 root.mail
--- etc/root/root.mail  10 Aug 2018 20:27:01 -0000      1.129
+++ etc/root/root.mail  17 Nov 2018 22:00:35 -0000
@@ -1,4 +1,4 @@
-From [email protected] Sun Nov 1 06:30:00 MDT 2018
+From [email protected] Thu Nov  1 06:30:00 MDT 2018
 Return-Path: root
 Date: Nov 1 06:30:00 MDT 2018
 From: [email protected] (Theo de Raadt)

Reply via email to