Go to TogaWare.com Home Page.
GNU/Linux Desktop Survival Guide
by Graham Williams
Google

Forwarding Email


Forwarding Email

We can specify exactly which emails we wish a recipe to apply to. We do this for a recipe which will forward email on to another user, as well as keeping a copy for ourselves:

:0 c
* ^From.*abc.com
! abcmail@togaware.com

Lines beginning with * allow us to identify email messages to which the recipe should apply. This example forwards any email from particular users (any email from anyone with an email address that has the string abc.com in it), onto another user (abcuser@togaware.com). You can have a comma separated list of email addresses on to which the email should be forwarded.

With this recipe the recipe introduction uses the c flag to pass the email message on to following recipes as a carbon copy. Also, there is no trailing colon, so we are not requesting a lockfile for this recipe--in this case we don't need to use a lockfile because two instances of procmail will not interfere with each other when the action is to send the email on to someone else.

Copyright © 1995-2014 Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware.