[H-GEN] Procmail testing
Christopher Biggs
listjunkie at pobox.com
Tue Jan 6 19:09:56 EST 2004
Jason Parker-Burlingham <jasonp at panix.com> moved upon the face of the 'Net and spake thusly:
> Greg Black <gjb at gbch.net> writes:
>
>> Yes, I think I advocated a test account myself -- and it's the
>> only way to test stuff that could easily see you losing actual
>> email that you wanted if you make some little mistake.
>
> This really, really demonstrably did not work for me a few weeks ago.
> I was doing a little work to whitelist addresses to save on CPU time
> and improve bogofilter's filtering[1]. I created and tested the rule
> on my own account by using formail to redeliver messages; it worked
> fine.
One further refinement is to add a backup folder, which holds a copy
of the last N messages. Adjust N to suit your paranoia factor.
--------------- begin .procmailrc excerpt ---------------------------
# Two safety-net rules so that if any of my new rules go haywire, mail will
# not be lost, provided I catche the error within N messages:
#
# Put a copy of all messages in the directory folder "backup"
# You must create this directory ($MAILDIR/backup) manually!
#
:0 c
backup
#
# Whenever a message is received, after it is added to the backup folder
# above, cd into that directory and delete all but the 256 most recent
# messages.
:0 ic
| cd backup && /bin/rm -f dummy `ls -t msg.* | sed -e 1,250d`
----------------- end .procmailrc excerpt------------------------------
As always, my entire .procmailrc (now a bit behind the state of the
art in many ways, but still under active use and development) is
available from an autoresponder at <mailto:unixbigot at pobox.com?Subject=sendprocmail>.
--cjb
More information about the General
mailing list