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