MIMEDefang is a
GPL
The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general us ...
licensed
A license (or licence) is an official permission or permit to do, use, or own something (as well as the document of that permission or permit).
A license is granted by a party (licensor) to another party (licensee) as an element of an agreeme ...
framework for
filtering
Filter, filtering or filters may refer to:
Science and technology
Computing
* Filter (higher-order function), in functional programming
* Filter (software), a computer program to process a data stream
* Filter (video), a software component th ...
e-mail
Electronic mail (email or e-mail) is a method of exchanging messages ("mail") between people using electronic devices. Email was thus conceived as the electronic ( digital) version of, or counterpart to, mail, at a time when "mail" mean ...
. It uses
sendmail
Sendmail is a general purpose internetwork email routing facility that supports many kinds of mail-transfer and delivery methods, including the Simple Mail Transfer Protocol (SMTP) used for email transport over the Internet.
A descendant of the ...
's "
Milter
Milter (portmanteau for ''mail filter'') is an extension to the widely used open source mail transfer agents (MTA) Sendmail and Postfix. It allows administrators to add mail filters for filtering spam or viruses in the mail-processing chain. ...
"
API, some
C glue code
Adhesive, also known as glue, cement, mucilage, or paste, is any non-metallic substance applied to one or both surfaces of two separate items that binds them together and resists their separation.
The use of adhesives offers certain advant ...
, and some Perl code to let the user write high-performance mail filters in
Perl
Perl is a family of two High-level programming language, high-level, General-purpose programming language, general-purpose, Interpreter (computing), interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it ...
.
MIMEDefang can be used to:
* Block
viruses
A virus is a submicroscopic infectious agent that replicates only inside the living cells
Cell most often refers to:
* Cell (biology), the functional basic unit of life
Cell may also refer to:
Locations
* Monastic cell, a small room ...
(e.g. using
Clamav
Clam AntiVirus (ClamAV) is a free software, cross-platform antimalware toolkit able to detect many types of malware, including viruses. It was developed for Unix and has third party versions available for AIX, BSD, HP-UX, Linux, macOS, OpenVMS, ...
)
* Block or tag
spam (e.g. using
SpamAssassin
Apache SpamAssassin is a computer program used for e-mail spam filtering. It uses a variety of spam-detection techniques, including DNS and fuzzy checksum techniques, Bayesian filtering, external programs, blacklists and online databases. It is ...
)
* Remove
HTML
The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
mail parts
* Add boilerplate disclaimers to outgoing mail
* Remove or alter
attachments
* Replace attachments with
URLs
* Implement sophisticated
access control
In the fields of physical security and information security, access control (AC) is the selective restriction of access to a place or other resource, while access management describes the process. The act of ''accessing'' may mean consuming ...
s
* Verify and add DKIM and ARC signatures
History
MIMEDefang was originally developed by
Dianne Skoll, who was contracted by the
Royal College of Physicians and Surgeons of Canada
The Royal College of Physicians and Surgeons of Canada (french: Collège royal des médecins et chirurgiens du Canada) is a regulatory college which acts as a national, nonprofit organization established in 1929 by a special Act of Parliament to o ...
in 2000 to help stop the flood of email viruses to the college's
network
Network, networking and networked may refer to:
Science and technology
* Network theory, the study of graphs as a representation of relations between discrete objects
* Network science, an academic field that studies complex networks
Mathematics ...
. The software was written to filter attachments and was originally called MIMESweeper, then MIMEDefanger, and currently MIMEDefang. Skoll announced her software to the public on August 28, 2000. On December 21, 2001, a version incorporating support for
SpamAssassin
Apache SpamAssassin is a computer program used for e-mail spam filtering. It uses a variety of spam-detection techniques, including DNS and fuzzy checksum techniques, Bayesian filtering, external programs, blacklists and online databases. It is ...
was released, making MIMEDefang a filter for both spam and viruses. Skoll's company, Roaring Penguin Software, developed and sold a commercial anti-spam product known as CanIt, which is based on the open-source version of MIMEDefang.
Roaring Penguin Software was acquired by AppRiver in March 2018.
On March 5th, 2020, AppRiver agreed to give The McGrail Foundation leadership of the open-source MIMEDefang project for a period of three years, automatically renewable for one-year terms after that unless either AppRiver or The McGrail Foundation chooses not to renew the agreement.
On May 28th, 2021, Dianne Skoll announced
a fork of the project, known as Mailmunge.
Architecture
The
Milter
Milter (portmanteau for ''mail filter'') is an extension to the widely used open source mail transfer agents (MTA) Sendmail and Postfix. It allows administrators to add mail filters for filtering spam or viruses in the mail-processing chain. ...
library included with Sendmail uses
POSIX
The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system- and user-level application programming inte ...
thread
Thread may refer to:
Objects
* Thread (yarn), a kind of thin yarn used for sewing
** Thread (unit of measurement), a cotton yarn measure
* Screw thread, a helical ridge on a cylindrical fastener
Arts and entertainment
* ''Thread'' (film), 2016 ...
s to allow multiple concurrent filters. MIMEDefang's Perl filter uses a pre-forked process model, similar to the traditional
Apache Web server multi-processing model. MIMEDefang therefore consists of three components:
* A
multithreaded C program that communicates with Sendmail and the filtering processes
* A
multiplexer
In electronics, a multiplexer (or mux; spelled sometimes as multiplexor), also known as a data selector, is a device that selects between several analog or digital input signals and forwards the selected input to a single output line. The sel ...
(written in C) that manages a pool of Perl scanning processes (called "slaves")
* A Perl program called mimedefang.pl that provides the basic filtering infrastructure.
MIMEDefang users code their filtering policies in Perl, using the infrastructure provided by mimedefang.pl. They don't need to worry about thread synchronizations because each Perl filter is a separate single-threaded process.
The infrastructure provided by mimedefang.pl follows the Milter API reasonably closely, but not exactly. It includes convenience routines for parsing and rebuilding MIME messages so that filter authors can concentrate on high-level policy rather than worry about low-level API details. This convenience comes with a small loss of flexibility and some loss of performance.
References
External links
* {{official website, https://mimedefang.org/
Free email software
Spam filtering