masqmail

annotate man/masqmail.8 @ 257:8cca5305e4f0

fixed -oi to really be the same as -i
author markus schnalke <meillo@marmaro.de>
date Wed, 01 Dec 2010 17:29:52 -0300
parents 3c40f86d50e4
children 05fa719b7002
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@0 30 .SH OPTIONS
meillo@0 31
meillo@34 32 Since masqmail is intended to replace sendmail, it uses the same command line options,
meillo@34 33 but not all are implemented.
meillo@252 34 The \fB\-qo\fP option is additional, and unique to masqmail.
meillo@34 35
meillo@0 36 .TP
meillo@34 37 \fB\-\-\fR
meillo@0 38
meillo@34 39 Not a `real' option, it means that all following arguments are to be understood
meillo@34 40 as arguments and not as options even if they begin with a leading dash `\-'.
meillo@34 41 Mutt is known to call sendmail with this option.
meillo@0 42
meillo@0 43 .TP
meillo@34 44 \fB\-bd\fR
meillo@0 45
meillo@34 46 Run as daemon, accepting connections, usually on port 25 if not configured differently.
meillo@34 47 This is usually used in the startup script at system boot and together with
meillo@34 48 the \fB\-q\fR option (see below).
meillo@0 49
meillo@0 50 .TP
meillo@34 51 \fB\-bi\fR
meillo@0 52
meillo@34 53 Old sendmail rebuilds its alias database when invoked with this option.
meillo@34 54 Masqmail ignores it.
meillo@34 55 Masqmail reads directly from the file given with `alias_file' in the config file.
meillo@0 56
meillo@0 57 .TP
meillo@34 58 \fB\-bp\fR
meillo@0 59
meillo@34 60 Show the messages in the queue. Same as calling masqmail as `mailq'.
meillo@0 61
meillo@0 62 .TP
meillo@34 63 \fB\-bs\fR
meillo@0 64
meillo@34 65 Accept SMTP commands from stdin.
meillo@34 66 Some mailers (e.g. pine) use this option as an interface.
meillo@34 67 It can also be used to call masqmail from inetd.
meillo@0 68
meillo@0 69 .TP
meillo@34 70 \fB\-B \fIarg\fR
meillo@0 71
meillo@34 72 \fIarg\fR is usually 8BITMIME.
meillo@34 73 Some mailers use this to indicate that the message contains characters > 127.
meillo@34 74 Masqmail is 8-bit clean and ignores this, so you do not have to recompile elm,
meillo@34 75 which is very painful ;-).
meillo@34 76 Note though that this violates some conventions:
meillo@34 77 masqmail does not convert 8 bit messages to any MIME format if it encounters
meillo@34 78 a mail server which does not advertise its 8BITMIME capability,
meillo@34 79 masqmail does not advertise this itself.
meillo@34 80 This is the same practice as that of exim (but different to sendmail).
meillo@0 81
meillo@0 82 .TP
meillo@34 83 \fB\-bV \fR
meillo@0 84
meillo@0 85 Show version information.
meillo@34 86
meillo@0 87 .TP
meillo@34 88 \fB\-C \fIfilename\fR
meillo@0 89
meillo@34 90 Use another configuration than \fI/etc/masqmail/masqmail.conf\fR.
meillo@34 91 Useful for debugging purposes.
meillo@34 92 If not invoked by a privileged user, masqmail will drop all privileges.
meillo@0 93
meillo@0 94 .TP
meillo@34 95 \fB\-d \fInumber\fR
meillo@0 96
meillo@34 97 Set the debug level.
meillo@34 98 This takes precedence before the value of `debug_level' in the configuration file.
meillo@34 99 Read the warning in the description of the latter.
meillo@252 100 Only root may set the debug level.
meillo@0 101
meillo@0 102 .TP
meillo@34 103 \fB\-f [\fIaddress\fB]\fR
meillo@0 104
meillo@34 105 Set the return path address to \fIaddress\fR.
meillo@34 106 Only root, the user mail and anyone in group mail is allowed to do that.
meillo@0 107
meillo@0 108 .TP
meillo@34 109 \fB\-F [\fIstring\fB]\fR
meillo@0 110
meillo@34 111 Set the full sender name (in the From: header) to \fIstring\fR.
meillo@0 112
meillo@0 113 .TP
meillo@34 114 \fB\-i\fR
meillo@0 115
meillo@34 116 Same as \fB\-oi\fR, see below.
meillo@252 117 Kept for compatibility.
meillo@0 118
meillo@0 119 .TP
meillo@252 120 \fB\-Mrm \fImsgid...\fR
meillo@0 121
meillo@34 122 Remove given messages from the queue.
meillo@252 123 Privileged users may remove any message,
meillo@252 124 other users only their own.
meillo@252 125 The message identifiers are listed in the output of
meillo@252 126 \fImasqmail \-bp\fP (aka. \fImailq\fR).
meillo@0 127
meillo@0 128 .TP
meillo@247 129 \fB\-m\fR
meillo@247 130
meillo@247 131 Same as \fB\-om\fR, see below.
meillo@252 132 Kept for compatibility.
meillo@247 133
meillo@247 134 .TP
meillo@34 135 \fB\-oem\fR
meillo@0 136
meillo@252 137 Currently this option makes masqmail behave such:
meillo@252 138
meillo@34 139 If the \fB\-oi\fR ist not also given, always return with a non zero return code.
meillo@252 140
meillo@252 141 It seems as if this current behavior is not like it should be.
meillo@252 142
meillo@252 143 In exim this option makes it behave such:
meillo@252 144
meillo@252 145 .in +4
meillo@252 146 .ll -4
meillo@252 147 If an error is detected while a non-SMTP message is being received
meillo@252 148 (for example, a malformed address),
meillo@252 149 the error is reported to the sender in a mail message.
meillo@252 150 Exim exits with a non-zero return code then,
meillo@252 151 no matter if the error message was successful or not.
meillo@252 152 (In exim, -oee is similar but exim returns successful
meillo@252 153 if the error message had been sent successful.)
meillo@252 154 .ll
meillo@252 155 .in
meillo@252 156
meillo@252 157 The mutt wiki writes about ``sendmail -oi -oem'':
meillo@252 158
meillo@252 159 .in +4
meillo@252 160 .ll -4
meillo@252 161 The mail server (in this case sendmail) will receive the message in input,
meillo@252 162 and will parse it. In case of a malformed message, it will send an error
meillo@252 163 message to the user to whom belongs the MUA trasmitting the message
meillo@252 164 (e.g. user@localhost.localdomain), and it will exit with a non zero exit code:
meillo@252 165 the -oem flag forces the returning of a non zero exit code even in
meillo@252 166 the case the error message has been successfully sent to the local server.
meillo@252 167 .ll
meillo@252 168 .in
meillo@252 169
meillo@252 170 Masqmail's behavior is different in that:
meillo@252 171 First, it does not send such error messages.
meillo@252 172 Second, return non-zero whenever -oem is set (but -oi not).
meillo@252 173 Third, -oi overrules -oem, though as it seems the two options
meillo@252 174 should not affect each other.
meillo@252 175 (Their relationship is just that -oem does only affect non-SMTP
meillo@252 176 messages on stdin, which is the typical use of -oi.)
meillo@0 177
meillo@0 178 .TP
meillo@34 179 \fB\-odb\fR
meillo@0 180
meillo@252 181 ``Deliver in Background''
meillo@252 182 Masqmail always does this.
meillo@252 183 Hence masqmail ignores this switch.
meillo@0 184
meillo@0 185 .TP
meillo@34 186 \fB\-odq\fR
meillo@0 187
meillo@252 188 ``Do Queueing''
meillo@34 189 Do not attempt to deliver immediately.
meillo@34 190 Any messages will be queued until the next queue running process picks them up and delivers them.
meillo@34 191 You get the same effect by setting the do_queue option in /etc/masqmail/masqmail.conf.
meillo@0 192
meillo@0 193 .TP
meillo@34 194 \fB\-oi\fR
meillo@0 195
meillo@0 196 A dot as a single character in a line does not terminate the message.
meillo@34 197
meillo@0 198 .TP
meillo@247 199 \fB\-om\fR
meillo@247 200
meillo@252 201 ``Me too''
meillo@252 202 Masqmail never excludes the sender from any alias expansions,
meillo@252 203 like if this switch is always set.
meillo@252 204 Specifying this switch changes nothing.
meillo@247 205
meillo@252 206 .TP
meillo@252 207 \fB\-oXXX\fR
meillo@252 208
meillo@252 209 Any other switch starting with `-o' is ignored.
meillo@247 210
meillo@247 211 .TP
meillo@34 212 \fB\-q [\fIinterval\fB]\fR
meillo@0 213
meillo@34 214 If not given with an argument, run a queue process, i.e. try to deliver all messages in the queue.
meillo@34 215 Masqmail sends only to those addresses that are on the local net, not to those that are outside.
meillo@34 216 Use \fB\-qo\fR for those.
meillo@0 217
meillo@34 218 If you have configured inetd to start masqmail,
meillo@34 219 you can use this option in a cron job which starts in regular time intervals,
meillo@34 220 to mimic the same effect as starting masqmail with \fB\-bd \-q30m\fR.
meillo@0 221
meillo@34 222 An argument may be a time interval i.e. a numerical value followed by one of the letters.
meillo@34 223 s,m,h,d,w which are interpreted as seconds, minutes, hours, days or weeks respectively.
meillo@34 224 Example: \fB\-q30m\fR.
meillo@34 225 Masqmail starts as a daemon and a queue runner process will be started automatically
meillo@34 226 once in this time interval.
meillo@34 227 This is usually used together with \fB\-bd\fR (see above).
meillo@0 228
meillo@0 229 .TP
meillo@34 230 \fB\-qo [\fIname\fB]\fR
meillo@0 231
meillo@34 232 Can be followed by a connection name.
meillo@34 233 Use this option in your script which starts as soon as a link to the internet
meillo@34 234 has been set up (usually ip-up).
meillo@34 235 When masqmail is called with this option, the specified route configuration
meillo@34 236 is read and the queued mail with destinations on the internet will be sent.
meillo@34 237 The \fIname\fR is defined in the configuration (see \fBonline_routes.\fIname\fR).
meillo@0 238
meillo@34 239 If called without \fIname\fR the online status is determined with the configured
meillo@34 240 method (see \fBonline_detect\fR in \fBmasqmail.conf(5)\fR)
meillo@0 241
meillo@0 242 .TP
meillo@34 243 \fB\-t\fR
meillo@0 244
meillo@34 245 Read recipients from headers.
meillo@34 246 If any arguments are given, these are interpreted as recipient addresses
meillo@103 247 and the message will not be sent to these,
meillo@103 248 although they might appear in To:, Cc:, or Bcc: headers.
meillo@103 249 I.e. the set of argument recipients is ``substracted'' from the set of header recipients.
meillo@103 250
meillo@103 251 This behavior is similar to exim's and smail's.
meillo@103 252 Postfix, in contrast, adds the arguments to the set of header recipients.
meillo@103 253 Sendmail seems to behave differently, depending on the version.
meillo@103 254 See exim(8) for further information.
meillo@0 255
meillo@0 256 .TP
meillo@34 257 \fB\-v\fR
meillo@0 258
meillo@252 259 ``Verbose''
meillo@34 260 Log also to stdout.
meillo@34 261 Currently, some log messages are marked as `write to stdout' and additionally,
meillo@34 262 all messages with priority `LOG_ALERT' and `LOG_WARNING' will be written to stdout
meillo@34 263 if this option is given. It is disabled in daemon mode.
meillo@0 264
meillo@34 265
meillo@0 266 .SH ENVIRONMENT FOR PIPES AND MDAS
meillo@0 267
meillo@34 268 For security reasons, before any pipe command from an alias expansion or an mda is called,
meillo@34 269 the environment variables will be completely discarded and newly set up. These are:
meillo@0 270
meillo@34 271 SENDER, RETURN_PATH \(en the return path.
meillo@0 272
meillo@34 273 SENDER_DOMAIN \(en the domain part of the return path.
meillo@0 274
meillo@34 275 SENDER_LOCAL \(en the local part of the return path.
meillo@0 276
meillo@34 277 RECEIVED_HOST \(en the host the message was received from (unless local).
meillo@0 278
meillo@34 279 LOCAL_PART, USER, LOGNAME \(en the local part of the (original) recipient.
meillo@0 280
meillo@34 281 MESSAGE_ID \(en the unique message id.
meillo@34 282 This is not necessarily identical with the Message ID as given in the Message ID: header.
meillo@0 283
meillo@34 284 QUALIFY_DOMAIN \(en the domain which will be appended to unqualified addresses.
meillo@34 285
meillo@0 286
meillo@0 287 .SH FILES
meillo@0 288
meillo@34 289 \fI/etc/masqmail/masqmail.conf\fR is the main configuration for masqmail.
meillo@34 290 Depending on the settings in this file, you will also have other configuration
meillo@34 291 files in \fI/etc/masqmail/\fR.
meillo@0 292
meillo@34 293 \fI/var/spool/masqmail/\fR is the spool directory where masqmail stores
meillo@192 294 its spooled messages.
meillo@0 295
meillo@34 296 \fI/var/spool/mail/\fR is the directory where locally delivered mail will be put,
meillo@34 297 if not configured differently in \fImasqmail.conf\fR.
meillo@0 298
meillo@34 299 \fI/var/log/masqmail/\fR is the directory where masqmail stores its log mesages.
meillo@34 300 This can also be somewhere else if configured differently by your sysadmin or the package mantainer.
meillo@34 301
meillo@0 302
meillo@0 303 .SH CONFORMING TO
meillo@0 304
meillo@0 305 RFC 821, 822, 1869, 1870, 2197, 2554 (SMTP)
meillo@0 306
meillo@0 307 RFC 1321 (MD5)
meillo@0 308
meillo@0 309 RFC 2195 (CRAM-MD5)
meillo@0 310
meillo@34 311
meillo@0 312 .SH AUTHOR
meillo@0 313
meillo@34 314 Masqmail was written by Oliver Kurth.
meillo@34 315 It is now maintained by Markus Schnalke <meillo@marmaro.de>.
meillo@0 316
meillo@95 317 You will find the newest version of masqmail at \fBhttp://marmaro.de/prog/masqmail/\fR.
meillo@26 318 There is also a mailing list, you will find information about it at masqmail's main site.
meillo@0 319
meillo@34 320
meillo@0 321 .SH BUGS
meillo@0 322
meillo@34 323 Please report them to the mailing list.
meillo@34 324
meillo@0 325
meillo@0 326 .SH SEE ALSO
meillo@0 327
meillo@192 328 \fBmasqmail.conf(5)\fR, \fBmasqmail.route(5)\fR, \fBmasqmail.aliases(5)\fR