MAILBOT(1) | Double Precision, Inc. | MAILBOT(1) |
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 only exception is the -T replydraft option, which requires the -l option instead of either -t or -m. The default behavior is to send an autoresponse unless the original message has the "Precedence: junk" or the "Precedence: bulk" header, or the "Precedence: list" header, or the "List-ID:" header, or if its MIME content type is "multipart/report" (this is the MIME content type for delivery status notifications). The -M option formats the the autoresponse itself as a MIME delivery status notification.
OPTIONS¶
-A "header: value"
-faddress
-t filename
Note
Messages in languages (see the -c option) which use spaces as word delimiters must have two spaces at the end of a flowed line. The last space on a flowed line is logically removed, and the first space separates the last word on the previous line from the first word on the next line. Otherwise, the two words will not have a logical space between them if they get repositioned as part of adjusting the message's width for display.
Messages in ideographic languages that do not use spaces as word delimiters need only one space trailing a flowed line.
Note
The trailing whitespace has no visual impact when shown by software that does not implemented flowed text format, and always displays messages using their original width.
-c charset
-m filename
The specified file must contain the “Content-Type” header specifying the “text/plain” MIME type, with the “format=flowed”, “delsp=yes”, and the “charset” attributes, which override the -c parameter. If the specified file has a “Content-Transfer-Encoding” header it must be either “7bit” or “8bit”, it may not be “quoted-printable”. mailbot always drops any existing “Content-Transfer-Encoding” header and always adds the “Content-Transfer-Encoding: 8bit” header, even with the -m, since the salutation inserted into the message includes the sender's name, which may contain 8-bit characters. Example:
Content-Type: text/plain; format=flowed; delsp=yes; charset="iso-8859-1" Mary had a little lamb, Its fleece was white as snow. And everywhere Mary went, The lamb was sure to go.
Note
When the -m option is specified mailbot ignores the locale's character set and formats the autoreply according to the character set read from the “Content-Type” header.
-M address
-R type
-T format
-N
Note
The original message gets quoted, in the absence of this option, only if the original message was formatted as plain text. mailbot is unable to quote an original message which was formatted as HTML, or any other non-plaintext format.
Note
For “replydsn”, “feedback”, and “replyfeedback” options, the convention is to attach the original message, or only its headers, separately; so this option should always be specified for these three reply formats.
-a
-e
-S “salutation”
All other characters in the salutation string are left as is.
-F “marker”
-r addrlist
-d filename
-D x
-s "subject"
-n
--feedback-original-envelope-id "<envelopeid>", --feedback-original-mail-from "<mailfrom>", --feedback-reporting-mta "dns; hostname", --feedback-source-ip aaa.bbb.ccc.ddd, --feedback-incidents n, --feedback-authentication-results "results", --feedback-original-rcpt-to "<rcptto>", --feedback-reported-domain example.com
“--feedback-authentication-results”, “--feedback-original-rcpt-to” and “--feedback-reported-domain” may be specified more than once.
-l maildir
Autoreplies from a maildir folder¶
In .mailfilter:
cc "| mailbot -T replydraft -l './Maildir/.Vacation' \
-d autoresponsedb \
-A 'From: info@domain.com' /usr/bin/sendmail -f ''" to "./Maildir"
The -T replydraft reply format takes the content of the autoresponse from the most recent message in a maildir. The -l option specifies the maildir. The above example takes the message from $HOME/Maildir/.Drafts which should be a maildir (with the usual cur, new, and tmp subdirectories). It would typically get created by Courier-IMAP as a folder named “Vacation”.
This makes it possible to install autoreplies via an IMAP client by creating a folder named “Vacation”, and copying a message into it. The contents of the message become the autoresponse.
If the named maildir does not exist, or is empty, mailbot does nothing. If the named maildir has more than one message, the most recent message gets used.
The above example uses additional mailbot options to suppress duplicate autoresponses, and to set the “From:” header on the autoresponse.
SEE ALSO¶
maildrop(1)[4], reformail(1)[5], reformime(1)[6].
AUTHOR¶
Sam Varshavchik
NOTES¶
- 1.
- RFC 2822
- 2.
- RFC 1894
- 3.
- RFC 5965
- 4.
- maildrop(1)
- 5.
- reformail(1)
- 6.
- reformime(1)
06/20/2015 | Courier Mail Server |