Contents


On-line Guides
All Guides
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems

How To Guides
Xen Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

 

 

Carbon Copy all Email


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 Graham.Williams@togaware.com

 
 
  Published under the terms fo the GNU General Public License Design by Interspire