procmail
[Top] [All Lists]

Returning a value to a recipe

2009-03-09 00:55:40

Hi

I am aware of how the basic whitelisting works from the docs on the web thus:

# whitelist
FGREP=/usr/bin/fgrep
FROM=`formail -x From:`
DEFAULT=/var/mail/cannon

:0E
* ? (echo "$FROM" | $FGREP -i -f $HOME/ok)
${DEFAULT}

However I need to do something a little different. I need to extract a customer header and look for it in a text file - so far so good. I then need to return a token from the file. For example, if my header contains 001 and the file contains:

001:fred
002:jim

I need to return the value "fred" back to my recipe.

Any suggestions please?

TIA

Nigel.


____________________________________________________________
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

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