| 1 |
'\" t |
| 2 |
.\"<!-- Copyright 1998 - 2009 Double Precision, Inc. See COPYING for --> |
| 3 |
.\"<!-- distribution information. --> |
| 4 |
.\" Title: mailbot |
| 5 |
.\" Author: Sam Varshavchik |
| 6 |
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> |
| 7 |
.\" Date: 11/04/2020 |
| 8 |
.\" Manual: Double Precision, Inc. |
| 9 |
.\" Source: Courier Mail Server |
| 10 |
.\" Language: English |
| 11 |
.\" |
| 12 |
.TH "MAILBOT" "1" "11/04/2020" "Courier Mail Server" "Double Precision, Inc\&." |
| 13 |
.\" ----------------------------------------------------------------- |
| 14 |
.\" * Define some portability stuff |
| 15 |
.\" ----------------------------------------------------------------- |
| 16 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 17 |
.\" http://bugs.debian.org/507673 |
| 18 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 19 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 20 |
.ie \n(.g .ds Aq \(aq |
| 21 |
.el .ds Aq ' |
| 22 |
.\" ----------------------------------------------------------------- |
| 23 |
.\" * set default formatting |
| 24 |
.\" ----------------------------------------------------------------- |
| 25 |
.\" disable hyphenation |
| 26 |
.nh |
| 27 |
.\" disable justification (adjust text to left margin only) |
| 28 |
.ad l |
| 29 |
.\" ----------------------------------------------------------------- |
| 30 |
.\" * MAIN CONTENT STARTS HERE * |
| 31 |
.\" ----------------------------------------------------------------- |
| 32 |
.SH "NAME" |
| 33 |
mailbot \- A MIME\-aware autoresponder utility |
| 34 |
.SH "SYNOPSIS" |
| 35 |
.HP \w'\fBmailbot\fR\ 'u |
| 36 |
\fBmailbot\fR [options] {\fIprogram\fR} [arg...] |
| 37 |
.PP |
| 38 |
In |
| 39 |
\&.mailfilter: |
| 40 |
.sp |
| 41 |
.nf |
| 42 |
if (/^Subject: *info/) |
| 43 |
{ |
| 44 |
cc "| mailbot \-t /usr/share/autoresponse/info \-d autoresponsedb \e |
| 45 |
\-A \*(AqFrom: info@domain\&.com\*(Aq /usr/bin/sendmail \-f \*(Aq\*(Aq" |
| 46 |
} |
| 47 |
.fi |
| 48 |
.SH "DESCRIPTION" |
| 49 |
.PP |
| 50 |
\fBmailbot\fR |
| 51 |
reads an E\-mail message on standard input and creates an E\-mail message replying to the original message\*(Aqs sender\&. A |
| 52 |
\fBprogram\fR |
| 53 |
is specified as an argument to |
| 54 |
\fBmailbot\fR |
| 55 |
after all of |
| 56 |
\fBmailbot\fR |
| 57 |
options\&. |
| 58 |
\fBprogram\fR |
| 59 |
is expected to read the created autoreply on its standard input, and mail it\&. If |
| 60 |
\fBprogram\fR |
| 61 |
is not specified, |
| 62 |
\fBmailbot\fR |
| 63 |
runs \*(Aqsendmail \-f ""\*(Aq\&. |
| 64 |
.PP |
| 65 |
\fBmailbot\fR |
| 66 |
has several options for suppressing duplicate autoresponse messages\&. If |
| 67 |
\fBmailbot\fR |
| 68 |
chooses not to send an autoresponse, it quietly terminates without running |
| 69 |
\fBprogram\fR\&. The autoresponse is optionally formatted as a MIME delivery status notification\&. |
| 70 |
.PP |
| 71 |
The text of the autoresponse is specified by the |
| 72 |
\fB\-t\fR |
| 73 |
or the |
| 74 |
\fB\-m\fR |
| 75 |
argument\&. Either one is required\&. Everything else is optional\&. The only exception is the |
| 76 |
\fB\-T replydraft\fR |
| 77 |
option, which requires the |
| 78 |
\fB\-l\fR |
| 79 |
option instead of either |
| 80 |
\fB\-t\fR |
| 81 |
or |
| 82 |
\fB\-m\fR\&. 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 |
| 83 |
\fB\-M\fR |
| 84 |
option formats the the autoresponse itself as a MIME delivery status notification\&. |
| 85 |
.SH "OPTIONS" |
| 86 |
.PP |
| 87 |
\-A "\fIheader: value\fR" |
| 88 |
.RS 4 |
| 89 |
Add a header to the autoresponse\&. Multiple |
| 90 |
\fB\-A\fR |
| 91 |
options are allowed\&. In most situations, the |
| 92 |
\fB\-A\fR |
| 93 |
option must be used to set the |
| 94 |
\(lqFrom:\(rq |
| 95 |
header in the autogenerated response\&. |
| 96 |
.RE |
| 97 |
.PP |
| 98 |
\-f\fIaddress\fR |
| 99 |
.RS 4 |
| 100 |
Address the autoresponse to |
| 101 |
\fIaddress\fR, which must be an |
| 102 |
\m[blue]\fBRFC 2822\fR\m[]\&\s-2\u[1]\d\s+2 |
| 103 |
address\&. By default |
| 104 |
\fBmailbot\fR |
| 105 |
takes the autoresponse address from the |
| 106 |
From: |
| 107 |
(or the |
| 108 |
Reply\-To:) header in the original message\&. |
| 109 |
\fB\-f\fR, if present, overrides and explicitly sets the autoresponse address\&. "\fIaddress\fR" must immediately follow the |
| 110 |
\fB\-f\fR |
| 111 |
option without an intervening space (it\*(Aqs a single command line argument)\&. An |
| 112 |
\fB\-f\fR |
| 113 |
option without an |
| 114 |
\fIaddress\fR |
| 115 |
takes the address from the |
| 116 |
\fBSENDER\fR |
| 117 |
environment variable\&. |
| 118 |
.RE |
| 119 |
.PP |
| 120 |
\-t \fIfilename\fR |
| 121 |
.RS 4 |
| 122 |
Read text autoresponse from |
| 123 |
\fIfilename\fR, which must contain a plain text message in |
| 124 |
\(lqflowed\-text\(rq |
| 125 |
format\&. In a |
| 126 |
\(lqflowed\-text\(rq\-formatted message, each line that ends with a space character indicates that the line logically flows into the next line\&. This allows the message to be reformatted for any shown display width\&. |
| 127 |
.if n \{\ |
| 128 |
.sp |
| 129 |
.\} |
| 130 |
.RS 4 |
| 131 |
.nr an-no-space-flag 1 |
| 132 |
.nr an-break-flag 1 |
| 133 |
.br |
| 134 |
.ps +1 |
| 135 |
\fBNote\fR |
| 136 |
.ps -1 |
| 137 |
.br |
| 138 |
Messages in languages (see the |
| 139 |
\fB\-c\fR |
| 140 |
option) which use spaces as word delimiters must have |
| 141 |
\fItwo\fR |
| 142 |
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\*(Aqs width for display\&. |
| 143 |
.sp |
| 144 |
Messages in ideographic languages that do not use spaces as word delimiters need only one space trailing a flowed line\&. |
| 145 |
.sp .5v |
| 146 |
.RE |
| 147 |
.if n \{\ |
| 148 |
.sp |
| 149 |
.\} |
| 150 |
.RS 4 |
| 151 |
.nr an-no-space-flag 1 |
| 152 |
.nr an-break-flag 1 |
| 153 |
.br |
| 154 |
.ps +1 |
| 155 |
\fBNote\fR |
| 156 |
.ps -1 |
| 157 |
.br |
| 158 |
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\&. |
| 159 |
.sp .5v |
| 160 |
.RE |
| 161 |
.RE |
| 162 |
.PP |
| 163 |
\-c \fIcharset\fR |
| 164 |
.RS 4 |
| 165 |
Set the autoresponse\*(Aqs MIME character set to |
| 166 |
\fIcharset\fR\&. Run |
| 167 |
\fBmailbot\fR |
| 168 |
without any arguments to see the default character set\&. |
| 169 |
.RE |
| 170 |
.PP |
| 171 |
\-m \fIfilename\fR |
| 172 |
.RS 4 |
| 173 |
Read a MIME autoresponse from |
| 174 |
filename\&. This is similar to the |
| 175 |
\fB\-t\fR |
| 176 |
option, except that |
| 177 |
\fIfilename\fR |
| 178 |
contains MIME headers, followed by a blank line, and the corresponding MIME content\&. The contents of |
| 179 |
\fIfilename\fR |
| 180 |
are inserted in the autoresponse without further processing\&. |
| 181 |
.sp |
| 182 |
The specified file must contain the |
| 183 |
\(lqContent\-Type\(rq |
| 184 |
header specifying the |
| 185 |
\(lqtext/plain\(rq |
| 186 |
MIME type, with the |
| 187 |
\(lqformat=flowed\(rq, |
| 188 |
\(lqdelsp=yes\(rq, and the |
| 189 |
\(lqcharset\(rq |
| 190 |
attributes, which override the |
| 191 |
\fB\-c\fR |
| 192 |
parameter\&. If the specified file has a |
| 193 |
\(lqContent\-Transfer\-Encoding\(rq |
| 194 |
header it must be either |
| 195 |
\(lq7bit\(rq |
| 196 |
or |
| 197 |
\(lq8bit\(rq, it may not be |
| 198 |
\(lqquoted\-printable\(rq\&. |
| 199 |
\fBmailbot\fR |
| 200 |
always drops any existing |
| 201 |
\(lqContent\-Transfer\-Encoding\(rq |
| 202 |
header and always adds the |
| 203 |
\(lqContent\-Transfer\-Encoding: 8bit\(rq |
| 204 |
header, even with the |
| 205 |
\fB\-m\fR, since the salutation inserted into the message includes the sender\*(Aqs name, which may contain 8\-bit characters\&. Example: |
| 206 |
.sp |
| 207 |
.if n \{\ |
| 208 |
.RS 4 |
| 209 |
.\} |
| 210 |
.nf |
| 211 |
Content\-Type: text/plain; format=flowed; delsp=yes; |
| 212 |
charset="iso\-8859\-1" |
| 213 |
|
| 214 |
Mary had a little lamb, |
| 215 |
Its fleece was white as snow\&. |
| 216 |
And everywhere Mary went, |
| 217 |
The lamb was sure to go\&. |
| 218 |
.fi |
| 219 |
.if n \{\ |
| 220 |
.RE |
| 221 |
.\} |
| 222 |
.if n \{\ |
| 223 |
.sp |
| 224 |
.\} |
| 225 |
.RS 4 |
| 226 |
.nr an-no-space-flag 1 |
| 227 |
.nr an-break-flag 1 |
| 228 |
.br |
| 229 |
.ps +1 |
| 230 |
\fBNote\fR |
| 231 |
.ps -1 |
| 232 |
.br |
| 233 |
When the |
| 234 |
\fB\-m\fR |
| 235 |
option is specified |
| 236 |
\fBmailbot\fR |
| 237 |
ignores the locale\*(Aqs character set and formats the autoreply according to the character set read from the |
| 238 |
\(lqContent\-Type\(rq |
| 239 |
header\&. |
| 240 |
.sp .5v |
| 241 |
.RE |
| 242 |
.RE |
| 243 |
.PP |
| 244 |
\-M \fIaddress\fR |
| 245 |
.RS 4 |
| 246 |
Format the autoresponse as a delivery status notification (\m[blue]\fBRFC 1894\fR\m[]\&\s-2\u[2]\d\s+2)\&. |
| 247 |
\fIaddress\fR |
| 248 |
is an |
| 249 |
\m[blue]\fBRFC 2822\fR\m[]\&\s-2\u[1]\d\s+2 |
| 250 |
E\-mail address that generates the DSN\&. Note that the |
| 251 |
\fB\-A\fR |
| 252 |
option should still be used in addition to |
| 253 |
\fB\-M\fR |
| 254 |
in order to set the |
| 255 |
From: |
| 256 |
header on the autoresponse\&. |
| 257 |
\fB\-M\fR |
| 258 |
sets the DSN address only\&. The |
| 259 |
\fB\-M\fR |
| 260 |
option automatically sets |
| 261 |
\fB\-T \fR\fBreplydsn\fR |
| 262 |
.RE |
| 263 |
.PP |
| 264 |
\-R \fItype\fR |
| 265 |
.RS 4 |
| 266 |
Specify the feedback report type, with |
| 267 |
\fItype\fR |
| 268 |
set to |
| 269 |
abuse, |
| 270 |
fraud, |
| 271 |
other, or |
| 272 |
virus\&. Must be used together with |
| 273 |
\(lq\-T feedback\(rq |
| 274 |
or |
| 275 |
\(lq\-T replyfeedback\(rq\&. |
| 276 |
.RE |
| 277 |
.PP |
| 278 |
\-T \fIformat\fR |
| 279 |
.RS 4 |
| 280 |
Set the reply format\&. |
| 281 |
\fIformat\fR |
| 282 |
must be one of the following values: |
| 283 |
.sp |
| 284 |
.RS 4 |
| 285 |
.ie n \{\ |
| 286 |
\h'-04'\(bu\h'+03'\c |
| 287 |
.\} |
| 288 |
.el \{\ |
| 289 |
.sp -1 |
| 290 |
.IP \(bu 2.3 |
| 291 |
.\} |
| 292 |
\(lqreply\(rq |
| 293 |
\- the default reply format\&. |
| 294 |
.RE |
| 295 |
.sp |
| 296 |
.RS 4 |
| 297 |
.ie n \{\ |
| 298 |
\h'-04'\(bu\h'+03'\c |
| 299 |
.\} |
| 300 |
.el \{\ |
| 301 |
.sp -1 |
| 302 |
.IP \(bu 2.3 |
| 303 |
.\} |
| 304 |
\(lqreplyall\(rq |
| 305 |
\- like |
| 306 |
\(lqreply\(rq, except also puts the recipients in the original message\*(Aqs |
| 307 |
\(lqTo:\(rq |
| 308 |
and |
| 309 |
\(lqCc:\(rq |
| 310 |
headers into the |
| 311 |
\(lqCc:\(rq |
| 312 |
header of the generated reply\&. |
| 313 |
.RE |
| 314 |
.sp |
| 315 |
.RS 4 |
| 316 |
.ie n \{\ |
| 317 |
\h'-04'\(bu\h'+03'\c |
| 318 |
.\} |
| 319 |
.el \{\ |
| 320 |
.sp -1 |
| 321 |
.IP \(bu 2.3 |
| 322 |
.\} |
| 323 |
\(lqreplydsn\(rq |
| 324 |
\- like |
| 325 |
\(lqreply\(rq, except the message is formatted as a delivery status notification\&. |
| 326 |
.RE |
| 327 |
.sp |
| 328 |
.RS 4 |
| 329 |
.ie n \{\ |
| 330 |
\h'-04'\(bu\h'+03'\c |
| 331 |
.\} |
| 332 |
.el \{\ |
| 333 |
.sp -1 |
| 334 |
.IP \(bu 2.3 |
| 335 |
.\} |
| 336 |
\(lqreplydraft\(rq |
| 337 |
\- like |
| 338 |
\(lqreply\(rq, with the text of the autoresponse coming from a maildir specified by the |
| 339 |
\fB\-l\fR |
| 340 |
option\&. See |
| 341 |
\(lqAutoreplies from a maildir folder\(rq, below\&. |
| 342 |
.RE |
| 343 |
.sp |
| 344 |
.RS 4 |
| 345 |
.ie n \{\ |
| 346 |
\h'-04'\(bu\h'+03'\c |
| 347 |
.\} |
| 348 |
.el \{\ |
| 349 |
.sp -1 |
| 350 |
.IP \(bu 2.3 |
| 351 |
.\} |
| 352 |
\(lqforward\(rq |
| 353 |
\- attach the original message as forwarded text\&. |
| 354 |
.RE |
| 355 |
.sp |
| 356 |
.RS 4 |
| 357 |
.ie n \{\ |
| 358 |
\h'-04'\(bu\h'+03'\c |
| 359 |
.\} |
| 360 |
.el \{\ |
| 361 |
.sp -1 |
| 362 |
.IP \(bu 2.3 |
| 363 |
.\} |
| 364 |
\(lqforwardatt\(rq |
| 365 |
\- attach the original message as a forwarded message attachment\&. |
| 366 |
.RE |
| 367 |
.sp |
| 368 |
.RS 4 |
| 369 |
.ie n \{\ |
| 370 |
\h'-04'\(bu\h'+03'\c |
| 371 |
.\} |
| 372 |
.el \{\ |
| 373 |
.sp -1 |
| 374 |
.IP \(bu 2.3 |
| 375 |
.\} |
| 376 |
\(lqfeedback\(rq |
| 377 |
\- generate an Email Feedback Report message (see |
| 378 |
\m[blue]\fBRFC 5965\fR\m[]\&\s-2\u[3]\d\s+2)\&. The |
| 379 |
\(lq\-R\(rq |
| 380 |
option is required when this is specified\&. |
| 381 |
.RE |
| 382 |
.sp |
| 383 |
.RS 4 |
| 384 |
.ie n \{\ |
| 385 |
\h'-04'\(bu\h'+03'\c |
| 386 |
.\} |
| 387 |
.el \{\ |
| 388 |
.sp -1 |
| 389 |
.IP \(bu 2.3 |
| 390 |
.\} |
| 391 |
\(lqreplyfeedback\(rq |
| 392 |
\- like |
| 393 |
\(lqfeedback\(rq, but also adds a |
| 394 |
\(lqTo:\(rq |
| 395 |
header, addressed to the original message\*(Aqs sender\&. |
| 396 |
.RE |
| 397 |
.RE |
| 398 |
.PP |
| 399 |
\-N |
| 400 |
.RS 4 |
| 401 |
Do not quote the contents of the original message in the message created by |
| 402 |
\(lqreply\(rq, |
| 403 |
\(lqreplyall\(rq, |
| 404 |
\(lqreplydsn\(rq, |
| 405 |
\(lqfeedback\(rq, and |
| 406 |
\(lqreplyfeedback\(rq |
| 407 |
options\&. |
| 408 |
.if n \{\ |
| 409 |
.sp |
| 410 |
.\} |
| 411 |
.RS 4 |
| 412 |
.nr an-no-space-flag 1 |
| 413 |
.nr an-break-flag 1 |
| 414 |
.br |
| 415 |
.ps +1 |
| 416 |
\fBNote\fR |
| 417 |
.ps -1 |
| 418 |
.br |
| 419 |
The original message gets quoted, in the absence of this option, only if the original message was formatted as plain text\&. |
| 420 |
\fBmailbot\fR |
| 421 |
is unable to quote an original message which was formatted as |
| 422 |
HTML, or any other non\-plaintext format\&. |
| 423 |
.sp .5v |
| 424 |
.RE |
| 425 |
.if n \{\ |
| 426 |
.sp |
| 427 |
.\} |
| 428 |
.RS 4 |
| 429 |
.nr an-no-space-flag 1 |
| 430 |
.nr an-break-flag 1 |
| 431 |
.br |
| 432 |
.ps +1 |
| 433 |
\fBNote\fR |
| 434 |
.ps -1 |
| 435 |
.br |
| 436 |
For |
| 437 |
\(lqreplydsn\(rq, |
| 438 |
\(lqfeedback\(rq, and |
| 439 |
\(lqreplyfeedback\(rq |
| 440 |
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\&. |
| 441 |
.sp .5v |
| 442 |
.RE |
| 443 |
.RE |
| 444 |
.PP |
| 445 |
\-a |
| 446 |
.RS 4 |
| 447 |
Attach the entire message, for |
| 448 |
\(lqreplydsn\(rq, |
| 449 |
\(lqfeedback\(rq, and |
| 450 |
\(lqreplyfeedback\(rq, instead of only its headers\&. |
| 451 |
.RE |
| 452 |
.PP |
| 453 |
\-e |
| 454 |
.RS 4 |
| 455 |
Generate a reply (\(lqreply\(rq\-formats) to the address listed in any |
| 456 |
\(lqErrors\-To\(rq |
| 457 |
or |
| 458 |
\(lqReturn\-Path\(rq |
| 459 |
header, if present, instead of the |
| 460 |
\(lqFrom\(rq |
| 461 |
header\&. |
| 462 |
.RE |
| 463 |
.PP |
| 464 |
\-S \(lqsalutation\(rq |
| 465 |
.RS 4 |
| 466 |
Use the given |
| 467 |
\fIsalutation\fR |
| 468 |
in the |
| 469 |
\(lqreply\(rq\&. The default value is |
| 470 |
\(lq%F writes:\(rq\&. The following substitutions are recognized in the salutation string: |
| 471 |
.sp |
| 472 |
.RS 4 |
| 473 |
.ie n \{\ |
| 474 |
\h'-04'\(bu\h'+03'\c |
| 475 |
.\} |
| 476 |
.el \{\ |
| 477 |
.sp -1 |
| 478 |
.IP \(bu 2.3 |
| 479 |
.\} |
| 480 |
%% |
| 481 |
\- an explicit |
| 482 |
% |
| 483 |
character\&. |
| 484 |
.RE |
| 485 |
.sp |
| 486 |
.RS 4 |
| 487 |
.ie n \{\ |
| 488 |
\h'-04'\(bu\h'+03'\c |
| 489 |
.\} |
| 490 |
.el \{\ |
| 491 |
.sp -1 |
| 492 |
.IP \(bu 2.3 |
| 493 |
.\} |
| 494 |
%n |
| 495 |
\- a newline character\&. |
| 496 |
.RE |
| 497 |
.sp |
| 498 |
.RS 4 |
| 499 |
.ie n \{\ |
| 500 |
\h'-04'\(bu\h'+03'\c |
| 501 |
.\} |
| 502 |
.el \{\ |
| 503 |
.sp -1 |
| 504 |
.IP \(bu 2.3 |
| 505 |
.\} |
| 506 |
%C |
| 507 |
\- the |
| 508 |
\(lqX\-Newsgroup:\(rq |
| 509 |
header from the original message\&. |
| 510 |
.RE |
| 511 |
.sp |
| 512 |
.RS 4 |
| 513 |
.ie n \{\ |
| 514 |
\h'-04'\(bu\h'+03'\c |
| 515 |
.\} |
| 516 |
.el \{\ |
| 517 |
.sp -1 |
| 518 |
.IP \(bu 2.3 |
| 519 |
.\} |
| 520 |
%N |
| 521 |
\- the |
| 522 |
\(lqNewsgroups:\(rq |
| 523 |
header from the original message\&. |
| 524 |
.RE |
| 525 |
.sp |
| 526 |
.RS 4 |
| 527 |
.ie n \{\ |
| 528 |
\h'-04'\(bu\h'+03'\c |
| 529 |
.\} |
| 530 |
.el \{\ |
| 531 |
.sp -1 |
| 532 |
.IP \(bu 2.3 |
| 533 |
.\} |
| 534 |
%i |
| 535 |
\- the |
| 536 |
\(lqMessage\-ID:\(rq |
| 537 |
header from the original message\&. |
| 538 |
.RE |
| 539 |
.sp |
| 540 |
.RS 4 |
| 541 |
.ie n \{\ |
| 542 |
\h'-04'\(bu\h'+03'\c |
| 543 |
.\} |
| 544 |
.el \{\ |
| 545 |
.sp -1 |
| 546 |
.IP \(bu 2.3 |
| 547 |
.\} |
| 548 |
%f |
| 549 |
\- the original message\*(Aqs sender\*(Aqs address\&. |
| 550 |
.RE |
| 551 |
.sp |
| 552 |
.RS 4 |
| 553 |
.ie n \{\ |
| 554 |
\h'-04'\(bu\h'+03'\c |
| 555 |
.\} |
| 556 |
.el \{\ |
| 557 |
.sp -1 |
| 558 |
.IP \(bu 2.3 |
| 559 |
.\} |
| 560 |
%F |
| 561 |
\- the original message\*(Aqs sender\*(Aqs name\&. |
| 562 |
.RE |
| 563 |
.sp |
| 564 |
.RS 4 |
| 565 |
.ie n \{\ |
| 566 |
\h'-04'\(bu\h'+03'\c |
| 567 |
.\} |
| 568 |
.el \{\ |
| 569 |
.sp -1 |
| 570 |
.IP \(bu 2.3 |
| 571 |
.\} |
| 572 |
%S |
| 573 |
\- the |
| 574 |
\(lqSubject:\(rq |
| 575 |
header from the original message |
| 576 |
.RE |
| 577 |
.sp |
| 578 |
.RS 4 |
| 579 |
.ie n \{\ |
| 580 |
\h'-04'\(bu\h'+03'\c |
| 581 |
.\} |
| 582 |
.el \{\ |
| 583 |
.sp -1 |
| 584 |
.IP \(bu 2.3 |
| 585 |
.\} |
| 586 |
%d |
| 587 |
\- the original message\*(Aqs date, in the local timezone\&. |
| 588 |
.RE |
| 589 |
.sp |
| 590 |
.RS 4 |
| 591 |
.ie n \{\ |
| 592 |
\h'-04'\(bu\h'+03'\c |
| 593 |
.\} |
| 594 |
.el \{\ |
| 595 |
.sp -1 |
| 596 |
.IP \(bu 2.3 |
| 597 |
.\} |
| 598 |
%{\fI\&.\&.\&.\fR}d |
| 599 |
\- use |
| 600 |
\fBstrftime\fR() to format the original message\*(Aqs date\&. A plain |
| 601 |
%d |
| 602 |
is equivalent to |
| 603 |
%{%a, %d %b %Y %H:%M:%S %z}d\&. |
| 604 |
.RE |
| 605 |
.sp |
| 606 |
All other characters in the salutation string are left as is\&. |
| 607 |
.RE |
| 608 |
.PP |
| 609 |
\-F \(lqmarker\(rq |
| 610 |
.RS 4 |
| 611 |
When generating a |
| 612 |
forward, use the |
| 613 |
\fImarker\fR |
| 614 |
to separate the forwarded message from the autoreply text, instead of the default |
| 615 |
\(lq\-\-\- Forwarded message \-\-\-\(rq |
| 616 |
.RE |
| 617 |
.PP |
| 618 |
\-r \fIaddrlist\fR |
| 619 |
.RS 4 |
| 620 |
\fIaddrlist\fR |
| 621 |
is a comma\-separated list of |
| 622 |
\m[blue]\fBRFC 2822\fR\m[]\&\s-2\u[1]\d\s+2 |
| 623 |
E\-mail addresses\&. |
| 624 |
\fBmailbot\fR |
| 625 |
sends an autoresponse only if the original message has at least one of the specified addresses in any |
| 626 |
To: |
| 627 |
or |
| 628 |
Cc: |
| 629 |
header\&. |
| 630 |
.RE |
| 631 |
.PP |
| 632 |
\-d \fIfilename\fR |
| 633 |
.RS 4 |
| 634 |
Create a small database, |
| 635 |
\fIfilename\fR, that keeps track of senders\*(Aq E\-mail addresses, and prevent duplicate autoresponses going to the same address (suppress autoresponses going back to the same senders, for subsequent received messages)\&. The |
| 636 |
\fB\-d\fR |
| 637 |
option is only available if |
| 638 |
\fBmaildrop\fR |
| 639 |
has GDBM/DB extensions enabled\&. |
| 640 |
.RE |
| 641 |
.PP |
| 642 |
\-D \fIx\fR |
| 643 |
.RS 4 |
| 644 |
Do not send duplicate autoresponses (see the |
| 645 |
\fB\-d\fR |
| 646 |
option) for at least |
| 647 |
\fIx\fR |
| 648 |
days (default: 1 day)\&. The |
| 649 |
\fB\-d\fR |
| 650 |
option creates a database of E\-mail addresses and the times an autoresponse was last mailed to them\&. Another autoresponse to the same address will not be mailed until at least the amount of time specified by the |
| 651 |
\fB\-D\fR |
| 652 |
option has elapsed\&. |
| 653 |
.RE |
| 654 |
.PP |
| 655 |
\-s "\fIsubject\fR" |
| 656 |
.RS 4 |
| 657 |
Set the |
| 658 |
Subject: |
| 659 |
header on the autoresponse to |
| 660 |
\fIsubject\fR\&. |
| 661 |
.RE |
| 662 |
.PP |
| 663 |
\-n |
| 664 |
.RS 4 |
| 665 |
Show the resulting message, do not send it\&. Used for debugging purposes\&. |
| 666 |
.RE |
| 667 |
.PP |
| 668 |
\-\-feedback\-original\-envelope\-id\ \&\fI"<envelopeid>"\fR, \-\-feedback\-original\-mail\-from\ \&\fI"<mailfrom>"\fR, \-\-feedback\-reporting\-mta\ \&"\fIdns;\ \&hostname"\fR, \-\-feedback\-source\-ip\ \&\fIaaa\&.bbb\&.ccc\&.ddd\fR, \-\-feedback\-incidents\ \&\fIn\fR, \-\-feedback\-authentication\-results\ \&\fI"results"\fR, \-\-feedback\-original\-rcpt\-to\ \&\fI"<rcptto>"\fR, \-\-feedback\-reported\-domain\ \&\fIexample\&.com\fR |
| 669 |
.RS 4 |
| 670 |
Optional parameters to include in the feedback report generated by |
| 671 |
\(lqfeedback\(rq |
| 672 |
and |
| 673 |
\(lqreplyfeedback\(rq\&. |
| 674 |
\fBmailbot\fR |
| 675 |
always adds |
| 676 |
\(lqArrival\-Date\(rq |
| 677 |
with the current time, as well as |
| 678 |
\(lqVersion\(rq |
| 679 |
and |
| 680 |
\(lqUser\-Agent\(rq\&. |
| 681 |
.sp |
| 682 |
\(lq\-\-feedback\-authentication\-results\(rq, |
| 683 |
\(lq\-\-feedback\-original\-rcpt\-to\(rq |
| 684 |
and |
| 685 |
\(lq\-\-feedback\-reported\-domain\(rq |
| 686 |
may be specified more than once\&. |
| 687 |
.sp |
| 688 |
Where appropriate, UTF\-8 encoding should be used for non\-ASCII characters\&. |
| 689 |
.RE |
| 690 |
.PP |
| 691 |
\-l \fImaildir\fR |
| 692 |
.RS 4 |
| 693 |
Specifies the maildir for the |
| 694 |
\(lq\-T replydraft\(rq |
| 695 |
option\&. See |
| 696 |
\(lqAutoreplies from a maildir folder\(rq, below\&. |
| 697 |
.RE |
| 698 |
.SS "Autoreplies from a maildir folder" |
| 699 |
.PP |
| 700 |
In |
| 701 |
\&.mailfilter: |
| 702 |
.sp |
| 703 |
.if n \{\ |
| 704 |
.RS 4 |
| 705 |
.\} |
| 706 |
.nf |
| 707 |
cc "| mailbot \-T replydraft \-l \*(Aq\&./Maildir/\&.Vacation\*(Aq \e |
| 708 |
\-d autoresponsedb \e |
| 709 |
\-A \*(AqFrom: info@domain\&.com\*(Aq /usr/bin/sendmail \-f \*(Aq\*(Aq" |
| 710 |
to "\&./Maildir" |
| 711 |
.fi |
| 712 |
.if n \{\ |
| 713 |
.RE |
| 714 |
.\} |
| 715 |
.PP |
| 716 |
The |
| 717 |
\fB\-T replydraft\fR |
| 718 |
reply format takes the content of the autoresponse from the most recent message in a maildir\&. The |
| 719 |
\fB\-l\fR |
| 720 |
option specifies the maildir\&. The above example takes the message from |
| 721 |
$HOME/Maildir/\&.Drafts |
| 722 |
which should be a maildir (with the usual |
| 723 |
cur, |
| 724 |
new, and |
| 725 |
tmp |
| 726 |
subdirectories)\&. It would typically get created by Courier\-IMAP as a folder named |
| 727 |
\(lqVacation\(rq\&. |
| 728 |
.PP |
| 729 |
This makes it possible to install autoreplies via an IMAP client by creating a folder named |
| 730 |
\(lqVacation\(rq, and copying a message into it\&. The contents of the message become the autoresponse\&. |
| 731 |
.PP |
| 732 |
If the named maildir does not exist, or is empty, |
| 733 |
\fBmailbot\fR |
| 734 |
does nothing\&. If the named maildir has more than one message, the most recent message gets used\&. |
| 735 |
.PP |
| 736 |
The above example uses additional |
| 737 |
\fBmailbot\fR |
| 738 |
options to suppress duplicate autoresponses, and to set the |
| 739 |
\(lqFrom:\(rq |
| 740 |
header on the autoresponse\&. |
| 741 |
.SH "SEE ALSO" |
| 742 |
.PP |
| 743 |
\m[blue]\fB\fBmaildrop\fR(1)\fR\m[]\&\s-2\u[4]\d\s+2, |
| 744 |
\m[blue]\fB\fBreformail\fR(1)\fR\m[]\&\s-2\u[5]\d\s+2, |
| 745 |
\m[blue]\fB\fBreformime\fR(1)\fR\m[]\&\s-2\u[6]\d\s+2\&. |
| 746 |
.SH "AUTHOR" |
| 747 |
.PP |
| 748 |
\fBSam Varshavchik\fR |
| 749 |
.RS 4 |
| 750 |
Author |
| 751 |
.RE |
| 752 |
.SH "NOTES" |
| 753 |
.IP " 1." 4 |
| 754 |
RFC 2822 |
| 755 |
.RS 4 |
| 756 |
\%http://tools.ietf.org/html/rfc2822 |
| 757 |
.RE |
| 758 |
.IP " 2." 4 |
| 759 |
RFC 1894 |
| 760 |
.RS 4 |
| 761 |
\%http://tools.ietf.org/html/rfc1894 |
| 762 |
.RE |
| 763 |
.IP " 3." 4 |
| 764 |
RFC 5965 |
| 765 |
.RS 4 |
| 766 |
\%http://tools.ietf.org/html/rfc5965 |
| 767 |
.RE |
| 768 |
.IP " 4." 4 |
| 769 |
\fBmaildrop\fR(1) |
| 770 |
.RS 4 |
| 771 |
\%http://www.courier-mta.org/maildrop/maildrop.html |
| 772 |
.RE |
| 773 |
.IP " 5." 4 |
| 774 |
\fBreformail\fR(1) |
| 775 |
.RS 4 |
| 776 |
\%http://www.courier-mta.org/maildrop/reformail.html |
| 777 |
.RE |
| 778 |
.IP " 6." 4 |
| 779 |
\fBreformime\fR(1) |
| 780 |
.RS 4 |
| 781 |
\%http://www.courier-mta.org/maildrop/reformime.html |
| 782 |
.RE |