.TH masqmail.route 5 2012-01-18 masqmail-0.3.4 "File Formats" .SH NAME masqmail.route \- masqmail route configuration file .SH DESCRIPTION This man page describes the syntax of the route configuration files of \fBmasqmail (8)\fR. Their usual locations are in \fI/etc/masqmail/\fR. Mail will be sent with the SMTP protocol to its destination, unless `pipe' is given. In this case the message will be piped to the given program. .SH ROUTE CONDITIONS .TP \fBallowed_senders\fR = \fIlist\fR This is a semicolon `;' separated list of envelope sender addresses. Messages which have one of these addresses as the return path (= mail from) are allowed to use this route (if not also in \fBdenied_senders\fR). Glob patterns containing `?' and `*' can be used. The special item "<>" matches the null sender address (eg. failure notices or delivery notifications). If the pattern doesn't contain an `@', it is seen as a pattern for the local part only. Example: \fImeillo;*@*example.org;web*@example.com\fP (``meillo'' equals ``meillo@*'', i.e. the local part.) .TP \fBdenied_senders\fR = \fIlist\fR This is a semicolon `;' separated list of envelope sender addresses. Messages which have one of these addresses as the return path (= mail from) will not be sent using this route (even if also in \fBallowed_senders\fR). Glob patterns containing `?' and `*' can be used. The special item "<>" matches the null sender address (eg. failure notices or delivery notifications). If the pattern doesn't contain an `@', it is seen as a pattern for the local part only. Example: (see \fIallowed_senders\fP) .TP \fBallowed_recipients\fR = \fIlist\fR A list of envelope recipient addresses where mail can be sent to using this route. This is for example useful if you use this route configuration when connected to another LAN via ppp. Glob patterns containing `?' and `*' can be used. Example: \fI*@example.org;*@*foo.bar\fP (See also examples for \fIallowed_senders\fP) .TP \fBdenied_recipients\fR = \fIlist\fR A list of envelope recipient addresses where mail will not be sent to using this route. This is for example useful if you send mail directly (\fBmail_host\fR is not set) and you know of hosts that will not accept mail from you because they use a dialup list (eg. \fBhttp://maps.vix.com/dul/\fR). \fBdenied_recipients\fR overrules \fBallowed_recipients\fR. Glob patterns containing `?' and `*' can be used. Example: \fI*@spamblocker.example.org\fP (See also examples for \fIallowed_senders\fP) .TP \fBlast_route\fR = \fIboolean\fR If this is set, a mail which would have been delivered using this route, but has failed temporarily, will not be tried to be delivered using the next route. If you have set up a special route with filters using the lists `allowed_recipients' and `allowed_senders' or their complements (denied_), and the mail passing these rules should be delivered using this route only, you should set this to `true'. Otherwise the mail would be passed to the next route (if any), unless that route has rules which prevent that. Default is false. .TP \fBconnect_error_fail\fR = \fIboolean\fR If this is set, a connection error (or if a pipe command could not be executed) will cause a mail delivery to fail, ie. it will be bounced. If it is unset, it will just be defered. Default is false. The reason for this is that masqmail is designed for non permanent internet connections, where such errors may occur quite often, and a bounce would be annoying. You probably want to set this to true for permanent routes. .SH SMTP CONFIGURATION .TP \fBmail_host\fR = \fIstring\fR This is preferably the mail server of your ISP. All outgoing messages will be sent to this host which will distribute them to their destinations. If you do not set this mails will be sent directly. Because the mail server is probably `near' to you, mail transfer will be much faster if you use it. You can optionally give a port number following the host name and a colon, eg mail_host="mail.foo.com:25". .TP \fBresolve_list\fR = \fIlist\fR Specify the method how the domain of the server is resolved. Possible values are dns_mx, dns_a, byname. For `dns_mx', the domain is assumed to be an MX pointer to a list of host names, these will be tried each in order (lowest preference value first, equal preference values in random order). For `dns_a', the domain is assumed to be an A pointer. For `byname', the library function \fBgethostbyname(3)\fR will be used. For routes to a local network, where you likely don't have a DNS service, use only `byname'. The default is "dns_mx;dns_a;byname". .TP \fBhelo_name\fR = \fIstring\fR Set the name given with the HELO/EHLO command. If this is not set, \fBhost_name\fR from \fImasqmail.conf\fR will be used, if the \fBdo_correct_helo\fR option (see below) is unset. .TP \fBdo_correct_helo\fR = \fIboolean\fR If this is set, masqmail tries to look up your host name as it appears on the internet and sends this in the HELO/EHLO command. Some servers are so picky that they want this. Which is really crazy. It just does not make any sense to lie about ones own identity, because it can always be looked up by the server. Nobody should believe in the name given by HELO/EHLO anyway. If this is not set, \fBhost_name\fR from \fImasqmail.conf\fR or as given with the \fBhelo_name\fR (see above) will be used. .TP \fBinstant_helo\fR = \fIboolean\fR If this is set, masqmail does not wait for the greeting of the SMTP server after opening the connection. Instead it says EHLO right away (ESMTP is assumed). Use this option with wrappers that eat the 220 greeting of the SMTP server. Common examples are STARTTLS wrappers, like `openssl s_client \-starttls smtp ...'. If this option is set and a 220 greeting is received though, everything should still work. Please don't rely on that and keep in mind that RFC 2821 says that the client SHOULD wait for the 220 greeting of the server. Default: false .TP \fBdo_pipelining\fR = \fIboolean\fR If this is set to false, masqmail will not use ESMTP PIPELINING, even if the server announces that it is able to cope with it. Default is true. You do not want to set this to false unless the mail setup on the remote server side is really broken. Keywords: wingate. .TP \fBauth_name\fR = \fIstring\fR Set the authentication type for ESMTP AUTH authentication. Currently only `cram-md5' and `login' are supported. .TP \fBauth_login\fR = \fIstring\fR Your account name for ESMTP AUTH authentication. .TP \fBauth_secret\fR = \fIstring\fR Your secret for ESMTP AUTH authentication. .TP \fBwrapper\fR = \fIcommand\fR If set, instead of opening a connection to a remote server, \fIcommand\fR will be called and all traffic will be piped to its stdin and from its stdout. Purpose is to tunnel ip traffic, eg. for ssl. Example for SMTP over SSL tunneling: .nf wrapper="/usr/bin/openssl s_client \-quiet \-connect mail.gmx.net:465 2>/dev/null" .fi SMTP over SSL is supported since masqmail-0.1.8. It is marked obsolete by the IETF but is still in use. Example for encryption with STARTTLS (RFC-3207): .nf # don't forget the instant_helo, otherwise it won't work instant_helo=true wrapper="/usr/bin/openssl s_client \-quiet \-starttls smtp \-connect mail.gmx.net:25 2>/dev/null" .fi This is supported since masqmail-0.2.28. STARTTLS supersedes SMTP over SSL. Note for openssl: Ensure that stderr is redirected. Do *not* use \-crlf in the wrapper command, because masqmail does already insert CRLF. However, you might want to specify \-crlf if you want to test your wrapper command interactively on the command line. .SH PIPE CONFIGURATION .TP \fBpipe\fR = \fIcommand\fR \fIcommand\fR will be called and the message will be piped to its stdin. Purpose is to use gateways to uucp, fax, sms or whatever else. You can use variables to give as arguments to the command, these are the same as for the mda in the main configuration, see \fBmasqmail.conf(5)\fR. .TP \fBpipe_fromline = \fIboolean\fR Only if `pipe' is used. A from line will be prepended to the output stream whenever a pipe command is called. Default is false. .TP \fBpipe_fromhack = \fIboolean\fR Only if `pipe' is used. Each line beginning with `From ' is replaced with `>From ' whenever a pipe command is called. You probably want this if you have set \fBpipe_fromline\fR above. Default is false. .SH ADDRESS REWRITE RULES .TP \fBset_h_from_domain\fR = \fIstring\fR Replace the domain part in `From:' headers with this value. This may be useful if you use a private, outside unknown address on your local LAN and want this to be replaced by the domain of the address of your email address on the internet. Note that this is different to \fBset_return_path_domain\fR, see below. .TP \fBset_h_reply_to_domain\fR = \fIstring\fR Same as \fBset_h_from_domain\fP, but for the `Reply-To' header. .TP \fBset_return_path_domain\fR = \fIstring\fR Sets the domain part of the envelope from address. Some hosts check whether this is the same as the net the connection is coming from. If not, they reject the mail because they suspect spamming. It should be a valid address, because some mail servers also check that. You can also use this to set it to your usual address on the internet and put a local address only known on your LAN in the configuration of your mailer. Only the domain part will be changed, the local part remains unchanged. Use \fBmap_return_path_addresses\fR for rewriting local parts. .TP \fBmap_h_from_addresses\fR = \fIlist\fR This is similar to \fBset_h_from_domain\fR, but more flexible. Set this to a list which maps local parts to a full RFC 822 compliant email address, the local parts (the keys) are separated from the addresses (the values) by colons (`:'). Example: .nf map_h_from_addresses = "john: John Smith ; charlie: Charlie Miller " .fi You can use patterns, eg. * as keys. .TP \fBmap_h_reply_to_addresses\fR = \fIlist\fR Same as \fBmap_h_from_addresses\fR, but for the `Reply-To:' header. .TP \fBmap_h_mail_followup_to_addresses\fR = \fIlist\fR Same as \fBmap_h_from_addresses\fR, but for the `Mail-Followup-To:' header. Useful when replying to mailing lists. .TP \fBmap_return_path_addresses\fR = \fIlist\fR This is similar to \fBset_return_path_domain\fR, but more flexible. Set this to a list which maps local parts to a full RFC 821 compliant email address, the local parts (the keys) are separated from the addresses (the values) by colons (`:'). Note that this option takes RFC 821 addresses while \fBmap_h_from_addresses\fR takes RFC 822 addresses. The most important difference is that RFC 821 addresses have no full name. Example: .nf map_return_path_addresses = "john: ; charlie: " .fi You can use patterns, eg. * as keys. .TP \fBexpand_h_sender_address\fR = \fIboolean\fR This sets the domain of the sender address as given by the Sender: header to the same address as in the envelope return path address (which can be set by either \fBset_return_path_domain\fR or \fBmap_return_path_addresses\fR). This is for mail clients (eg. Microsoft Outlook) which use this address as the sender address. Though they should use the From: address, see RFC 821. If \fBfetchmail(1)\fR encounters an unqualified Sender: address, it will be expanded to the domain of the pop server, which is almost never correct. Default is true. .TP \fBexpand_h_sender_domain\fR = \fIboolean\fR Like \fBexpand_h_sender_address\fR, but sets the domain only. Deprecated, will be removed in a later version. .SH AUTHOR Masqmail was written by Oliver Kurth. It is now maintained by Markus Schnalke . You will find the newest version of masqmail at \fBhttp://marmaro.de/prog/masqmail/\fR. There is also a mailing list, you will find information about it at masqmail's main site. .SH BUGS Please report bugs to the mailing list. .SH SEE ALSO \fBmasqmail(8)\fR, \fBmasqmail.conf(5)\fR