Filtering and rejecting spam and virus mail with Sendmail and MIMEDefang
MIMEDefang is a software program for Sendmail mail servers, that implements anti spam, anti virus and other customisable filtering off mail.
MIMEDefang uses Sendmail’s built-in milter, or mail filter, interface to individually inspect, scan, modify and optionally reject (bounce) or discard mail as it pass through the mail server.
MIMEDefang provides an interface between Sendmail and other mail scanning software, such as SpamAssassin, and when combined with spam filtering software and antivirus software, MIMEDefang provides a complete, robust, and configurable solution for spam filtering, virus scanning and other mail filtering.
Read more about MIMEDefang at Mickey Hill.
The following example will configure a Sendmail mail server on a FreeBSD operating system. It is assumed, that Sendmail is configured and running. It is also assumed, that SpamAssassin is installed, configured and running.
- Mail, that has files with bad extensions attached, will have the files deleted and given a warning. This also count for files, that are hidden in zip archives.
- Mail, that is recognised as spam by SpamAssassin, is bounced – and not delivered to the recipient.
- Mail, that is otherwise is recognised as spam, is bounced.
You might want to go through the SpamAssassin configuration and adjust as necessary.
nano -w /usr/local/etc/mail/spamassassin/local.cf
cd /usr/local/etc/rc.d
./spamass-milter restart
Install the MIMEDefang milter.
cd /usr/ports/mail/mimedefang
make
make install
Configure the MIMEDefang filter. This is the configuration file for MIMEDefang. See our example here.
cd /usr/local/etc/mimedefang
nano -w mimedefang-filter
Configure the MIMEDefang milter to use the filter.
cd /usr/local/etc/rc.d
nano -w mimedefang
SUBFILTER=/usr/local/etc/mimedefang/mimedefang-filter
Start the MIMEDefang milter.
cd /usr/local/etc/rc.d
./mimedefang start
ps aux | grep mimedefang
If the MIMEDefang filter is edited while running, the MIMEDefang milter must reread.
cd /usr/local/etc/rc.d
./mimedefang reread
Configure FreeBSD, so the MIMEDefang milter is started at boot time.
cd /etc
nano -w rc.conf
mimedefang_enable="YES"
Edit the Sendmail configuration and insert the MIMEDefang milter instead if the SpamAsassin milter.
cd /etc/mail
nano -w `hostname`.mc
INPUT_MAIL_FILTER(`mimedefang', `S=unix:/var/spool/MIMEDefang/mimedefang.sock, F=T, T=S:5m;R:5m')
make
make install
make restart
View the mail log – and compare the amount of spam mail after the change. You might want to measure the amount of delivered mail and the amount of rejected mail. The FreeBSD system mail log is per default stored for a weak, which makes it possible to compare over the days.
tail -f /var/log/maillog
In this example, we will describe how to backup the files or contents of a home directory on an
In the Ubuntu operating system, you can use keyboard shortcuts to insert special characters, such as the check mark symbol (✔) or the Euro currency symbol ().
On many internet forums, you will find users of the Dell Laser Printer 1710n, that reports, that the printer will not print. On the homepage of the printer, the following error message is shown. The message remains the same even after inserting a new cartridge.