Handle a few more input line types; quote other From lines.
This commit is contained in:
parent
3ac906d197
commit
cb10a4bf39
1 changed files with 5 additions and 2 deletions
|
@ -22,10 +22,13 @@ use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
while (<>) {
|
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";
|
print "From ${1}\@${2} ${3}\n";
|
||||||
|
} elsif (/^From\s+=\?ISO\S+\s+(Mon|Tue|Wed|Thu|Fri|Sat|Sun)/) {
|
||||||
|
print $_;
|
||||||
} elsif (/^From\s+/) {
|
} elsif (/^From\s+/) {
|
||||||
die "invalid from line $_";
|
warn "just quoting line $_";
|
||||||
|
print ">$_";
|
||||||
} else {
|
} else {
|
||||||
print $_;
|
print $_;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue