HP-UX Mailing Solutions White Paper

Prerequisites
The Sendmail 8.13.3 software must be installed on the HP-UX system.
NOTE: Sendmail 8.13.3 is available in the core HP-UX 11i v3 operating system.
Compiling and Installing the Filter
Follow this procedure to compile and instal the filter on an HP-UX system:
1. Write the filter program, for example milter_prog.c, according to your requirements.
For a sample filter program, see https://www.milter.org/developers/sample.
2. Compile the filter program:
# cc -I/usr/include/sendmail -o
milter_prog milter_prog.c -L/usr/lib -lpthread -lnsl -lmilter lsm
3. Run the filter program:
# ./milter_prog p local:/var/run/f1.sock &
NOTE: HP recommends that you do not run a milter program as a superuser.
Configuring Milter with the Sendmail Server
You must enable the milter feature in the Sendmail configuration file to configure milter with
the Sendmail server.
Following is the procedure to enable the milter feature in the Sendmail configuration file using
the HP-UX /usr/newconfig/etc/mail/cf/cf/gen_cf utility:
NOTE: If you have any site specific customized configuration in your /etc/mail/
sendmail.cf file, ensure that those customized changes are not lost. You can obtain a backup
of the existing Sendmail configuration file (/etc/mail/sendmail.cf) as mentioned in Step
1, so that you can revert to the original state incase of any configuration issues).
1. Obtain a backup of the existing Sendmail configuration file:
cp p /etc/mail/sendmail.cf /etc/mail/sendmail.cf.BACKUP
2. Run the /usr/newconfig/etc/mail/cf/cf/gen_cf utility:
# cd /usr/newconfig/etc/mail/cf/cf
./gen_cf
3. Select the 3: Anti Spamming Options option in the main menu.
4. Select the 6: Milter: Modify (Add/Remove/List) filters option in the sub menu
and press Enter.
5. After the submenu is refreshed, select 0: Main Menu to go back to the main menu.
6. Select the 5: Generate sendmail.cf option and press enter to generate the Sendmail
configuration file, sendmail.cf.gen with the milter program to be configured.
The following output displays the further course of action, with the user input marked in
bold:
Do you want to continue and build the confuguration file
Press any key to continue or [n/N] to unset all options
Press enter to continue.
-------------------------------------------------------------------
Name Socket Flags
-------------------------------------------------------------------
-------------------------------------------------------------------
Do you want to add a new filter.
Press [y/Y] to create new filter.
Press any key to continue.
Enter y to add the filter program provide the filter program name and the socket address, on which the
filter must listen.
------------------------------------------------------------------
Sendmail Configuration File generator :
------------------------------------------------------------------
1: General Features
26