<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <HTML ><HEAD ><link rel='stylesheet' type='text/css' href='manpage.css'> <!-- $Id: mailbot.sgml,v 1.2 2002/05/08 02:57:07 mrsam Exp $ --> <!-- Copyright 1998 - 2001 Double Precision, Inc. See COPYING for --> <!-- distribution information. --> <meta name="MSSmartTagsPreventParsing" content="TRUE"> <link rel="icon" href="icon.gif" type="image/gif" /> <TITLE >mailbot</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD ><BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><H1 ><A NAME="MAILBOT" ></A >mailbot</H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN10" ></A ><H2 >Name</H2 >mailbot -- A MIME-aware autoresponder utility</DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN13" ></A ><H2 >Synopsis</H2 ><P ><B CLASS="COMMAND" >mailbot</B > [options] {<VAR CLASS="REPLACEABLE" >program</VAR >} [arg...]</P ><DIV CLASS="INFORMALEXAMPLE" ><P ></P ><A NAME="AEN20" ></A ><P >In <TT CLASS="FILENAME" >.mailfilter:</TT ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >if (/^Subject: *info/) { cc "| mailbot -t /usr/share/autoresponse/info -d autoresponsedb \ -A 'From: info@domain.com' /usr/bin/sendmail -f ''" }</PRE ></TD ></TR ></TABLE ><P ></P ></DIV ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN24" ></A ><H2 >DESCRIPTION</H2 ><P ><B CLASS="COMMAND" >mailbot</B > reads an E-mail message on standard input and creates an E-mail message replying to the original message's sender. A <B CLASS="COMMAND" >program</B > is specified as an argument to <B CLASS="COMMAND" >mailbot</B > after all of <B CLASS="COMMAND" >mailbot</B > options. <B CLASS="COMMAND" >program</B > is expected to read the created autoreply on its standard input, and mail it. If <B CLASS="COMMAND" >program</B > is not specified, <B CLASS="COMMAND" >mailbot</B > runs '<TT CLASS="LITERAL" >sendmail -f ""</TT >'.</P ><P ><B CLASS="COMMAND" >mailbot</B > has several options for suppressing duplicate autoresponse messages. If <B CLASS="COMMAND" >mailbot</B > chooses not to send an autoresponse, it quietly terminates without running <B CLASS="COMMAND" >program</B >. The autoresponse is optionally formatted as a MIME delivery status notification.</P ><P >The text of the autoresponse is specified by the <VAR CLASS="OPTION" >-t</VAR > or the <VAR CLASS="OPTION" >-m</VAR > argument. Either one is required. Everything else is optional. The default behavior is to send an autoresponse unless the original message has the "<TT CLASS="LITERAL" >Precedence: junk</TT >" or the "<TT CLASS="LITERAL" >Precedence: bulk</TT >" header, or if it's MIME content type is "<TT CLASS="LITERAL" >multipart/report</TT >" (this is the MIME content type for delivery status notifications). The <VAR CLASS="OPTION" >-M</VAR > option formats the the autoresponse itself as a MIME delivery status notification.</P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN46" ></A ><H2 >OPTIONS</H2 ><P ></P ><DIV CLASS="VARIABLELIST" ><DL ><DT >-f<VAR CLASS="REPLACEABLE" >address</VAR ></DT ><DD ><P >Address the autoresponse to <VAR CLASS="REPLACEABLE" >address</VAR >, which must be an <A HREF="http://www.rfc-editor.org/rfc/rfc2822.txt" TARGET="_top" >RFC 2822</A > address. By default <B CLASS="COMMAND" >mailbot</B > takes the autoresponse address from the <TT CLASS="LITERAL" >From:</TT > (or the <TT CLASS="LITERAL" >Reply-To:</TT >) header in the original message. <VAR CLASS="OPTION" >-f</VAR >, if present, overrides and explicitly sets the autoresponse address. "<VAR CLASS="REPLACEABLE" >address</VAR >" must immediately follow the <VAR CLASS="OPTION" >-f</VAR > option without an intervening space (it's a single command line argument). An <VAR CLASS="OPTION" >-f</VAR > option without an <VAR CLASS="REPLACEABLE" >address</VAR > takes the address from the <VAR CLASS="ENVAR" >SENDER</VAR > environment variable.</P ></DD ><DT >-t <VAR CLASS="REPLACEABLE" >filename</VAR ></DT ><DD ><P >Read text autoresponse from <VAR CLASS="REPLACEABLE" >filename</VAR >, which should contain a plain text message.</P ></DD ><DT >-c <VAR CLASS="REPLACEABLE" >charset</VAR ></DT ><DD ><P >Set the autoresponse's MIME character set to <VAR CLASS="REPLACEABLE" >charset</VAR >. Run <B CLASS="COMMAND" >mailbot</B > without any arguments to see the default character set.</P ></DD ><DT >-m <VAR CLASS="REPLACEABLE" >filename</VAR ></DT ><DD ><P >Read a MIME autoresponse from <TT CLASS="FILENAME" >filename</TT >. This is similar to the <VAR CLASS="OPTION" >-t</VAR > option, except that <VAR CLASS="REPLACEABLE" >filename</VAR > contains MIME headers, followed by a blank line, and the corresponding MIME content. The contents of <VAR CLASS="REPLACEABLE" >filename</VAR > are inserted in the autoresponse without further processing.</P ></DD ><DT >-M <VAR CLASS="REPLACEABLE" >address</VAR ></DT ><DD ><P >Format the autoresponse as a delivery status notification (<A HREF="http://www.rfc-editor.org/rfc/rfc1894.txt" TARGET="_top" >RFC 1894</A >). <VAR CLASS="REPLACEABLE" >address</VAR > is an <A HREF="http://www.rfc-editor.org/rfc/rfc2822.txt" TARGET="_top" >RFC 2822</A > E-mail address that generates the DSN. Note that the <VAR CLASS="OPTION" >-A</VAR > option should be used in ddition to <VAR CLASS="OPTION" >-M</VAR > in order to set the <TT CLASS="LITERAL" >From:</TT > header on the autoresponse.</P ></DD ><DT >-r <VAR CLASS="REPLACEABLE" >addrlist</VAR ></DT ><DD ><P ><VAR CLASS="REPLACEABLE" >addrlist</VAR > is a comma-separated list of <A HREF="http://www.rfc-editor.org/rfc/rfc2822.txt" TARGET="_top" >RFC 2822</A > E-mail addresses. <B CLASS="COMMAND" >mailbot</B > sends an autoresponse only if the original message has at least one of the specified addresses in any <TT CLASS="LITERAL" >To:</TT > or <TT CLASS="LITERAL" >Cc:</TT > header.</P ></DD ><DT >-d <VAR CLASS="REPLACEABLE" >filename</VAR ></DT ><DD ><P >Create a small database, <VAR CLASS="REPLACEABLE" >filename</VAR >, that keeps track of sender's 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 <VAR CLASS="OPTION" >-d</VAR > option is only available if <B CLASS="COMMAND" >maildrop</B > has GDBM/DB extensions enabled.</P ></DD ><DT >-D <VAR CLASS="REPLACEABLE" >x</VAR ></DT ><DD ><P >Do not send duplicate autoresponses (see the <VAR CLASS="OPTION" >-d</VAR > option) for at least <VAR CLASS="REPLACEABLE" >x</VAR > days (default: 1 day). The <VAR CLASS="OPTION" >-d</VAR > 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 <VAR CLASS="OPTION" >-D</VAR > option has elapsed.</P ></DD ><DT >-s "<VAR CLASS="REPLACEABLE" >subject</VAR >"</DT ><DD ><P >Set the <TT CLASS="LITERAL" >Subject:</TT > header on the autoresponse to <VAR CLASS="REPLACEABLE" >subject</VAR >.</P ></DD ><DT >-A "<VAR CLASS="REPLACEABLE" >header: value</VAR >"</DT ><DD ><P >Add an arbitrary header to the autoresponse. Multiple <VAR CLASS="OPTION" >-A</VAR > options are allowed.</P ></DD ></DL ></DIV ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN138" ></A ><H2 >SEE ALSO</H2 ><P ><A HREF="maildrop.html" TARGET="_top" ><SPAN CLASS="CITEREFENTRY" ><SPAN CLASS="REFENTRYTITLE" >maildrop</SPAN >(1)</SPAN ></A >, <A HREF="reformail.html" TARGET="_top" ><SPAN CLASS="CITEREFENTRY" ><SPAN CLASS="REFENTRYTITLE" >reformail</SPAN >(1)</SPAN ></A >, <A HREF="reformime.html" TARGET="_top" ><SPAN CLASS="CITEREFENTRY" ><SPAN CLASS="REFENTRYTITLE" >reformime</SPAN >(1)</SPAN ></A >.</P ></DIV ></BODY ></HTML >