From cb10a4bf39a4319ce7b5c19eb4e70095bcde1fc2 Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Sun, 25 Aug 2013 12:48:31 -0400 Subject: [PATCH] Handle a few more input line types; quote other From lines. --- mailman-archive-create-real-mbox.plx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mailman-archive-create-real-mbox.plx b/mailman-archive-create-real-mbox.plx index bbe5a76..03640e2 100755 --- a/mailman-archive-create-real-mbox.plx +++ b/mailman-archive-create-real-mbox.plx @@ -22,10 +22,13 @@ use strict; use warnings; while (<>) { - if (/^From\s+(\S+)\s+at\s+(\S+)\s+(.+)$/) { + if (/^From\s+(\S+)(?:\s+at\s+|\@)(\S+)\s+(.+)$/) { print "From ${1}\@${2} ${3}\n"; + } elsif (/^From\s+=\?ISO\S+\s+(Mon|Tue|Wed|Thu|Fri|Sat|Sun)/) { + print $_; } elsif (/^From\s+/) { - die "invalid from line $_"; + warn "just quoting line $_"; + print ">$_"; } else { print $_; }