meillo@325: .TH masqmail 8 2011-06-03 masqmail-0.3.2 "Maintenance Commands" meillo@34: meillo@0: .SH NAME meillo@0: masqmail \- An offline Mail Transfer Agent meillo@34: meillo@0: .SH SYNOPSIS meillo@0: meillo@290: .BR masqmail\ [ \-t ] \ [ \-oi ] \ [ \-f\ \fIADDRESS ]\ \fIRECIPIENT... meillo@0: meillo@285: .B mailq meillo@285: .br meillo@285: .B masqmail \-bp meillo@0: meillo@285: .B runq meillo@285: .br meillo@285: .B masqmail \-q meillo@0: meillo@290: .BR masqmail\ \-qo\ \fINAME meillo@0: meillo@285: .BI mailrm\ MSGID... meillo@285: .br meillo@285: .BI masqmail\ -Mrm\ MSGID... meillo@0: meillo@285: .BR masqmail\ [ \-C\ \fIFILE ] \ [ \-odq ]\ \-bs meillo@285: meillo@285: .BR masqmail\ [ \-C\ \fIFILE ] \ [ \-odq ]\ \-bd\ \-q\fIINTERVAL meillo@285: meillo@285: (This list is a selection.) 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@285: and usually are, used in combination: meillo@283: .TP meillo@285: .B Daemon (listen) meillo@283: .B \-bd meillo@285: or invoked as meillo@285: .B smtpd meillo@285: meillo@285: Run as daemon. meillo@285: Act as SMTP server and accept SMTP connections, meillo@285: on port 25 if not configured differently. meillo@285: meillo@285: This is normally used in the startup script at system boot meillo@285: and together with \fB\-q\fIINTERVAL\fR (see below). meillo@285: meillo@285: Alternatively masqmail can be run with the \fB\-bs\fR option meillo@285: from inetd. meillo@285: meillo@283: .TP meillo@285: .B Daemon (queue) meillo@285: .B \-q\fIINTERVAL meillo@285: meillo@285: Run as daemon. meillo@285: Do regular queue runs at the specified time interval. meillo@285: This is normally used together with \fB\-bd\fR (see above). meillo@285: meillo@285: An argument may be a time interval i.e. a numerical value followed by one meillo@285: of the letters s,m,h,d,w which are interpreted as meillo@285: seconds, minutes, hours, days or weeks respectively. meillo@285: Example: \fB\-q30m\fR. meillo@285: Combinations like \fB\-q1h30m\fR, which sendmail accepts, are not possible. meillo@285: meillo@285: Alternatively single queue runs (\fB\-q\fR) can be started from cron. meillo@283: meillo@283: .P meillo@285: The queue processing mode has two flavors that may be meillo@285: used in combination: meillo@285: meillo@283: .TP meillo@285: .B Single queue run (normal) meillo@285: .B \-q meillo@283: (without argument) meillo@285: or invoked as meillo@285: .B runq meillo@285: meillo@285: Do a single queue run. meillo@285: Try to deliver all messages in the queue. meillo@285: Masqmail sends to addresses on the local host, on the local net, meillo@290: and to remote ones, if available online routes permit. meillo@285: That means, masqmail sends all queued mail it can. meillo@290: Online detection is done with the configured meillo@310: method (see \fBonline_query\fR in \fBmasqmail.conf(5)\fR). meillo@285: meillo@283: .TP meillo@290: .B Single queue run (only named route) meillo@290: .BI \-qo\ NAME meillo@285: meillo@290: Do a single queue run and deliver only using the specified online route. meillo@285: meillo@290: The route configuration for \fINAME\fP is read and queued mail meillo@290: to matching remote recipients is sent. meillo@290: (See \fBonline_routes.\fINAME\fR in the main config file.) meillo@285: meillo@285: You may want to use this option in scripts that run as soon as a link meillo@285: to the internet has been set up (e.g. ip-up). meillo@283: meillo@290: .B Obsolete behavior: meillo@290: Up to now: If meillo@290: .B \-qo meillo@290: has no argument, the online connection is determinded meillo@290: by online detect and, if available, mail is sent through it. meillo@290: If none is available no mail is delivered. meillo@290: meillo@290: This behavior is likely to change in future versions meillo@290: because it is included in \-q. meillo@290: We could do something more useful instead. meillo@290: meillo@283: .P meillo@283: The other modes are simple ones: meillo@285: meillo@283: .TP meillo@285: .B Rebuild alias database meillo@283: .B \-bi meillo@285: or invoked as meillo@285: .B newaliases meillo@285: meillo@285: A no-op for masqmail, just exit. meillo@285: Old sendmail rebuilds its alias database when invoked with this option. meillo@285: Masqmail reads directly from its alias file meillo@285: (see config option `alias_file'), meillo@285: thus no database needs to be updated. meillo@285: meillo@283: .TP meillo@285: .B Accept messages meillo@285: .BR \-bm , meillo@285: also the default mode meillo@285: meillo@285: Accept a text message on stdin. meillo@285: This is the default mode of operation. meillo@285: One will hardly use this switch as it is the default. meillo@285: meillo@285: The command line options meillo@285: .BR \-f , \-F , \-i / \-oi , \-t meillo@285: are only used in this mode. meillo@285: meillo@283: .TP meillo@285: .B Print queue meillo@283: .B \-bp meillo@285: or invoked as meillo@285: .B mailq meillo@285: meillo@285: Show the messages in the queue. meillo@285: meillo@283: .TP meillo@285: .B Stand-alone SMTP server meillo@283: .B \-bs meillo@285: meillo@285: Act as SMTP server by reading commands from stdin meillo@285: and writing to stdout. meillo@285: Some mailers (e.g. pine) use this option as an interface. meillo@285: It can also be used to call masqmail from inetd. meillo@285: meillo@283: .TP meillo@285: .B Print version meillo@283: .B \-bV meillo@285: or if called without arguments meillo@285: meillo@285: Print version information, then exit. meillo@285: meillo@283: .TP meillo@285: .B Queue manipulation mode meillo@283: .B \-Mrm meillo@285: or invoked as meillo@285: .B mailrm meillo@285: meillo@285: Remove given messages from the queue. meillo@285: Privileged users may remove any message, other users only their own. meillo@285: The message identifiers are listed when printing the queue meillo@285: (see \fB\-bp\fR). meillo@285: meillo@283: .P meillo@285: The default mode: meillo@285: .P 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@285: \fB\-t\fR is given, then mail can not be sent, meillo@285: 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@285: ``Daemon (listen)'' mode. See above. meillo@0: meillo@0: .TP meillo@34: \fB\-bi\fR meillo@0: meillo@285: ``Rebuild alias database'' mode. See above. meillo@283: meillo@283: .TP meillo@283: .B \-bm meillo@283: meillo@285: ``Accept message'' mode. See above. meillo@0: meillo@0: .TP meillo@34: \fB\-bp\fR meillo@0: meillo@285: ``Print queue'' mode. See above. meillo@0: meillo@0: .TP meillo@34: \fB\-bs\fR meillo@0: meillo@285: ``Stand-alone SMTP server'' mode. See above. meillo@0: meillo@0: .TP meillo@283: \fB\-bV \fR meillo@283: meillo@285: ``Print version'' mode. See above. 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@285: ``Queue manipulation'' mode. See above. 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@285: \fB\-q meillo@0: meillo@285: ``Single queue run (normal)'' mode. See above. meillo@0: meillo@285: .TP meillo@285: \fB\-q\fIINTERVAL meillo@0: meillo@285: ``Daemon (queue)'' mode. See above. meillo@0: meillo@0: .TP meillo@290: \fB\-qo \fIname meillo@0: meillo@290: ``Single queue run (only named route)'' mode. See above. 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@286: .TP meillo@286: .I /etc/masqmail/masqmail.conf meillo@286: 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@286: .TP meillo@286: .I /var/spool/masqmail/ meillo@286: The spool directory where masqmail stores its queued mails. meillo@0: meillo@286: .TP meillo@286: .I /var/spool/mail/ meillo@286: The directory where locally delivered mail will be put, meillo@34: if not configured differently in \fImasqmail.conf\fR. meillo@0: meillo@286: .TP meillo@286: .I /var/log/masqmail/ meillo@286: The directory where masqmail stores its log messages. meillo@286: meillo@286: .P meillo@286: Any of the paths can be configured at compile time, meillo@286: and (except the main config file) also in the main config file. meillo@286: The typical paths are different, depending on the Unix system you use. 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@286: You will find the newest version of masqmail on its website: meillo@286: .BR http://marmaro.de/prog/masqmail/ . meillo@286: There is also a mailing list; meillo@286: you will find information about it on the website. meillo@0: meillo@34: meillo@0: .SH BUGS meillo@0: meillo@286: Bug reports of any kind are very welcome. meillo@286: They help masqmail to become better. meillo@286: Please report bugs to the mailing list (anyone can post). 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