next up previous contents index
Next: mail Up: .forward and .procmailrc Previous: .forward files   Contents   Index


.procmailrc files

The .procmailrc file can do everything that the .forward file can do, but the .procmailrc file has a few added options. Here is the simple email forwarding:

:0
! mike@bob.org

Extra recipients can be added easily:

:0
! mike@bob.org

:0
! bob@bob.org

When you write your .procmailrc or .forward file you should make sure that you do not loop the message. If the message gets sent back to your self that could cause problems. Now for sending mail to a file:

:0
mbox

Sending a message to a program is the basically the same as in the .forward file:

:0
|/home/bob/mailfilter.pl

Now that you have the basics, you can add options to sort your mail. To forward mail with mike in the subject line to Mike use these lines:

:0
* ^Subject:.*mike
! mike@bob.org

If you are having problems with getting mail forwarded to you that you do not want, you can trash it like this:

:0
* ^To:.*specialoffer@maileveryone.com
/dev/null

If you would like to learn more about .procmailrc and the options that you have, look at the man page:

bash$ man procmail


next up previous contents index
Next: mail Up: .forward and .procmailrc Previous: .forward files   Contents   Index
Joseph Colton 2002-09-24