
Summary: Procmail is an E-Mail processing utility and language. It can be used to filter incoming e-mail and process it
Procmail is an E-Mail processing utility and language. It can be used to filter incoming e-mail and process it.
Installation
To install procmail, Telnet or SSH to your Virtual Private Server and do the following:
% vinstall procmail
Configuration
The Sendmail Configuration Tools include a default sendmail configuration file to enable procmail mail filtering. The following steps will install the default procmail-enabled sendmail configuration file on your Virtual Private Server.
Connect to your Virtual Private Server via SSH or Telnet.
Install the sendmail configuration utility by entering the following command.
% vinstall sendmail
Make a back-up of your current sendmail configuration file in case you need it later.
% cp ~/etc/sendmail.cf ~/etc/sendmail.cf.old
Copy the procmail-enabled sendmail configuration file to the etc/ directory.
% cp ~/usr/local/sendmail/cf/cf/default-procmail-lda.cf ~/etc/sendmail.cf
Test to see if mail is being delivered properly. Enter the following command at the command prompt of your Virtual Private Server.
% virtual mail -s test root
When you enter this command, your cursor will move down to a blank line and wait for you to input the content of the message. A simple message such as hi is sufficient for our test. After you have entered your message, hold down the control key and press the D key to exit the mail program and send the message. The control-D combination will be represented by ^D on your screen.
You can check to see if the message was delivered properly by checking the last two lines of your messages log file.
% tail -n 2 ~/var/log/messages
The following is an example of what you might see if the message was sent.
<XX>AUG 10 14:31:24 sendmail[24923]: f8AKVOg24923: from=server, size=27, class=0, nrcpts=1, msgid=2002080231.f8AKVOg24923@yourdomain.com, relay=server@localhost
<XX>AUG 10 14:31:25 sendmail[24925]: f8AKVOg24923: to=server, ctladdr=server (1234/100), delay=00:00:01, xdelay=00:00:00, mailer=local, pri=30027 dsn=2.0.0, stat=sent
Once you have sendmail working with Procmail, you can configure your procmail configuration file by following the instructions found on the following page.
Documentation
More information can be found in the procmail man pages.
|
NOTE: All questions sent to the Support Staff with regard to Procmail configuration will be answered with a URL to this page. |