|
mailprocd is a high-performance mail delivery, classification and filtering
daemon written in C, designed to extend the capabilities of MTAs such as
postfix and
sendmail.
It was initially developed for use on multiuser
csoft.net mail servers
using
postfix, but it is suitable
to any MTA that can deliver to a SMTP or LMTP server.
Typically, mailprocd will be configured to accept SMTP/LTMP connections and
will process mail based on the contents of four databases:
rules, uid, gid and lists.
The rules database contains per-address delivery instructions. Multiple
destinations can be configured per address. Mail can be delivered to
mailboxes, maildirs, piped to arbitrary commands or forwarded to other
addresses based on conditionals.
The uid and gid databases specify the default UID/GID associated with
every address (individual delivery instructions can override this setting).
The optional lists database specifies configured mailing lists.
|
|
mailprocd embeds the Perl interpreter (like
mod_perl does)
in order to use the
SpamAssassin
filter in the most efficient manner possible.
A major problem with SpamAssassin on multiuser systems is the fact that
custom user configurations and important features such as
Autowhitelisting and Bayes filtering require that
SpamAssassin execute under the user's privileges (which is desirable anyway,
for quota and security reasons). This usually involves very
inefficient spawning of processes and unnecessary operations every time
a message is delivered.
mailprocd solves that problem using persistent spam-checker processes running
with user privileges.
Idle spam-checker processes are simply expired when they are idle for too
long.
As an additional benefit, SpamAssassin's learning databases can remain open
and be updated at a specific rate.
Under mailprocd, single users who are receiving large amounts of spam in
a short amount of time can no longer cause excess load on the mail server
since they can only have a certain number (typically one) of "worker"
processes running concurrently. Heavier users can be accomodate with multiple
"worker" processes, depending on how long the SpamAssassin tests take to
execute.
|
|
Classification and delivery |
|
mailprocd provides simple built-in mail classification services, which helps
avoid the need for procmail/maildrop subprocesses in many situations.
For maximum efficiency, it also handles various forms of e-mail delivery,
such as local mailboxes/maildirs, forwarders and custom filter programs.
On systems running Postfix,
mailprocd can allow unprivileged users to specify policies that directly
affect the behavior of the SMTP server, using the SMTP Policy Manager
interface provided by Postfix.
|
|
Special support is provided for efficient delivery to mailing list managers.
Currently, only
Mailman
is supported.
The policy manager can even check for subscriber addresses in SMTP
context. This allows for pre-queue rejection of messages sent to
mailing lists from non-subscribers.
|
|