From cc054ed56838e1facf493acab38a5f4f65a26104 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Mon, 31 Aug 2009 11:49:29 +0200 Subject: [PATCH] separate from email from sender --- procmail/defines | 23 +++++++++++++---------- procmail/delay-delivery | 2 +- procmail/logging | 2 +- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/procmail/defines b/procmail/defines index 32a6e8f..218ba89 100644 --- a/procmail/defines +++ b/procmail/defines @@ -121,6 +121,18 @@ INCLUDERC=$PMDIR/get-msgid *$ ^From:$RE_EXTRACT_HEADER_VALUE { FROM="$MATCH" } +:0 +*$ FROM ?? ^\/${RE_NOT_SPACE}+@${RE_NOT_SPACE}+ +{ FROMEMAIL="$MATCH" } + +:0 E +* FROM ?? ^.+ <\/[^>]+ +{ FROMEMAIL="$MATCH" } + +:0 E +* FROM ?? ^.+ \(\/[^\)]+ +{ FROMEMAIL="$MATCH" } + # if $SENDER is undefined or not an email address, get it from the message :0 * !SENDER ?? @ @@ -130,16 +142,7 @@ INCLUDERC=$PMDIR/get-msgid { SENDER="$MATCH" } :0 E - *$ FROM ?? ^\/${RE_NOT_SPACE}+@${RE_NOT_SPACE}+ - { SENDER="$MATCH" } - - :0 E - * FROM ?? ^.+ <\/[^>]+ - { SENDER="$MATCH" } - - :0 E - * FROM ?? ^.+ \(\/[^\)]+ - { SENDER="$MATCH" } + { SENDER="$FROMEMAIL" } } :0 diff --git a/procmail/delay-delivery b/procmail/delay-delivery index 339e3b6..cf4837d 100644 --- a/procmail/delay-delivery +++ b/procmail/delay-delivery @@ -16,7 +16,7 @@ :0 E * ! TICKLE ?? . -* ? echo "$SENDER" | $EGREP -qif $CONF/undelayed-senders +* ? echo "$FROMEMAIL" | $EGREP -qif $CONF/undelayed-senders { LOG="delay: do not delay mail from $SENDER$NL" } diff --git a/procmail/logging b/procmail/logging index 67d7712..2f16c83 100644 --- a/procmail/logging +++ b/procmail/logging @@ -36,8 +36,8 @@ LOG="=========================================================================== LOG="msgid: $MSGID logfile: $THISLOGFILE_REL date: $DATE (@$OURDATE) -from: $FROM sender: $SENDER +from: $FROMEMAIL ($FROM) original-to: $ORIGINAL_TO subject: $SUBJECT$NL" -- 2.39.5