Milter
From Wikislax
What is Milter ?
The Milter (mail filter) interface of the sendmail program affords calling plugins to filter bounce or modify mails while they are being received. Sendmail must have been compiled with the Milter DEFINE.
Installing Milter
Build libmilter, and verify that mailstats, makemap, and smrsh are already in place :
# /etc/rc.d/rc.sendmail stop # cd /usr/local/sendmail-* # cd libmilter # sh Build # sh Build install # cd .. # cd mailstats # sh Build # sh Build install # cd .. # cd makemap # sh Build # sh Build install # cd .. # cd smrsh # sh Build # sh Build install # cd ..
Install headers and libraries for MIMEDefang. The name of the Linux directory will actually depend on your specific installation :
# mkdir -p /usr/local/include/sendmail # cp -R include/* /usr/local/include/sendmail/ # cp -R sendmail/*.h /usr/local/include/sendmail/ # cp obj.Linux.2.6.37-jpm1.x86_64/*/*.a /usr/local/lib64/
Configuring Milter
Add the INPUT_MAIL_FILTER macro to sendmail.mc to send all mails trough the specified filter :
# cd /usr/local/sendmail-*/cf/cf # vi sendmail.mc a INPUT_MAIL_FILTER(`mimedefang', `S=unix:/var/spool/MIMEDefang/mimedefang.sock, F=T, T=S:5m;R:5m')dnl <esc> :x # m4 ../m4/cf.m4 sendmail.mc > sendmail.cf # cp sendmail.mc /etc/mail # cp sendmail.cf /etc/mail
/etc/mail/local-host-names should have the following lines :
# local-host-names - include all aliases for your machine here yourcompany.com mail.yourcompany.com
Running Sendmail with Milter
As we have installed and configured SpamAssassin, ClamAV and MIMEDefang previously, all the pieces are now in place and ready to interlock. Just restart sendmail :
# /etc/rc.d/rc.sendmail start Starting mimedefang-multiplexor: [ OK ] Starting mimedefang: [ OK ] Starting sendmail MTA daemon: /usr/sbin/sendmail -L sm-mta -bd -q25m Starting sendmail MSP queue runner: /usr/sbin/sendmail -L sm-msp-queue -Ac -q25m root@inner:/etc/rc.d#
| MIMEDefang | Main Page | MySQL |