Overview of Quarantining

A quarantined message is an envelope, containing one or more recipients, that is held in the queue pending review. It can either be an inbound or outbound envelope that, for policy or security reasons, should not be sent or delivered immediately, or not be sent or delivered as is.

For example, consider a user who has a history of sending offensive email. You might want to intercept such a user’s email on its way out, so it can be screened for words or phrases that the user has been previously warned about.

V8.13 sendmail implemented quarantining by creating a new kind of queued file. Instead of storing the envelope information in a qf file, a quarantined message has its envelope information stored in an hf file. The different file allows sendmail to process messages normally (quarantined messages are invisible) unless you specifically ask it to handle quarantined messages (make them visible).

Note that the mailstats program (The mailstats Program on page 364) automatically (without you needing to ask) includes the total count of quarantined messages in its output.

To ensure that the reason for quarantining a message is not lost, a new qf file[191] line has been introduced. Called a q line (q line on page 453), it stores the reason the message was quarantined. In parallel, a new macro, called ${quarantine} (${quarantine} on page 841) has also been added. It is intended for use in rule sets, and contains the reason the envelope was quarantined.

Note that quarantining ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.