masqmail
view man/masqmail.8 @ 249:f9da5a7caeda
refactored the cmdline argument processing
I replaced the nested switch statements with one single
large else-if construct. Instead of char comparision now
str(n)cmp(3) is used. Although this is slower it is much
more readable and covers corner-cases which were uncovered
before (e.g. -bdxxx).
As always: Readability and simplicity matter, not performance.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Thu, 04 Nov 2010 11:02:42 -0300 |
parents | 9397d10fd771 |
children | 1b25fabdc3cb |
line source
1 .TH masqmail 8 2010-07-23 masqmail-0.3.0 "Maintenance Commands"
3 .SH NAME
4 masqmail \- An offline Mail Transfer Agent
6 .SH SYNOPSIS
7 \fB/usr/sbin/masqmail \fR[\fB\-C \fIfile\fR] [\fB\-odq\fR] [\fB\-bd\fR] [\fB\-q\fIinterval\fR]
9 \fB/usr/sbin/masqmail \fR[\fB\-odq\fR] [\fB\-bs\fR]
11 \fB/usr/sbin/masqmail \fR[\fB\-bp\fR]
13 \fB/usr/sbin/masqmail \fR[\fB\-q\fR]
15 \fB/usr/sbin/masqmail \fR[\fB\-qo \fR[\fIname\fR]]
17 \fB/usr/sbin/masqmail \fR[\fB\-t\fR] [\fB\-oi\fR] [\fB\-f \fIaddress\fR] [\fB\-\-\fR] \fIaddress...
19 \fB/usr/sbin/mailq\fR
22 .SH DESCRIPTION
24 Masqmail is a mail server designed for hosts that do not have a permanent internet connection
25 e.g. a home network or a single host at home.
26 It has special support for connections to different ISPs.
27 It replaces sendmail or other MTAs such as qmail or exim.
30 .SH OPTIONS
32 Since masqmail is intended to replace sendmail, it uses the same command line options,
33 but not all are implemented.
34 There are also two additional options, which are unique to masqmail
35 (\fB\-qo \fIconnection\fR and \fB\-g\fR)
37 .TP
38 \fB\-\-\fR
40 Not a `real' option, it means that all following arguments are to be understood
41 as arguments and not as options even if they begin with a leading dash `\-'.
42 Mutt is known to call sendmail with this option.
44 .TP
45 \fB\-bd\fR
47 Run as daemon, accepting connections, usually on port 25 if not configured differently.
48 This is usually used in the startup script at system boot and together with
49 the \fB\-q\fR option (see below).
51 .TP
52 \fB\-bi\fR
54 Old sendmail rebuilds its alias database when invoked with this option.
55 Masqmail ignores it.
56 Masqmail reads directly from the file given with `alias_file' in the config file.
58 .TP
59 \fB\-bp\fR
61 Show the messages in the queue. Same as calling masqmail as `mailq'.
63 .TP
64 \fB\-bs\fR
66 Accept SMTP commands from stdin.
67 Some mailers (e.g. pine) use this option as an interface.
68 It can also be used to call masqmail from inetd.
70 .TP
71 \fB\-B \fIarg\fR
73 \fIarg\fR is usually 8BITMIME.
74 Some mailers use this to indicate that the message contains characters > 127.
75 Masqmail is 8-bit clean and ignores this, so you do not have to recompile elm,
76 which is very painful ;-).
77 Note though that this violates some conventions:
78 masqmail does not convert 8 bit messages to any MIME format if it encounters
79 a mail server which does not advertise its 8BITMIME capability,
80 masqmail does not advertise this itself.
81 This is the same practice as that of exim (but different to sendmail).
83 .TP
84 \fB\-bV \fR
86 Show version information.
88 .TP
89 \fB\-C \fIfilename\fR
91 Use another configuration than \fI/etc/masqmail/masqmail.conf\fR.
92 Useful for debugging purposes.
93 If not invoked by a privileged user, masqmail will drop all privileges.
95 .TP
96 \fB\-d \fInumber\fR
98 Set the debug level.
99 This takes precedence before the value of `debug_level' in the configuration file.
100 Read the warning in the description of the latter.
102 .TP
103 \fB\-f [\fIaddress\fB]\fR
105 Set the return path address to \fIaddress\fR.
106 Only root, the user mail and anyone in group mail is allowed to do that.
108 .TP
109 \fB\-F [\fIstring\fB]\fR
111 Set the full sender name (in the From: header) to \fIstring\fR.
113 .TP
114 \fB\-i\fR
116 Same as \fB\-oi\fR, see below.
118 .TP
119 \fB\-Mrm \fIlist\fR
121 Remove given messages from the queue.
122 Only allowed for privileged users.
123 The identifiers of messages are listed in the output of
124 \fImasqmail \-bp\fP (\fImailq\fR).
126 .TP
127 \fB\-m\fR
129 Same as \fB\-om\fR, see below.
131 .TP
132 \fB\-oem\fR
134 If the \fB\-oi\fR ist not also given, always return with a non zero return code.
135 Maybe someone tells me what this is good for...
137 .TP
138 \fB\-odb\fR
140 Deliver in background.
141 Masqmail always does this, which makes this option pretty much useless.
143 .TP
144 \fB\-odq\fR
146 Do not attempt to deliver immediately.
147 Any messages will be queued until the next queue running process picks them up and delivers them.
148 You get the same effect by setting the do_queue option in /etc/masqmail/masqmail.conf.
150 .TP
151 \fB\-oi\fR
153 A dot as a single character in a line does not terminate the message.
155 .TP
156 \fB\-om\fR
158 From exim(8)'s man page: In Sendmail, this option means ``me too'',
159 indicating that the sender of a message should receive a copy of the
160 message if the sender appears in an alias expansion.
162 Masqmail always does this, hence the option does nothing.
164 .TP
165 \fB\-q [\fIinterval\fB]\fR
167 If not given with an argument, run a queue process, i.e. try to deliver all messages in the queue.
168 Masqmail sends only to those addresses that are on the local net, not to those that are outside.
169 Use \fB\-qo\fR for those.
171 If you have configured inetd to start masqmail,
172 you can use this option in a cron job which starts in regular time intervals,
173 to mimic the same effect as starting masqmail with \fB\-bd \-q30m\fR.
175 An argument may be a time interval i.e. a numerical value followed by one of the letters.
176 s,m,h,d,w which are interpreted as seconds, minutes, hours, days or weeks respectively.
177 Example: \fB\-q30m\fR.
178 Masqmail starts as a daemon and a queue runner process will be started automatically
179 once in this time interval.
180 This is usually used together with \fB\-bd\fR (see above).
182 .TP
183 \fB\-qo [\fIname\fB]\fR
185 Can be followed by a connection name.
186 Use this option in your script which starts as soon as a link to the internet
187 has been set up (usually ip-up).
188 When masqmail is called with this option, the specified route configuration
189 is read and the queued mail with destinations on the internet will be sent.
190 The \fIname\fR is defined in the configuration (see \fBonline_routes.\fIname\fR).
192 If called without \fIname\fR the online status is determined with the configured
193 method (see \fBonline_detect\fR in \fBmasqmail.conf(5)\fR)
195 .TP
196 \fB\-t\fR
198 Read recipients from headers.
199 Delete `Bcc:' headers.
200 (Since 0.2.25, masqmail deletes Bcc: headers in all cases.)
201 If any arguments are given, these are interpreted as recipient addresses
202 and the message will not be sent to these,
203 although they might appear in To:, Cc:, or Bcc: headers.
204 I.e. the set of argument recipients is ``substracted'' from the set of header recipients.
206 This behavior is similar to exim's and smail's.
207 Postfix, in contrast, adds the arguments to the set of header recipients.
208 Sendmail seems to behave differently, depending on the version.
209 See exim(8) for further information.
211 .TP
212 \fB\-v\fR
214 Log also to stdout.
215 Currently, some log messages are marked as `write to stdout' and additionally,
216 all messages with priority `LOG_ALERT' and `LOG_WARNING' will be written to stdout
217 if this option is given. It is disabled in daemon mode.
220 .SH ENVIRONMENT FOR PIPES AND MDAS
222 For security reasons, before any pipe command from an alias expansion or an mda is called,
223 the environment variables will be completely discarded and newly set up. These are:
225 SENDER, RETURN_PATH \(en the return path.
227 SENDER_DOMAIN \(en the domain part of the return path.
229 SENDER_LOCAL \(en the local part of the return path.
231 RECEIVED_HOST \(en the host the message was received from (unless local).
233 LOCAL_PART, USER, LOGNAME \(en the local part of the (original) recipient.
235 MESSAGE_ID \(en the unique message id.
236 This is not necessarily identical with the Message ID as given in the Message ID: header.
238 QUALIFY_DOMAIN \(en the domain which will be appended to unqualified addresses.
241 .SH FILES
243 \fI/etc/masqmail/masqmail.conf\fR is the main configuration for masqmail.
244 Depending on the settings in this file, you will also have other configuration
245 files in \fI/etc/masqmail/\fR.
247 \fI/var/spool/masqmail/\fR is the spool directory where masqmail stores
248 its spooled messages.
250 \fI/var/spool/mail/\fR is the directory where locally delivered mail will be put,
251 if not configured differently in \fImasqmail.conf\fR.
253 \fI/var/log/masqmail/\fR is the directory where masqmail stores its log mesages.
254 This can also be somewhere else if configured differently by your sysadmin or the package mantainer.
257 .SH CONFORMING TO
259 RFC 821, 822, 1869, 1870, 2197, 2554 (SMTP)
261 RFC 1321 (MD5)
263 RFC 2195 (CRAM-MD5)
266 .SH AUTHOR
268 Masqmail was written by Oliver Kurth.
269 It is now maintained by Markus Schnalke <meillo@marmaro.de>.
271 You will find the newest version of masqmail at \fBhttp://marmaro.de/prog/masqmail/\fR.
272 There is also a mailing list, you will find information about it at masqmail's main site.
275 .SH BUGS
277 Please report them to the mailing list.
280 .SH SEE ALSO
282 \fBmasqmail.conf(5)\fR, \fBmasqmail.route(5)\fR, \fBmasqmail.aliases(5)\fR