rev |
line source |
meillo@228
|
1 .TH masqmail 8 2010-07-23 masqmail-0.3.0 "Maintenance Commands"
|
meillo@34
|
2
|
meillo@0
|
3 .SH NAME
|
meillo@0
|
4 masqmail \- An offline Mail Transfer Agent
|
meillo@34
|
5
|
meillo@0
|
6 .SH SYNOPSIS
|
meillo@34
|
7 \fB/usr/sbin/masqmail \fR[\fB\-C \fIfile\fR] [\fB\-odq\fR] [\fB\-bd\fR] [\fB\-q\fIinterval\fR]
|
meillo@0
|
8
|
meillo@34
|
9 \fB/usr/sbin/masqmail \fR[\fB\-odq\fR] [\fB\-bs\fR]
|
meillo@0
|
10
|
meillo@34
|
11 \fB/usr/sbin/masqmail \fR[\fB\-bp\fR]
|
meillo@0
|
12
|
meillo@34
|
13 \fB/usr/sbin/masqmail \fR[\fB\-q\fR]
|
meillo@0
|
14
|
meillo@34
|
15 \fB/usr/sbin/masqmail \fR[\fB\-qo \fR[\fIname\fR]]
|
meillo@0
|
16
|
meillo@34
|
17 \fB/usr/sbin/masqmail \fR[\fB\-t\fR] [\fB\-oi\fR] [\fB\-f \fIaddress\fR] [\fB\-\-\fR] \fIaddress...
|
meillo@0
|
18
|
meillo@34
|
19 \fB/usr/sbin/mailq\fR
|
meillo@0
|
20
|
meillo@34
|
21
|
meillo@0
|
22 .SH DESCRIPTION
|
meillo@0
|
23
|
meillo@34
|
24 Masqmail is a mail server designed for hosts that do not have a permanent internet connection
|
meillo@34
|
25 e.g. a home network or a single host at home.
|
meillo@34
|
26 It has special support for connections to different ISPs.
|
meillo@34
|
27 It replaces sendmail or other MTAs such as qmail or exim.
|
meillo@34
|
28
|
meillo@0
|
29
|
meillo@283
|
30 .SH OPERATION MODES
|
meillo@283
|
31
|
meillo@283
|
32 Masqmail operates in one of several exclusive modes.
|
meillo@283
|
33
|
meillo@283
|
34 The daemon mode has two flavors that may be,
|
meillo@283
|
35 and usually are, combined:
|
meillo@283
|
36 .TP
|
meillo@283
|
37 .B \-bd
|
meillo@283
|
38 listen daemon; listens for incoming SMTP connections.
|
meillo@283
|
39 .TP
|
meillo@283
|
40 .B \-q\fRINTERVAL
|
meillo@283
|
41 queue daemon; processes the queue in a regular interval.
|
meillo@283
|
42
|
meillo@283
|
43 .P
|
meillo@283
|
44 The queue processing mode has two flavors that may be combined:
|
meillo@283
|
45 .TP
|
meillo@283
|
46 .BR \-q
|
meillo@283
|
47 (without argument)
|
meillo@283
|
48 do a single queue run.
|
meillo@283
|
49 .TP
|
meillo@283
|
50 .B \-qo
|
meillo@283
|
51 do a single queue run and deliver only using a specific online route.
|
meillo@283
|
52
|
meillo@283
|
53 .P
|
meillo@283
|
54 The other modes are simple ones:
|
meillo@283
|
55 .TP
|
meillo@283
|
56 .B \-bi
|
meillo@283
|
57 a no-op for masqmail, just exit.
|
meillo@283
|
58 .TP
|
meillo@283
|
59 .B \-bm
|
meillo@283
|
60 accept messages on stdin. (The default)
|
meillo@283
|
61 .TP
|
meillo@283
|
62 .B \-bp
|
meillo@283
|
63 print the contents of the queue.
|
meillo@283
|
64 .TP
|
meillo@283
|
65 .B \-bs
|
meillo@283
|
66 accept messages by speaking SMTP on stdin.
|
meillo@283
|
67 .TP
|
meillo@283
|
68 .B \-bV
|
meillo@283
|
69 print version information.
|
meillo@283
|
70 .TP
|
meillo@283
|
71 .B \-Mrm
|
meillo@283
|
72 remove messages from the queue.
|
meillo@283
|
73 .P
|
meillo@283
|
74 Some of the modes are also available by calling masqmail
|
meillo@283
|
75 under a special name.
|
meillo@283
|
76
|
meillo@283
|
77 When no mode had been specified by either one of the above command line
|
meillo@283
|
78 options or by calling masqmail under a special name,
|
meillo@283
|
79 then the default mode \fB\-bm\fR
|
meillo@283
|
80 (i.e. accept messages on stdin) is entered.
|
meillo@283
|
81 However, if neither address arguments are specified nor
|
meillo@283
|
82 \fB\-t\fR is given, then no recipients are available and thus mail can not
|
meillo@283
|
83 be sent, hence something more useful is done: \fB\-bV\fP is assumed.
|
meillo@283
|
84
|
meillo@283
|
85
|
meillo@0
|
86 .SH OPTIONS
|
meillo@0
|
87
|
meillo@283
|
88 Since masqmail is intended to replace sendmail,
|
meillo@283
|
89 it uses the same command line options,
|
meillo@34
|
90 but not all are implemented.
|
meillo@252
|
91 The \fB\-qo\fP option is additional, and unique to masqmail.
|
meillo@34
|
92
|
meillo@0
|
93 .TP
|
meillo@34
|
94 \fB\-\-\fR
|
meillo@0
|
95
|
meillo@34
|
96 Not a `real' option, it means that all following arguments are to be understood
|
meillo@34
|
97 as arguments and not as options even if they begin with a leading dash `\-'.
|
meillo@34
|
98 Mutt is known to call sendmail with this option.
|
meillo@0
|
99
|
meillo@0
|
100 .TP
|
meillo@34
|
101 \fB\-bd\fR
|
meillo@0
|
102
|
meillo@283
|
103 Run as daemon, accepting connections,
|
meillo@283
|
104 usually on port 25 if not configured differently.
|
meillo@34
|
105 This is usually used in the startup script at system boot and together with
|
meillo@34
|
106 the \fB\-q\fR option (see below).
|
meillo@0
|
107
|
meillo@0
|
108 .TP
|
meillo@34
|
109 \fB\-bi\fR
|
meillo@0
|
110
|
meillo@34
|
111 Old sendmail rebuilds its alias database when invoked with this option.
|
meillo@34
|
112 Masqmail reads directly from the file given with `alias_file' in the config file.
|
meillo@283
|
113 Hence masqmail simply exits in this mode.
|
meillo@283
|
114
|
meillo@283
|
115 .TP
|
meillo@283
|
116 .B \-bm
|
meillo@283
|
117
|
meillo@283
|
118 Accept a text message on stdin.
|
meillo@283
|
119 This is the default mode of operation.
|
meillo@283
|
120 One will hardly use this switch as it is the default.
|
meillo@0
|
121
|
meillo@0
|
122 .TP
|
meillo@34
|
123 \fB\-bp\fR
|
meillo@0
|
124
|
meillo@283
|
125 Show the messages in the queue.
|
meillo@283
|
126 Same as calling masqmail as `mailq'.
|
meillo@0
|
127
|
meillo@0
|
128 .TP
|
meillo@34
|
129 \fB\-bs\fR
|
meillo@0
|
130
|
meillo@34
|
131 Accept SMTP commands from stdin.
|
meillo@34
|
132 Some mailers (e.g. pine) use this option as an interface.
|
meillo@34
|
133 It can also be used to call masqmail from inetd.
|
meillo@0
|
134
|
meillo@0
|
135 .TP
|
meillo@283
|
136 \fB\-bV \fR
|
meillo@283
|
137
|
meillo@283
|
138 Show version information, then exit.
|
meillo@283
|
139
|
meillo@283
|
140 .TP
|
meillo@34
|
141 \fB\-B \fIarg\fR
|
meillo@0
|
142
|
meillo@34
|
143 \fIarg\fR is usually 8BITMIME.
|
meillo@34
|
144 Some mailers use this to indicate that the message contains characters > 127.
|
meillo@34
|
145 Masqmail is 8-bit clean and ignores this, so you do not have to recompile elm,
|
meillo@34
|
146 which is very painful ;-).
|
meillo@34
|
147 Note though that this violates some conventions:
|
meillo@34
|
148 masqmail does not convert 8 bit messages to any MIME format if it encounters
|
meillo@34
|
149 a mail server which does not advertise its 8BITMIME capability,
|
meillo@34
|
150 masqmail does not advertise this itself.
|
meillo@34
|
151 This is the same practice as that of exim (but different to sendmail).
|
meillo@0
|
152
|
meillo@0
|
153 .TP
|
meillo@34
|
154 \fB\-C \fIfilename\fR
|
meillo@0
|
155
|
meillo@34
|
156 Use another configuration than \fI/etc/masqmail/masqmail.conf\fR.
|
meillo@34
|
157 Useful for debugging purposes.
|
meillo@34
|
158 If not invoked by a privileged user, masqmail will drop all privileges.
|
meillo@0
|
159
|
meillo@0
|
160 .TP
|
meillo@34
|
161 \fB\-d \fInumber\fR
|
meillo@0
|
162
|
meillo@34
|
163 Set the debug level.
|
meillo@34
|
164 This takes precedence before the value of `debug_level' in the configuration file.
|
meillo@34
|
165 Read the warning in the description of the latter.
|
meillo@252
|
166 Only root may set the debug level.
|
meillo@0
|
167
|
meillo@0
|
168 .TP
|
meillo@34
|
169 \fB\-f [\fIaddress\fB]\fR
|
meillo@0
|
170
|
meillo@34
|
171 Set the return path address to \fIaddress\fR.
|
meillo@34
|
172 Only root, the user mail and anyone in group mail is allowed to do that.
|
meillo@0
|
173
|
meillo@0
|
174 .TP
|
meillo@34
|
175 \fB\-F [\fIstring\fB]\fR
|
meillo@0
|
176
|
meillo@34
|
177 Set the full sender name (in the From: header) to \fIstring\fR.
|
meillo@0
|
178
|
meillo@0
|
179 .TP
|
meillo@34
|
180 \fB\-i\fR
|
meillo@0
|
181
|
meillo@34
|
182 Same as \fB\-oi\fR, see below.
|
meillo@252
|
183 Kept for compatibility.
|
meillo@0
|
184
|
meillo@0
|
185 .TP
|
meillo@252
|
186 \fB\-Mrm \fImsgid...\fR
|
meillo@0
|
187
|
meillo@283
|
188 ``Queue manipulation mode''
|
meillo@283
|
189
|
meillo@34
|
190 Remove given messages from the queue.
|
meillo@283
|
191 Privileged users may remove any message, other users only their own.
|
meillo@252
|
192 The message identifiers are listed in the output of
|
meillo@252
|
193 \fImasqmail \-bp\fP (aka. \fImailq\fR).
|
meillo@0
|
194
|
meillo@0
|
195 .TP
|
meillo@247
|
196 \fB\-m\fR
|
meillo@247
|
197
|
meillo@258
|
198 ``Me too''
|
meillo@258
|
199 This switch is ignored as,
|
meillo@258
|
200 masqmail never excludes the sender from any alias expansions.
|
meillo@258
|
201
|
meillo@258
|
202 \fB\-m\fP is an ancient alias for \fB\-om\fP.
|
meillo@252
|
203 Kept for compatibility.
|
meillo@247
|
204
|
meillo@247
|
205 .TP
|
meillo@34
|
206 \fB\-odb\fR
|
meillo@0
|
207
|
meillo@252
|
208 ``Deliver in Background''
|
meillo@252
|
209 Masqmail always does this.
|
meillo@252
|
210 Hence masqmail ignores this switch.
|
meillo@0
|
211
|
meillo@0
|
212 .TP
|
meillo@34
|
213 \fB\-odq\fR
|
meillo@0
|
214
|
meillo@252
|
215 ``Do Queueing''
|
meillo@34
|
216 Do not attempt to deliver immediately.
|
meillo@283
|
217 Any messages will be queued until the next queue running process picks them
|
meillo@283
|
218 up and delivers them.
|
meillo@283
|
219 You get the same effect by setting the do_queue option in
|
meillo@283
|
220 /etc/masqmail/masqmail.conf.
|
meillo@0
|
221
|
meillo@0
|
222 .TP
|
meillo@34
|
223 \fB\-oi\fR
|
meillo@0
|
224
|
meillo@0
|
225 A dot as a single character in a line does not terminate the message.
|
meillo@34
|
226
|
meillo@258
|
227 The same as \fB\-i\fP.
|
meillo@247
|
228
|
meillo@252
|
229 .TP
|
meillo@252
|
230 \fB\-oXXX\fR
|
meillo@252
|
231
|
meillo@258
|
232 Any other switch starting with `\-o' is ignored.
|
meillo@258
|
233 This especially affects \-om, \-oem, \-oee.
|
meillo@247
|
234
|
meillo@247
|
235 .TP
|
meillo@34
|
236 \fB\-q [\fIinterval\fB]\fR
|
meillo@0
|
237
|
meillo@283
|
238 Without argument:
|
meillo@283
|
239 Do a single queue run, i.e. try to deliver all messages in the queue.
|
meillo@283
|
240 Masqmail sends to addresses on the local host, on the local net,
|
meillo@283
|
241 and if it detects an online connection, to remote ones too.
|
meillo@283
|
242 That means, that masqmail sends any queued mail it can.
|
meillo@283
|
243 .B \-q
|
meillo@283
|
244 includes
|
meillo@283
|
245 .B \-qo
|
meillo@283
|
246 (without argument).
|
meillo@0
|
247
|
meillo@283
|
248 With an argument:
|
meillo@283
|
249 Start as a daemon and do a queue run automatically once in the specified
|
meillo@283
|
250 time interval.
|
meillo@283
|
251 This is usually used together with \fB\-bd\fR (see above).
|
meillo@0
|
252
|
meillo@283
|
253 An argument may be a time interval i.e. a numerical value followed by one
|
meillo@283
|
254 of the letters s,m,h,d,w which are interpreted as
|
meillo@283
|
255 seconds, minutes, hours, days or weeks respectively.
|
meillo@34
|
256 Example: \fB\-q30m\fR.
|
meillo@283
|
257
|
meillo@283
|
258 Running masqmail from inetd and starting single queue runs from cron
|
meillo@283
|
259 mimics the same effect as starting masqmail with something like
|
meillo@283
|
260 \fB\-bd \-q30m\fR.
|
meillo@0
|
261
|
meillo@0
|
262 .TP
|
meillo@34
|
263 \fB\-qo [\fIname\fB]\fR
|
meillo@0
|
264
|
meillo@283
|
265 Online queue runs.
|
meillo@283
|
266
|
meillo@283
|
267 Without a connection name:
|
meillo@283
|
268 Determine the online status with the configured method
|
meillo@283
|
269 (see \fBonline_detect\fR in \fBmasqmail.conf(5)\fR)
|
meillo@283
|
270 and, if a connection is available, send remote mail over it.
|
meillo@283
|
271
|
meillo@283
|
272 With a connection name:
|
meillo@283
|
273 Send remote mail over the specified connection,
|
meillo@283
|
274 no online detection is made.
|
meillo@283
|
275
|
meillo@283
|
276 The specified route configuration is read and queued mail to remote
|
meillo@283
|
277 recipients will be sent.
|
meillo@283
|
278 The \fIname\fR is defined in the configuration (see \fBonline_routes.\fIname\fR).
|
meillo@283
|
279
|
meillo@34
|
280 Use this option in your script which starts as soon as a link to the internet
|
meillo@34
|
281 has been set up (usually ip-up).
|
meillo@0
|
282
|
meillo@0
|
283 .TP
|
meillo@34
|
284 \fB\-t\fR
|
meillo@0
|
285
|
meillo@276
|
286 Read recipients from mail headers and add them to the ones specified on the
|
meillo@276
|
287 command line.
|
meillo@276
|
288 (Only To:, Cc:, and Bcc: headers are regarded.)
|
meillo@103
|
289
|
meillo@276
|
290 .B WARNING: The behavior changed with version 0.3.1!
|
meillo@276
|
291
|
meillo@276
|
292 In earlier versions command line argument addresses were ``substracted''
|
meillo@276
|
293 from header addresses.
|
meillo@276
|
294
|
meillo@276
|
295 The old behavior was similar to exim's and smail's
|
meillo@276
|
296 (which are anchesters of masqmail).
|
meillo@276
|
297 The new behavior is similar to the one of current postfix versions,
|
meillo@276
|
298 which add the arguments to the set of header recipients.
|
meillo@276
|
299 (Earlier postfix failed in case of address arguments with \-t.)
|
meillo@103
|
300 Sendmail seems to behave differently, depending on the version.
|
meillo@103
|
301 See exim(8) for further information.
|
meillo@0
|
302
|
meillo@276
|
303 For masqmail the most simple approach had been taken.
|
meillo@276
|
304
|
meillo@276
|
305 As the behavior of \-t together with command line address arguments
|
meillo@276
|
306 differs among MTAs, one better not steps into this corner case.
|
meillo@276
|
307
|
meillo@0
|
308 .TP
|
meillo@34
|
309 \fB\-v\fR
|
meillo@0
|
310
|
meillo@252
|
311 ``Verbose''
|
meillo@34
|
312 Log also to stdout.
|
meillo@34
|
313 Currently, some log messages are marked as `write to stdout' and additionally,
|
meillo@34
|
314 all messages with priority `LOG_ALERT' and `LOG_WARNING' will be written to stdout
|
meillo@34
|
315 if this option is given. It is disabled in daemon mode.
|
meillo@0
|
316
|
meillo@34
|
317
|
meillo@0
|
318 .SH ENVIRONMENT FOR PIPES AND MDAS
|
meillo@0
|
319
|
meillo@34
|
320 For security reasons, before any pipe command from an alias expansion or an mda is called,
|
meillo@34
|
321 the environment variables will be completely discarded and newly set up. These are:
|
meillo@0
|
322
|
meillo@34
|
323 SENDER, RETURN_PATH \(en the return path.
|
meillo@0
|
324
|
meillo@34
|
325 SENDER_DOMAIN \(en the domain part of the return path.
|
meillo@0
|
326
|
meillo@34
|
327 SENDER_LOCAL \(en the local part of the return path.
|
meillo@0
|
328
|
meillo@34
|
329 RECEIVED_HOST \(en the host the message was received from (unless local).
|
meillo@0
|
330
|
meillo@34
|
331 LOCAL_PART, USER, LOGNAME \(en the local part of the (original) recipient.
|
meillo@0
|
332
|
meillo@34
|
333 MESSAGE_ID \(en the unique message id.
|
meillo@34
|
334 This is not necessarily identical with the Message ID as given in the Message ID: header.
|
meillo@0
|
335
|
meillo@34
|
336 QUALIFY_DOMAIN \(en the domain which will be appended to unqualified addresses.
|
meillo@34
|
337
|
meillo@0
|
338
|
meillo@0
|
339 .SH FILES
|
meillo@0
|
340
|
meillo@34
|
341 \fI/etc/masqmail/masqmail.conf\fR is the main configuration for masqmail.
|
meillo@34
|
342 Depending on the settings in this file, you will also have other configuration
|
meillo@34
|
343 files in \fI/etc/masqmail/\fR.
|
meillo@0
|
344
|
meillo@34
|
345 \fI/var/spool/masqmail/\fR is the spool directory where masqmail stores
|
meillo@192
|
346 its spooled messages.
|
meillo@0
|
347
|
meillo@34
|
348 \fI/var/spool/mail/\fR is the directory where locally delivered mail will be put,
|
meillo@34
|
349 if not configured differently in \fImasqmail.conf\fR.
|
meillo@0
|
350
|
meillo@34
|
351 \fI/var/log/masqmail/\fR is the directory where masqmail stores its log mesages.
|
meillo@34
|
352 This can also be somewhere else if configured differently by your sysadmin or the package mantainer.
|
meillo@34
|
353
|
meillo@0
|
354
|
meillo@0
|
355 .SH CONFORMING TO
|
meillo@0
|
356
|
meillo@0
|
357 RFC 821, 822, 1869, 1870, 2197, 2554 (SMTP)
|
meillo@0
|
358
|
meillo@0
|
359 RFC 1321 (MD5)
|
meillo@0
|
360
|
meillo@0
|
361 RFC 2195 (CRAM-MD5)
|
meillo@0
|
362
|
meillo@34
|
363
|
meillo@0
|
364 .SH AUTHOR
|
meillo@0
|
365
|
meillo@34
|
366 Masqmail was written by Oliver Kurth.
|
meillo@34
|
367 It is now maintained by Markus Schnalke <meillo@marmaro.de>.
|
meillo@0
|
368
|
meillo@95
|
369 You will find the newest version of masqmail at \fBhttp://marmaro.de/prog/masqmail/\fR.
|
meillo@26
|
370 There is also a mailing list, you will find information about it at masqmail's main site.
|
meillo@0
|
371
|
meillo@34
|
372
|
meillo@0
|
373 .SH BUGS
|
meillo@0
|
374
|
meillo@34
|
375 Please report them to the mailing list.
|
meillo@34
|
376
|
meillo@0
|
377
|
meillo@0
|
378 .SH SEE ALSO
|
meillo@0
|
379
|
meillo@192
|
380 \fBmasqmail.conf(5)\fR, \fBmasqmail.route(5)\fR, \fBmasqmail.aliases(5)\fR
|