procmail
[Top] [All Lists]

Re: Procmail Rules

2001-01-04 18:18:40
Robert Dege wrote:
:0:
* ! 
^From:(_dot_)+(_at_)*test(_dot_)com|(_dot_)+(_at_)*test1(_dot_)com|(_dot_)+(_at_)mail(_dot_)test(_dot_)com|MAILER-DAEMON
* ! ^(To:|CC:)(_dot_)+(_at_)test(_dot_)com|\
              (_dot_)+(_at_)test1(_dot_)com|\
              (_dot_)*(_at_)OpenLDAP(_dot_)org|\
              (_dot_)*(_at_)postgresql(_dot_)org|\
            procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE


Let's look at that first pattern line.

* ! 
^From:(_dot_)+(_at_)*test(_dot_)com|(_dot_)+(_at_)*test1(_dot_)com|(_dot_)+(_at_)mail(_dot_)test(_dot_)com|MAILER-DAEMON

This means: "If the line does NOT contain any of the following:
  1. a line that starts with "From:", followed by at least one
     character, followed by zero or more '@', followed by
     "test" followed by any character, followed by "com";
  2. a line that contains at least one character, followed by zero or
     more '@', followed by "test1", then any character, then "com"
     (this line need NOT contain "From:" at the beginning of the line);
  3. a line containing at least 1 character, followed by '@mail'
     followed by any character, followed by 'test' followed by any
     character followed by 'com' (this line needn't contain "From:"
     either) ;
  4. a line containing the string 'MAILER-DAEMON' anywhere on it.
" etc.

I *think* what you want is more like:

   :0:
   * ! ^FROM_MAILER
   * ! ^From:.*@(test\.com|test1\.com|mail\.test\.com)
   * ! ^TO_.*@(test\.com|test1\.com|openldap\.org|postgresql.org)
   * ! ^TO_procmail(_at_)lists(_dot_)rwth-aachen(_dot_)de
   /spam/directory/here/


This rule appears to be working great & it's stopping about 90% of the
incoming mail.  Now I know that you can't block all the SPAM, but a few
emails are getting through that shouldn't be.  Here are the mail headers
for 2 of several that got through:


Date: Thu, 04 Jan 2001 06:21:37 -0500
From: tazz101(_at_)earthlink(_dot_)net
To: undisclosed-recipients:  ;
Subject: Buffalo Bills


Is there a "Received:" header that contains "test1.com" or
"test1-com"?  (or "contest.com"?)

What does the Return-Path: say?

Finally, try doing this:

    LOGFILE=/path/to/some/global/lockfile
    VERBOSE=yes

in .procmailrc in a test account to see which recipe/test is doing
other than what you expect.

-- 
Neither I nor my employer will accept any liability for any problems
or consequential loss caused by relying on this information.  Sorry.
Collin Park                         Not a statement of my employer.
_______________________________________________
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>