masqmail

annotate man/masqmail.8 @ 315:c98aa884d2cb

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