FromTo: not working?
Jan-Peter Koopmann
Jan-Peter.Koopmann at SECEIDOS.DE
Mon Mar 10 11:42:25 GMT 2003
> I was quite surprised to see that $msg->(from) included the
> '<' and '>'.
Quick fix in Exim.pm:
--- Exim.pm.orig Mon Mar 10 12:34:20 2003
+++ Exim.pm Mon Mar 10 12:39:25 2003
@@ -255,7 +255,13 @@
chomp(($metadata{user},$metadata{uid},$metadata{gid}) = split / /,
<$RQf>);
# envelope-sender (in <>)
chomp($metadata{sender} = <$RQf>);
- $message->{from} = lc $metadata{sender};
+
+ $from = lc $metadata{sender};
+ $from =~ s/^<\s*//; # leading and
+ $from =~ s/\s*>$//; # trailing <>
+
+ $message->{from} = $from;
+
# time msg received (seconds since epoch)
# + number of delay warnings sent
chomp(($metadata{rcvtime},$metadata{warncnt}) = split / /, <$RQf>);
This seems to work here but I am not sure about other implications (esp.
for Exim3). Could someone with more Exim experience please have a look
at this?
Regards,
JP
More information about the MailScanner
mailing list