Maildrop

from Wikipedia, the free encyclopedia
maildrop
Basic data

developer Double Precision Inc.
Publishing year 1999
Current  version 2.9.0
(June 23, 2017)
operating system Unix , Linux
programming language C ++
category Mail filter
License GPL
German speaking No
www.courier-mta.org/maildrop

Mail Drop is a Mail Delivery Agent (MDA) and mail filter for mail servers , known as MDA of the Courier mail server originated, but for use with other Mail Transfer Agents and Message Stores is also available separately and for this purpose next Maildir and mbox supported.

Maildrop can filter e-mails based on various properties, such as:

Maildrop is often used as an alternative to procmail because it is also actively maintained and, in contrast to procmail, supports a far more powerful and understandable syntax that is similar to that of Perl . For example, maildrop supports very powerful branches using if – elseif – else .

example

The following example for one $HOME/.mailfilterforwards incoming emails to SpamAssassin and then sorts them according to the flags.

if ( $SIZE < 262144 )
{
         xfilter "/usr/bin/spamassassin"
}

if (/^X-Spam-Status: *YES/)
{
         to "Maildir/.Spam"
}
else
{
         to "Maildir/"
}

Explanation: The first thing to do is to check whether the message is smaller than 256 kB (262144 bytes) in order not to overload SpamAssassin with messages that are too large. If it meets the size criterion, it is now passed on to SpamAssassin via the command xfiltervia pipe . It then checks whether SpamAssassin has marked the message as spam ( X-Spam-Flag: YES). In this case the message will be sorted into the folder .Spamin the maildir , otherwise it will be delivered to the maildir as normal.