procmail
[Top] [All Lists]

Re: How do I match from a tedt file?

2002-08-12 06:02:03
Mike Jackson wrote:

Hi,
 This might work for you, something I found searching google and
modified slightly for my own testing:

FGREP=`which fgrep`
FROM=`formail -x From:`
REC=`formail -x Received:`

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

 Let me know how it works for you.

That almost worked. The only two problems are:

1) It keeps giving the message 'wordlist too large' whenever the list of names
in the file exceeds 315 or so. Putting WORDLIST= 8000, 16000 or 200000 does not
seem to change this behaviour at all. This seems to be a procmail problem, as
fgrep has no problems with a file of this length.

I produced my white.list from a list of the people I have emailed in the past.
That is just over 500 entries, but I suppose that since the problem occurs at
315 (or was it 316) entries, putting them into two files would do for a while
and 3 files for a long time ahead.

Perhaps it is possible to recompile procmail, changing a value, to circumvent
this problem??? Can anyone suggest if this is possible and if so how.

2) It does match on people with longer email addresses, than those in
white.list.  Hence if fred(_at_)sun(_dot_)com is in my white.list, so 
fredsmith(_at_)sun(_dot_)com
would be accepted too. This is not such a hassle.

I've only tested it from one account, so have not tried it with a range of
sender addresses, but it looks simple and reasonably effective.

--
Dr. David Kirkby,
Senior Research Fellow,
Department of Medical Physics,
University College London,
11-20 Capper St, London, WC1E 6JA.
Tel: 020 7679 6409 Fax: 020 7679 6269
Internal telephone: ext 46409
e-mail davek(_at_)medphys(_dot_)ucl(_dot_)ac(_dot_)uk


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail