Chapter 26. The X (Milters) Configuration Command

Beginning with V8.12, sendmail offers hooks to access external programs via sockets, and a library to build external programs that listen on sockets. A Milter is an external program that can be used to screen inbound email (mail received by your server rather than mail sent by your client).[442] A Milter is composed of two kinds of functions:

  • Those that you write yourself are called xxfi_ functions.

  • Those that your xxfi_ functions call in the Milter library are called smfi_ Milter library routines.

V8.13 and V8.14 sendmail added several new functions to the Milter library. In this chapter, we first discuss the hooks inside the configuration file that support external programs, and after that briefly discuss building your own program.

While screening email messages, Milters can:

  • Add, modify, or remove headers.

  • Add, remove, or reject recipients.

  • Change or reject the sender.

  • Replace the body.

  • Accept, reject, defer, or quarantine individual messages.

  • Enforce policy, archive for conformance, or enable security rules.

  • Sign or verify using DKIM, DomainKeys, SPF, or other standards.

Creating your own Milters is possible only on operating systems that include POSIX threading (pthread) support. Table 26-1 lists the operating systems that do, and do not, include the required threading support.

Table 26-1. Operating system support for Milters

Operating system

Support

FreeBSD

3.x and later

SunOS (Solaris)

5.5 and later

AIX

4.3 and later

HP-UX

11 ...

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.