The mail/mimedefang port
mimedefang-3.5 – mailfilter to identify and mark spam (cvsweb github mirror)
Description
MIMEDefang is a framework for filtering e-mail. It uses Sendmail's "Milter" API, some C glue code, and some Perl code to let you write high-performance mail filters in Perl. People use MIMEDefang to: - Block viruses - Block or tag spam - Remove HTML mail parts - Add boilerplate disclaimers to outgoing mail - Remove or alter attachments - Replace attachments with URL's - Implement sophisticated access controls. You're limited only by your imagination. If you can think of it and code it in Perl, you can do it with MIMEDefang.WWW: https://www.mimedefang.org/
Readme
+----------------------------------------------------------------------- | Running ${PKGSTEM} on OpenBSD +----------------------------------------------------------------------- Post-installation steps ======================= Register the mimedefang milter with sendmail(8) by adding the following to your .mc file: INPUT_MAIL_FILTER(`mimedefang', \ `S=local:/var/spool/MIMEDefang/mimedefang.sock, \ F=T, T=C:15m;S:4m;R:4m;E:10m')dnl Then re-generate your .cf file. When using administrator notifications, it is advised to add the "_mdefang" user to the list of users that are allowed to set their envelope "from" address to a different user. This is done in: ${SYSCONFDIR}/mail/trusted-user Improving performance --------------------- On a busy mail server, it is advised to have the spool directory in virtual memory (i.e. ramdisk). This can be achieve by adding the following line to fstab(5): swap /var/spool/MIMEDefang tmpfs rw,nodev,nosuid,-s256M,-u570,-g570,-m0750 0 0 This will create a 256M tmpfs filesystem under /var/spool/MIMEDefang. SpamAssassin ------------ SpamAssassin can be used by mimedefang(8) in which case some maintenance tasks are required and cron(8) jobs must be setup in root's crontab(5): - Automating SpamAssassin rule updates: 0 0 * * * PATH=${PATH}:${LOCALBASE}/bin; ${LOCALBASE}/bin/sa-update && ${RCDIR}/mimedefang_multiplexor reload >/dev/null - Synchronizing the journal data into the Bayes databases: 30 0 * * * PATH=${PATH}:${LOCALBASE}/bin; su -s /bin/sh _mdefang -c "${LOCALBASE}/bin/sa-learn --force-expire >/dev/null" IP validation header ==================== To retain relay's IP address information between Mail eXchangers, an identical ${SYSCONFDIR}/mail/mimedefang-ip-key must be installed on all relays. The content of this file is generated using: # ${PREFIX}/share/examples/gen-ip-validator.pl Start-up order ============== Be sure to start mimedefang_multiplexor before mimedefang in rc.local(8). # rcctl order mimedefang_multiplexor mimedefang
Maintainer
Giovanni Bechis
Categories
Library dependencies
Build dependencies
Run dependencies
Test dependencies
Reverse dependencies
Files
- /etc/mail/mimedefang-filter
- /etc/mail/mimedefang-ip-key
- /etc/mail/sa-mimedefang.cf
- /etc/rc.d/mimedefang
- /etc/rc.d/mimedefang_multiplexor
- /usr/local/bin/md-mx-ctrl
- /usr/local/bin/mimedefang
- /usr/local/bin/mimedefang-multiplexor
- /usr/local/bin/mimedefang-release
- /usr/local/bin/mimedefang-util
- /usr/local/bin/mimedefang.pl
- /usr/local/bin/watch-mimedefang
- /usr/local/bin/watch-multiple-mimedefangs.tcl
- /usr/local/libdata/perl5/site_perl/Mail/MIMEDefang.pm
- /usr/local/libdata/perl5/site_perl/Mail/MIMEDefang/
- /usr/local/libdata/perl5/site_perl/Mail/MIMEDefang/Actions.pm
- /usr/local/libdata/perl5/site_perl/Mail/MIMEDefang/Antispam.pm
- /usr/local/libdata/perl5/site_perl/Mail/MIMEDefang/Antivirus.pm
- /usr/local/libdata/perl5/site_perl/Mail/MIMEDefang/Authres.pm
- /usr/local/libdata/perl5/site_perl/Mail/MIMEDefang/DKIM.pm
- /usr/local/libdata/perl5/site_perl/Mail/MIMEDefang/DKIM/
- /usr/local/libdata/perl5/site_perl/Mail/MIMEDefang/DKIM/ARC.pm
- /usr/local/libdata/perl5/site_perl/Mail/MIMEDefang/MIME.pm
- /usr/local/libdata/perl5/site_perl/Mail/MIMEDefang/Mail.pm
- /usr/local/libdata/perl5/site_perl/Mail/MIMEDefang/Net.pm
- /usr/local/libdata/perl5/site_perl/Mail/MIMEDefang/RFC2822.pm
- /usr/local/libdata/perl5/site_perl/Mail/MIMEDefang/SPF.pm
- /usr/local/libdata/perl5/site_perl/Mail/MIMEDefang/Unit.pm
- /usr/local/libdata/perl5/site_perl/Mail/MIMEDefang/Utils.pm
- /usr/local/man/man1/mimedefang-util.1
- /usr/local/man/man3/Mail::MIMEDefang.3
- /usr/local/man/man3/Mail::MIMEDefang::Actions.3
- /usr/local/man/man3/Mail::MIMEDefang::Antispam.3
- /usr/local/man/man3/Mail::MIMEDefang::Antivirus.3
- /usr/local/man/man3/Mail::MIMEDefang::Authres.3
- /usr/local/man/man3/Mail::MIMEDefang::DKIM.3
- /usr/local/man/man3/Mail::MIMEDefang::DKIM::ARC.3
- /usr/local/man/man3/Mail::MIMEDefang::MIME.3
- /usr/local/man/man3/Mail::MIMEDefang::Mail.3
- /usr/local/man/man3/Mail::MIMEDefang::Net.3
- /usr/local/man/man3/Mail::MIMEDefang::RFC2822.3
- /usr/local/man/man3/Mail::MIMEDefang::SPF.3
- /usr/local/man/man3/Mail::MIMEDefang::Unit.3
- /usr/local/man/man3/Mail::MIMEDefang::Utils.3
- /usr/local/man/man5/mimedefang-filter.5
- /usr/local/man/man7/mimedefang-notify.7
- /usr/local/man/man7/mimedefang-protocol.7
- /usr/local/man/man8/md-mx-ctrl.8
- /usr/local/man/man8/mimedefang-multiplexor.8
- /usr/local/man/man8/mimedefang-release.8
- /usr/local/man/man8/mimedefang.8
- /usr/local/man/man8/mimedefang.pl.8
- /usr/local/man/man8/watch-mimedefang.8
- /usr/local/man/man8/watch-multiple-mimedefangs.8
- /usr/local/share/doc/pkg-readmes/mimedefang
- /usr/local/share/examples/mimedefang/
- /usr/local/share/examples/mimedefang/contrib/
- /usr/local/share/examples/mimedefang/contrib/fang.pl
- /usr/local/share/examples/mimedefang/contrib/greylisting/
- /usr/local/share/examples/mimedefang/contrib/greylisting/greylist-mysql.sql
- /usr/local/share/examples/mimedefang/contrib/greylisting/greylist-pgsql.sql
- /usr/local/share/examples/mimedefang/contrib/greylisting/greylist-sqlite.sql
- /usr/local/share/examples/mimedefang/contrib/greylisting/mimedefang-filter
- /usr/local/share/examples/mimedefang/contrib/munin/
- /usr/local/share/examples/mimedefang/contrib/munin/mimedefang_munin_plugin
- /usr/local/share/examples/mimedefang/gen-ip-validator.pl
- /usr/local/share/examples/mimedefang/mail/
- /usr/local/share/examples/mimedefang/mail/mimedefang-filter
- /usr/local/share/examples/mimedefang/mail/mimedefang-ip-key
- /usr/local/share/examples/mimedefang/mail/sa-mimedefang.cf
- /usr/local/share/examples/mimedefang/mimedefang-filter-openbsd-ports
- /var/spool/MD-Quarantine/
- /var/spool/MIMEDefang/
- @extraunexec rm -rf /var/spool/MD-Quarantine/*
- @extraunexec rm -rf /var/spool/MIMEDefang/*
- @newgroup _mdefang:570
- @newuser _mdefang:570:_mdefang::MIMEDefang User:/var/spool/MD-Quarantine:/sbin/nologin