E-mail filtering framework using Sendmail's Milter interface
Find a file
2025-07-24 21:37:37 +00:00
.gitignore Upgrade to 3.2 (#2136815) 2022-10-24 15:26:43 +02:00
9F9B564003DFF9E4D904301E3B6DDB11E78FEBD2 Switch to keys.openpgp.org 2022-10-02 22:21:29 +02:00
mimedefang-3.6-tests.patch Update patch URL after merge into upstream 2025-03-01 20:01:14 +01:00
mimedefang-multiplexor.service Upgrade to 2.81 (#1487543, #1487804) 2017-09-03 23:36:24 +02:00
mimedefang-wrapper Upgrade to 2.85 (#1998443) 2021-08-29 21:53:46 +02:00
mimedefang.service Upgrade to 2.81 (#1487543, #1487804) 2017-09-03 23:36:24 +02:00
mimedefang.spec Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-24 21:37:37 +00:00
mimedefang.sysusersd Upgrade to 3.0 (#2097136) 2022-08-06 00:53:42 +02:00
mimedefang.tmpfilesd Avoid chown-ing and chmod-ing /dev/null (#1296288 #c6) 2016-01-09 01:00:12 +01:00
README.FEDORA Upgrade to 2.80 (#1474551) 2017-07-27 00:51:50 +02:00
sources Upgrade to 3.6 (#2301647) 2025-03-01 13:33:29 +01:00

To configure MIMEDefang, you have to edit the file /etc/mail/mimedefang-filter.
This is a Perl source file, so you have to know Perl. Go ahead and read the man
pages mimedefang(8), mimedefang.pl(8) and mimedefang-filter(5). There are some
sample filters in the /usr/share/doc/mimedefang-* directory.

In order to complete the installation of MIMEDefang, you will need to add for
example the following lines to your /etc/mail/sendmail.mc file (which requires,
in turn, the installation of sendmail-cf package):

  define(`MILTER', `1')dnl
  define(`confMILTER_LOG_LEVEL', `6')dnl
  INPUT_MAIL_FILTER(`mimedefang', `S=unix:/var/spool/MIMEDefang/mimedefang.sock, F=T, T=S:1m;R:1m;E:5m')dnl

Use "systemctl restart sendmail.service" to rebuild your /etc/mail/sendmail.cf
file, run "systemctl enable mimedefang.service" to start MIMEDefang during boot
time per default and execute "systemctl enable mimedefang.service" to start the
service. When everything was correct, MIMEDefang should now do its job...


For the integration of MIMEDefang and ClamAV, some manual steps are required:

(1) Add the user clam to the defang group after installing MIMEDefang

    usermod -a -G defang clam

(2) Find and modify the following lines in /etc/clamd.conf:

    LocalSocketGroup defang
    LocalSocketMode 660

    and optionally disable the TCP listener if you are only using the UNIX
    socket from MIMEDefang (below):

    #TCPSocket 3310
    #TCPAddr 127.0.0.1

(3) Enable MD_ALLOW_GROUP_ACCESS=yes in /etc/sysconfig/mimedefang

(4) Configure /etc/mail/mimedefang-filter to use clamd via UNIX socket:

    $Features{'Virus:CLAMD'} = 1;
    $ClamdSock = '/var/run/clamav/clamd.sock';

(5) Restart the MIMEDefang and clamd services (clamd first).