Documentation for mfilter configuration

NOTE: Before modifying any file please check in current version of file.

Documentation for configuring mfilter
_____________________________________

1] Kill savemail (savemail's pid can be found using ps command)

2] edit root's crontab entry and comment lines for
i) savemailctl
ii) sendcopy

NOTE: crontab can be edited using following command

# crontab -e

3] Stop sendmail using following command

/etc/init.d/sendmail stop

4] copy mfilter.tar to /var/tmp/

5] untar mfilter.tar using following command

tar -C / -xvpf /var/tmp/mfilter.tar

6] Edit /etc/mail/mfilter.cf.
add or modify BACKUP: parameter.
It should be comma separated list of email addresses to which
backup of mail should be sent.

Eg: BACKUP: backup@starcomsoftware.com,mailbac@starcomsoftware.com

7] Start mfilter using following command

/usr/sbin/mfilter

Note: This needs to be done because when sendmail starts it expects
Mfilter to be running. Later we are going to insserv the mfilter,
so that it starts before sendmail at startup.

8] Edit /etc/mail/merce.mc file and add following entry:

INPUT_MAIL_FILTER(
`filter1',
`S=inet:1234@localhost, F=T, T=C:1m;S:30s;R:6m;E:1m'
)dnl

9] Edit /etc/mail/merce.mc

i) Change value of `confCON_EXPENSIVE' from `True' to `False'.
ii) Delete following lines,

MODIFY_MAILER_FLAGS(`SMTP',`+e')dnl
MODIFY_MAILER_FLAGS(`UUCP',`+e')dnl
MODIFY_MAILER_FLAGS(`ESMTP',`+e')dnl

iii) Edit MODIFY_MAILER_FLAGS(`CYRUSV2',`+we')dnl to remove 'e' from
`+we' now line will look like

MODIFY_MAILER_FLAGS(`CYRUSV2',`+w')dnl

10] Generate sendmail.cf file from merce.mc using following command

m4 /etc/mail/merce.mc > /var/tmp/sendmail.cf

11] Using vimdiff command verify that new sendmail.cf has changes related
to mfilter only. If there are any other changes like DS or Mail Size
those should be taken care of. If every thing is correct move new sendmail.cf
to /etc using following command and proceed

mv /var/tmp/sendmail.cf /etc/

12] Start sendmail using following command

/etc/init.d/sendmail start

13] Edit /etc/init.d/sendmail file append ' mfilter'(note space before mfilter) at the end of
"Requred-Start: " parameter.

14] Give following command, so that after next restart mfilter start before sendmail:
insserv /etc/init.d/mfilterd

TESTING:

1] Using telnet verify that mfilter is accepting connection.

telnet localhost 1234

2] Send a test mail using telnet.

3] Check /var/adm/log/mail.log file. It should contain log with tag mfilter.
Also you should see mail to backup address you have specified in mfilter.conf
file.