procmail
[Top] [All Lists]

Re: procmailproblem

1999-11-09 21:34:34
Kajetan Beler <kajetan(_at_)nvg(_dot_)ntnu(_dot_)no> writes:
 Thanks for a nice man page (procmail). I find
 procmail really interesting and exciting since
 it's a such a great tool. But I have one problem
 I hope you guys could help me figure out. What I
 basicly want to do is to accept on or two
 email addresses from hotmail. All the rest from
 hotmail should be deleted (/dev/null). Below is
 the idea which doesn't work. That recepie deletes
 ALL  mail from hotmail.com. 

 :0
 * ^From:(_dot_)*(_at_)hotmail(_dot_)com
 {
   0:c
   * ^From:(_dot_)olufla(_at_)hotmail(_dot_)com
   !kajetan(_at_)pvv(_dot_)ntnu(_dot_)no

Forwarding the mail to yourself will just cause a mail loop.  That's
why you didn't get any mail from hotmail.com: it was all looping and
then bouncing.  If you want to go ahead and deliver a message, either
explicitly deliver it to $DEFAULT, or just don't deliver it elsewhere
before the end of your .procmailrc file.  For example, consider the
following recipe:

        :0
        *   ^From:(_dot_)*(_at_)hotmail\(_dot_)com
        * ! ^From:(.*\<)?olufla(_at_)hotmail\(_dot_)com
        /dev/null

If the From: header contains a hotmail address, but it doesn't contain the
address olufla(_at_)hotmail(_dot_)com, then the message is delivered to 
/dev/null.
If the From: header does contain olufla(_at_)hotmail(_dot_)com then procmail 
will
continue onto the next recipe and if the message isn't delivered before
the end of the rcfile then it will end up in $DEFAULT.


Philip Guenther

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