Top Document: Filtering Mail FAQ Previous Document: 2.1.1 Is Procmail on Your System? Next Document: 2.1.3 Testing See reader questions & answers on this topic! - Help others by sharing your knowledge 2a] Create ~/.procmailrc. cd pico .procmailrc NOTE: Throughout this article I use pico for editing files. Replace `pico' with your editor. 2b] Enter a modified version of the following in your ~/.procmailrc. Note that lines that begin with # are comments and are ignored by procmail. #Set on when debugging VERBOSE=off #Replace `mail' with your mail directory (Pine uses mail, Elm uses Mail) MAILDIR=$HOME/mail #Directory for storing procmail log and rc files PMDIR=$HOME/.procmail LOGFILE=$PMDIR/log INCLUDERC=$PMDIR/rc.testing INCLUDERC=$PMDIR/rc.maillists 3] Create the directory where you will store your procmail log and rc files (this is $PMDIR that you set above). cd mkdir .procmail 4a] Create an rc (run commands) file for testing: cd .procmail pico rc.testing 4b] Enter the following in ~/.procmail/rc.testing: :0: * ^Subject:.*test IN.testing Note that the first line contains a zero (0), not the letter "oh". For now, don't worry about the meaning of this recipe. It is explained in 2.3 "Explanation of Test Recipe." 5a] Create a ~/.forward file by typing the following. (Pico's -w flag tells pico not to auto wrap lines.) cd pico -w .forward 5b] Enter a modified version of the following in your ~/.forward: "|IFS=' ' && exec /usr/local/bin/procmail -f- || exit 75 #nancym" == IMPORTANT NOTES == * Make sure you include all the quotes, both double (") and single ('). * The vertical bar (|) is a pipe. * Replace /usr/local/bin with the correct path for procmail (see step 1). * Replace `nancym' with your userid. You need to put your userid in your .forward so that it will be different than any other .forward file on your system. * Do NOT use ~ or environment variables, like $HOME, in your .forward file. If procmail resides below your home directory write out the *full* path. 5c] On many systems you need to make your .forward world readable and your home directory world searchable in order for the mail transport agent to "see" it. To do this type: cd chmod 644 .forward chmod a+x . User Contributions:Top Document: Filtering Mail FAQ Previous Document: 2.1.1 Is Procmail on Your System? Next Document: 2.1.3 Testing Single Page [ Usenet FAQs | Web FAQs | Documents | RFC Index ] Send corrections/additions to the FAQ Maintainer: FAQ Editor <faq-editor@ii.com>
Last Update March 27 2014 @ 02:11 PM
|
Comment about this article, ask questions, or add new information about this topic: