HP-UX Mailing Solutions White Paper

Procmail Support
Procmail is a mail delivery agent (MDA) or mail filter to process incoming emails. It is invoked
from an MTA like Sendmail or Postfix.
Procmail provides the following features:
Creates mail-servers and mailing lists
Sorts incoming mail into separate folders or files
Preprocess email, start any programs upon mail arrival (for example, to generate different
chimes on your workstation for different types of mail) or selectively forward certain
incoming mail automatically.
Configuring Procmail with Sendmail on an HP-UX System
This section discusses the prerequisites and procedure to configure Procmail with Sendmail on
an HP-UX system.
Prerequisites
Following are the prerequisites for configuring Procmail:
The Sendmail 8.13.3 software
NOTE: Sendmail 8.13.3 is available in the core HP-UX 11i v3 operating system.
The Procmail software
NOTE: You can download the latest version of Procmail (A.11.00-3.22.002) from http://
www.software.hp.com.
Configuring Procmail on an HP-UX system
Follow this procedure configure Procmail on an HP-UX system:
1. Create a .forward file for the superuser. The .forward file must mention that incoming
mail from Sendmail be processed by the Procmail program:
# echo "|exec /usr/bin/procmail" >> /.forward
NOTE: For a normal user, add the .forward file under the users home directory:
#su <username>
#pwd
/
# echo "|exec /usr/bin/procmail" >> /home/<username>/.forward
2. Change the permission for the .forward file:
# chmod 644 /.forward
3. Change the ownership for the .forward file:
# chown <username> :users .forward
4. Create the procmail.rc file that contains the rules for the Procmail filtering:
# cat /.procmailrc
:0:
* ^Subject:.*test
<folder-name>
This forwards the mails with subject line containing the keyword test folder to
folder-name.
Anti-Spam and Anti-Virus Solutions in HP-UX Sendmail 35