masqmail

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