HP-UX Mailing Solutions White Paper
O Milter.macros.envfrom=i, {auth_type}, {auth_authen}, {auth_ssf}, {auth_author}, {mail_mailer}, {mail_host},
{mai
l_addr}
O Milter.macros.envrcpt={rcpt_mailer}, {rcpt_host}, {rcpt_addr}
O Milter.macros.eom={msg_id}
……………………
######################################################################
######################################################################
#####
##### MAIL FILTER DEFINITIONS
#####
######################################################################
######################################################################
X<already-configured-milters>, S=local:/var/run/f1.sock, F=T, T=C:5m;S:10s;R:10s;E:5m
Xmilter-regex, S=/var/milter-regex/milter-regex.sock, F=T,
T=C:5m;S:10s;R:10s;E:5m
Add the definition of milter-regex as a milter program
7. Restart the Sendmail daemon:
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start
Verifying the Milter-Regex Configuration
Complete the following checks to verify the Milter-Regex configuration:
• Ensure that the output of the mtail command does not contain any error or warning which
indicate that Sendmail is not working properly.
• Send a test email to verify if the email is delivered properly.
• Ensure that the Regex filter program is running on the system.
#ps -ef | grep milter
root 16803 16045 0 15:42:38 pts/0 0:00 grep milter
regex 16740 1 0 15:12:34 ? 0:00 /usr/bin/milter-regex -c
/opt/iexpress/milter-regex/conf/milter-regex.conf –u
• Test the email as per the configuration file set up.
— System1: Configured as a mail server with Milter-Regex
System1# cat /opt/iexpress/milter-regex/conf/milter-regex.conf
. . .
. . .
ipfreject "IP filter reject !!!!"
body /^hotmail/
…………..
tempfail "TEMPORARY FAILURE'S TESTING"
body /^HP/ This rule mentions that any line in mail body starting with “HP” will be discarded with
temp failure
.. .
.. .
— Send a mail from System2 to System1 with following contents:
System2# sendmail -v root@System1.domain.hp.com
HP mail
. . .
root@ system1.domain.hp.com... Connecting to System1.domain.hp.com. via esmtp...
.
.
250-ENHANCEDSTATUSCODES
.
250 HELP
>>> MAIL From:<root@system2.domain.hp.com> SIZE=6 AUTH=root@ system2.domain.hp.com
250 2.1.0 <root@system2.domain.ind.hp.com> ... Sender ok
>>> RCPT To:<root@system1.domain.hp.com>
>>> DATA
250 2.1.5 <root@system1.domain.hp.com> ... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
451 4.7.1 TEMPORARY FAILURE'S TESTING As specified by the rule in regex.conf
root@inet24-ep.ind.hp.com... Deferred: 451 4.7.1 TEMPORARY FAILURE'S TESTING
Closing connection to system1.domain.hp.com.
>>> QUIT
221 2.0.0 system1.domain.hp.com closing connection
System2#
34