sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 37c5da0a9411a7192a674c4b9832c68e9b5fcc15
parent 1b2ec087af0fea5400176b3d2a1aba42ef2bb71e
Author: Sascha Silbe <sascha-pgp@silbe.org>
Date:   Thu,  8 Jul 2010 12:28:07 +0000

mbox: fix date format

The date format used in all (known/common) variations is that of Unix/POSIX
asctime(), not the RFC 822 / RFC 2822 Date: header format.

Using an incorrect date format causes at least mutt, mb2md and Python
UnixMailbox (but not PortableUnixMailbox) to either reject the mailbox or show
it as empty.

References:
http://homepage.ntlworld.com./jonathan.deboynepollard/FGA/mail-mbox-formats.html
http://www.qmail.org/man/man5/mbox.html

Signed-off-by: Sascha Silbe 

Diffstat:
M lib/sup/mbox.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb
@@ -118,7 +118,7 @@ class MBox < Source
     need_blank = File.exists?(@filename) && !File.zero?(@filename)
     File.open(@filename, "ab") do |f|
       f.puts if need_blank
-      f.puts "From #{from_email} #{date.rfc2822}"
+      f.puts "From #{from_email} #{date.asctime}"
       yield f
     end
   end