MIMEDefang
Encyclopedia
MIMEDefang is a GPL
licensed framework for filtering
e-mail
. It uses sendmail
's "Milter
" API, some C
glue code
, and some Perl code to let the user write high-performance mail filters in Perl
.
MIMEDefang can be used to:
in 2000 to help stop the flood of email viruses to the college's network
. The software was written to filter attachments and was originally called MIMESweeper, then MIMEDefanger, and currently MIMEDefang. Skoll announced his software to the public on August 28, 2000. On December 21, 2001, a version incorporating support for SpamAssassin
was released, making MIMEDefang a filter for both spam and viruses. Skoll's company, Roaring Penguin Software
, currently markets a commercial anti-spam product known as CanIt, which is based on the open-source version of MIMEDefang.
library included with Sendmail uses POSIX
thread
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:
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.
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....
licensed framework for filtering
E-mail filtering
Email filtering is the processing of email to organize it according to specified criteria. Most often this refers to the automatic processing of incoming messages, but the term also applies to the intervention of human intelligence in addition to anti-spam techniques, and to outgoing emails as well...
E-mail
Electronic mail, commonly known as email or e-mail, is a method of exchanging digital messages from an author to one or more recipients. Modern email operates across the Internet or other computer networks. Some early email systems required that the author and the recipient both be online at the...
. It uses sendmail
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 used for email transport over the Internet....
's "Milter
Milter
Milter is an extension to the widely used open source mail transfer agents Sendmail and Postfix. It allows administrators to add mail filters for filtering spam or viruses very efficiently in the mail-processing chain...
" API, some C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....
glue code
Glue code
In programming, glue code is code that does not contribute any functionality towards meeting the program's requirements, but instead serves solely to "glue together" different parts of code that would not otherwise be compatible...
, and some Perl code to let the user write high-performance mail filters in Perl
Perl
Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier. Since then, it has undergone many changes and revisions and become widely popular...
.
MIMEDefang can be used to:
- Block virusesComputer virusA computer virus is a computer program that can replicate itself and spread from one computer to another. The term "virus" is also commonly but erroneously used to refer to other types of malware, including but not limited to adware and spyware programs that do not have the reproductive ability...
(e.g. using Clamav) - Block or tag spamE-mail spamEmail spam, also known as junk email or unsolicited bulk email , is a subset of spam that involves nearly identical messages sent to numerous recipients by email. Definitions of spam usually include the aspects that email is unsolicited and sent in bulk. One subset of UBE is UCE...
(e.g. using SpamAssassinSpamAssassinSpamAssassin is a computer program released under the Apache License 2.0 used for e-mail spam filtering based on content-matching rules. It is now part of the Apache Foundation....
) - Remove HTMLHTMLHyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....
mail parts - Add boilerplate disclaimers to outgoing mail
- Remove or alter attachments
- Replace attachments with URLs
- Implement sophisticated access controlAccess controlAccess control refers to exerting control over who can interact with a resource. Often but not always, this involves an authority, who does the controlling. The resource can be a given building, group of buildings, or computer-based information system...
s.
History
MIMEDefang was originally developed by David F. Skoll, who was contracted by the Royal College of Physicians and Surgeons of CanadaRoyal 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 national, private, nonprofit organization established in 1929 by a special Act of Parliament to oversee the medical education of specialists in Canada...
in 2000 to help stop the flood of email viruses to the college's network
Computer network
A computer network, often simply referred to as a network, is a collection of hardware components and computers interconnected by communication channels that allow sharing of resources and information....
. The software was written to filter attachments and was originally called MIMESweeper, then MIMEDefanger, and currently MIMEDefang. Skoll announced his software to the public on August 28, 2000. On December 21, 2001, a version incorporating support for SpamAssassin
SpamAssassin
SpamAssassin is a computer program released under the Apache License 2.0 used for e-mail spam filtering based on content-matching rules. It is now part of the Apache Foundation....
was released, making MIMEDefang a filter for both spam and viruses. Skoll's company, Roaring Penguin Software
Roaring Penguin Software
Roaring Penguin Software, Inc. is a small business which sells computer software, particularly in the area of antispam. Headquartered in Ottawa, Canada, the company develops both free and commercial software primarily for the purpose of e-mail filtering....
, currently markets a commercial anti-spam product known as CanIt, which is based on the open-source version of MIMEDefang.
Architecture
The MilterMilter
Milter is an extension to the widely used open source mail transfer agents Sendmail and Postfix. It allows administrators to add mail filters for filtering spam or viruses very efficiently in the mail-processing chain...
library included with Sendmail uses POSIX
POSIX
POSIX , an acronym for "Portable Operating System Interface", is a family of standards specified by the IEEE for maintaining compatibility between operating systems...
thread
Thread
Thread may refer to:*Thread , a kind of thin yarn used for sewing*Thread , a sequence of instructions that may execute in parallel with each other*Thread , a spore in the science fiction novels Dragonriders of Pern...
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 multiplexor (written in C) that manages a pool of Perl scanning processes (called "slaves")
- A Perl program called mimedefang.pl.pl.pl is the Internet country code top-level domain for Poland, administered by NASK, Polish research and development organization. It is one of the founding members of CENTR.- History :...
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.