masqmail

annotate man/masqmail.route.5 @ 312:c74adb7c4f50

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