procmail
[Top] [All Lists]

Re: sandbox question

2004-07-15 11:29:28
At 08:22 2004-07-15 -0500, Chuck Campbell wrote:
I've got a problem with a mailing list. Some messages are not being caught by my .procmailrc recipes, and end up in my main in-box.

Depending upon how much mail you get, it could be a matter of simply setting up a logfile and setting VERBOSE=YES, then checking the logs after you find a mis-categorized message. No sandbox.

to set up a sandbox, or can I just use formail to pass the problem messages
through a (modified) procmailrc recipe file with some added logging?

One of the intents of a sandbox is to minimize - and ideally, completely eliminate - the need for changes to your recipes in order to test them. If you set up the sandbox framework to match that of your main procmailrc (in which I don't perform any of my actual mail filing, just perform variable definitions and other prep work and then use INCLUDERC to bring in the actual recipes), then you can move recipes from your live configuration into your sandbox and use formail to throw a reprocessed mailbox at it. My sandbox redefines SENDMAIL and uses an external script, so anywhere it might forward or perform an autoreply, no message is actually submitted to the mail system. The output dir for messages is similarly redefined.

For a sandbox to be a near-transparent testing environ, you'll need to structure your procmailrc - something from what I've seen, many people don't spend much time doing. Those who are disciplined enough to maintain structure have the benefit of fewer problems because the flow through their procmailrc is clearer.

You should use variables to define directories, so that they can be easily redefined (then your tests don't dump their output into your regular mail directory).

I'm off to look at what it takes to set up a sandbox, just to learn.  If I'm
correct in what that entails it is a bit of overkill for my current problem.

Check the link in my .sig, which presents a complete sandbox, with downloadable files. The key thing is that the sandbox needs to mimic your existing structure (or, if you find that the sandbox defines structure where you have none, you should consider borrowing some of that structure so that your own procmailrc is improved - though doing that in the midst of trying to solve a problem isn't the best idea, since a few wrong changes can cause more trouble).

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.


____________________________________________________________
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>