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 default
34 behavior is to send an autoresponse unless the original message has the
35 "Precedence: junk" or the "Precedence: bulk" header, or the
36 "Precedence: list" header, or the "List-ID:" header, or if its MIME
37 content type is "multipart/report" (this is the MIME content type for
38 delivery status notifications). The -M option formats the the
39 autoresponse itself as a MIME delivery status notification.
40
42 -A "header: value"
43 Add a header to the autoresponse. Multiple -A options are allowed.
44 In most situations, the -A option must be used to set the “From:”
45 header in the autogenerated response.
46
47 -faddress
48 Address the autoresponse to address, which must be an RFC 2822[1]
49 address. By default mailbot takes the autoresponse address from the
50 From: (or the Reply-To:) header in the original message. -f, if
51 present, overrides and explicitly sets the autoresponse address.
52 "address" must immediately follow the -f option without an
53 intervening space (it´s a single command line argument). An -f
54 option without an address takes the address from the SENDER
55 environment variable.
56
57 -t filename
58 Read text autoresponse from filename, which should contain a plain
59 text message.
60
61 -c charset
62 Set the autoresponse´s MIME character set to charset. Run mailbot
63 without any arguments to see the default character set.
64
65 -m filename
66 Read a MIME autoresponse from filename. This is similar to the -t
67 option, except that filename contains MIME headers, followed by a
68 blank line, and the corresponding MIME content. The contents of
69 filename are inserted in the autoresponse without further
70 processing.
71
72 The specified file must contain the “Content-Type” header. mailbot
73 always adds the “Content-Transfer-Encoding: 8bit” headers even with
74 the -m, since the salutation inserted into the message includes the
75 sender´s name, which may contain 8-bit characters.
76
77 -M address
78 Format the autoresponse as a delivery status notification (RFC
79 1894[2]). address is an RFC 2822[1] E-mail address that generates
80 the DSN. Note that the -A option should still be used in addition
81 to -M in order to set the From: header on the autoresponse. -M
82 sets the DSN address only. The -M option automatically sets -T
83 replydsn
84
85 -T format
86 Set the reply format. format must be one of the following values:
87
88 · “reply” - the default reply format.
89
90 · “replyall” - like “reply”, except also puts the recipients in
91 the original message´s “To:” and “Cc:” headers into the “Cc:”
92 header of the generated reply.
93
94 · “replydsn” - like “reply”, except the message is formatted as
95 a delivery status notification.
96
97 · “forward” - attach the original message as forwarded text.
98
99 · “forwardatt” - attach the original message as a forwarded
100 message attachment.
101
102 -e
103 Generate a reply (“reply”-formats) to the address listed in any
104 “Errors-To” or “Return-Path” header, if present, instead of the
105 “From” header.
106
107 -S “salutation”
108 Use the given salutation in the “reply”. The default value is “%F
109 writes:”. The following substitutions are recognized in the
110 salutation string:
111
112 · %% - an explicit % character.
113
114 · %n - a newline character.
115
116 · %C - the “X-Newsgroup:” header from the original message.
117
118 · %N - the “Newsgroups:” header from the original message.
119
120 · %i - the “Message-ID:” header from the original message.
121
122 · %f - the original message´s sender´s address.
123
124 · %F - the original message´s sender´s name.
125
126 · %S - the “Subject:” header from the original message
127
128 · %d - the original message´s date, in the local timezone.
129
130 · %{...}d - use strftime() to format the original message´s
131 date. A plain %d is equivalent to %{%a, %d %b %Y %H:%M:%S %z}d.
132 All other characters in the salutation string are left as is.
133
134 -F “marker”
135 When generating a forward, use the marker to separate the
136 forwarded message from the autoreply text, instead of the
137 default “--- Forwarded message ---”
138
139 -r addrlist
140
141 addrlist is a comma-separated list of RFC 2822[1] E-mail
142 addresses. mailbot sends an autoresponse only if the original
143 message has at least one of the specified addresses in any To:
144 or Cc: header.
145
146 -d filename
147 Create a small database, filename, that keeps track of sender´s
148 E-mail addresses, and prevent duplicate autoresponses going to
149 the same address (suppress autoresponses going back to the same
150 senders, for subsequent received messages). The -d option is
151 only available if maildrop has GDBM/DB extensions enabled.
152
153 -D x
154 Do not send duplicate autoresponses (see the -d option) for at
155 least x days (default: 1 day). The -d option creates a database
156 of E-mail addresses and the times an autoresponse was last
157 mailed to them. Another autoresponse to the same address will
158 not be mailed until at least the amount of time specified by
159 the -D option has elapsed.
160
161 -s "subject"
162 Set the Subject: header on the autoresponse to subject.
163
164 -n
165 Show the resulting message, do not send it. Used for debugging
166 purposes.
167
169 maildrop(1)[3], reformail(1)[4], reformime(1)[5].
170
172 1. RFC 2822
173 http://www.rfc-editor.org/rfc/rfc2822.txt
174
175 2. RFC 1894
176 http://www.rfc-editor.org/rfc/rfc1894.txt
177
178 3. maildrop(1)
179 [set $man.base.url.for.relative.links]/maildrop.html
180
181 4. reformail(1)
182 [set $man.base.url.for.relative.links]/reformail.html
183
184 5. reformime(1)
185 [set $man.base.url.for.relative.links]/reformime.html
186
187
188
189Double Precision, Inc. 02/19/2010 MAILBOT(1)