1MAILBOT(1) Double Precision, Inc. MAILBOT(1)
2
3
4
6 mailbot - A MIME-aware autoresponder utility
7
9 mailbot [options] {program} [arg...]
10
11 In .mailfilter:
12
13 if (/^Subject: *info/)
14 {
15 cc "| mailbot -t /usr/share/autoresponse/info -d autoresponsedb \
16 -A 'From: info@domain.com' /usr/bin/sendmail -f ''"
17 }
18
20 mailbot reads an E-mail message on standard input and creates an E-mail
21 message replying to the original message's sender. A program is
22 specified as an argument to mailbot after all of mailbot options.
23 program is expected to read the created autoreply on its standard
24 input, and mail it. If program is not specified, mailbot runs 'sendmail
25 -f ""'.
26
27 mailbot has several options for suppressing duplicate autoresponse
28 messages. If mailbot chooses not to send an autoresponse, it quietly
29 terminates without running program. The autoresponse is optionally
30 formatted as a MIME delivery status notification.
31
32 The text of the autoresponse is specified by the -t or the -m argument.
33 Either one is required. Everything else is optional. The only exception
34 is the -T replydraft option, which requires the -l option instead of
35 either -t or -m. The default behavior is to send an autoresponse unless
36 the original message has the "Precedence: junk" or the "Precedence:
37 bulk" header, or the "Precedence: list" header, or the "List-ID:"
38 header, or if its MIME content type is "multipart/report" (this is the
39 MIME content type for delivery status notifications). The -M option
40 formats the the autoresponse itself as a MIME delivery status
41 notification.
42
44 -A "header: value"
45 Add a header to the autoresponse. Multiple -A options are allowed.
46 In most situations, the -A option must be used to set the “From:”
47 header in the autogenerated response.
48
49 -faddress
50 Address the autoresponse to address, which must be an RFC 2822[1]
51 address. By default mailbot takes the autoresponse address from the
52 From: (or the Reply-To:) header in the original message. -f, if
53 present, overrides and explicitly sets the autoresponse address.
54 "address" must immediately follow the -f option without an
55 intervening space (it's a single command line argument). An -f
56 option without an address takes the address from the SENDER
57 environment variable.
58
59 -t filename
60 Read text autoresponse from filename, which must contain a plain
61 text message in “flowed-text” format. In a “flowed-text”-formatted
62 message, each line that ends with a space character indicates that
63 the line logically flows into the next line. This allows the
64 message to be reformatted for any shown display width.
65
66 Note
67 Messages in languages (see the -c option) which use spaces as
68 word delimiters must have two spaces at the end of a flowed
69 line. The last space on a flowed line is logically removed, and
70 the first space separates the last word on the previous line
71 from the first word on the next line. Otherwise, the two words
72 will not have a logical space between them if they get
73 repositioned as part of adjusting the message's width for
74 display.
75
76 Messages in ideographic languages that do not use spaces as
77 word delimiters need only one space trailing a flowed line.
78
79 Note
80 The trailing whitespace has no visual impact when shown by
81 software that does not implemented flowed text format, and
82 always displays messages using their original width.
83
84 -c charset
85 Set the autoresponse's MIME character set to charset. Run mailbot
86 without any arguments to see the default character set.
87
88 -m filename
89 Read a MIME autoresponse from filename. This is similar to the -t
90 option, except that filename contains MIME headers, followed by a
91 blank line, and the corresponding MIME content. The contents of
92 filename are inserted in the autoresponse without further
93 processing.
94
95 The specified file must contain the “Content-Type” header
96 specifying the “text/plain” MIME type, with the “format=flowed”,
97 “delsp=yes”, and the “charset” attributes, which override the -c
98 parameter. If the specified file has a “Content-Transfer-Encoding”
99 header it must be either “7bit” or “8bit”, it may not be
100 “quoted-printable”. mailbot always drops any existing
101 “Content-Transfer-Encoding” header and always adds the
102 “Content-Transfer-Encoding: 8bit” header, even with the -m, since
103 the salutation inserted into the message includes the sender's
104 name, which may contain 8-bit characters. Example:
105
106 Content-Type: text/plain; format=flowed; delsp=yes; charset="iso-8859-1"
107
108 Mary had a little lamb,
109 Its fleece was white as snow.
110 And everywhere Mary went,
111 The lamb was sure to go.
112
113 Note
114 When the -m option is specified mailbot ignores the locale's
115 character set and formats the autoreply according to the
116 character set read from the “Content-Type” header.
117
118 -M address
119 Format the autoresponse as a delivery status notification (RFC
120 1894[2]). address is an RFC 2822[1] E-mail address that generates
121 the DSN. Note that the -A option should still be used in addition
122 to -M in order to set the From: header on the autoresponse. -M
123 sets the DSN address only. The -M option automatically sets -T
124 replydsn
125
126 -R type
127 Specify the feedback report type, with type set to abuse, fraud,
128 other, or virus. Must be used together with “-T feedback” or “-T
129 replyfeedback”.
130
131 -T format
132 Set the reply format. format must be one of the following values:
133
134 · “reply” - the default reply format.
135
136 · “replyall” - like “reply”, except also puts the recipients in
137 the original message's “To:” and “Cc:” headers into the “Cc:”
138 header of the generated reply.
139
140 · “replydsn” - like “reply”, except the message is formatted as a
141 delivery status notification.
142
143 · “replydraft” - like “reply”, with the text of the autoresponse
144 coming from a maildir specified by the -l option. See
145 “Autoreplies from a maildir folder”, below.
146
147 · “forward” - attach the original message as forwarded text.
148
149 · “forwardatt” - attach the original message as a forwarded
150 message attachment.
151
152 · “feedback” - generate an Email Feedback Report message (see RFC
153 5965[3]). The “-R” option is required when this is specified.
154
155 · “replyfeedback” - like “feedback”, but also adds a “To:”
156 header, addressed to the original message's sender.
157
158 -N
159 Do not quote the contents of the original message in the message
160 created by “reply”, “replyall”, “replydsn”, “feedback”, and
161 “replyfeedback” options.
162
163 Note
164 The original message gets quoted, in the absence of this
165 option, only if the original message was formatted as plain
166 text. mailbot is unable to quote an original message which was
167 formatted as HTML, or any other non-plaintext format.
168
169 Note
170 For “replydsn”, “feedback”, and “replyfeedback” options, the
171 convention is to attach the original message, or only its
172 headers, separately; so this option should always be specified
173 for these three reply formats.
174
175 -a
176 Attach the entire message, for “replydsn”, “feedback”, and
177 “replyfeedback”, instead of only its headers.
178
179 -e
180 Generate a reply (“reply”-formats) to the address listed in any
181 “Errors-To” or “Return-Path” header, if present, instead of the
182 “From” header.
183
184 -S “salutation”
185 Use the given salutation in the “reply”. The default value is “%F
186 writes:”. The following substitutions are recognized in the
187 salutation string:
188
189 · %% - an explicit % character.
190
191 · %n - a newline character.
192
193 · %C - the “X-Newsgroup:” header from the original message.
194
195 · %N - the “Newsgroups:” header from the original message.
196
197 · %i - the “Message-ID:” header from the original message.
198
199 · %f - the original message's sender's address.
200
201 · %F - the original message's sender's name.
202
203 · %S - the “Subject:” header from the original message
204
205 · %d - the original message's date, in the local timezone.
206
207 · %{...}d - use strftime() to format the original message's date.
208 A plain %d is equivalent to %{%a, %d %b %Y %H:%M:%S %z}d.
209
210 All other characters in the salutation string are left as is.
211
212 -F “marker”
213 When generating a forward, use the marker to separate the forwarded
214 message from the autoreply text, instead of the default “---
215 Forwarded message ---”
216
217 -r addrlist
218 addrlist is a comma-separated list of RFC 2822[1] E-mail addresses.
219 mailbot sends an autoresponse only if the original message has at
220 least one of the specified addresses in any To: or Cc: header.
221
222 -d filename
223 Create a small database, filename, that keeps track of senders'
224 E-mail addresses, and prevent duplicate autoresponses going to the
225 same address (suppress autoresponses going back to the same
226 senders, for subsequent received messages). The -d option is only
227 available if maildrop has GDBM/DB extensions enabled.
228
229 -D x
230 Do not send duplicate autoresponses (see the -d option) for at
231 least x days (default: 1 day). The -d option creates a database of
232 E-mail addresses and the times an autoresponse was last mailed to
233 them. Another autoresponse to the same address will not be mailed
234 until at least the amount of time specified by the -D option has
235 elapsed.
236
237 -s "subject"
238 Set the Subject: header on the autoresponse to subject.
239
240 -n
241 Show the resulting message, do not send it. Used for debugging
242 purposes.
243
244 --feedback-original-envelope-id "<envelopeid>",
245 --feedback-original-mail-from "<mailfrom>",
246 --feedback-reporting-mta "dns; hostname",
247 --feedback-source-ip aaa.bbb.ccc.ddd, --feedback-incidents n,
248 --feedback-authentication-results "results",
249 --feedback-original-rcpt-to "<rcptto>",
250 --feedback-reported-domain example.com
251 Optional parameters to include in the feedback report generated by
252 “feedback” and “replyfeedback”. mailbot always adds “Arrival-Date”
253 with the current time, as well as “Version” and “User-Agent”.
254
255 “--feedback-authentication-results”, “--feedback-original-rcpt-to”
256 and “--feedback-reported-domain” may be specified more than once.
257
258 -l maildir
259 Specifies the maildir for the “-T replydraft” option. See
260 “Autoreplies from a maildir folder”, below.
261
262 Autoreplies from a maildir folder
263 In .mailfilter:
264
265 cc "| mailbot -T replydraft -l './Maildir/.Vacation' \
266 -d autoresponsedb \
267 -A 'From: info@domain.com' /usr/bin/sendmail -f ''"
268 to "./Maildir"
269
270 The -T replydraft reply format takes the content of the autoresponse
271 from the most recent message in a maildir. The -l option specifies the
272 maildir. The above example takes the message from $HOME/Maildir/.Drafts
273 which should be a maildir (with the usual cur, new, and tmp
274 subdirectories). It would typically get created by Courier-IMAP as a
275 folder named “Vacation”.
276
277 This makes it possible to install autoreplies via an IMAP client by
278 creating a folder named “Vacation”, and copying a message into it. The
279 contents of the message become the autoresponse.
280
281 If the named maildir does not exist, or is empty, mailbot does nothing.
282 If the named maildir has more than one message, the most recent message
283 gets used.
284
285 The above example uses additional mailbot options to suppress duplicate
286 autoresponses, and to set the “From:” header on the autoresponse.
287
289 maildrop(1)[4], reformail(1)[5], reformime(1)[6].
290
292 Sam Varshavchik
293 Author
294
296 1. RFC 2822
297 http://tools.ietf.org/html/rfc2822
298
299 2. RFC 1894
300 http://tools.ietf.org/html/rfc1894
301
302 3. RFC 5965
303 http://tools.ietf.org/html/rfc5965
304
305 4. maildrop(1)
306 http://www.courier-mta.org/maildrop/maildrop.html
307
308 5. reformail(1)
309 http://www.courier-mta.org/maildrop/reformail.html
310
311 6. reformime(1)
312 http://www.courier-mta.org/maildrop/reformime.html
313
314
315
316Courier Mail Server 06/20/2015 MAILBOT(1)