Hello:
I have a recipe:
FORMAIL=/usr/bin/formail
TRAVEL=$VPOPDIR$DOMAIN$ACCT/.travel
:0 hw
FROM=|$FORMAIL -rzxTo:|$TR / _
:0 h
* ? $GREP -i ^$FROM $TRAVEL
{
:0
.Travel/
}
This sends any e-mail with a from address that is found in the .travel
file to the Travel folder.
What I need now is a $DOMAIN variable so I can sort any mail from a
domain (listed in the file) to its folder of happiness.
I'm thinking there's some esoteric way to do this with formail and
sed, but I don't know sed well enough.
Something like ...
:0 hw
DOMAIN=|$FORMAIL and sed to find the domain.com part of the $FROM
Then I can do something like this? ...
:0 h
* ? $GREP -i ^($FROM|$DOMAIN) $TRAVEL
{
:0
.Travel/
}
I think the ^($FROM|$DOMAIN) part is actually not correct either.
Is there a real easy way to do this that I'm missing?
Thanks,
Bill
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail