procmail
[Top] [All Lists]

Few misc questions.

2004-02-05 17:59:39
hi,
  I've got Postfix/Procmail and Spammassassin + Nancy McGeough's
virussnag.rc script, which is all working pretty well.  I'm amazed at
how much can be done with Procmail.   I have a few questions, nothing
heavy, maybe someone could answer.  ( I've included my simple
..procmailrc file below )


1.  All my mail that isn't tagged by SA and deposited in a special file
is sent to a maildir/ type folder.  Because my virus stuff plus the SA
stuff are in a regular MH style file, I used the :0 : format telling
procmail to use a lockfile on these files only.  I assume this is
proper, as I see no need to use maildir/ format style directories to
deposit spam and viruses.  While i go to the trouble of scanning these
files using "less" to make sure I'm not getting good mail deposited
here, I have to believe there's an easier way.  Isn't there some mail
utility that can scan all this mail in one of these files ( one at a
time, all, whatever)  and lay it out neatly so I can see what type of
mail is in there?  ( I did try "mailstat", it's kind of a "busy"
display)

2.  Because I subscribe to three maillists, which can involve a lot of
mail, I don't think it's necessary to have Procmail force each maillist
email to go through the SA and Virus checks.  I think it would be much
more efficient if I could tell Procmail that if any email is from one of
these three maillists, just bypass all these checks and deposit it in my
regular Inbox.   Does anyone know of some sample code somewhere that
will accomplish this?  I came up with this outline:

The first block says (I think...) "If this email is NOT one of these
three mailing lists, then execute the code between the braces {}.

:0 :
* !1^0 IsThisProcmailList?
* !1^0 IsThisPostFixList?
* !1^0 IsThisEvolutionList?
{
  Virussnag.rc code
  Spamassassin checks
}

   What's a fairly bulletproof way to snag mail from a mailing list? 
I'm a little confused over the special variables that can be used just
for a mailing list, truth be told.

3. Last question.   These spammers are getting sneakier.  They used to
use just .exe attachments, now, among others, they use my old reliable
..zip extension as well.  So virussnag.rc can snag these also, no
problem, but I thought it would be wiser to use a conditional statement
somehow that said, basically, "Check this list, and if this file with
the .zip attachment is from anyone on this list, then let it in".
Most of my zipped up stuff comes from business associates, so I do want
to receive these mails, but I could be dealing with any of 20 different
addresses on my "allow" list.  Would it be easier to use an external
file instead?  Does anyone have any ideas on how to code this?

Thanks for this really cool piece of software,
Robert

# Configuration parameters

SHELL=/bin/bash
PATH=$HOME/bin:/bin/:/usr/bin:/usr/local/bin

LOGFILE=$HOME/procmail.log
VERBOSE=0

# These must be set if using Maildir/ style mailboxes
MAILDIR=$HOME/Maildir/
DEFAULT=$HOME/Maildir/
VIRUSFILE=$HOME/virus

SENDER=$1
SHIFT=1

INCLUDERC = $HOME/virussnag.rc

# Until now, mail is untagged, you may add rules for
# mail that must not be tagged.

:0fw
* < 256000
| /usr/bin/spamc

# Now mail is tagged by Spamassassin
# You may insert other rules here.

:0 :
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
red-spam

:0 :
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
blue-spam

:0 :
* ^X-Spam-Status: Yes
probably-spam

:0
* ^^rom[ ]
{
  LOG="*** Dropped F off From_header!  Fixing up. "

  :0fhw
  | sed -e 'ls/^/F/'
}



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