procmail
[Top] [All Lists]

Getting receptor with formail

1997-04-18 06:23:00
Hello!
        Here we have an account which receives mail from various aliases.
Then, I must modify the subject so the new one read: [$BANNER] $SUBJECT.
But $BANNER = echo $RECEPTOR | cut -d"@" -f1 | cut "<" -d2

If I use " $RECEPTOR=`formail -zx "To:"` " $RECEPTOR is OK 
If I use " $RECEPTOR=`formail -zx "To:" | cut -d"@" -f1 | cut"<" -d2` "
then $RECEPTOR is EMPTY :(

And what happends if $RECEPTOR is in Cc: or in Bcc:

Is there any manner to acomplish this using $MATCH (i.e. 

SUBJECT=`formail -zx "Subject:"`

:0 f
* ^TO_\/$RECEPTOR
| $BANNER=[`echo $MATCH | cut -d"@" -f1 | cut -d"<" -f2`] formail \
-I"Subject: $BANNER $SUBJECT"

:0 
* ^TO_receptorN
! finalN1 finalN2

Could this or anything else work?
TIA,
        Gerardo

<Prev in Thread] Current Thread [Next in Thread>