GNU/Linux Desktop Survival Guide
by Graham Williams
Carbon Copy all Email
For the especially cautious, or for when setting up
procmail and testing it, you may want to keep a copy
of every email that comes through. The first recipe might then be:
:0 c: .incoming.`date +%Y.%m`/
All recipes are introduced with the :0. This can be followed by flags to control how the recipe works. The c flag above indicates that the email message is to be processed further by this specific recipe, but also a copy is to be pushed through to the remainder of the recipes within the .procmailrc file. The final : indicates that while procmail is processing the email message with this recipe, the recipe should be locked (so that no other procmail can write to the specified file at the same time).
After introducing the recipe with the :0 line, the next line in the above example is the action to be performed. In this case a file name is specified, beginning with a full stop and calling on the operating system to provide a current year and month string (e.g. 2006.01).
Copyright © 1995-2006 [email protected]