procmail
[Top] [All Lists]

Re: Newbie needs help

2003-02-06 13:23:31
On Thu, 6 Feb 2003, Ruud H.G. van Tol wrote:

I assume there is more in your .procmailrc than just the above, 
lines like 'SHELL=/bin/sh' and 'LOGFILE=$HOME/pm.log' and 
'MAILDIR=$HOME/mail'.

Yes, there is.  I just wanted to get to the meat of the problem.

A first rewrite (untested):
  :0:
  * ! ^From:.*(\
        (email1|email2|friend)@hotmail\.com|\
        (email3|somebody)@yahoo\.com|\
        friend(_at_)aol\(_dot_)com|\
        (brother(_at_)serv|sister(_at_)qwest)\.net|\
        @somemailinglist\.com|\
      @@)
  * ! ^Sender:.*procmail-admin@
  * ! ^Subject:.*[CyberDojo]
  * ! ^TO_(myaddress1|myaddress2)@domain1\.tld
  Spam

David Tamkin spoke of some logic problems I had in my original conditions 
so I have had to re-write them a bit.  It still needs to be tested, 
though.  Keep in mind the actual email addresses are place-holders for the 
real ones, of course :)

#
# Any email not being sent from/to/subject lined with one of the following
# is sent to the Spam folder
#

:0:
* !^From:(_dot_)*email1(_at_)hotmail(_dot_)com
* !^From:(_dot_)*email2(_at_)hotmail(_dot_)com
* !^From:(_dot_)*email3(_at_)yahoo(_dot_)com
* !^From:(_dot_)*somebody(_at_)yahoo(_dot_)com
* !^From:(_dot_)*friend(_at_)aol(_dot_)com
* !^From:(_dot_)*friend(_at_)hotmail(_dot_)com
* !^From:(_dot_)*brother(_at_)serv(_dot_)net
* !^From:(_dot_)*sister(_at_)qwest(_dot_)net
* !^To:(_dot_)*procmail(_at_)lists(_dot_)rwth-aachen(_dot_)de
* !^Subject:.*CyberDojo
* !^From:(_dot_)*(_at_)somemailinglist(_dot_)com
Spam

Thus,
If the email is not from this person,
and is not from this person,
and is not from this person,
<etc>
and is not sent here,
and does not have a subject line containing this
then send it to the Spam folder

But From:'friend(_at_)aol(_dot_)com(_dot_)cn' will not go to Spam.

So how would I go about processing such an email?


-- 
Phuc Tram
Master Pivot - Wielder of the Coherent Light Bokken
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
pivot(_at_)CrystalTokyo(_dot_)com


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

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