--David Benfell wrote on 22.12.2001 02:24 -0800:
> On Sat, Dec 22, 2001 at 02:26:49AM -0600, Jeffrey Taylor wrote:
>> if ( lookup($FROM, "members-white-list")
>> {
>> ...
>> }
>>
>> Try "man maildropfilter" and search for lookup for another way to do
>> it. As an earlier post told you, your code is looking up asterisk in
>> the files. And it's not there.
>>
> Here follows everything the man page has to say about lookup:
[...have them already...]
> if ( /^To: *!.*/ && lookup( $MATCH2, "badto.dat" )
> {
> exit
> }
>
> And the file badto.dat contains the following two lines:
>
> friend@public
> ^[^@]*$
Why dont you start with this example, just invert some bits ?
> The earlier response about expr being set by the MTA makes sense if
> you let fetchmail follow the default procedure of invoking your MTA to
> deliver received mail. It would be relatively straightforward for
> maildrop to compare the contents of a variable to each line in a file
> looking for a match.
Thats exactly what lookup() does.
> But invoking the MTA to deliver retrieved mail caused me some grief a
> while ago. I don't remember what the problem was, but I don't do this
> anymore. I call maildrop directly from fetchmail.
>
> Of course the bad news is that fetchmail doesn't set a variable I can
> use for expr.
Fetchmail parses out both sender and recipient (if possible)
and you are free to push them into the environment (with env)
or add (recipient only) to the command-line of maildrop.
But maildrop will do a much better job with parsing anyway.
Check the archives a few days back, there are examples how to
invoke maildrop via fetchmail.
> And the thing is, I don't really care where in the headers the pattern
> found in the file matches. If the e-mail address in the file is
> there, anywhere in the headers, I want the test to succeed. But if I
> have to choose something, I guess the From: address will work.
Have a look at the headers, if they all have 'Return-Path:' near
the top you dont need anything else. If not nag at your provider
to get a local-delivery with rfc-compatible headers.
Roland
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users