mailbot

Name

mailbot -- A MIME-aware autoresponder utility

Synopsis

mailbot [options] {program} [arg...]

In .mailfilter:

if (/^Subject: *info/)
{
     cc "| mailbot -t /usr/share/autoresponse/info -d autoresponsedb \
            -A 'From: info@domain.com' /usr/bin/sendmail -f ''"
}

DESCRIPTION

mailbot reads an E-mail message on standard input and creates an E-mail message replying to the original message's sender. A program is specified as an argument to mailbot after all of mailbot options. program is expected to read the created autoreply on its standard input, and mail it. If program is not specified, mailbot runs 'sendmail -f ""'.

mailbot has several options for suppressing duplicate autoresponse messages. If mailbot chooses not to send an autoresponse, it quietly terminates without running program. The autoresponse is optionally formatted as a MIME delivery status notification.

The text of the autoresponse is specified by the -t or the -m argument. Either one is required. Everything else is optional. The default behavior is to send an autoresponse unless the original message has the "Precedence: junk" or the "Precedence: bulk" header, or if over surprises.

maildrop supports the concept of "default" filter files. If the file specified by the -M option cannot be found in $HOME/.mailfilters, maildrop will try to open $HOME/.mailfilters/filterfileprefix-default. filterfileprefix is the initial part of filterfile up until the last '-' character in filterfile.

If $HOME/.mailfilters/filterfileprefix-default does not exist, and there are any other dashes left in filterfileprefix, maildrop removes the last dash and everything following it, then tries again.

As a last resort maildrop tries to open $HOME/.mailfilters/default.

For example, if the parameter to the -M option is mailfilter-lists-maildrop, maildrop will try to open the following files, in order:

$HOME/.mailfilters/mailfilter-lists-maildrop
$HOME/.mailfilters/mailfilter-lists-maildrop-default
$HOME/.mailfilters/mailfilter-lists-default
$HOME/.mailfilters/mailfilter-default
$HOME/.mailfilters/default

Note that maildrop looks for -default files ONLY if -M is used.

-D uuu/ggg

This option is reserved for use by the version of maildrop that comes integrated with the Courier mail server.

-V level

Initialize the VERBOSE variable to level. Because maildrop parses the entire before running it, this option is used to produce debugging output in the parsing phase. Otherwise, if filename has syntax errors, then no debugging output is possible because the VERBOSE variable is not yet set.

-V is ignored when maildrop runs in delivery mode.

-w N

The -w N option places a warning message into the maildir if the maildir has a quota setting, and after the message was successfully delivered the maildir was at least N percent full. The warning message is copied verbatim from /etc/quotawarnmsg with the addition of the "Date:" and "Message-Id:" headers. The warning is repeated every 24 hours (at least), until the maildir drops below N percent full.

DELIVERY MODE

If a filename is not specified on the command line, or if the -d option is used, maildrop will run in delivery mode. In delivery mode, maildrop changes to the home directory of the user specified by the -d option (or the user who is running maildrop if the -d option was not given) and reads $HOME/.mailfilter for filtering instructions. $HOME/.mailfilter must be owned by the user, and have no group or global permissions (maildrop terminates if it does).

If $HOME/.mailfilter does not exist, maildrop will simply deliver the message to the user's mailbox.

If the file /etc/maildroprc exists, maildrop reads filtering instructions from this file first, before reading $HOME/.mailfilter. This allows the system administrator to provide global filtering instructions for all users.

NOTE:

/etc/maildroprc is read only in delivery mode.

EMBEDDED MODE

The embedded mode is used when maildrop