masqmail

view man/masqmail.8 @ 286:e2f6eefbd573

further, minor, improvements to man/masqmail.8
author markus schnalke <meillo@marmaro.de>
date Tue, 07 Dec 2010 17:21:07 -0300
parents bdcc2b42eb0f
children 792e0201c1b3
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
8 .BR masqmail\ [ \-t ] \ [ \-oi ] \ [ \-f\ \fIADDRESS ] \ \fIRECIPIENT...
10 .B mailq
11 .br
12 .B masqmail \-bp
14 .B runq
15 .br
16 .B masqmail \-q
18 .BR masqmail\ \-qo\ [ \fINAME ]
20 .BI mailrm\ MSGID...
21 .br
22 .BI masqmail\ -Mrm\ MSGID...
24 .BR masqmail\ [ \-C\ \fIFILE ] \ [ \-odq ]\ \-bs
26 .BR masqmail\ [ \-C\ \fIFILE ] \ [ \-odq ]\ \-bd\ \-q\fIINTERVAL
28 (This list is a selection.)
31 .SH DESCRIPTION
33 Masqmail is a mail server designed for hosts that do not have a permanent internet connection
34 e.g. a home network or a single host at home.
35 It has special support for connections to different ISPs.
36 It replaces sendmail or other MTAs such as qmail or exim.
39 .SH OPERATION MODES
41 Masqmail operates in one of several exclusive modes.
43 The daemon mode has two flavors that may be,
44 and usually are, used in combination:
45 .TP
46 .B Daemon (listen)
47 .B \-bd
48 or invoked as
49 .B smtpd
51 Run as daemon.
52 Act as SMTP server and accept SMTP connections,
53 on port 25 if not configured differently.
55 This is normally used in the startup script at system boot
56 and together with \fB\-q\fIINTERVAL\fR (see below).
58 Alternatively masqmail can be run with the \fB\-bs\fR option
59 from inetd.
61 .TP
62 .B Daemon (queue)
63 .B \-q\fIINTERVAL
65 Run as daemon.
66 Do regular queue runs at the specified time interval.
67 This is normally used together with \fB\-bd\fR (see above).
69 An argument may be a time interval i.e. a numerical value followed by one
70 of the letters s,m,h,d,w which are interpreted as
71 seconds, minutes, hours, days or weeks respectively.
72 Example: \fB\-q30m\fR.
73 Combinations like \fB\-q1h30m\fR, which sendmail accepts, are not possible.
75 Alternatively single queue runs (\fB\-q\fR) can be started from cron.
77 .P
78 The queue processing mode has two flavors that may be
79 used in combination:
81 .TP
82 .B Single queue run (normal)
83 .B \-q
84 (without argument)
85 or invoked as
86 .B runq
88 Do a single queue run.
89 Try to deliver all messages in the queue.
90 Masqmail sends to addresses on the local host, on the local net,
91 and if it detects an online connection to remote ones too.
92 That means, masqmail sends all queued mail it can.
93 .B \-q
94 includes
95 .B \-qo
96 (without argument).
98 .TP
99 .B Single queue run (online)
100 .B \-qo \fR[\fB\fINAME\fR]
102 Do a single queue run and deliver only using one specific online route.
104 If a connection name is given, then this one will be used.
106 If no connection name is given, it will be determined with the configured
107 method (see \fBonline_detect\fR in \fBmasqmail.conf(5)\fR) and,
108 if none is available no mail will be delivered.
110 The specified route configuration is read and queued mail to matching
111 remote recipients will be sent.
112 The \fINAME\fR is defined in the configuration
113 (see \fBonline_routes.\fINAME\fR).
115 You may want to use this option in scripts that run as soon as a link
116 to the internet has been set up (e.g. ip-up).
118 .P
119 The other modes are simple ones:
121 .TP
122 .B Rebuild alias database
123 .B \-bi
124 or invoked as
125 .B newaliases
127 A no-op for masqmail, just exit.
128 Old sendmail rebuilds its alias database when invoked with this option.
129 Masqmail reads directly from its alias file
130 (see config option `alias_file'),
131 thus no database needs to be updated.
133 .TP
134 .B Accept messages
135 .BR \-bm ,
136 also the default mode
138 Accept a text message on stdin.
139 This is the default mode of operation.
140 One will hardly use this switch as it is the default.
142 The command line options
143 .BR \-f , \-F , \-i / \-oi , \-t
144 are only used in this mode.
146 .TP
147 .B Print queue
148 .B \-bp
149 or invoked as
150 .B mailq
152 Show the messages in the queue.
154 .TP
155 .B Stand-alone SMTP server
156 .B \-bs
158 Act as SMTP server by reading commands from stdin
159 and writing to stdout.
160 Some mailers (e.g. pine) use this option as an interface.
161 It can also be used to call masqmail from inetd.
163 .TP
164 .B Print version
165 .B \-bV
166 or if called without arguments
168 Print version information, then exit.
170 .TP
171 .B Queue manipulation mode
172 .B \-Mrm
173 or invoked as
174 .B mailrm
176 Remove given messages from the queue.
177 Privileged users may remove any message, other users only their own.
178 The message identifiers are listed when printing the queue
179 (see \fB\-bp\fR).
181 .P
182 The default mode:
183 .P
184 When no mode had been specified by either one of the above command line
185 options or by calling masqmail under a special name,
186 then the default mode \fB\-bm\fR
187 (i.e. accept messages on stdin) is entered.
188 However, if neither address arguments are specified nor
189 \fB\-t\fR is given, then mail can not be sent,
190 hence something more useful is done: \fB\-bV\fP is assumed.
193 .SH OPTIONS
195 Since masqmail is intended to replace sendmail,
196 it uses the same command line options,
197 but not all are implemented.
198 The \fB\-qo\fP option is additional, and unique to masqmail.
200 .TP
201 \fB\-\-\fR
203 Not a `real' option, it means that all following arguments are to be understood
204 as arguments and not as options even if they begin with a leading dash `\-'.
205 Mutt is known to call sendmail with this option.
207 .TP
208 \fB\-bd\fR
210 ``Daemon (listen)'' mode. See above.
212 .TP
213 \fB\-bi\fR
215 ``Rebuild alias database'' mode. See above.
217 .TP
218 .B \-bm
220 ``Accept message'' mode. See above.
222 .TP
223 \fB\-bp\fR
225 ``Print queue'' mode. See above.
227 .TP
228 \fB\-bs\fR
230 ``Stand-alone SMTP server'' mode. See above.
232 .TP
233 \fB\-bV \fR
235 ``Print version'' mode. See above.
237 .TP
238 \fB\-B \fIarg\fR
240 \fIarg\fR is usually 8BITMIME.
241 Some mailers use this to indicate that the message contains characters > 127.
242 Masqmail is 8-bit clean and ignores this, so you do not have to recompile elm,
243 which is very painful ;-).
244 Note though that this violates some conventions:
245 masqmail does not convert 8 bit messages to any MIME format if it encounters
246 a mail server which does not advertise its 8BITMIME capability,
247 masqmail does not advertise this itself.
248 This is the same practice as that of exim (but different to sendmail).
250 .TP
251 \fB\-C \fIfilename\fR
253 Use another configuration than \fI/etc/masqmail/masqmail.conf\fR.
254 Useful for debugging purposes.
255 If not invoked by a privileged user, masqmail will drop all privileges.
257 .TP
258 \fB\-d \fInumber\fR
260 Set the debug level.
261 This takes precedence before the value of `debug_level' in the configuration file.
262 Read the warning in the description of the latter.
263 Only root may set the debug level.
265 .TP
266 \fB\-f [\fIaddress\fB]\fR
268 Set the return path address to \fIaddress\fR.
269 Only root, the user mail and anyone in group mail is allowed to do that.
271 .TP
272 \fB\-F [\fIstring\fB]\fR
274 Set the full sender name (in the From: header) to \fIstring\fR.
276 .TP
277 \fB\-i\fR
279 Same as \fB\-oi\fR, see below.
280 Kept for compatibility.
282 .TP
283 \fB\-Mrm \fImsgid...\fR
285 ``Queue manipulation'' mode. See above.
287 .TP
288 \fB\-m\fR
290 ``Me too''
291 This switch is ignored as,
292 masqmail never excludes the sender from any alias expansions.
294 \fB\-m\fP is an ancient alias for \fB\-om\fP.
295 Kept for compatibility.
297 .TP
298 \fB\-odb\fR
300 ``Deliver in Background''
301 Masqmail always does this.
302 Hence masqmail ignores this switch.
304 .TP
305 \fB\-odq\fR
307 ``Do Queueing''
308 Do not attempt to deliver immediately.
309 Any messages will be queued until the next queue running process picks them
310 up and delivers them.
311 You get the same effect by setting the do_queue option in
312 /etc/masqmail/masqmail.conf.
314 .TP
315 \fB\-oi\fR
317 A dot as a single character in a line does not terminate the message.
319 The same as \fB\-i\fP.
321 .TP
322 \fB\-oXXX\fR
324 Any other switch starting with `\-o' is ignored.
325 This especially affects \-om, \-oem, \-oee.
327 .TP
328 \fB\-q
330 ``Single queue run (normal)'' mode. See above.
332 .TP
333 \fB\-q\fIINTERVAL
335 ``Daemon (queue)'' mode. See above.
337 .TP
338 \fB\-qo [\fIname\fB]\fR
340 ``Single queue run (online)'' mode. See above.
342 .TP
343 \fB\-t\fR
345 Read recipients from mail headers and add them to the ones specified on the
346 command line.
347 (Only To:, Cc:, and Bcc: headers are regarded.)
349 .B WARNING: The behavior changed with version 0.3.1!
351 In earlier versions command line argument addresses were ``substracted''
352 from header addresses.
354 The old behavior was similar to exim's and smail's
355 (which are anchesters of masqmail).
356 The new behavior is similar to the one of current postfix versions,
357 which add the arguments to the set of header recipients.
358 (Earlier postfix failed in case of address arguments with \-t.)
359 Sendmail seems to behave differently, depending on the version.
360 See exim(8) for further information.
362 For masqmail the most simple approach had been taken.
364 As the behavior of \-t together with command line address arguments
365 differs among MTAs, one better not steps into this corner case.
367 .TP
368 \fB\-v\fR
370 ``Verbose''
371 Log also to stdout.
372 Currently, some log messages are marked as `write to stdout' and additionally,
373 all messages with priority `LOG_ALERT' and `LOG_WARNING' will be written to stdout
374 if this option is given. It is disabled in daemon mode.
377 .SH ENVIRONMENT FOR PIPES AND MDAS
379 For security reasons, before any pipe command from an alias expansion or an mda is called,
380 the environment variables will be completely discarded and newly set up. These are:
382 SENDER, RETURN_PATH \(en the return path.
384 SENDER_DOMAIN \(en the domain part of the return path.
386 SENDER_LOCAL \(en the local part of the return path.
388 RECEIVED_HOST \(en the host the message was received from (unless local).
390 LOCAL_PART, USER, LOGNAME \(en the local part of the (original) recipient.
392 MESSAGE_ID \(en the unique message id.
393 This is not necessarily identical with the Message ID as given in the Message ID: header.
395 QUALIFY_DOMAIN \(en the domain which will be appended to unqualified addresses.
398 .SH FILES
400 .TP
401 .I /etc/masqmail/masqmail.conf
402 The main configuration for masqmail.
403 Depending on the settings in this file, you will also have other configuration
404 files in \fI/etc/masqmail/\fR.
406 .TP
407 .I /var/spool/masqmail/
408 The spool directory where masqmail stores its queued mails.
410 .TP
411 .I /var/spool/mail/
412 The directory where locally delivered mail will be put,
413 if not configured differently in \fImasqmail.conf\fR.
415 .TP
416 .I /var/log/masqmail/
417 The directory where masqmail stores its log messages.
419 .P
420 Any of the paths can be configured at compile time,
421 and (except the main config file) also in the main config file.
422 The typical paths are different, depending on the Unix system you use.
425 .SH CONFORMING TO
427 RFC 821, 822, 1869, 1870, 2197, 2554 (SMTP)
429 RFC 1321 (MD5)
431 RFC 2195 (CRAM-MD5)
434 .SH AUTHOR
436 Masqmail was written by Oliver Kurth.
437 It is now maintained by Markus Schnalke <meillo@marmaro.de>.
439 You will find the newest version of masqmail on its website:
440 .BR http://marmaro.de/prog/masqmail/ .
441 There is also a mailing list;
442 you will find information about it on the website.
445 .SH BUGS
447 Bug reports of any kind are very welcome.
448 They help masqmail to become better.
449 Please report bugs to the mailing list (anyone can post).
452 .SH SEE ALSO
454 \fBmasqmail.conf(5)\fR, \fBmasqmail.route(5)\fR, \fBmasqmail.aliases(5)\fR