masqmail

annotate man/masqmail.route.5 @ 316:d596ac8b5afb

heavy restructuring of masqmail.route(5) (sections)
author meillo@marmaro.de
date Mon, 25 Apr 2011 15:17:30 +0200
parents e230bcd0f1c6
children 55b7bde95d37
rev   line source
meillo@291 1 .TH masqmail.route 5 2010-12-08 masqmail-0.3.1 "File Formats"
meillo@34 2
meillo@0 3 .SH NAME
meillo@0 4 masqmail.route \- masqmail route configuration file
meillo@34 5
meillo@34 6
meillo@0 7 .SH DESCRIPTION
meillo@0 8
meillo@34 9 This man page describes the syntax of the route configuration files of \fBmasqmail (8)\fR.
meillo@34 10 Their usual locations are in \fI/etc/masqmail/\fR.
meillo@0 11
meillo@311 12 Mail will be sent with the SMTP protocol to its destination, unless
meillo@311 13 `pipe' is given.
meillo@311 14 In this case the message will be piped to the given program.
meillo@311 15
meillo@311 16
meillo@316 17 .SH ROUTE CONDITIONS
meillo@316 18
meillo@316 19 .TP
meillo@316 20 \fBallowed_mail_locals\fR = \fIlist\fR
meillo@316 21
meillo@316 22 This is a semicolon `;' separated list of local parts of envelope
meillo@316 23 senders (= mail from = return path) which will be allowed
meillo@316 24 to send mail through this connection.
meillo@316 25 If unset and \fBnot_allowed_mail_locals\fR is also unset, all users are allowed.
meillo@316 26
meillo@316 27 .TP
meillo@316 28 \fBnot_allowed_mail_locals\fR = \fIlist\fR
meillo@316 29
meillo@316 30 This is a semicolon `;' separated list of local parts of envelope
meillo@316 31 senders (= mail from = return path) which will be not allowed
meillo@316 32 to send mail through this connection.
meillo@316 33 Local parts in this list will not be allowed to use this route even if they
meillo@316 34 are part of \fBallowed_mail_locals\fR (see above).
meillo@316 35
meillo@316 36 .TP
meillo@316 37 \fBallowed_return_paths\fR = \fIlist\fR
meillo@316 38
meillo@316 39 This is a semicolon `;' separated list of addresses.
meillo@316 40 Messages which have one of these addresses as the return path (=
meillo@316 41 envelope sender = mail from) will be used using this route
meillo@316 42 (if not also in \fBnot_allowed_return_paths\fR or an item in \fBnot_allowed_mail_locals\fR matches).
meillo@316 43
meillo@316 44 Patterns containing `?' and `*' can be used.
meillo@316 45 The special item "<>" matches the null sender address (eg. failure notices or delivery notifications).
meillo@316 46
meillo@316 47 .TP
meillo@316 48 \fBnot_allowed_return_paths\fR = \fIlist\fR
meillo@316 49
meillo@316 50 This is a semicolon `;' separated list of addresses.
meillo@316 51 Messages which have one of these addresses as the return path (=
meillo@316 52 envelope sender = mail from) will not
meillo@316 53 be used using this route (even if also in \fBallowed_return_paths\fR
meillo@316 54 or an item in \fBallowed_mail_locals\fR matches).
meillo@316 55
meillo@316 56 Patterns containing `?' and `*' can be used.
meillo@316 57 The special item "<>" matches the null sender address (eg. failure notices or delivery notifications).
meillo@316 58
meillo@316 59 .TP
meillo@316 60 \fBallowed_rcpt_domains\fR = \fIlist\fR
meillo@316 61
meillo@316 62 A list of recipient domains (of envelope recipients) where mail will be sent to.
meillo@316 63 This is for example useful if you use this route configuration when connected to another LAN via ppp.
meillo@316 64 Patterns containing `?' and `*' can be used.
meillo@316 65
meillo@316 66 .TP
meillo@316 67 \fBnot_allowed_rcpt_domains\fR = \fIlist\fR
meillo@316 68
meillo@316 69 A list of recipient domains (of envelope recipients) where mail will not be sent to.
meillo@316 70 This is for example useful if you send mail directly (\fBmail_host\fR is not set)
meillo@316 71 and you know of hosts that will not accept mail from you because they use a dialup list
meillo@316 72 (eg. \fBhttp://maps.vix.com/dul/\fR).
meillo@316 73 If any domain matches both \fBallowed_rcpt_domains\fR and \fBnot_allowed_rcpt_domains\fR,
meillo@316 74 mail will not be sent to this domain.
meillo@316 75 Patterns containing `?' and `*' can be used.
meillo@316 76
meillo@316 77 .TP
meillo@316 78 \fBlast_route\fR = \fIboolean\fR
meillo@316 79
meillo@316 80 If this is set, a mail which would have been delivered using this route,
meillo@316 81 but has failed temporarily, will not be tried to be delivered using the next route.
meillo@316 82
meillo@316 83 If you have set up a special route with filters using the lists `allowed_rcpt_domains',
meillo@316 84 `allowed_return_paths', and `allowed_mail_locals' or their complements (not_),
meillo@316 85 and the mail passing these rules should be delivered using this route only,
meillo@316 86 you should set this to `true'.
meillo@316 87 Otherwise the mail would be passed to the next route (if any),
meillo@316 88 unless that route has rules which prevent that.
meillo@316 89
meillo@316 90 Default is false.
meillo@316 91
meillo@316 92
meillo@316 93 .SH SMTP CONFIGURATION
meillo@34 94
meillo@0 95 .TP
meillo@34 96 \fBmail_host\fR = \fIstring\fR
meillo@0 97
meillo@34 98 This is preferably the mail server of your ISP.
meillo@34 99 All outgoing messages will be sent to this host which will distribute them to their destinations.
meillo@34 100 If you do not set this mails will be sent directly.
meillo@34 101 Because the mail server is probably `near' to you, mail transfer will be much faster if you use it.
meillo@0 102
meillo@0 103 You can optionally give a port number following the host name and a colon, eg mail_host="mail.foo.com:25".
meillo@34 104
meillo@0 105 .TP
meillo@34 106 \fBresolve_list\fR = \fIlist\fR
meillo@0 107
meillo@34 108 Specify the method how the domain of the server is resolved.
meillo@34 109 Possible values are dns_mx, dns_a, byname.
meillo@34 110 For `dns_mx', the domain is assumed to be an MX pointer to a list of host names,
meillo@34 111 these will be tried each in order (lowest preference value first, equal preference values in random order).
meillo@34 112 For `dns_a', the domain is assumed to be an A pointer.
meillo@34 113 For `byname', the library function \fBgethostbyname(3)\fR will be used.
meillo@0 114
meillo@0 115 The default is "dns_mx;dns_a;byname".
meillo@34 116
meillo@0 117 .TP
meillo@34 118 \fBconnect_error_fail\fR = \fIboolean\fR
meillo@0 119
meillo@34 120 If this is set, a connection error will cause a mail delivery to fail, ie. it will be bounced.
meillo@34 121 If it is unset, it will just be defered.
meillo@0 122
meillo@34 123 Default is false.
meillo@34 124 The reason for this is that masqmail is designed for non permanent internet connections,
meillo@34 125 where such errors may occur quite often, and a bounce would be annoying.
meillo@0 126
meillo@171 127 For the default local_net route it is set to true.
meillo@34 128
meillo@0 129 .TP
meillo@34 130 \fBhelo_name\fR = \fIstring\fR
meillo@0 131
meillo@34 132 Set the name given with the HELO/EHLO command. If this is not set,
meillo@34 133 \fBhost_name\fR from \fImasqmail.conf\fR will be used,
meillo@34 134 if the \fBdo_correct_helo\fR option (see below) is unset.
meillo@0 135
meillo@0 136 .TP
meillo@34 137 \fBdo_correct_helo\fR = \fIboolean\fR
meillo@0 138
meillo@34 139 If this is set, masqmail tries to look up your host name as it appears
meillo@34 140 on the internet and sends this in the HELO/EHLO command.
meillo@34 141 Some servers are so picky that they want this.
meillo@34 142 Which is really crazy.
meillo@34 143 It just does not make any sense to lie about ones own identity,
meillo@34 144 because it can always be looked up by the server.
meillo@34 145 Nobody should believe in the name given by HELO/EHLO anyway.
meillo@34 146 If this is not set, \fBhost_name\fR from \fImasqmail.conf\fR or as given with
meillo@34 147 the \fBhelo_name\fR (see above) will be used.
meillo@0 148
meillo@0 149 .TP
meillo@222 150 \fBinstant_helo\fR = \fIboolean\fR
meillo@222 151
meillo@222 152 If this is set, masqmail does not wait for the greeting of the SMTP server
meillo@222 153 after opening the connection.
meillo@222 154 Instead it says EHLO right away (ESMTP is assumed).
meillo@222 155 Use this option with wrappers that eat the 220 greeting of the SMTP server.
meillo@223 156 Common examples are STARTTLS wrappers, like `openssl s_client -starttls smtp ...'.
meillo@222 157
meillo@222 158 If this option is set and a 220 greeting is received though,
meillo@222 159 everything should still work.
meillo@222 160 Please don't rely on that and keep in mind that RFC 2821 says that the client
meillo@222 161 SHOULD wait for the 220 greeting of the server.
meillo@222 162
meillo@222 163 Default: false
meillo@222 164
meillo@222 165 .TP
meillo@34 166 \fBdo_pipelining\fR = \fIboolean\fR
meillo@0 167
meillo@34 168 If this is set to false, masqmail will not use ESMTP PIPELINING,
meillo@34 169 even if the server announces that it is able to cope with it.
meillo@34 170 Default is true.
meillo@0 171
meillo@34 172 You do not want to set this to false unless the mail setup on the
meillo@34 173 remote server side is really broken.
meillo@34 174 Keywords: wingate.
meillo@0 175
meillo@0 176
meillo@0 177 .TP
meillo@316 178 \fBauth_name\fR = \fIstring\fR
meillo@0 179
meillo@316 180 Set the authentication type for ESMTP AUTH authentication.
meillo@316 181 Currently only `cram-md5' and `login' are supported.
meillo@0 182
meillo@0 183 .TP
meillo@316 184 \fBauth_login\fR = \fIstring\fR
meillo@0 185
meillo@316 186 Your account name for ESMTP AUTH authentication.
meillo@0 187
meillo@0 188 .TP
meillo@316 189 \fBauth_secret\fR = \fIstring\fR
meillo@0 190
meillo@316 191 Your secret for ESMTP AUTH authentication.
meillo@0 192
meillo@0 193 .TP
meillo@316 194 \fBwrapper\fR = \fIcommand\fR
meillo@0 195
meillo@316 196 If set, instead of opening a connection to a remote server,
meillo@316 197 \fIcommand\fR will be called and all traffic will be piped to its stdin and from its stdout.
meillo@316 198 Purpose is to tunnel ip traffic, eg. for ssl.
meillo@316 199
meillo@316 200 Example for SMTP over SSL tunneling:
meillo@316 201 .nf
meillo@316 202 wrapper="/usr/bin/openssl s_client \-quiet \-connect mail.gmx.net:465 2>/dev/null"
meillo@316 203 .fi
meillo@316 204
meillo@316 205 SMTP over SSL is supported since masqmail-0.1.8.
meillo@316 206 It is marked obsolete by the IETF but is still in use.
meillo@316 207
meillo@316 208
meillo@316 209 Example for encryption with STARTTLS (RFC-3207):
meillo@316 210 .nf
meillo@316 211 # don't forget the instant_helo, otherwise it won't work
meillo@316 212 instant_helo=true
meillo@316 213 wrapper="/usr/bin/openssl s_client \-quiet \-starttls smtp \-connect mail.gmx.net:25 2>/dev/null"
meillo@316 214 .fi
meillo@316 215
meillo@316 216 This is supported since masqmail-0.2.28.
meillo@316 217 STARTTLS supersedes SMTP over SSL.
meillo@316 218
meillo@316 219 Note for openssl:
meillo@316 220 Ensure that stderr is redirected.
meillo@316 221 Do *not* use \-crlf in the wrapper command, because masqmail does already insert CRLF.
meillo@316 222 However, you might want to specify \-crlf if you want to test your wrapper command
meillo@316 223 interactively on the command line.
meillo@316 224
meillo@316 225
meillo@316 226 .SH PIPE CONFIGURATION
meillo@0 227
meillo@0 228 .TP
meillo@316 229 \fBpipe\fR = \fIcommand\fR
meillo@0 230
meillo@316 231 \fIcommand\fR will be called and the message will be piped to its stdin.
meillo@316 232 Purpose is to use gateways to uucp, fax, sms or whatever else.
meillo@316 233
meillo@316 234 You can use variables to give as arguments to the command,
meillo@316 235 these are the same as for the mda in the main configuration, see \fBmasqmail.conf(5)\fR.
meillo@316 236
meillo@316 237 .TP
meillo@316 238 \fBpipe_fromline = \fIboolean\fR
meillo@316 239
meillo@316 240 Only if `pipe' is used.
meillo@316 241 A from line will be prepended to the output stream whenever a pipe command is called.
meillo@316 242 Default is false.
meillo@316 243
meillo@316 244 .TP
meillo@316 245 \fBpipe_fromhack = \fIboolean\fR
meillo@316 246
meillo@316 247 Only if `pipe' is used.
meillo@316 248 Each line beginning with `From ' is replaced with `>From ' whenever a pipe command is called.
meillo@316 249 You probably want this if you have set \fBpipe_fromline\fR above.
meillo@316 250 Default is false.
meillo@316 251
meillo@316 252
meillo@316 253 .SH ADDRESS REWRITE RULES
meillo@0 254
meillo@0 255 .TP
meillo@34 256 \fBset_h_from_domain\fR = \fIstring\fR
meillo@0 257
meillo@34 258 Replace the domain part in `From:' headers with this value.
meillo@34 259 This may be useful if you use a private, outside unknown address on your local LAN
meillo@141 260 and want this to be replaced by the domain of the address of your email address on the internet.
meillo@34 261 Note that this is different to \fBset_return_path_domain\fR, see below.
meillo@0 262
meillo@0 263 .TP
meillo@138 264 \fBset_h_reply_to_domain\fR = \fIstring\fR
meillo@138 265
meillo@138 266 Same as \fBset_h_from_domain\fP, but for the `Reply-To' header.
meillo@138 267
meillo@138 268 .TP
meillo@34 269 \fBset_return_path_domain\fR = \fIstring\fR
meillo@0 270
meillo@34 271 Sets the domain part of the envelope from address.
meillo@34 272 Some hosts check whether this is the same as the net the connection is coming from.
meillo@34 273 If not, they reject the mail because they suspect spamming.
meillo@34 274 It should be a valid address, because some mail servers also check that.
meillo@34 275 You can also use this to set it to your usual address on the internet
meillo@34 276 and put a local address only known on your LAN in the configuration of your mailer.
meillo@34 277 Only the domain part will be changed, the local part remains unchanged.
meillo@34 278 Use \fBmap_return_path_addresses\fR for rewriting local parts.
meillo@0 279
meillo@0 280 .TP
meillo@34 281 \fBmap_h_from_addresses\fR = \fIlist\fR
meillo@0 282
meillo@34 283 This is similar to \fBset_h_from_domain\fR, but more flexible.
meillo@34 284 Set this to a list which maps local parts to a full RFC 822 compliant email address,
meillo@34 285 the local parts (the keys) are separated from the addresses (the values) by colons (`:').
meillo@0 286
meillo@0 287 Example:
meillo@223 288 .nf
meillo@0 289 map_h_from_addresses = "john: John Smith <jsmith@mail.academic.edu>; charlie: Charlie Miller <cmiller@mx.commercial.com>"
meillo@223 290 .fi
meillo@0 291
meillo@0 292 You can use patterns, eg. * as keys.
meillo@34 293
meillo@0 294 .TP
meillo@34 295 \fBmap_h_reply_to_addresses\fR = \fIlist\fR
meillo@0 296
meillo@34 297 Same as \fBmap_h_from_addresses\fR, but for the `Reply-To:' header.
meillo@0 298
meillo@0 299 .TP
meillo@34 300 \fBmap_h_mail_followup_to_addresses\fR = \fIlist\fR
meillo@0 301
meillo@34 302 Same as \fBmap_h_from_addresses\fR, but for the `Mail-Followup-To:' header.
meillo@34 303 Useful when replying to mailing lists.
meillo@0 304
meillo@0 305 .TP
meillo@34 306 \fBmap_return_path_addresses\fR = \fIlist\fR
meillo@0 307
meillo@34 308 This is similar to \fBset_return_path_domain\fR, but more flexible.
meillo@34 309 Set this to a list which maps local parts to a full RFC 821 compliant email address,
meillo@34 310 the local parts (the keys) are separated from the addresses (the values) by colons (`:').
meillo@34 311 Note that this option takes RFC 821 addresses while \fBmap_h_from_addresses\fR takes RFC 822 addresses.
meillo@34 312 The most important difference is that RFC 821 addresses have no full name.
meillo@0 313
meillo@0 314 Example:
meillo@223 315 .nf
meillo@0 316 map_return_path_addresses = "john: <jsmith@mail.academic.edu>; charlie: <cmiller@mx.commercial.com>"
meillo@223 317 .fi
meillo@0 318
meillo@0 319 You can use patterns, eg. * as keys.
meillo@34 320
meillo@0 321 .TP
meillo@34 322 \fBexpand_h_sender_address\fR = \fIboolean\fR
meillo@0 323
meillo@34 324 This sets the domain of the sender address as given by the Sender: header
meillo@34 325 to the same address as in the envelope return path address
meillo@34 326 (which can be set by either \fBset_return_path_domain\fR or \fBmap_return_path_addresses\fR).
meillo@34 327 This is for mail clients (eg. Microsoft Outlook) which use this address as the sender address.
meillo@34 328 Though they should use the From: address, see RFC 821.
meillo@34 329 If \fBfetchmail(1)\fR encounters an unqualified Sender: address,
meillo@34 330 it will be expanded to the domain of the pop server, which is almost never correct.
meillo@34 331 Default is true.
meillo@0 332
meillo@0 333 .TP
meillo@34 334 \fBexpand_h_sender_domain\fR = \fIboolean\fR
meillo@0 335
meillo@34 336 Like \fBexpand_h_sender_address\fR, but sets the domain only.
meillo@34 337 Deprecated, will be removed in a later version.
meillo@0 338
meillo@34 339
meillo@0 340 .SH AUTHOR
meillo@0 341
meillo@34 342 Masqmail was written by Oliver Kurth.
meillo@34 343 It is now maintained by Markus Schnalke <meillo@marmaro.de>.
meillo@0 344
meillo@95 345 You will find the newest version of masqmail at \fBhttp://marmaro.de/prog/masqmail/\fR.
meillo@26 346 There is also a mailing list, you will find information about it at masqmail's main site.
meillo@0 347
meillo@34 348
meillo@0 349 .SH BUGS
meillo@0 350
meillo@34 351 Please report bugs to the mailing list.
meillo@0 352
meillo@0 353 .SH SEE ALSO
meillo@0 354
meillo@192 355 \fBmasqmail(8)\fR, \fBmasqmail.conf(5)\fR