A script for answering mail. Put it in your .forward or .qmail
file, and it will reply to all incoming messages with the
response you specify, optionally including the original message
as an attachment.
Latest Release
The currently stable version of autoresponder
is 1.16.7, released on 6 August 2002. It fixed a number
of parsing problems and added the --verbose and
--version options.
On Friday, 11 January 2002, someone reported to BUGTRAQ that
the autoresponder package could be used by spammers
to bypass filters. Essentially, the spammer S would send a message
to an autoresponding address with a spoofed origin address R;
the autoresponder would then 'reply' and send the spam to R,
bypassing any controls it might have in place against S.
As of version 1.15.0, the autoresponder package
provides additional controls to allow dealing with this and
other spam-related scenarios:
History database. If configured with the
--enable-history option, and run with the
--history-db option, the package will
record the last time it responded to an address, and
ignore subsequent messages from it until at least
--ignore-interval seconds have passed.
Blind mailings. The --accept-for
runtime option allows you to specify address for which
the package is answering; if specified, it will not respond
to any messages that don't mention at least one of those
addresses in the To: or Cc: lines.
Download
The files and package are available for download from the listing
at the bottom of this page.
Mailing List
There is a mailing list for announcements and discussions about
the autoresponder package. It is managed by Majordomo, so
to join send a message containing the single word 'subscribe'
in it to
<autoresponder-discuss-request@MeepZor.Com>.
Man page for autoresponder
Until such time as more detailed documentation is written,
I'll let the man page suffice. The information below was
originally generated by man2html, but considerable
frobbing of the output was necessary.
autoresponder is a rather hackish script to deal with incoming
mail; a sort of email receptionist. It sends a standard reply back to
the sender. It's designed to be invoked through .forward or
.qmail files.
OPTION SYNTAX
Option values may be separated from their keywords by either an
equals-sign ('=') or a space; the following are equivalent:
Options are taken from the command line. If a ~/.autoresponderrc file
exists, its contents are read and prefixed to the command line arguments.
Blank lines, lines containing only whitespace, and lines beginning with
a '#' (with or without leading whitespace) are treated as comments and
ignored. The effect is equivalent to
As a consequence, options in the ~/.autoresponderrc file may be
specified either as one per line or multiple options per line, but '\'
continuation characters should not be used.
Some options may appear on the command line more than once, such
as
--ignore-from foo --ignore-from bar
The individual option descriptions indicate whether this applies.
OPTIONS
--from email-address
The address to put into the 'From:' field of the response.
Mail settings may prevent this from taking effect if this
is not the same as the actually responding account; some
systems take a dim view of such masquerades.
Note: This option is required.
--accept-for pattern
Only reply if one or more of the specified regular expressions
appears in the original message's To: or Cc: fields.
In other words, don't reply to blind mailings.
The default is to reply regardless of the recipient of the
original message.
Use this option with care, since it can block messages from
mailing lists to which you are subscribed!
This option may occur multiple times.
--bcc address-list
A comma-separated list of addresses to include in the
response's Bcc field. The default is to have no Bcc list.
--cc address-list
A comma-separated list of addresses to include in the
response's Cc field. The default is to have no Cc list.
--edit-response
Indicates that the contents of the response file (--file) should
be modified and substitutions applied. If the file contains any of
the following special sequences, they will be replaced as described:
%F
Replaced by the eddress information of the sender of the original
message.
%L
The current local time is substituted. The offset from Universal
is included.
%S
Replaced by the original subject of the message (after any reply
prefixes have been removed).
%T
Replaced by the eddress to which the original message was sent.
%U
The current Universal (GMT) time is substituted.
Time values are formatted with strftime(3) using "%a, %d %b %Y %T";
this is based on the HTTP standard date syntax. %U string will have
"GMT" appended, and %L string will have the local offset from
Universal time appended (e.g., "-0800").
Note: For large response files this option can have a significant
impact on the script's performance.
--errors-to address-list
A comma-separated list of addresses to include in the
response's Errors-To field; these should receive notification
of any problems if the response doesn't reach its destination.
The default is to have no Errors-To list.
Note: This header field is somewhat controversial, and
may be ignored by many systems, which will use the one of the
"From:", "From", or "Sender:" field
values to report errors.
--file reply-text-file
The name of the file comprising the response text. Only
text files are supported at this time. If omitted, the
reply text sent is:
This is an automatic response. Your message has been
received.
--history-add email-address
Adds the specified email address to the do-not-reply history database.
The entry will be eligible for removal after the number of seconds
specified by the --ignore-interval option. Only other history
database options will be processed. Requires that the
--history-db option be specified. This option may occur
multiple times.
--history-db history-file
Specifies the name of an SDBM database to use to track responses
so that a flood of inbound messages from the same address won't
result in an equal-sized flood of outbound autoresponses. Include
the directory path, but do not specify the .pag or
.dir suffix.
--history-list
Displays the entries in the do-not-reply history database and
when they become eligible to receive autoresponses. Only other
history database options will be processed. Requires that the
--history-db option be specified.
--history-remove email-address
Removes the specified address from the do-not-reply database. The
address immediately becomes eligible to receive autoresponses. Only other
history database options will be processed. Requires
that the --history-db option be specified. This option may occur
multiple times.
--ignore-from pattern
Specifies a regular expression pattern (see 'man perlre') used
to match origins to which replies should not be sent. This
option may occur multiple times. Matches are performed in a
case-INSENSITIVE manner. This option may occur multiple times.
--ignore-header fieldname:pattern
Identifies the name of a field in the message header, and a regular
expression pattern (see 'man perlre') against which to compare its
value. If a match is detected, an autoresponse is not sent.
Matches are performed in a case-INSENSITIVE manner. This option
may occur multiple times.
--ignore-interval seconds
If history tracking is enabled, this value specifies the minimum
number of seconds that must pass before another autoresponse will be
sent to the same source address. For normal operations the minimum
value allowed is 30 seconds; When used with --history-add, the
minimum value is 0 (meaning never send an autoresponse). If omitted,
the default is the minimum.
--ignore-precedence pattern
Specifies a regular expression pattern (see 'man perlre') used
to match message precedences to which replies should not
be sent. This option may occur multiple times. Matches are performed in a
case-INSENSITIVE manner. This option may occur multiple times.
--ignore-subject pattern
Specifies a regular expression pattern (see 'man perlre') used
to match the subjects of messages to which replies should not
be sent. This option may occur multiple times. Matches are performed in a
case-INSENSITIVE manner. This option may occur multiple times.
--[no]include-original
Indicates whether or not the original message should be
included in the response as a MIME attachment. The default
is to not attach the original message.
--no-reply-to pattern
Deprecated in release 1.11. Use --ignore-from instead.
--precedence mailpri
Specifies the precedence of the autoresponse message.
The default value is "bulk".
--sender email-address
An email address to put into the message "From" field (distinct
from the "From:" field). This is useful for environments which
don't honour the Errors-To field. Defaults to the value of the
--errors-to option if one is set, otherwise to the value of the
--from option.
--subject printf-string
A string to be used when constructing the Subject: of the
response message. "%s" in the string will be replaced by
the subject of the original message, after removal of any
leading "Re: " or "Sv: " strings.
The default is "Re: %s".
--[no]verbose
Controls whether detailed processing messages are displayed.
By default they are not.
--version
Displays the programme version and exits. Don't put this
into your rc file, or the autoresponder won't do anything!
--work-dir directory
Specifies where temporary files should be placed; this may
be important if large messages are sent to the autoresponder's
address. The default value is "/tmp".
The conditional expressions (--ignore-from,
--ignore-subject, and --ignore-precedence)
are handled with a Boolean OR
operation. That is, if any of the patterns match,
the message will be ignored and no reply will be sent.
EXIT STATUS
autoresponder returns an exit status of 1 if there are problems with the
command-line options. Otherwise, the exit status is zero indicating
a successfully processed message.
EXAMPLES
All of these examples are of usage in .qmail files, and assume that
the autoresponder script is invoked using the
following single line in the .qmail file:
| /home/doe/autoresponder-script
This is because .qmail files cannot contain continuation lines.
Therefore, the examples show modifications to the autoresponder-script
file, not the .qmail file proper.
This will cause all messages received by the account to get an
response back, unless the incoming message came from a
MAILER-DAEMON address or the value of the X-Spam-Status
header field starts with the word 'yes'. The subject of the response
will be altered; if the original subject was "Meeting Tuesday",
the subject of the automatic response would be "On holiday (was:
Meeting Tuesday)". Note: If this is the only entry in the
.qmail file, no copy of the original message will be kept.
As a complete .qmail file, this will save the inbound
message in an mbox-formatted file, and send an automatic
reply back to the sender. The text of the reply will come
from the file ack.txt, and the original message will be
attached. The reply itself will not itself replyable-to;
this should avoid loops when handling spam sent from a bogus
address. Any errors encountered in the delivery of the
reply may be sent to the 'human-response' address.
Working files are created in the autoresponder.work
subdirectory.
SECURITY CONSIDERATIONS
Use of the --work-dir option is strongly recommended.
Otherwise, message files will be created in the default directory
(/tmp), and sensitive information may be exposed.
Similarly, use of the history tracking and --accept-for
capabilities are recommended to ward off spam.
RESTRICTIONS
In the work directory, autoresponder will create files for
the incoming message and the result of parsing it. These files
may or may not be automatically cleaned up depending upon the
version of the MIME::Parser module you have installed.
Older versions will require manual cleanup; a crontab
entry such as the following may be appropriate: