Hi,
Below is my procmailrc file designed to discard all mail that is not from a
know source.
[...]
[...]
# Here is where we allow mail with the password the subject to pass through
:0:
* $ ^Subject:.*${BYPASSWD}
! smarks(_at_)ne(_dot_)highway1(_dot_)com
# Here is where we check incoming mail's address against approved list
# if address is on approved list, it's forwarded and no more recipes are
executed
# (Note: there is no c: present)
# !! for unknown reasons (to me at least) this fgrep fails when it
shouldn't...
:1
? fgrep -i -f $HOME/known.senders
! smarks(_at_)ne(_dot_)highway1(_dot_)com
Maybe you should give us a look at the structure of $HOME/known.senders.
One reason of failure could be, that fgrep is not a regex matcher... I
think, you better took one because you cannot ensure a uniform structure in
the 'from' lines.
I am not sure what this means: "regex matcher" (I know that's probably lame...)
Anyway, the known senders file is simple. It contains some text per line where
that text is either a name or a complete e-mail address.
e.g.
Stewart
smarks(_at_)foo(_dot_)com
foo.com
-------
It was my understanding that fgrep looked in the entire mail message for the
text and it there's a match the mail will be forwarded. Does fgrep only look in
a subset of the message in a specific way?
Would you recommend something other than fgrep that's more thorough?
And, btw, can anyone tell me why there is a ':1' at the beginning of this
recipe?
Sorry, I just borrowed from example code. So I don't know.
Thanks, Spencer