maildrop

TNEFclean

Deal with Winmail.dat attachments are included in received e-mail messages in Outlook by filtering messages through TNEFclean that re-encodes the attachments into standard MIME format

Move spam messages

Deliver messages that have been flagged as spam by Spamassassin or dspam into special IMAP folders and remove some clutter from your Inbox.

Spamassassin
There's a couple of ways to have spam messages filltered depending on how your Spamassassin has been configured:

  • Spamassassin has been configured to add X-Spam- headers to messages:
    if (/^X-Spam-Flag: *YES/)
    {
      to $VHOME/Maildir/.Spam
      exit
    }
  • Subject rewritten:
    if (/^X-Spam-Flag: *YES/)
    {
      to $VHOME/Maildir/.Spam
      exit
    }

Spam folder creation

Automatically create set of IMAP folders for sorting detected spam out of users' Inboxes and/or training a spam filter.

Spam folder creation for all users
For training a spam folder such as dspam, we'll give our users a "Spam" folder with subfolders for messages that were spam as well as folders for false positives and false negatives. We can install a global mailfilter on a domain that will make sure that those IMAP folders exist.
Create the Maildrop filter /home/vpopmail/domains/.mailfilter:

SHELL="/bin/sh"
import EXT
import HOST
VPOP="| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox"

Technology:

Filters

Maildrop allows you to filter mail by calling it using a .qmail file in a user's vpopmail home directory. It can be used to filter mail through SpamAssassin, with per-user configuration options, or to filter mail into subfolders of their mailbox depending on specified criteria. eg. Mail that SpamAssassin has flagged as spam can be moved to a special folder.

Filter Writing Guides and Examples
http://www.antagonism.org/mail/folder-creation-maildrop.shtml
http://www.courier-mta.org/maildrop/maildropfilter.html
http://mugurel.sumanariu.ro/qmail/qmail-move-spam-mail-to-junk-folder-using-maildrop/
Environment variables
The following snippet of code is a good opening for your filter script and will set some important variables for your script to use:

SHELL="/bin/sh"
import EXT
import HOST
VPOP="| /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox"
VHOME=`/home/vpopmail/bin/vuserinfo -d $EXT@$HOST`
VDHOME=`dirname "$VHOME"`
logfile "/tmp/log-maildrop"

Technology:

Maildrop

Maildrop is a mail filter/delivery agent that can be used with your Qmail server to customize how messages are handled as they are delivered. One capability is to have messages moved to a particular IMAP folder as they are delivered to the user's mailbox.

Prerequisites
Maildrop requires PCRE to be installed:

cd /extra/src
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
tar zxvf pcre-8.37.tar.gz
cd pcre-8.37
./configure --enable-utf8
make
make install

Version 2.8.1 requires the Courier Unicode Library

Technology:

Subscribe to RSS - maildrop

Recent Updates

  • 6 months 3 weeks ago
    1.27.2 update
  • 7 months 5 days ago
    Drupal 10/11 config
  • 7 months 6 days ago
  • PHP
    7 months 6 days ago
    PHP 8.3.11 and AlmaLinux
  • 7 months 6 days ago
    New version of Pound