meillo@228: .TH masqmail 8 2010-07-23 masqmail-0.3.0 "Maintenance Commands" meillo@34: meillo@0: .SH NAME meillo@0: masqmail \- An offline Mail Transfer Agent meillo@34: meillo@0: .SH SYNOPSIS meillo@34: \fB/usr/sbin/masqmail \fR[\fB\-C \fIfile\fR] [\fB\-odq\fR] [\fB\-bd\fR] [\fB\-q\fIinterval\fR] meillo@0: meillo@34: \fB/usr/sbin/masqmail \fR[\fB\-odq\fR] [\fB\-bs\fR] meillo@0: meillo@34: \fB/usr/sbin/masqmail \fR[\fB\-bp\fR] meillo@0: meillo@34: \fB/usr/sbin/masqmail \fR[\fB\-q\fR] meillo@0: meillo@34: \fB/usr/sbin/masqmail \fR[\fB\-qo \fR[\fIname\fR]] meillo@0: meillo@34: \fB/usr/sbin/masqmail \fR[\fB\-t\fR] [\fB\-oi\fR] [\fB\-f \fIaddress\fR] [\fB\-\-\fR] \fIaddress... meillo@0: meillo@34: \fB/usr/sbin/mailq\fR meillo@0: meillo@34: meillo@0: .SH DESCRIPTION meillo@0: meillo@34: Masqmail is a mail server designed for hosts that do not have a permanent internet connection meillo@34: e.g. a home network or a single host at home. meillo@34: It has special support for connections to different ISPs. meillo@34: It replaces sendmail or other MTAs such as qmail or exim. meillo@34: meillo@0: meillo@283: .SH OPERATION MODES meillo@283: meillo@283: Masqmail operates in one of several exclusive modes. meillo@283: meillo@283: The daemon mode has two flavors that may be, meillo@283: and usually are, combined: meillo@283: .TP meillo@283: .B \-bd meillo@283: listen daemon; listens for incoming SMTP connections. meillo@283: .TP meillo@283: .B \-q\fRINTERVAL meillo@283: queue daemon; processes the queue in a regular interval. meillo@283: meillo@283: .P meillo@283: The queue processing mode has two flavors that may be combined: meillo@283: .TP meillo@283: .BR \-q meillo@283: (without argument) meillo@283: do a single queue run. meillo@283: .TP meillo@283: .B \-qo meillo@283: do a single queue run and deliver only using a specific online route. meillo@283: meillo@283: .P meillo@283: The other modes are simple ones: meillo@283: .TP meillo@283: .B \-bi meillo@283: a no-op for masqmail, just exit. meillo@283: .TP meillo@283: .B \-bm meillo@283: accept messages on stdin. (The default) meillo@283: .TP meillo@283: .B \-bp meillo@283: print the contents of the queue. meillo@283: .TP meillo@283: .B \-bs meillo@283: accept messages by speaking SMTP on stdin. meillo@283: .TP meillo@283: .B \-bV meillo@283: print version information. meillo@283: .TP meillo@283: .B \-Mrm meillo@283: remove messages from the queue. meillo@283: .P meillo@283: Some of the modes are also available by calling masqmail meillo@283: under a special name. meillo@283: meillo@283: When no mode had been specified by either one of the above command line meillo@283: options or by calling masqmail under a special name, meillo@283: then the default mode \fB\-bm\fR meillo@283: (i.e. accept messages on stdin) is entered. meillo@283: However, if neither address arguments are specified nor meillo@283: \fB\-t\fR is given, then no recipients are available and thus mail can not meillo@283: be sent, hence something more useful is done: \fB\-bV\fP is assumed. meillo@283: meillo@283: meillo@0: .SH OPTIONS meillo@0: meillo@283: Since masqmail is intended to replace sendmail, meillo@283: it uses the same command line options, meillo@34: but not all are implemented. meillo@252: The \fB\-qo\fP option is additional, and unique to masqmail. meillo@34: meillo@0: .TP meillo@34: \fB\-\-\fR meillo@0: meillo@34: Not a `real' option, it means that all following arguments are to be understood meillo@34: as arguments and not as options even if they begin with a leading dash `\-'. meillo@34: Mutt is known to call sendmail with this option. meillo@0: meillo@0: .TP meillo@34: \fB\-bd\fR meillo@0: meillo@283: Run as daemon, accepting connections, meillo@283: usually on port 25 if not configured differently. meillo@34: This is usually used in the startup script at system boot and together with meillo@34: the \fB\-q\fR option (see below). meillo@0: meillo@0: .TP meillo@34: \fB\-bi\fR meillo@0: meillo@34: Old sendmail rebuilds its alias database when invoked with this option. meillo@34: Masqmail reads directly from the file given with `alias_file' in the config file. meillo@283: Hence masqmail simply exits in this mode. meillo@283: meillo@283: .TP meillo@283: .B \-bm meillo@283: meillo@283: Accept a text message on stdin. meillo@283: This is the default mode of operation. meillo@283: One will hardly use this switch as it is the default. meillo@0: meillo@0: .TP meillo@34: \fB\-bp\fR meillo@0: meillo@283: Show the messages in the queue. meillo@283: Same as calling masqmail as `mailq'. meillo@0: meillo@0: .TP meillo@34: \fB\-bs\fR meillo@0: meillo@34: Accept SMTP commands from stdin. meillo@34: Some mailers (e.g. pine) use this option as an interface. meillo@34: It can also be used to call masqmail from inetd. meillo@0: meillo@0: .TP meillo@283: \fB\-bV \fR meillo@283: meillo@283: Show version information, then exit. meillo@283: meillo@283: .TP meillo@34: \fB\-B \fIarg\fR meillo@0: meillo@34: \fIarg\fR is usually 8BITMIME. meillo@34: Some mailers use this to indicate that the message contains characters > 127. meillo@34: Masqmail is 8-bit clean and ignores this, so you do not have to recompile elm, meillo@34: which is very painful ;-). meillo@34: Note though that this violates some conventions: meillo@34: masqmail does not convert 8 bit messages to any MIME format if it encounters meillo@34: a mail server which does not advertise its 8BITMIME capability, meillo@34: masqmail does not advertise this itself. meillo@34: This is the same practice as that of exim (but different to sendmail). meillo@0: meillo@0: .TP meillo@34: \fB\-C \fIfilename\fR meillo@0: meillo@34: Use another configuration than \fI/etc/masqmail/masqmail.conf\fR. meillo@34: Useful for debugging purposes. meillo@34: If not invoked by a privileged user, masqmail will drop all privileges. meillo@0: meillo@0: .TP meillo@34: \fB\-d \fInumber\fR meillo@0: meillo@34: Set the debug level. meillo@34: This takes precedence before the value of `debug_level' in the configuration file. meillo@34: Read the warning in the description of the latter. meillo@252: Only root may set the debug level. meillo@0: meillo@0: .TP meillo@34: \fB\-f [\fIaddress\fB]\fR meillo@0: meillo@34: Set the return path address to \fIaddress\fR. meillo@34: Only root, the user mail and anyone in group mail is allowed to do that. meillo@0: meillo@0: .TP meillo@34: \fB\-F [\fIstring\fB]\fR meillo@0: meillo@34: Set the full sender name (in the From: header) to \fIstring\fR. meillo@0: meillo@0: .TP meillo@34: \fB\-i\fR meillo@0: meillo@34: Same as \fB\-oi\fR, see below. meillo@252: Kept for compatibility. meillo@0: meillo@0: .TP meillo@252: \fB\-Mrm \fImsgid...\fR meillo@0: meillo@283: ``Queue manipulation mode'' meillo@283: meillo@34: Remove given messages from the queue. meillo@283: Privileged users may remove any message, other users only their own. meillo@252: The message identifiers are listed in the output of meillo@252: \fImasqmail \-bp\fP (aka. \fImailq\fR). meillo@0: meillo@0: .TP meillo@247: \fB\-m\fR meillo@247: meillo@258: ``Me too'' meillo@258: This switch is ignored as, meillo@258: masqmail never excludes the sender from any alias expansions. meillo@258: meillo@258: \fB\-m\fP is an ancient alias for \fB\-om\fP. meillo@252: Kept for compatibility. meillo@247: meillo@247: .TP meillo@34: \fB\-odb\fR meillo@0: meillo@252: ``Deliver in Background'' meillo@252: Masqmail always does this. meillo@252: Hence masqmail ignores this switch. meillo@0: meillo@0: .TP meillo@34: \fB\-odq\fR meillo@0: meillo@252: ``Do Queueing'' meillo@34: Do not attempt to deliver immediately. meillo@283: Any messages will be queued until the next queue running process picks them meillo@283: up and delivers them. meillo@283: You get the same effect by setting the do_queue option in meillo@283: /etc/masqmail/masqmail.conf. meillo@0: meillo@0: .TP meillo@34: \fB\-oi\fR meillo@0: meillo@0: A dot as a single character in a line does not terminate the message. meillo@34: meillo@258: The same as \fB\-i\fP. meillo@247: meillo@252: .TP meillo@252: \fB\-oXXX\fR meillo@252: meillo@258: Any other switch starting with `\-o' is ignored. meillo@258: This especially affects \-om, \-oem, \-oee. meillo@247: meillo@247: .TP meillo@34: \fB\-q [\fIinterval\fB]\fR meillo@0: meillo@283: Without argument: meillo@283: Do a single queue run, i.e. try to deliver all messages in the queue. meillo@283: Masqmail sends to addresses on the local host, on the local net, meillo@283: and if it detects an online connection, to remote ones too. meillo@283: That means, that masqmail sends any queued mail it can. meillo@283: .B \-q meillo@283: includes meillo@283: .B \-qo meillo@283: (without argument). meillo@0: meillo@283: With an argument: meillo@283: Start as a daemon and do a queue run automatically once in the specified meillo@283: time interval. meillo@283: This is usually used together with \fB\-bd\fR (see above). meillo@0: meillo@283: An argument may be a time interval i.e. a numerical value followed by one meillo@283: of the letters s,m,h,d,w which are interpreted as meillo@283: seconds, minutes, hours, days or weeks respectively. meillo@34: Example: \fB\-q30m\fR. meillo@283: meillo@283: Running masqmail from inetd and starting single queue runs from cron meillo@283: mimics the same effect as starting masqmail with something like meillo@283: \fB\-bd \-q30m\fR. meillo@0: meillo@0: .TP meillo@34: \fB\-qo [\fIname\fB]\fR meillo@0: meillo@283: Online queue runs. meillo@283: meillo@283: Without a connection name: meillo@283: Determine the online status with the configured method meillo@283: (see \fBonline_detect\fR in \fBmasqmail.conf(5)\fR) meillo@283: and, if a connection is available, send remote mail over it. meillo@283: meillo@283: With a connection name: meillo@283: Send remote mail over the specified connection, meillo@283: no online detection is made. meillo@283: meillo@283: The specified route configuration is read and queued mail to remote meillo@283: recipients will be sent. meillo@283: The \fIname\fR is defined in the configuration (see \fBonline_routes.\fIname\fR). meillo@283: meillo@34: Use this option in your script which starts as soon as a link to the internet meillo@34: has been set up (usually ip-up). meillo@0: meillo@0: .TP meillo@34: \fB\-t\fR meillo@0: meillo@276: Read recipients from mail headers and add them to the ones specified on the meillo@276: command line. meillo@276: (Only To:, Cc:, and Bcc: headers are regarded.) meillo@103: meillo@276: .B WARNING: The behavior changed with version 0.3.1! meillo@276: meillo@276: In earlier versions command line argument addresses were ``substracted'' meillo@276: from header addresses. meillo@276: meillo@276: The old behavior was similar to exim's and smail's meillo@276: (which are anchesters of masqmail). meillo@276: The new behavior is similar to the one of current postfix versions, meillo@276: which add the arguments to the set of header recipients. meillo@276: (Earlier postfix failed in case of address arguments with \-t.) meillo@103: Sendmail seems to behave differently, depending on the version. meillo@103: See exim(8) for further information. meillo@0: meillo@276: For masqmail the most simple approach had been taken. meillo@276: meillo@276: As the behavior of \-t together with command line address arguments meillo@276: differs among MTAs, one better not steps into this corner case. meillo@276: meillo@0: .TP meillo@34: \fB\-v\fR meillo@0: meillo@252: ``Verbose'' meillo@34: Log also to stdout. meillo@34: Currently, some log messages are marked as `write to stdout' and additionally, meillo@34: all messages with priority `LOG_ALERT' and `LOG_WARNING' will be written to stdout meillo@34: if this option is given. It is disabled in daemon mode. meillo@0: meillo@34: meillo@0: .SH ENVIRONMENT FOR PIPES AND MDAS meillo@0: meillo@34: For security reasons, before any pipe command from an alias expansion or an mda is called, meillo@34: the environment variables will be completely discarded and newly set up. These are: meillo@0: meillo@34: SENDER, RETURN_PATH \(en the return path. meillo@0: meillo@34: SENDER_DOMAIN \(en the domain part of the return path. meillo@0: meillo@34: SENDER_LOCAL \(en the local part of the return path. meillo@0: meillo@34: RECEIVED_HOST \(en the host the message was received from (unless local). meillo@0: meillo@34: LOCAL_PART, USER, LOGNAME \(en the local part of the (original) recipient. meillo@0: meillo@34: MESSAGE_ID \(en the unique message id. meillo@34: This is not necessarily identical with the Message ID as given in the Message ID: header. meillo@0: meillo@34: QUALIFY_DOMAIN \(en the domain which will be appended to unqualified addresses. meillo@34: meillo@0: meillo@0: .SH FILES meillo@0: meillo@34: \fI/etc/masqmail/masqmail.conf\fR is the main configuration for masqmail. meillo@34: Depending on the settings in this file, you will also have other configuration meillo@34: files in \fI/etc/masqmail/\fR. meillo@0: meillo@34: \fI/var/spool/masqmail/\fR is the spool directory where masqmail stores meillo@192: its spooled messages. meillo@0: meillo@34: \fI/var/spool/mail/\fR is the directory where locally delivered mail will be put, meillo@34: if not configured differently in \fImasqmail.conf\fR. meillo@0: meillo@34: \fI/var/log/masqmail/\fR is the directory where masqmail stores its log mesages. meillo@34: This can also be somewhere else if configured differently by your sysadmin or the package mantainer. meillo@34: meillo@0: meillo@0: .SH CONFORMING TO meillo@0: meillo@0: RFC 821, 822, 1869, 1870, 2197, 2554 (SMTP) meillo@0: meillo@0: RFC 1321 (MD5) meillo@0: meillo@0: RFC 2195 (CRAM-MD5) meillo@0: meillo@34: meillo@0: .SH AUTHOR meillo@0: meillo@34: Masqmail was written by Oliver Kurth. meillo@34: It is now maintained by Markus Schnalke . meillo@0: meillo@95: You will find the newest version of masqmail at \fBhttp://marmaro.de/prog/masqmail/\fR. meillo@26: There is also a mailing list, you will find information about it at masqmail's main site. meillo@0: meillo@34: meillo@0: .SH BUGS meillo@0: meillo@34: Please report them to the mailing list. meillo@34: meillo@0: meillo@0: .SH SEE ALSO meillo@0: meillo@192: \fBmasqmail.conf(5)\fR, \fBmasqmail.route(5)\fR, \fBmasqmail.aliases(5)\fR