Milter
Encyclopedia
Milter is an extension to the widely used open source mail transfer agent
s (MTA) Sendmail
and Postfix
. It allows administrators to add mail filters for filtering spam
or viruses very efficiently in the mail-processing chain. In the language of the art, "milter" refers to the protocol and API implementing the service, while "a milter" has come to refer to a filter application that uses milter to provide service.
Prior to the advent of milter, an email filter was generally implemented as a program to which an MTA would hand the message once it has completely arrived, with most of the message's envelope information removed. That program could then analyze the header and body of the message and make a decision to accept the message (i.e. return a "success" status to the MTA) or reject it (i.e. return a "failed" status to the MTA). The MTA would then log a successful delivery or return a failure message to the sender as appropriate, and the filter would be responsible for effecting delivery of the message (to the intended inbox(es) as-is, or modified to remove unwanted content, or to specific folder(s), etc.).
An MTA that is milter-capable instead notifies filters to which it is connected about each phase of the delivery of a message, from initial client connection through completion of transmission. At each phase of the SMTP
session, the filter is given data about the arriving message and then has an opportunity to terminate acceptance of the message early when appropriate. For very large messages, this can have an enormous impact when a decision to reject can be made as early as possible. Moreover, unlike the former model, a milter-capable MTA can connect to multiple filters in parallel that serve specific purposes such as anti-virus, anti-spam, message authentication, flow regulation, etc. Finally, such filters can take special action on the message: add or remove recipients in the envelope; alter the body prior to delivery; add, change or remove header fields in the message, etc.
The Sendmail Consortium includes a special thread-based library in the sendmail distribution that provides the milter API
.
The use of milters has spread in recent years and milters are becoming increasingly important in mail processing on the large scale to block, verify and sort incoming mail.
8.12.0 released on September 8, 2001. Milter was available in sendmail 8.11.x versions as an FFR (For Future Release/Beta code).
Milter has undergone substantial improvements since its first official release.
Search for MILTER in SENDMAIL RELEASE NOTES to know about changes related to Milter in sendmail versions .
Sendmail 8's successor, known as Meta1, will also support milters.
2.3.0 released July 12, 2006 . Most, but not all, milters can be used with Postfix "out of the box".
that can be used to create milters for special needs. The library provided by The Sendmail Consortium is pthread-based. However, documentation of the protocol used for communication between sendmail and milter processes is not provided. This internal protocol is subject to changes in new sendmail versions.
Mail transfer agent
Within Internet message handling services , a message transfer agent or mail transfer agent or mail relay is software that transfers electronic mail messages from one computer to another using a client–server application architecture...
s (MTA) 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....
and Postfix
Postfix (software)
In computing, Postfix is a free and open-source mail transfer agent that routes and delivers electronic mail. It is intended as a fast, easier-to-administer, and secure alternative to the widely-used Sendmail MTA....
. It allows administrators to add mail filters for filtering spam
E-mail spam
Email 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...
or viruses very efficiently in the mail-processing chain. In the language of the art, "milter" refers to the protocol and API implementing the service, while "a milter" has come to refer to a filter application that uses milter to provide service.
Prior to the advent of milter, an email filter was generally implemented as a program to which an MTA would hand the message once it has completely arrived, with most of the message's envelope information removed. That program could then analyze the header and body of the message and make a decision to accept the message (i.e. return a "success" status to the MTA) or reject it (i.e. return a "failed" status to the MTA). The MTA would then log a successful delivery or return a failure message to the sender as appropriate, and the filter would be responsible for effecting delivery of the message (to the intended inbox(es) as-is, or modified to remove unwanted content, or to specific folder(s), etc.).
An MTA that is milter-capable instead notifies filters to which it is connected about each phase of the delivery of a message, from initial client connection through completion of transmission. At each phase of the SMTP
Simple Mail Transfer Protocol
Simple Mail Transfer Protocol is an Internet standard for electronic mail transmission across Internet Protocol networks. SMTP was first defined by RFC 821 , and last updated by RFC 5321 which includes the extended SMTP additions, and is the protocol in widespread use today...
session, the filter is given data about the arriving message and then has an opportunity to terminate acceptance of the message early when appropriate. For very large messages, this can have an enormous impact when a decision to reject can be made as early as possible. Moreover, unlike the former model, a milter-capable MTA can connect to multiple filters in parallel that serve specific purposes such as anti-virus, anti-spam, message authentication, flow regulation, etc. Finally, such filters can take special action on the message: add or remove recipients in the envelope; alter the body prior to delivery; add, change or remove header fields in the message, etc.
The Sendmail Consortium includes a special thread-based library in the sendmail distribution that provides the milter API
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...
.
The use of milters has spread in recent years and milters are becoming increasingly important in mail processing on the large scale to block, verify and sort incoming mail.
Sendmail
Milter was first officially introduced to SendmailSendmail
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....
8.12.0 released on September 8, 2001. Milter was available in sendmail 8.11.x versions as an FFR (For Future Release/Beta code).
Milter has undergone substantial improvements since its first official release.
Search for MILTER in SENDMAIL RELEASE NOTES to know about changes related to Milter in sendmail versions .
Sendmail 8's successor, known as Meta1, will also support milters.
Postfix
Milter support was added to PostfixPostfix (software)
In computing, Postfix is a free and open-source mail transfer agent that routes and delivers electronic mail. It is intended as a fast, easier-to-administer, and secure alternative to the widely-used Sendmail MTA....
2.3.0 released July 12, 2006 . Most, but not all, milters can be used with Postfix "out of the box".
Interface
The Sendmail Consortium provides a documented Application Programming InterfaceApplication programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...
that can be used to create milters for special needs. The library provided by The Sendmail Consortium is pthread-based. However, documentation of the protocol used for communication between sendmail and milter processes is not provided. This internal protocol is subject to changes in new sendmail versions.