procmail
[Top] [All Lists]

Re: Recipe failing....Why?

2008-07-08 08:14:30
Jim Seavey <procmail(_at_)norseaodyssey(_dot_)com> writes:

My point is that if you're going to trash messages, reserve that
action for AFTER you know something works properly.  Seeing a recipe
that isn't working right *AND* seeing /dev/null as the action throws
warning flags - 
in your case, you were NOT matching - but what if your logic were
hosed and the problem was that you were matching EVERYTHING?

Right you are.

That is exactly why I archive the most recent 1000 email messages for
each user. This is done BEFORE any recipes are run against
anything. If a Procmail recipe gets screwed up the email for a week,
more or less, is available for them to sort through.

Thanks again for responding...


Sounds like what Sean is working up to is suggesting you try your
recipes in a sand box.

Set up a test directory and run a number of those kind of messages
(from your stash of 1000 per user ) thru the test procmailrc.

Edit the .procmailrc so that mail is sent into the test directory
only.

A command like this will send the test mail thru

cat testArchiveIncludingKnownSpam|
    formail -e -s procmail -m ${HOME}/SandboxDir/.testprocmailrc

(The command above assumes a mbox style test archive and can of
course. be done without the `cat' by using the direct `< 'tool.  I use
cat because its easier to tell whats going on at a glance)

Be sure to edit you .testprocmailrc so that mail is not sent to real
mailboxes. 


My testprocmailrc begins like this... fill in the `my' variables to
point to your sandbox

  #shell-script-*--
  PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin
  SHELL=/bin/sh
  MAILDIR=$mysandbox/spool
  LOGFILE=$mysandbox/.log
  ORGMAIL=/$mysandbox/"$LOGNAME"
  DEFAULT=$ORGMAIL
  VERBOSE=YES 
  
  [...]

(Look up the uppercase variables in procmail man pages for more
information.  Be sure to use VERBOSE=YES.)

With this kind of setup you can experiment quickly and be sure your
recipes are working to your liking before putting them into
production.

Suggestion:

Unless you have more than 100 users it might be wise to
increase the stash to 5000.  I've found you can get enough penis
enlargment and cialis mail to sink a battle ship pretty quickly.  So a
real mail can be hidden under an avalanche of bunkem.

On a single user machine (My own desktop) I keep about 50,000 stash
and only go to /dev/null after a lengthy test of recipes.

I do use a cron script to delete the oldest in the stash every week,
keeping it at or a little above 50,000

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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