MAILBOT(1)
π MAILBOT β the manual, but make it cute π
ok so welcome to the mailbot(1) page bestie, this is section 1 of the manual and it's giving "S. Varshavchik" in the corner, iconic, we love a credited author π«Ά
β¨ NAME β¨
mailbot β a MIME-aware autoresponder utility π
πΈ SYNOPSIS πΈ
mailbot [options] {program} [arg...]
and in your .mailfilter, it looks like this:
if (/^Subject: *info/)
{
cc "| mailbot -t /usr/share/autoresponse/info -d autoresponsedb \
-A 'From: info@domain.com' /usr/bin/sendmail -f ''"
}
π¦ DESCRIPTION π¦
ok so here's the vibe: mailbot reads an E-mail message on standard input, and then it creates an E-mail message replying to the original message's sender. like, it's an autoresponder bestie, that's the whole thing π
you give it a program as an argument to mailbot after all the mailbot options. that program is expected to read the created autoreply on its standard input, and mail it. if program is not specified, mailbot runs 'sendmail -f ""'. periodt.
mailbot has several options for suppressing duplicate autoresponse messages. and if mailbot chooses not to send an autoresponse, it quietly terminates without running program. no drama, no message, it just ghosts β¨
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. iykyk π
and now the default behaviour, listen up: by defaultmailbotsends an autoresponse unless the original message has the"Precedence: junk"header, or the"Precedence: bulk"header, or the"Precedence: list"header, or the"List-ID:"header, or if its MIME content type is"multipart/report"β that's the MIME content type for delivery status notifications, for the record. π
and the -M option formats the the autoresponse itself as a MIME delivery status notification. slay π
more parts coming bestie, don't go anywhere π
β¨ OPTIONS β¨
Bestie, this is the whole toolkit. Every flag, every vibe, all of it π
-A "header: value"β drops a header into the autoresponse. You can stack-Aas many times as you want. And lowkey? In most situations you have to use-Ato set theFrom:header on your autogenerated response. Like, it's not optional-optional. Set it. π«Ά-faddressβ addresses the autoresponse to address, which has to be an RFC 2822[1] address. Normally mailbot just steals the autoresponse address from theFrom:header (or theReply-To:header) of the original message. But-f, when it shows up, overrides all that and explicitly sets the autoresponse address. Heads up tho: address has to come immediately after-fwith no space in between β it's one single command line argument, no cap. And if you write-fwith no address at all? Then it pulls the address from theSENDERenvironment variable. β¨-t filenameβ reads the text autoresponse out of filename, which must contain a plain text message in "flowed-text" format. And bestie, "flowed-text" means: every line that ends with a space character is saying "hey, I logically flow into the next line." That's the whole trick β it lets the message get reformatted for literally any display width. π
Note β If your message is in a language (peep the -c option) that uses spaces as word delimiters, you need two spaces at the end of a flowed line. Why? Because the last space on a flowed line gets logically removed, and the first space is what separates the last word on the previous line from the first word on the next line. Skip that and your two words end up with no logical space between them if they get repositioned while adjusting the message width for display. π But messages in ideographic languages that don't use spaces as word delimiters? They only need one space trailing a flowed line. Different rules, different slay. π
Note β The trailing whitespace has zero visual impact when it's shown by software that doesn't implement flowed text format, and that kind of software always displays messages using their original width. So it's giving invisible, not giving messy. π
-c charsetβ sets the autoresponse's MIME character set to charset. Wanna know the default character set? Run mailbot with no arguments and it'll tell you. π-m filenameβ reads a MIME autoresponse from filename. It's basically the-toption's cousin, except filename holds MIME headers, then a blank line, then the matching MIME content. The contents of filename get inserted into the autoresponse with no further processing. Periodt.
Okay so the rules on that file, listen up:
- It must contain the
Content-Typeheader specifying thetext/plainMIME type, with theformat=flowed,delsp=yes, and thecharsetattributes β and those override the-cparameter. - If the file has a
Content-Transfer-Encodingheader, it must be either7bitor8bit. It may not bequoted-printable. - mailbot always drops any existing
Content-Transfer-Encodingheader and always addsContent-Transfer-Encoding: 8bit, even with-mβ because the salutation inserted into the message includes the sender's name, which may contain 8-bit characters. Not negotiable, sorry bestie. π
Example, so you can see the shape of it:
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-mis specified, mailbot ignores the locale's character set and formats the autoreply according to the character set it read from theContent-Typeheader. It's that header's world and we're just living in it. π¦
-M addressβ formats the autoresponse as a delivery status notification (RFC 1894[2]). address is an RFC 2822[1] E-mail address that generates the DSN. Quick note: you should still use-Ain addition to-Mso theFrom:header gets set on the autoresponse β-Monly sets the DSN address. Also,-Mautomatically sets-T replydsnfor you. β¨-R typeβ specifies the feedback report type, where type isabuse,fraud,other, orvirus. This one must be used together with-T feedbackor-T replyfeedback. No solo runs. π«-T formatβ sets the reply format. format has to be one of these values:- "reply" β the default reply format. π
- "replyall" β like "reply", except it also scoops up the recipients in the original message's
To:andCc:headers and puts them into theCc:header of the generated reply. Everyone's invited fr fr. - "replydsn" β like "reply", except the message gets formatted as a delivery status notification.
- "replydraft" β like "reply", but the text of the autoresponse comes from a maildir specified by the
-loption. Peep "Autoreplies from a maildir folder" below. π - "forward" β attaches the original message as forwarded text.
- "forwardatt" β attaches the original message as a forwarded message attachment.
- "feedback" β generates an Email Feedback Report message (see RFC 5965[3]). When you specify this one, the
-Roption is required. π₯ - "replyfeedback" β like "feedback", except it also adds a
To:header addressed to the original message's sender.
-Nβ do not quote the contents of the original message in the message created by "reply", "replyall", "replydsn", "feedback", and "replyfeedback". Not me being picky about quoting π
Note β Without this option, the original message only gets quoted if the original message was formatted as plain text. mailbot literally cannot quote an original message formatted as HTML, or any other non-plaintext format. It's not being lazy, it's just not possible. π Also, using the-moption to specify MIME contents other than plain text automatically implies-N. Sneaky, but correct. Note β For the "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 those three reply formats. Always always. π
-aβ attaches the entire message for "replydsn", "feedback", and "replyfeedback", instead of only its headers. Go big. π-eβ generates a reply ("reply"-formats) to the address listed in anyErrors-ToorReturn-Pathheader, if one's present, instead of theFromheader. Taking the scenic route home. π-S "salutation"β uses the given salutation in the "reply". The default value is%F writes:. Here's every substitution it recognizes, bestie, memorize the chart:%%β an explicit%character.%nβ a newline character.%Cβ theX-Newsgroup:header from the original message.%Nβ theNewsgroups:header from the original message.%iβ theMessage-ID:header from the original message.%fβ the original message's sender's address.%Fβ the original message's sender's name.%Sβ theSubject:header from the original message%dβ the original message's date, in the local timezone.%{...}dβ usestrftime()to format the original message's date. A plain%dis equivalent to%{%a, %d %b %Y %H:%M:%S %z}d.
And literally every other character in the salutation string just gets left as is. Simple as that. β¨
-F "marker"β when generating a forward, use the marker to separate the forwarded message from the autoreply text, instead of the default--- Forwarded message ---. Pick your own divider, main character energy. π¦-r addrlistβ addrlist is a comma-separated list of RFC 2822[1] E-mail addresses. mailbot will send an autoresponse only if the original message has at least one of the specified addresses in anyTo:orCc:header. Strict guest list. π-d filenameβ creates a small database, filename, that keeps track of senders' E-mail addresses and prevents duplicate autoresponses going to the same address (so it suppresses autoresponses going back to the same senders, for subsequent received messages). Big note tho: the-doption is only available if maildrop has GDBM/DB extensions enabled. No extensions, no database, no dice. π-D xβ do not send duplicate autoresponses (see the-doption) for at least x days (default: 1 day). The-doption 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-Doption has elapsed. Patience is a vibe. β³-s "subject"β sets theSubject:header on the autoresponse to subject. Cute, catchy, iconic. π-nβ shows you the resulting message, does not send it. It's for debugging purposes. Look, don't touch. π--feedback-original-envelope-id "<envelopeid>"β optional parameter you can include in the feedback report generated by "feedback" and "replyfeedback" (all the details are right below).--feedback-original-mail-from "<mailfrom>"β same deal, optional, goes in the feedback report.--feedback-reporting-mta "dns; hostname"β optional, feedback report. β¨--feedback-source-ip aaa.bbb.ccc.dddβ optional, feedback report.--feedback-incidents nβ optional, feedback report.--feedback-authentication-results "results"β optional, feedback report.--feedback-original-rcpt-to "<rcptto>"β optional, feedback report.--feedback-reported-domain example.comβ optional, feedback report.
So these are the optional parameters to include in the feedback report generated by "feedback" and "replyfeedback". mailbot always adds Arrival-Date with the current time, as well as Version and User-Agent β those come free, bestie. π«Ά
--feedback-authentication-results, --feedback-original-rcpt-to and --feedback-reported-domain may be specified more than once. Stack away.
Where appropriate, UTF-8 encoding should be used for non-ASCII characters.
-l maildirβ specifies the maildir for the-T replydraftoption. Peep "Autoreplies from a maildir folder" below for the full tutorial. π
π 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 example above 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". Yes, it's lowkey a genius hack and yes it ate. π
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 that message become the autoresponse. That's it, that's the whole magic trick β¨
If the named maildir does not exist, or is empty, mailbot does nothing. Silent. Unbothered.
If the named maildir has more than one message, the most recent message gets used. Recency wins, as always. π
The example above uses additional mailbot options to suppress duplicate autoresponses, and to set the From: header on the autoresponse. Teamwork fr fr. π«Ά
π SEE ALSO π
maildrop(1)[4], reformail(1)[5], reformime(1)[6].
β¨ AUTHOR β¨
- Sam Varshavchik β Author π
No cap, that's the whole section. One (1) icon, one (1) job, and he did it. Respect the author bestie π
πΈ NOTES πΈ
Okay so these are the footnote receipts β all the RFCs and sibling man pages that got referenced up in the SEE ALSO zone. NOT me forgetting them, we're listing them fr fr π«Ά
- RFC 2822 β
https://datatracker.ietf.org/doc/html/rfc2822 - RFC 1894 β
https://datatracker.ietf.org/doc/html/rfc1894 - RFC 5965 β
https://datatracker.ietf.org/doc/html/rfc5965 maildrop(1)βhttp://www.courier-mta.org/maildrop/maildrop.htmlreformail(1)βhttp://www.courier-mta.org/maildrop/reformail.htmlreformime(1)βhttp://www.courier-mta.org/maildrop/reformime.html
Tap any of those links if you wanna go full lore-mode on the specs, bestie π¦ iykyk
And that's a wrap on MAILBOT(1) π
this one's from the Courier Mail Server, dated 01/30/2026 β go forth and let your autoreplies be iconic, main character energy only, periodt β¨ππ
π¦ where this page comes from
- ubuntu stonking: maildrop 4.0.4-1 Β· GPL-3~with-OpenSSL-exception
- Copyright 1998 - 2009 S. Varshavchik. See COPYING for -->
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms