| 1 | ## |
| 2 | ## This file is processed by Perl scripts to produce an ASCII and an HTML |
| 3 | ## version. Lines starting with ## are omitted. The markup used with paragraphs |
| 4 | ## is as follows: |
| 5 | ## |
| 6 | ## Markup User for HTML Text |
| 7 | ## ------------------------------------------------------ |
| 8 | ## \...\ option fixed-pitch "quoted" |
| 9 | ## \$...$\ variable $italic $plain |
| 10 | ## \*...*\ titles, quotes italic "quoted" |
| 11 | ## \(...)\ file name italic plain |
| 12 | ## \[...]\ replaceable <italic> <plain> |
| 13 | ## \?...?\ URL URL plain |
| 14 | ## \^...^\ Unix command italic plain |
| 15 | ## \%...%\ Exim driver bold "quoted" |
| 16 | ## \^^.^^\ C function bold plain |
| 17 | ## ::...:: header name italic: plain: |
| 18 | ## //...// domain italic plain |
| 19 | ## \/.../\ local part italic plain |
| 20 | ## \"..."\ literal fixed-pitch "quoted" |
| 21 | ## \\...\\ SMTP, build small caps caps |
| 22 | ## \**...**\ warn, item bold plain |
| 23 | ## \-...-\ cmd option -italic -plain |
| 24 | ## \# hard space space |
| 25 | ## |
| 26 | ## ``...'' quoted string “...” "..." |
| 27 | ## |
| 28 | ## @\ is used when a real backslash is required |
| 29 | ## |
| 30 | ## In addition, sequences of not blank lines that start with ==> are displayed |
| 31 | ## in fixed-pitch with no further interpretation. A line containing only [[br]] |
| 32 | ## is removed from the text version, but turned into <br> in the HTML version. |
| 33 | ## |
| 34 | ## The starts of sections and of questions and answers are automatically |
| 35 | ## detected by the scripts. |
| 36 | ## |
| 37 | ## |
| 38 | THE EXIM FAQ |
| 39 | ------------ |
| 40 | |
| 41 | This is the FAQ for the Exim Mail Transfer Agent. Many thanks to the many |
| 42 | people who provided the original information. This file would be amazingly |
| 43 | cluttered if I tried to list them all. Suggestions for corrections, |
| 44 | improvements, and additions are always welcome. |
| 45 | |
| 46 | This version of the FAQ applies to Exim 4.43 and later releases. |
| 47 | |
| 48 | References of the form Cnnn, Fnnn, Lnnn, and Snnn are to the sample |
| 49 | configuration, filter, \^^local_scan()^^\, and ``useful script'' files. These |
| 50 | are hyperlinked from the HTML version of this FAQ. They can also be found in |
| 51 | the separately distributed directory called \(config.samples)\. The primary |
| 52 | location is |
| 53 | |
| 54 | \?ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/config.samples.tar.gz?\ |
| 55 | \?ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/config.samples.tar.bz2?\ |
| 56 | |
| 57 | There are brief descriptions of these files at the end of this document. |
| 58 | |
| 59 | Philip Hazel |
| 60 | Last update: 14-October-2004 |
| 61 | |
| 62 | |
| 63 | The FAQ is divided into the following sections: |
| 64 | |
| 65 | 0. General Debugging |
| 66 | 1. Building and Installing |
| 67 | 2. Routing in general |
| 68 | 3. Routing to remote hosts |
| 69 | 4. Routing for local delivery |
| 70 | 5. Filtering |
| 71 | 6. Delivery |
| 72 | 7. Policy controls |
| 73 | 8. Rewriting addresses |
| 74 | 9. Headers |
| 75 | 10. Performance |
| 76 | 11. Majordomo |
| 77 | 12. Fetchmail |
| 78 | 13. Perl |
| 79 | 14. Dial-up and ISDN |
| 80 | 15. UUCP |
| 81 | 16. Modifying message bodies |
| 82 | 17. Encryption (TLS/SSL) |
| 83 | 20. Millennium |
| 84 | 50. Miscellaneous |
| 85 | 91. Mac OS X |
| 86 | 92. FreeBSD |
| 87 | 93. HP-UX |
| 88 | 94. BSDI |
| 89 | 95. IRIX |
| 90 | 96. Linux |
| 91 | 97. Sun systems |
| 92 | 98. Configuration cookbook |
| 93 | 99. List of sample configurations |
| 94 | |
| 95 | |
| 96 | |
| 97 | 0. GENERAL DEBUGGING |
| 98 | |
| 99 | Q0001: Exim is crashing. What is wrong? |
| 100 | |
| 101 | A0001: Exim should never crash. The author is always keen to know about |
| 102 | crashes, so that they can be diagnosed and fixed. However, before you |
| 103 | start sending me email, please check that you are running the latest |
| 104 | release of Exim, in case the problem has already been fixed. The |
| 105 | techniques described below can also be useful in trying to pin down |
| 106 | exactly which circumstances caused the crash and what Exim was trying to |
| 107 | do at the time. If the crash is reproducible (by a particular message, |
| 108 | say) keep a copy of that message. |
| 109 | |
| 110 | |
| 111 | Q0002: Exim is not working. What is wrong? How can I check what it is doing? |
| 112 | |
| 113 | A0002: Exactly how is it not working? Check the more specific questions in the |
| 114 | other sections of this FAQ. Some general techniques for debugging are: |
| 115 | |
| 116 | (1) Look for information in Exim's log files. These are in the \(log)\ |
| 117 | directory in Exim's spool directory, unless you have configured a |
| 118 | different path for them. Serious operational problems are reported |
| 119 | in paniclog. |
| 120 | |
| 121 | (2) If the problem involves the delivery of one or more messages, try |
| 122 | forcing a delivery with the \-M-\ option and also set the \-d-\ |
| 123 | option, to cause Exim to output debugging information. For example: |
| 124 | |
| 125 | ==> exim -d -M 0z6CXU-0005RR-00 |
| 126 | |
| 127 | The output is written to the standard error stream. You need to have |
| 128 | admin privileges to use \-M-\ and \-d-\. |
| 129 | |
| 130 | (3) If the problem involves incoming SMTP mail, try using the \-bh-\ |
| 131 | option to simulate an incoming connection from a specific host, |
| 132 | for example: |
| 133 | |
| 134 | ==> exim -bh 10.9.8.7 |
| 135 | |
| 136 | This goes through the motions of an SMTP session, without actually |
| 137 | accepting a message. Information about various policy checks is |
| 138 | output. You will need to know how to pretend to be an SMTP client. |
| 139 | |
| 140 | (4) If the problem involves lack of recognition or incorrect handling |
| 141 | of local addresses, try using the \-bt-\ option with debugging turned |
| 142 | on, to see how Exim is handling the address. For example, |
| 143 | |
| 144 | ==> exim -d -bt z6abc |
| 145 | |
| 146 | shows you how it would handle the local part \"z6abc"\. |
| 147 | |
| 148 | |
| 149 | Q0003: What does the error \*Child process of address_pipe transport returned |
| 150 | 127 from command xxx*\ mean? |
| 151 | |
| 152 | A0003: It means that when a transport called \%address_pipe%\ was run to pass an |
| 153 | email message by means of a pipe to another process running the command |
| 154 | xxx, the return code from that command was 127, which indicates some kind |
| 155 | of error (the success return code is 0). |
| 156 | |
| 157 | The most common meaning of exit code 127 is that when Exim tried to run |
| 158 | the command \(xxx)\, it failed. One cause of this might be incorrect |
| 159 | permissions on the file containing the command. See also Q0026. |
| 160 | |
| 161 | |
| 162 | Q0004: My virtual domain setup isn't working. How can I debug it? |
| 163 | |
| 164 | A0004: You can use an exim command with \-d-\ to get it to show you how it is |
| 165 | processing addresses. You don't actually need to send a message; use the |
| 166 | \-bt-\ option like this: |
| 167 | |
| 168 | ==> exim -d -bt localpart@virtualhost |
| 169 | |
| 170 | This will show you which routers it is using. If the problem appears |
| 171 | to be with the expansion of an option setting, you can use the |
| 172 | \debug_print\ option on a router to get Exim to output the expanded |
| 173 | string values as it goes along. |
| 174 | |
| 175 | |
| 176 | Q0005: Why is Exim not rejecting incoming messages addressed to non-existent |
| 177 | users at SMTP time? |
| 178 | |
| 179 | A0005: This is controlled by the ACL that is run for each incoming RCPT |
| 180 | command. It is defined by the \acl_smtp_rcpt\ option. You can check this |
| 181 | part of your configuration by using the \-bh-\ option to run a simulated |
| 182 | SMTP session, during which Exim will tell you what things it is |
| 183 | checking. |
| 184 | |
| 185 | |
| 186 | Q0006: I've put an entry for \"*.my.domain"\ in a DBM lookup file, but it isn't |
| 187 | getting recognized. |
| 188 | |
| 189 | A0006: You need to request ``partial matching'' by setting the search type to |
| 190 | \partial-dbm\ in order for this to work. |
| 191 | |
| 192 | |
| 193 | Q0007: I've put the entry \"*@domain.com"\ in a lookup database, but it isn't |
| 194 | working. The expansion I'm using is: |
| 195 | |
| 196 | ==> ${lookup{${lc:$sender_address}}dbm{/the/file} ... |
| 197 | |
| 198 | A0007: As no sender address will ever be //*@domain.com// this will indeed have |
| 199 | no effect as it stands. You need to tell Exim that you want it to look |
| 200 | for defaults after the normal lookup has failed. In this case, change the |
| 201 | search type from \"dbm"\ to \"dbm*@"\. See the section on \*Default values in |
| 202 | single-key lookups*\ in the chapter entitled \*File and database |
| 203 | lookups*\ in the Exim manual. |
| 204 | |
| 205 | |
| 206 | Q0008: If I run \"./exim -d -bt user@domain"\ all seems well, but when I send |
| 207 | a message from my User Agent, it does not arrive at its destination. |
| 208 | |
| 209 | A0008: Try sending a message directly to Exim by typing this: |
| 210 | |
| 211 | ==> exim -v user@domain |
| 212 | <some message, could be empty> |
| 213 | . |
| 214 | |
| 215 | If the message gets delivered to a remote host, but never arrives at its |
| 216 | final destination, then the problem is at the remote host. If, however, |
| 217 | the message gets through correctly, then the problem may be between your |
| 218 | User Agent and Exim. Try setting Exim's \log_selector\ option to include |
| 219 | \"+arguments"\, to see with which arguments the UA is calling Exim. |
| 220 | |
| 221 | |
| 222 | Q0009: What does \*no immediate delivery: too many messages received in one SMTP |
| 223 | connection*\ mean? |
| 224 | |
| 225 | A0009: An SMTP client may send any number of messages down a single SMTP |
| 226 | connection to a server. Initially, an Exim server starts up a delivery |
| 227 | process as soon as a message is received. However, in order not to start |
| 228 | up too many processes when lots of messages are arriving (typically |
| 229 | after a period of downtime), it stops doing immediate delivery after a |
| 230 | certain number of messages have arrived down the same connection. The |
| 231 | threshold is set by \smtp_accept_queue_per_connection\, and the default |
| 232 | value is 10. On large systems, the value should be increased. If you are |
| 233 | running a dial-in host and expecting to get all your mail down a single |
| 234 | SMTP connection, then you can disable the limit altogether by setting |
| 235 | the value to zero. |
| 236 | |
| 237 | |
| 238 | Q0010: Exim puts \*for \[address]\*\ in the ::Received:: headers of some, but not all, |
| 239 | messages. Is this a bug? |
| 240 | |
| 241 | A0010: No. It is deliberate. Exim inserts a ``for'' phrase only if the incoming |
| 242 | message has precisely one recipient. If there is more than one |
| 243 | recipient, nothing is inserted. The reason for this is that not all |
| 244 | recipients appear in the ::To:: or ::Cc:: headers, and it is considered a |
| 245 | breach of privacy to expose such recipients to the others. A common |
| 246 | case is when a message has come from a mailing list. |
| 247 | |
| 248 | |
| 249 | Q0011: Instead of \^exim_dbmbuild^\, I'm using a homegrown program to build DBM |
| 250 | (or cdb) files, but Exim doesn't seem to be able to use them. |
| 251 | |
| 252 | A0011: Exim expects there to be a binary zero value on the end of each key used |
| 253 | in a DBM file if you use the \"dbm"\ lookup type, but not for the \"dbmnz"\ |
| 254 | lookup type or for the keys of a cdb file. Check that you haven't |
| 255 | slipped up in this regard. |
| 256 | |
| 257 | |
| 258 | Q0012: Exim is unable to route to any remote domains. It doesn't seen to be |
| 259 | able to access the DNS. |
| 260 | |
| 261 | A0012: Try running \"exim -d+resolver -bt \[remote address]\"\. The \-d-\ |
| 262 | options turns on debugging output, and the addition of \"+resolver"\ |
| 263 | will make it show the resolver queries it is building and the results of |
| 264 | its DNS queries. If it appears unable to contact any name servers, check |
| 265 | the contents and permissions of \(/etc/resolv.conf)\. |
| 266 | |
| 267 | |
| 268 | Q0013: What does the error message \*transport system_aliases: cannot find |
| 269 | transport driver "redirect" in line 92*\ mean? |
| 270 | |
| 271 | A0013: \%redirect%\ is a router, not a transport. You have put a configuration |
| 272 | for a router into the transports section of the configuration file. |
| 273 | |
| 274 | |
| 275 | Q0014: Exim is timing out after receiving and responding to the DATA command |
| 276 | from one particular host, and yet the client host also claims to be |
| 277 | timing out. This seems to affect only certain messages. |
| 278 | |
| 279 | A0014: This kind of problem can have many different causes. |
| 280 | |
| 281 | (1) This problem has been seen with a network that was dropping all |
| 282 | packets over a certain size, which mean that the first part of the SMTP |
| 283 | transaction worked, but when the body of a large message started |
| 284 | flowing, the main data bits never got through the network. See also |
| 285 | Q0017. |
| 286 | |
| 287 | (2) This can also happen if a host has a broken TCP stack and won't |
| 288 | reassemble fragmented datagrams. |
| 289 | |
| 290 | (3) A very few ISDN lines have been seen which failed when certain data |
| 291 | patterns were sent through them, and replacing the routers at both end |
| 292 | of the link did not fix things. One of them was triggered by more than 4 |
| 293 | X's in a row in the data. |
| 294 | |
| 295 | |
| 296 | Q0015: What does the message \*Socket bind() to port 25 for address (any) |
| 297 | failed: address already in use*\ mean? |
| 298 | |
| 299 | A0015: You are trying to run an Exim daemon when there is one already running - |
| 300 | or maybe some other MTA is running, or perhaps you have an SMTP line in |
| 301 | \(/etc/inetd.conf)\ which is causing \(inetd)\ to listen on port 25. |
| 302 | |
| 303 | |
| 304 | Q0016: I've set \"verify = header_syntax"\ in my ACL, but this causes Exim to |
| 305 | complain about header lines like \"To: Work: Jim <jims@email>, |
| 306 | Home: Bob <bobs@email>"\ which look all right to me. Is this a bug? |
| 307 | |
| 308 | A0016: No. Header lines such as ::From::, ::To::, etc., which contain addresses, are |
| 309 | structured, and have to be in a specific format which is defined in RFC |
| 310 | 2822. Unquoted colons are not allowed in the ``phrase'' part of an email |
| 311 | address (they are OK in other headers such as ::Subject::). The correct |
| 312 | form for that header is |
| 313 | |
| 314 | ==> To: "Work: Jim" <jims@email>, "Home: Bob" <bobs@email> |
| 315 | |
| 316 | You will sometimes see unquoted colons in ::To:: and ::Cc:: headers, but only |
| 317 | in connection with name lists (called ``groups''), for example: |
| 318 | |
| 319 | ==> To: My friends: X <x@y.x>, Y <y@w.z>;, |
| 320 | My enemies: A <a@b.c>, B <b@c.d>; |
| 321 | |
| 322 | Each list must be terminated by a semicolon, as shown. |
| 323 | |
| 324 | |
| 325 | Q0017: Whenever Exim tries to deliver a specific message to a particular |
| 326 | server, it fails, giving the error \*Remote end closed connection after |
| 327 | data*\ or \*Broken pipe*\ or a timeout. What's going on? |
| 328 | |
| 329 | A0017: \*Broken pipe*\ is the error you get on some OS when the remote host just |
| 330 | drops the connection. The alternative is \*connection reset by peer*\. |
| 331 | There are many potential causes. Here are some of them (see also Q0068): |
| 332 | |
| 333 | (1) There are some firewalls that fall over on binary zero characters |
| 334 | in email. Have a look, e.g. with \"hexdump -c mymail | tail"\ to see if |
| 335 | your mail contains any binary zero characters. |
| 336 | |
| 337 | (2) There are broken SMTP servers around that just drop the connection |
| 338 | after the data has been sent if they don't like the message for some |
| 339 | reason (e.g. it is too big) instead of sending a 5xx error code. Have |
| 340 | you tried sending a small message to the same address? |
| 341 | |
| 342 | It has been reported that some releases of Novell servers running NIMS |
| 343 | are unable to handle lines longer than 1024 characters, and just close |
| 344 | the connection. This is an example of this behaviour. |
| 345 | |
| 346 | (3) If the problem occurs right at the start of the mail, then it could |
| 347 | be a network problem with mishandling of large packets. Many emails are |
| 348 | small and thus appear to propagate correctly, but big emails will |
| 349 | generate big IP datagrams. |
| 350 | |
| 351 | There have been problems when something in the middle of the network |
| 352 | mishandles large packets due to IP tunnelling. In a tunnelled link, your |
| 353 | IP datagrams gets wrapped in a larger datagram and sent over a network. |
| 354 | This is how virtual private networks (VPNs), and some ISP transit |
| 355 | circuits work. Since the datagrams going over the tunnel require a |
| 356 | larger packet size, the tunnel needs a bigger maximum transfer unit |
| 357 | (MTU) in the network handling the tunnelled packets. However, MTUs |
| 358 | are often fixed, so the tunnel will try to fragment the packets. |
| 359 | |
| 360 | If the systems outside the tunnel are using path MTU discovery, (most |
| 361 | Sun Sparc Solaris machines do by default), and set the DF (don't |
| 362 | fragment) bit because they don't send packets larger than their \(local)\ |
| 363 | MTU, then ICMP control messages will be sent by the routers at the |
| 364 | ends of the tunnel to tell them to reduce their MTU, since the tunnel |
| 365 | can't fragment the data, and has to throw it away. If this mechanism |
| 366 | stops working, e.g. a firewall blocks ICMP, then your host never |
| 367 | knows it has hit the maximum path MTU, but it has received no ACK on |
| 368 | the packet either, so it continues to resend the same packet and the |
| 369 | connection stalls, eventually timing out. |
| 370 | |
| 371 | You can test the link using pings of large packets and see what works: |
| 372 | |
| 373 | ==> ping -s host 2048 |
| 374 | |
| 375 | Try reducing the MTU on the sending host: |
| 376 | |
| 377 | ==> ifconfig le0 mtu 1300 |
| 378 | |
| 379 | Alternatively, you can reduce the size of the buffer Exim uses for SMTP |
| 380 | output by putting something like |
| 381 | |
| 382 | ==> DELIVER_OUT_BUFFER_SIZE=512 |
| 383 | |
| 384 | in your \(Local/Makefile)\ and rebuilding Exim (the default is 8192). |
| 385 | While this should not in principle have any effect on the size of |
| 386 | packets sent, in practice it does seem to have an effect on some OS. |
| 387 | |
| 388 | You can also try disabling path MTU discovery on the sending host. On |
| 389 | Linux, try: |
| 390 | |
| 391 | ==> echo 1 >/proc/sys/net/ipv4/ip_no_pmtu_disc |
| 392 | |
| 393 | For a general discussion and information about other operating systems, see |
| 394 | \?http://www.netheaven.com/pmtu.html?\. If disabling path MTU discovery |
| 395 | fixes the problem, try to find the broken or misconfigured |
| 396 | router/firewall that swallows the ICMP-unreachable packets. Increasing |
| 397 | timeouts on the receiving host will not work around the problem. |
| 398 | |
| 399 | |
| 400 | Q0018: Why do messages not get delivered down the same connection when I do |
| 401 | something like: \"exim -v -R @aol.com"\? For other domains, I do this and |
| 402 | I see the appropriate \*waiting for passed connections to get used*\ |
| 403 | messages. |
| 404 | |
| 405 | A0018: Recall that Exim does not keep separate queues for each domain, but |
| 406 | operates in a distributed fashion. Messages get into its `waiting for |
| 407 | host x' hints database only when a delivery has been tried, and has had |
| 408 | a temporary error. Here are some possibilities: |
| 409 | |
| 410 | (1) The messages to \(aol.com)\ got put in your queue, but no previous |
| 411 | delivery attempt occured before you did the \-R-\. This might have been |
| 412 | because of your settings of \queue_only_load\, \smtp_accept_queue\, or any |
| 413 | other option that caused no immediate delivery attempt on arrival. If |
| 414 | this is the case, you can try using \-qqR-\ instead of \-R-\. |
| 415 | |
| 416 | (2) You have set \connection_max_messages\ on the smtp transport, and |
| 417 | that limit was reached. This would show as a sequence of messages |
| 418 | down one connection, then another sequence down a new connection, etc. |
| 419 | |
| 420 | (3) Exim tried to pass on the SMTP connection to another message, but |
| 421 | that message was in the process of being delivered to \(aol.com)\ by some |
| 422 | other process (typically, a normal queue runner). This will break the |
| 423 | sequence, though the other delivery should pass its connection on to |
| 424 | other messages if there are any. |
| 425 | |
| 426 | (4) The folk at \(aol.com)\ changed the MX records so the host names have |
| 427 | changed - or a new host has been added. I don't know how likely this is. |
| 428 | |
| 429 | (5) Exim is not performing as it should in this regard, for some reason. |
| 430 | Next time you have mail queued up for \(aol.com)\, try running |
| 431 | |
| 432 | ==> exim_dumpdb /var/spool/exim wait-remote_smtp |
| 433 | |
| 434 | to see if those messages are listed among those waiting for the relevant |
| 435 | \(aol.com)\ hosts. |
| 436 | |
| 437 | |
| 438 | Q0019: There seems to be a problem in the string expansion code: it doesn't |
| 439 | recognize references to headers such as \"${h_to}"\. |
| 440 | |
| 441 | A0019: The only valid syntax for header references is (for example) \"$h_to:"\ |
| 442 | because header names are permitted by RFC 2822 to contain a very wide |
| 443 | range of characters. A colon (or white space) is required as the |
| 444 | terminator. |
| 445 | |
| 446 | |
| 447 | Q0020: Why do connections to my machine's SMTP port take a long time to respond |
| 448 | with the banner, when connections to other ports respond instantly? The |
| 449 | delay is sometimes as long as 30 seconds. |
| 450 | |
| 451 | A0020: These kinds of delay are usually caused by some kind of network problem |
| 452 | that affects outgoing calls made by Exim at the start of an incoming |
| 453 | connection. Configuration options that cause outgoing calls are: |
| 454 | |
| 455 | (1) \rfc1413_hosts\ and \rfc1413_query_timeout\ (for \*ident*\ calls). |
| 456 | Firewalls sometimes block ident connections so that they time out, |
| 457 | instead of refusing them immediately. This can cause this problem. |
| 458 | See Q5023 for a discussion of the usefulness of \*ident*\. |
| 459 | |
| 460 | (2) The \host_lookup\ option, the \host_reject_connection\ option, or a |
| 461 | condition in the ACL that runs at connection time requires the |
| 462 | remote host's name to be looked up from its IP address. Sometimes |
| 463 | these DNS lookups time out. You can get this effect with ACL |
| 464 | statements like this: |
| 465 | |
| 466 | ==> deny hosts = *.x.example |
| 467 | |
| 468 | If at all possible, you should use IP addresses instead of host |
| 469 | names in blocking lists in order to avoid this problem. |
| 470 | |
| 471 | You can use the \-bh-\ option to get more information about what is |
| 472 | happening at the start of a connection. However, note that the \-bh-\ |
| 473 | option does not provide a complete simulation. In particular, no |
| 474 | \*ident*\ checks are done, so it won't show up a delay problem that is |
| 475 | related to (1) above. |
| 476 | |
| 477 | |
| 478 | Q0021: What does \*failed to create child process to send failure message*\ mean? |
| 479 | This is a busy mail server with \smtp_accept_max\ set to 500, but this |
| 480 | problem started to occur at about 300 incoming connections. |
| 481 | |
| 482 | A0021: Some message delivery failed, and when Exim wanted to send a bounce |
| 483 | message, it was unable to create a process in which to do so. Probably |
| 484 | the limit on the maximum number of simultaneously active processes has |
| 485 | been reached. Most OS have some means of increasing this limit, and in |
| 486 | some operating systems there is also a limit per uid which can be |
| 487 | varied. |
| 488 | |
| 489 | |
| 490 | Q0022: What does \*No transport set by system filter*\ in a log line mean? |
| 491 | |
| 492 | A0022: Your system filter contains a \"pipe"\ or \"save"\ or \"mail"\ command, |
| 493 | but you have not set the corresponding option which specifies which |
| 494 | transport is to be used. You need to set whichever of |
| 495 | \system_filter_pipe_transport\, \system_filter_file_transport\ or |
| 496 | \system_filter_reply_transport\ is relevant. |
| 497 | |
| 498 | |
| 499 | Q0023: Why is Exim refusing to relay, saying \*failed to find host name from IP |
| 500 | address*\ when I have the sender's IP address in an ACL condition? My |
| 501 | configuration contains this ACL statement: |
| 502 | |
| 503 | ==> accept hosts = lsearch;/etc/mail/relaydomains:192.168.96.0/24 |
| 504 | |
| 505 | A0023: When checking a host list, the items are tested in left-to-right |
| 506 | order. The first item in your list is a lookup on the incoming host's |
| 507 | name, so Exim has to determine the name from the incoming IP address in |
| 508 | order to perform the test. If it can't find the host name, it can't do |
| 509 | the check, so it gives up. You would have discovered what was going |
| 510 | on if you had run a test such as |
| 511 | |
| 512 | ==> exim -bh 192.168.96.131 |
| 513 | |
| 514 | The solution is to put all explicit IP addresses first in the list. |
| 515 | Alternatively, you can split the ACL statement into two like this: |
| 516 | |
| 517 | ==> accept hosts = lsearch;/etc/mail/relaydomains |
| 518 | accept hosts = 192.168.96.0/24 |
| 519 | |
| 520 | If the host lookup fails, the first \"accept"\ fails, but then the |
| 521 | second one is considered. |
| 522 | |
| 523 | |
| 524 | Q0024: When I run \"exim -bd -q10m"\ I get \*PANIC LOG: exec of exim -q failed*\. |
| 525 | |
| 526 | A0024: This probably means that Exim doesn't know its own path so it can't |
| 527 | re-exec itself to do the first queue run. Check the output of |
| 528 | |
| 529 | ==> exim -bP exim_path |
| 530 | |
| 531 | |
| 532 | Q0025: I can't seem to get a pipe command to run when I include a \"${if"\ |
| 533 | expansion in it. This fails: |
| 534 | |
| 535 | ==> command = perl -T /usr/local/rt/bin/rtmux.pl \ |
| 536 | rt-mailgate helpdesk \ |
| 537 | ${if eq {$local_part}{rt} {correspond}{action}} |
| 538 | |
| 539 | A0025: You need some internal quoting in there. Exim expands each individual |
| 540 | argument separately. Because you have (necessarily) got spaces in your |
| 541 | \"${if"\ item, you have to quote that argument. Try |
| 542 | |
| 543 | ==> command = perl -T /usr/local/rt/bin/rtmux.pl \ |
| 544 | rt-mailgate helpdesk \ |
| 545 | "${if eq {$local_part}{rt} {correspond}{action}}" |
| 546 | |
| 547 | \**Warning:**\ If command starts with an item that requires quoting, |
| 548 | you cannot just put it in quotes, because a leading quote means that the |
| 549 | entire option setting is being quoted. What you have to do is to quote |
| 550 | the entire value, and use internally escaped quotes for the ones you |
| 551 | really want. For example: |
| 552 | |
| 553 | ==> command = "\"${if ....}\" arg1 arg2" |
| 554 | |
| 555 | Any backslashes in the expansion items will have to be doubled to stop |
| 556 | them being interpreted by the string reader. |
| 557 | |
| 558 | |
| 559 | Q0026: I'm trying to get Exim to connect an alias to a pipe, but it always |
| 560 | gives error code 127, with the comment \*(could mean unable to exec |
| 561 | or command does not exist)*\. |
| 562 | |
| 563 | A0026: If your alias entry looks like this: |
| 564 | |
| 565 | ==> alias: |"/some/command some parameters" |
| 566 | |
| 567 | change it to look like this: |
| 568 | |
| 569 | ==> alias: "|/some/command some parameters" |
| 570 | |
| 571 | |
| 572 | Q0027: What does the error \*Spool file is locked*\ mean? |
| 573 | |
| 574 | A0027: This is not an error. All it means is that when an Exim delivery |
| 575 | process (probably started by a queue runner process) looked at a message |
| 576 | in order to start delivering it, it found that another Exim process was |
| 577 | already busy delivering it. On a busy system this is quite a common |
| 578 | occurrence. If you set \"-skip_delivery"\ in the \log_selector\ option, |
| 579 | these messages are omitted from the log. |
| 580 | |
| 581 | The only time when this message might indicate a problem is if it is |
| 582 | repeated for the same message for a very long time. That would suggest |
| 583 | that the process that is delivering the message has somehow got stuck. |
| 584 | |
| 585 | |
| 586 | Q0028: Exim is reporting IP addresses as 0.0.0.0 or 255.255.255.255 instead of |
| 587 | their correct values. What's going on? |
| 588 | |
| 589 | A0028: You are using a version of Exim built with gcc on an IRIX box. |
| 590 | See Q9502. |
| 591 | |
| 592 | |
| 593 | Q0029: I can't seem to figure out why PAM support doesn't work correctly. |
| 594 | |
| 595 | A0029: There is a problem using PAM with shadow passwords when the calling |
| 596 | program is not running as \/root/\. Exim is normally running as the |
| 597 | Exim user when authenticating a remote host. |
| 598 | |
| 599 | (1) One solution can be found at \?http://www.e-admin.de/pam_exim/?\. |
| 600 | |
| 601 | (2) PAM 0.72 allows authorization as non-\/root/\, using setuid helper |
| 602 | programs. Furthermore, in \(/etc/pam.d/exim)\ you can explicitly |
| 603 | specify that this authorization (using setuid helpers) is only |
| 604 | permitted for certain users and groups. |
| 605 | |
| 606 | (3) Another approach is to authenticate using the \^saslauthd^\ daemon, |
| 607 | which has its own interface to PAM. The daemon runs as root, so |
| 608 | there is no access problem. |
| 609 | |
| 610 | (4) One suggested solution was to set |
| 611 | |
| 612 | ==> exim_group=shadow |
| 613 | |
| 614 | in the configuration file, or the equivalent at build time. This is |
| 615 | very strongly discouraged. Do not do it! It works, but it's a |
| 616 | potential security exposure. Exim is intended to run as a |
| 617 | non-privileged user for much of the time. This setting gives it have |
| 618 | privileged access to crucial security information all of the time, |
| 619 | simply for the purposes of authentication (which Exim will only |
| 620 | spend a tiny part of its total time doing). The result is that a |
| 621 | successful compromise of the Exim system can give someone direct |
| 622 | access to the system passwords. |
| 623 | |
| 624 | |
| 625 | Q0030: I'm trying to use a query-style lookup for hosts that are allowed to |
| 626 | relay, but it is giving really weird errors. |
| 627 | |
| 628 | A0030: Does your query contain a colon character? Remember that host lists are |
| 629 | colon-separated, so you need to double any colons in the query. This |
| 630 | applies even if the query is defined as a macro. |
| 631 | |
| 632 | |
| 633 | Q0031: Exim is rejecting connections from hosts that have more than one IP |
| 634 | address, for no apparent reason. |
| 635 | |
| 636 | A0031: You are using Solaris 7 or earlier, and have \"nis dns files"\ in |
| 637 | \(/etc/nsswitch.conf)\. Change this to \"dns nis files"\ to avoid hitting Sun |
| 638 | bug 1154236 (a bad interaction between NIS and the DNS). |
| 639 | |
| 640 | |
| 641 | Q0032: Exim is failing to find the MySQL library, even though is it present |
| 642 | within \\LD_LIBRARY_PATH\\. I'm getting this error: |
| 643 | |
| 644 | ==> /usr/local/bin/exim: fatal: libmysqlclient.so.6: open failed: |
| 645 | No such file or directory |
| 646 | |
| 647 | A0032: Exim is suid, and \\LD_LIBRARY_PATH\\ is ignored for suid binaries on a |
| 648 | Solaris (and other?) systems. What you should be doing is adding |
| 649 | \"-R/local/lib/mysql"\ to the same place in the compilation that you added |
| 650 | \"-L/local/lib/mysql"\. This tells the binary where to look without |
| 651 | needing a path variable. |
| 652 | |
| 653 | |
| 654 | Q0033: What does the error \*lookup of host "xx.xx.xx" failed in yyy router*\ |
| 655 | mean? |
| 656 | |
| 657 | A0033: You configured a \%manualroute%\ router to send the message to xx.xx.xx. When |
| 658 | it tried to look up the IP address for that host, the lookup failed |
| 659 | with a permanent error. As this is a manual routing, this is a |
| 660 | considered to be a serious error which the postmaster needs to know |
| 661 | about (maybe you have a typo in your file), and there is little point |
| 662 | in keeping on trying. So it freezes the message. |
| 663 | |
| 664 | (1) Don't set up routes to non-existent hosts. |
| 665 | |
| 666 | (2) If you must set up routes to non-existent hosts, and don't want |
| 667 | freezing, set the \host_find_failed\ option on the router to do something |
| 668 | other than freeze. |
| 669 | |
| 670 | |
| 671 | Q0034: Exim works fine on one host, but when I copied the binary to another |
| 672 | identical host, it stopped working (it could not resolve DNS names). |
| 673 | |
| 674 | A0034: Is the new host running exactly the same operating system? Most |
| 675 | importantly, are the versions of the dynamically loaded libraries |
| 676 | (files with names like \(libsocket.so.1)\) the same on both systems? If not, |
| 677 | that is probably the cause of the problem. Either arrange for the |
| 678 | libraries to be the same, or rebuild Exim from source on the new host. |
| 679 | |
| 680 | |
| 681 | Q0035: I set a \"hosts"\ condition in an ACL to do a lookup in a file of IP |
| 682 | addresses, but it doesn't work. |
| 683 | |
| 684 | A0035: Did you remember to put \"net-"\ at the start of the the search type? If |
| 685 | you set something like this: |
| 686 | |
| 687 | ==> accept hosts = lsearch;/some/file |
| 688 | |
| 689 | Exim searches the file for the host name, not the IP address. You need |
| 690 | to set |
| 691 | |
| 692 | ==> accept hosts = net-lsearch;/some/file |
| 693 | |
| 694 | to make it use the IP address as the key to the lookup. |
| 695 | |
| 696 | |
| 697 | Q0036: Why do I get the error \*Permission denied: creating lock file hitching |
| 698 | post*\ when Exim tries to do a local delivery? |
| 699 | |
| 700 | A0036: Your configuration specifies that local mailboxes are all held in |
| 701 | single directory, via configuration lines like these (taken from the |
| 702 | default configuration): |
| 703 | |
| 704 | ==> local_delivery: |
| 705 | driver = appendfile |
| 706 | file = /var/mail/$local_part |
| 707 | |
| 708 | and the permissions on the directory probably look like this: |
| 709 | |
| 710 | ==> drwxrwxr-x 3 root mail 512 Jul 9 13:48 /var/mail/ |
| 711 | |
| 712 | Using the default configuration, Exim runs as the local user when doing |
| 713 | a local delivery, and it uses a lock file to prevent any other process |
| 714 | from updating the mailbox while it is writing to it. With those |
| 715 | permissions the delivery process, running as the user, is unable to |
| 716 | create a lock file in the \(/var/mail(\ directory. There are two solutions |
| 717 | to this problem: |
| 718 | |
| 719 | (1) Set the \"write"\ and \"sticky bit"\ permissions on the directory, so |
| 720 | that it looks like this: |
| 721 | |
| 722 | ==> drwxrwxrwt 3 root mail 512 Jul 9 13:48 /var/mail/ |
| 723 | |
| 724 | The \"w"\ allows any user to create new files in the directory, but |
| 725 | the \"t"\ bit means that only the creator of a file is able to remove |
| 726 | it. This is the same setting as is normally used with the \(/tmp)\ |
| 727 | directory. |
| 728 | |
| 729 | (2) Arrange to run the local_delivery transport under a specific group |
| 730 | by changing the configuration to read |
| 731 | |
| 732 | ==> local_delivery: |
| 733 | driver = appendfile |
| 734 | file = /var/mail/${local_part} |
| 735 | group = mail |
| 736 | |
| 737 | The delivery process still runs under the user's uid, but with the |
| 738 | group set to \"mail"\. The group permission on the directory allows |
| 739 | the process to create and remove the lock file. |
| 740 | |
| 741 | The choice between (1) and (2) is up to the administrator. If the |
| 742 | second solution is used, users can empty their mailboxes by updating |
| 743 | them, but cannot delete them. |
| 744 | |
| 745 | If your problem involves mail to \/root/\, see also Q0039. |
| 746 | |
| 747 | |
| 748 | Q0037: I am experiencing mailbox locking problems with Sun's \"mailtool"\ used |
| 749 | over a network. |
| 750 | |
| 751 | A0037: See Q9705 in the Sun-specific section below. |
| 752 | |
| 753 | |
| 754 | Q0038: What does the error message \*error in forward file (filtering not |
| 755 | enabled): missing or malformed local part*\ mean? |
| 756 | |
| 757 | A0038: If you are trying to use an Exim filter, you have forgotten to enable |
| 758 | the facility, which is disabled by default. In the \%redirect%\ router |
| 759 | (in the Exim run time configuration file) you need to set |
| 760 | |
| 761 | ==> allow_filter = true |
| 762 | |
| 763 | to allow a \(.forward)\ file to be used as an Exim filter. If you are not |
| 764 | trying to use an Exim filter, then you have put a malformed address in |
| 765 | the \(.forward)\ file. |
| 766 | |
| 767 | |
| 768 | Q0039: I have installed Exim, but now I can't mail to \/root/\ any more. Why is |
| 769 | this? |
| 770 | |
| 771 | A0039: Most people set up \/root/\ as an alias for the manager of the host. If |
| 772 | you haven't done this, Exim will attempt to deliver to \/root/\ as if it |
| 773 | were a normal user. This isn't really a good idea because the delivery |
| 774 | process would run as \/root/\. Exim has two trigger guards that stop |
| 775 | deliveries running as root. In the build-time configuration, there is a |
| 776 | setting called FIXED_NEVER_USERS, which defaults to \"root"\. This |
| 777 | setting cannot be overridden. In addition, the default runtime |
| 778 | configuration contains the option |
| 779 | |
| 780 | ==> never_users = root |
| 781 | |
| 782 | just to be on the safe side. If you really want to run local deliveries |
| 783 | as \/root/\, you must use a version of Exim that was built without the |
| 784 | FIXED_NEVER_USERS option, and remove the above line from the runtime |
| 785 | configuration, but it would be better to create an alias for \/root/\ |
| 786 | instead. |
| 787 | |
| 788 | |
| 789 | Q0040: How can I stop undeliverable bounce messages (e.g. to routeable, but |
| 790 | undeliverable, spammer senders) from clogging up the queue for days? |
| 791 | |
| 792 | A0040: If at all possible, you should try to avoid getting into this situation |
| 793 | in the first place, for example, by verifying recipients so that you |
| 794 | do not accept undeliverable messages that lead to these bounces. |
| 795 | You can, however, configure Exim to discard failing bounce messages |
| 796 | early. Just set \ignore_bounce_errors_after\ to specify a (short) time |
| 797 | to keep them for. |
| 798 | |
| 799 | |
| 800 | Q0041: What does the message \*unable to set gid=ddd or uid=ddd (euid=ddd): |
| 801 | local delivery to ... transport=ttt*\ mean? |
| 802 | |
| 803 | A0041: Have you remembered to make Exim setuid \/root/\? It needs root privilege if |
| 804 | it is to do any local deliveries, because it does them ``as the user''. |
| 805 | Note also that the partition from which Exim is running (where the |
| 806 | binary is installed) must not have the \nosuid\ mount option set. You |
| 807 | can check this by looking at its \(/etc/fstab)\ entry (or \(/etc/vfstab)\, |
| 808 | depending on your OS). |
| 809 | |
| 810 | |
| 811 | Q0042: My ISP's mail server is rejecting bounce messages from Exim, complaining |
| 812 | that they have no sender. The SMTP trace does indeed show that the |
| 813 | sender address is \"<>"\. Why is the Sender on the bounce message empty? |
| 814 | |
| 815 | A0042: Because the RFCs say it must be. Your ISP is at fault. Send them this |
| 816 | extract from RFC 2821 section 6.1 (\*Reliable Delivery and Replies by |
| 817 | Email*\): |
| 818 | |
| 819 | If there is a delivery failure after acceptance of a message, the |
| 820 | receiver-SMTP MUST formulate and mail a notification message. This |
| 821 | notification MUST be sent using a null (\"<>"\) reverse path in the |
| 822 | envelope. The recipient of this notification MUST be the address |
| 823 | from the envelope return path (or the ::Return-Path:: header line). |
| 824 | However, if this address is null (\"<>"\), the receiver-SMTP MUST NOT |
| 825 | send a notification. |
| 826 | |
| 827 | The reason that bounce messages have no sender is so that they |
| 828 | themselves cannot provoke further bounces, as this could lead to a |
| 829 | unending exchange of undeliverable messages. |
| 830 | |
| 831 | |
| 832 | Q0043: What does the error \*Unable to get interface configuration: 22 Invalid |
| 833 | argument*\ mean? |
| 834 | |
| 835 | A0043: This is an error that occurs when Exim is trying to find out the all the |
| 836 | IP addresses on all of the local host's interfaces. If you have lots of |
| 837 | virtual interfaces, this can occur if there are more than around 250 of |
| 838 | them. The solution is to set the option \local_interfaces\ to list just |
| 839 | those IP addresses that you want to use for making and receiving SMTP |
| 840 | connections. |
| 841 | |
| 842 | |
| 843 | Q0044: What does the error \*Failed to create spool file*\ mean? |
| 844 | |
| 845 | A0044: Exim has been unable to create a file in its spool area in which to |
| 846 | store an incoming message. This is most likely to be either a |
| 847 | permissions problem in the file hierarchy, or a problem with the uid |
| 848 | under which Exim is running, though it could be something more drastic |
| 849 | such as your disk being full. |
| 850 | |
| 851 | If you are running Exim with an alternate configuration file using a |
| 852 | command such as \"exim -C altconfig..."\, remember that the use of -C |
| 853 | takes away Exim's root privilege, unless \\TRUSTED_CONFIG_LIST\\ |
| 854 | is set in \(Local/Makefile)\ and the corresponding file contains a |
| 855 | prefix which matches the alternative configuration file being used. |
| 856 | |
| 857 | Check that you have defined the spool directory correctly by running |
| 858 | |
| 859 | ==> exim -bP spool_directory |
| 860 | |
| 861 | and examining the output. Check the mode of this directory. It should |
| 862 | look like this, assuming you are running Exim as user \/exim/\: |
| 863 | |
| 864 | ==> drwxr-x--- 6 exim exim 512 Jul 16 12:29 /var/spool/exim |
| 865 | |
| 866 | If there are any subdirectories already in existence, they should have |
| 867 | the same permissions, owner, and group. Check also that you haven't got |
| 868 | incorrect permissions on superior directories (for example, \(/var/spool)\). |
| 869 | Check that you have set up the Exim binary to be setuid \/root/\. It should |
| 870 | look like this: |
| 871 | |
| 872 | ==> -rwsr-xr-x 1 root xxx 502780 Jul 16 14:16 exim |
| 873 | |
| 874 | Note that it is not just the owner that must be \/root/\, but also the third |
| 875 | permission must be \"s"\ rather than \"x"\. |
| 876 | |
| 877 | |
| 878 | Q0045: I see entries in the log that mention two different IP addresses for the |
| 879 | same connection. Why is this? For example: |
| 880 | |
| 881 | ==> H=tip-mp8-ncs-13.stanford.edu ([36.173.0.189]) [36.173.0.156] |
| 882 | |
| 883 | A0045: The actual IP address from which the call came is the final one. |
| 884 | Whenever there's something in parentheses in a host name, it is what the |
| 885 | host quoted as the domain part of an SMTP HELO or EHLO command. So in |
| 886 | this case, the client, despite being 36.173.0.156, issued the command |
| 887 | |
| 888 | ==> EHLO [36.173.0.189] |
| 889 | |
| 890 | when it sent your server the message. This is, of course, very |
| 891 | misleading. |
| 892 | |
| 893 | |
| 894 | Q0046: A short time after I start Exim I see a defunct zombie process. What |
| 895 | is causing this? |
| 896 | |
| 897 | A0046: Your system must be lightly loaded as far as mail is concerned. The |
| 898 | daemon sets off a queue runner process when it is started, but it only |
| 899 | tidies up completed child processes when it wakes up for some other |
| 900 | reason. When there's nothing much going on, you occasionally see |
| 901 | defunct processes like this waiting to be dealt with. This is |
| 902 | perfectly normal. |
| 903 | |
| 904 | |
| 905 | Q0047: On a reboot, or a restart of the mail system, I see the message \*Mailer |
| 906 | daemons: exim abandoned: unknown, malformed, or incomplete option |
| 907 | -bz sendmail*\. What does this mean? |
| 908 | |
| 909 | A0047: \-bz-\ is a Sendmail option requesting it to create a `configuration freeze |
| 910 | file'. Exim has no such concept and so does not support the option. You |
| 911 | probably have a line like |
| 912 | |
| 913 | ==> /usr/lib/sendmail -bz |
| 914 | |
| 915 | in some start-up script (e.g. \(/etc/init.d/mail)\) immedately before |
| 916 | |
| 917 | ==> /usr/lib/sendmail -bd -q15m |
| 918 | |
| 919 | The first of these lines should be commented out. |
| 920 | |
| 921 | |
| 922 | Q0048: Whenever exim restarts it takes up to 3-5 minutes to start responding on |
| 923 | the SMTP port. Why is this? |
| 924 | |
| 925 | A0048: Something else is hanging onto port 25 and not releasing it. One place |
| 926 | to look is \(/etc/inetd.conf)\ in case for any reason an SMTP stream is |
| 927 | configured there. |
| 928 | |
| 929 | |
| 930 | Q0049: What does the log message \*no immediate delivery: more than 10 messages |
| 931 | received in one connection*\ mean? |
| 932 | |
| 933 | A0049: A remote MTA sent a number of messages in a single SMTP session. Exim |
| 934 | limits the number of immediate delivery processes it creates as a |
| 935 | result of a single SMTP connection, in order to avoid creating a zillion |
| 936 | processes on systems that can have many incoming connections. If you are |
| 937 | dialing in to collect mail from your ISP, you should probably set |
| 938 | \smtp_accept_queue_per_connection\ to some number larger than 10, or |
| 939 | arrange to start a queue runner for local delivery (using \-ql-\) |
| 940 | immediately after collecting the mail. |
| 941 | |
| 942 | |
| 943 | Q0050: I am getting complaints from a customer who uses my Exim server for |
| 944 | relaying that they are being blocked with a \*Too many connections*\ |
| 945 | error. |
| 946 | |
| 947 | A0050: See \smtp_accept_max\, \smep_accept_max_per_host\ and \smtp_accept_reserve\. |
| 948 | |
| 949 | |
| 950 | Q0051: When I test my system filter with \-bf-\, I get the error \*filtering |
| 951 | command "fail" is disabled*\. Why is this? |
| 952 | |
| 953 | A0051: Use the \-bF-\ option to test system filters. This gives you access to the |
| 954 | freeze and fail actions. |
| 955 | |
| 956 | |
| 957 | Q0052: What does \*ridiculously long message header*\ in an error report mean? |
| 958 | |
| 959 | A0052: There has to be some limit to the length of a message's header lines, |
| 960 | because otherwise a malefactor could open an SMTP channel to your host, |
| 961 | start a message, and then just send characters continuously until your |
| 962 | host runs out of memory. (Exim stores all the header lines in main |
| 963 | memory while processing a message). For this reason a limit is imposed |
| 964 | on the total amount of memory that can be used for header lines. The |
| 965 | default is 1MB, but this can be changed by setting \\HEADER_MAXSIZE\\ in |
| 966 | \(Local/Makefile)\ before building Exim. Exceeding the limit provokes |
| 967 | the ``ridiculous'' error message. |
| 968 | |
| 969 | |
| 970 | Q0053: Exim on my host responds to a connection with \"220 *****..."\ and |
| 971 | won't understand \\EHLO\\ commands. |
| 972 | |
| 973 | A0053: This is the sign of a Cisco Pix ``Mailguard'' sitting in front of your |
| 974 | MTA. Pix breaks ESMTP and only does SMTP. It is a nuisance when you have |
| 975 | a secure MTA running on your box. Something like ``no fixup protocol |
| 976 | smtp 25'' in the Pix configuration is needed. It may be possible to do |
| 977 | this by logging into the Pix (using \^telnet^\ or \^ssh^\) and typing |
| 978 | \"no fixup smtp"\ to its console. (You may need to use other commands |
| 979 | before or after to set up configuration mode and to activate a changed |
| 980 | configuration. Consult your Pix documentation or expert.) See also |
| 981 | Q0078. |
| 982 | |
| 983 | |
| 984 | Q0054: I'm getting an Exim configuration error \*unknown rewrite flag |
| 985 | character (m) in line 386*\ but I haven't used any flags on my rewriting |
| 986 | rules. |
| 987 | |
| 988 | A0054: You have probably forgotten to quote a replacement string that contains |
| 989 | white space. |
| 990 | |
| 991 | |
| 992 | Q0055: What does the error \*Failed to open wait-remote_smtp database: Invalid |
| 993 | argument*\ mean? |
| 994 | |
| 995 | A0055: This is something that happens if you have existing DBM hints files when |
| 996 | you install a new version of Exim that is compiled to use a different or |
| 997 | upgraded DBM library. The simplest thing to try is |
| 998 | |
| 999 | ==> rm /var/spool/exim/db/* |
| 1000 | |
| 1001 | This removes all the hints files. Exim will start afresh and build new |
| 1002 | ones. If the symptom recurs, it suggests there is some problem with your |
| 1003 | DBM library. |
| 1004 | |
| 1005 | |
| 1006 | Q0056: We are using Exim to send mail from our web server. However, whenever a |
| 1007 | user sends an email it gets sent with the return path (envelope sender) |
| 1008 | //apache@server_name.com// because the PHP script is running as |
| 1009 | \/apache/\. |
| 1010 | |
| 1011 | A0056: You need to include \/apache/\ in the \trusted_users\ configuration option. |
| 1012 | Only trusted users are permitted to specify senders when mail is passed |
| 1013 | to Exim via the command line. |
| 1014 | |
| 1015 | |
| 1016 | Q0057: We've got people complaining about attachments that don't show up |
| 1017 | as attachments, but are included in the body of the message. |
| 1018 | |
| 1019 | A0057: In the past, these symptoms could be seen when some software passed a |
| 1020 | CRLF line terminated message via the command line, because Exim expected |
| 1021 | lines to be terminated by LF only, and so it preserved the CRs as data. |
| 1022 | Modern versions of Exim (4.21 or later) use heuristics to try to do the |
| 1023 | right thing with line endings. |
| 1024 | |
| 1025 | |
| 1026 | Q0058: What does the error \*failed to open DB file \(/var/spool/exim/db/retry)\: |
| 1027 | File exists*\ mean? |
| 1028 | |
| 1029 | A0058: This error is most often caused when a hints file that was written with |
| 1030 | one version of the Berkeley DB library is read by another version. |
| 1031 | Sometimes this can happen if you change from a binary version of Exim to |
| 1032 | a locally compiled version. Or it can happen if you compile and install |
| 1033 | a new version of Exim after changing Berkeley DB versions. You can find |
| 1034 | out which version your Exim is using by running: |
| 1035 | |
| 1036 | ==> ldd /usr/sbin/exim |
| 1037 | |
| 1038 | The solution to the problem is to delete all the files in the |
| 1039 | \(/var/spool/exim/db)\ directory, and let Exim recreate them. |
| 1040 | |
| 1041 | |
| 1042 | Q0059: When my Outlook Express 6.0 client sends a STARTTLS command to begin a |
| 1043 | TLS session, Exim doesn't seem to receive it. The Outlook log shows |
| 1044 | this: |
| 1045 | |
| 1046 | ==> SMTP: 14:19:27 [tx] STARTTLS |
| 1047 | SMTP: 14:19:27 [rx] 500 Unsupported command. |
| 1048 | |
| 1049 | but the Exim debugging output shows this: |
| 1050 | |
| 1051 | ==> SMTP<< EHLO xxxx |
| 1052 | SMTP>> 250-yyyy Hello xxxx [nnn.nnn.nnn.nnn] |
| 1053 | 250-SIZE 52428800 |
| 1054 | 250-PIPELINING |
| 1055 | 250-AUTH CRAM-MD5 PLAIN LOGIN |
| 1056 | 250-STARTTLS |
| 1057 | 250 HELP |
| 1058 | SMTP<< QUIT |
| 1059 | |
| 1060 | A0059: Turn off scanning of outgoing email in Norton Antivirus. If you aren't |
| 1061 | running Norton Antivirus, see if you are running some other kind of SMTP |
| 1062 | proxying, either on the client or on a firewall between the client and |
| 1063 | server. ``Unsupported command'' is not an Exim message. |
| 1064 | |
| 1065 | |
| 1066 | Q0060: Why am I getting the error \*failed to expand \"/data/lists/lists/${lc"\ |
| 1067 | for require_files: \"${lc"\ is not a known operator*\ for this setting: |
| 1068 | |
| 1069 | ==> require_files = MAILMAN_HOME/lists/${lc:$local_part}/config.db |
| 1070 | |
| 1071 | A0060: The value of \"require_files"\ is a list in which each item is |
| 1072 | separately expanded. In other words, the splitting into items happens |
| 1073 | before the string expansion. You need either to double the colon, or |
| 1074 | switch to a different list separator. |
| 1075 | |
| 1076 | |
| 1077 | Q0061: What does the error \*Too many ``Received'' headers - suspected mail |
| 1078 | loop*\ mean? |
| 1079 | |
| 1080 | A0061: Whenever a message passes through an MTA, a ::Received:: header gets |
| 1081 | added. Exim counts the number of these headers in incoming messages. If |
| 1082 | there are more than the value of \received_headers_max\ (default 30), |
| 1083 | Exim assumes there is some kind of mail routing loop occurring. For |
| 1084 | example, host A passes the message to host B, which immediately passes |
| 1085 | it back to host A. Check the ::Received:: headers and the mail logs to |
| 1086 | determine exactly what is going on. |
| 1087 | |
| 1088 | One common cause of this problem is users with accounts on both systems |
| 1089 | who set up each one to forward to the other, thinking that will cause |
| 1090 | copies of all messages to be delivered on both of them. |
| 1091 | |
| 1092 | |
| 1093 | Q0062: When I try to start an Exim daemon with \-bd-\ it crashes. I ran a |
| 1094 | debugger and discovered that the crash is happening in the function |
| 1095 | \^^getservbyname()^^\. What's going on? |
| 1096 | |
| 1097 | A0062: What have you got in the file \(/etc/nsswitch.conf)\? If it contains this |
| 1098 | line: |
| 1099 | |
| 1100 | ==> services: db files |
| 1101 | |
| 1102 | try removing the \"db"\. Your system is trying to look in some kind of |
| 1103 | database before searching the file \(/etc/services)\, and there is an |
| 1104 | incompatibility the is causing the function \^^getservbyname()^^\ crash. |
| 1105 | This is an OS problem. See, for instance: |
| 1106 | |
| 1107 | \?http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=129025?\ |
| 1108 | |
| 1109 | Another workaround in Exim is to set |
| 1110 | |
| 1111 | ==> daemon_smtp_port = 25 |
| 1112 | |
| 1113 | in the configuration, to stop Exim calling \^^getservbyname()^^\. |
| 1114 | |
| 1115 | |
| 1116 | Q0063: When I try to start an Exim daemon, nothing happens. There is no |
| 1117 | process, and nothing is written to the Exim log. |
| 1118 | |
| 1119 | A0063: Check to see if anything is written to \(syslog)\. This problem can be |
| 1120 | caused by a permission problem that stops Exim from writing to its log |
| 1121 | files, especially if you've specified that they should be written |
| 1122 | somewhere other than under Exim's spool directory. You could also try |
| 1123 | running the daemon with debugging turned on. |
| 1124 | |
| 1125 | |
| 1126 | Q0064: When I run \"exim -d test@domain"\ it delivers fine, but when I send a |
| 1127 | message from the \^mail^\ command, I get \*User unknown*\ and the mail |
| 1128 | is saved in \(dead.letter)\. |
| 1129 | |
| 1130 | A0064: It looks as if Exim isn't being called by \^mail^\; instead it is |
| 1131 | calling some other program (probably Sendmail). Try running the command |
| 1132 | |
| 1133 | ==> /usr/sbin/sendmail -bV |
| 1134 | |
| 1135 | (If you get \*No such file or directory*\ or \*Command not found*\ you |
| 1136 | are running Solaris or IRIX. Try again with \(/usr/lib/sendmail)\.) The |
| 1137 | output should be something like this: |
| 1138 | |
| 1139 | ==> Exim version 4.05 #1 built 13-Jun-2002 10:27:15 |
| 1140 | Copyright (c) University of Cambridge 2002 |
| 1141 | |
| 1142 | If you don't see this, your Exim installation isn't fully operational. |
| 1143 | If you are running FreeBSD, see Q9201. For other systems, see Q0114. |
| 1144 | |
| 1145 | |
| 1146 | Q0065: When (as \/root/\) I use -C to run Exim with an alternate configuration |
| 1147 | file, it gives an error about being unable to create a spool file when |
| 1148 | trying to run an \%autoreply%\ transport. Why is this? |
| 1149 | |
| 1150 | A0065: When Exim is called with -C, it passes on -C to any instances of itself |
| 1151 | that it calls (so that the whole sequence uses the same config file). |
| 1152 | However, Exim gives up its root privilege if any user except \/root\/ |
| 1153 | passes a -C option to use a non-default configuration file, and that |
| 1154 | includes the case where Exim re-execs itself to regain root privilege. |
| 1155 | Thus it can't write to the spool. |
| 1156 | |
| 1157 | The fix for this is to use the \\TRUSTED_CONFIG_LIST\\ build-time |
| 1158 | option. This defines a file containing a list of 'trusted' prefixes for |
| 1159 | configuration files. Any configuration file specified with -C, if it |
| 1160 | matches a prefix listed in that file, will be used without dropping root |
| 1161 | privileges (as long as it is not writeable by a non-root user). |
| 1162 | |
| 1163 | |
| 1164 | Q0066: What does the message \*unable to set gid=xxx or uid=xxx*\ mean? |
| 1165 | |
| 1166 | A0066: This message is given when an Exim process is unable to change uid or |
| 1167 | gid when it needs to, because it does not have root privilege. This is a |
| 1168 | serious problem that prevents Exim from carrying on with what it is |
| 1169 | doing. The two most common situations where Exim needs to change uid/gid |
| 1170 | are doing local deliveries and processing users' filter files. There are |
| 1171 | two common causes of this error: |
| 1172 | |
| 1173 | (1) You have forgotten to make the exim binary setuid to \/root/\. This |
| 1174 | means that it can never change uid/gid in any situation. Also, the |
| 1175 | setuid binary must reside on a disk partition that does not have the |
| 1176 | \"nosuid"\ mount option set. |
| 1177 | |
| 1178 | (2) The exim binary is setuid, but you have configured Exim so that, |
| 1179 | while trying to verify an address at SMTP time, it runs a router |
| 1180 | that needs to change uid/gid. Because Exim runs as \/exim/\ and not |
| 1181 | \/root/\ while receiving messages, the router is unable to change |
| 1182 | uid and therefore it cannot operate. The usual example of this is a |
| 1183 | \%redirect%\ router for users' filter files. |
| 1184 | |
| 1185 | Setting the \user\ or \check_local_user\ options on a \redirect\ |
| 1186 | router causes this to happen (except in the special case when the |
| 1187 | redirection list is provided by the \data\ option and does not |
| 1188 | contain \":include:"\). |
| 1189 | |
| 1190 | The solution is to set \no_verify\ on the router that is causing the |
| 1191 | problem. This means that it is skipped when an address is being |
| 1192 | verified. In ``normal'' configurations where the router is indeed |
| 1193 | handling users' filter files, this is quite acceptable, because you |
| 1194 | do not usually need to process a filter file in order to verify that |
| 1195 | the local part is valid. See, for example, the \%userforward%\ |
| 1196 | router in the default configuration. |
| 1197 | |
| 1198 | |
| 1199 | Q0067: What does the error \*too many unrecognized commands*\ mean? |
| 1200 | |
| 1201 | A0067: There have been instances of network abuse involving mail sent out by |
| 1202 | web servers. In most cases, unrecognizable commands are sent as part of |
| 1203 | the SMTP session. A real MTA never sends out such invalid commands. Exim |
| 1204 | allows a few unrecognized commands in a session to permit humans who are |
| 1205 | testing to make a few typos (it responds with a 5xx error). However, if |
| 1206 | Exim receives too many such commands, it assumes that it is dealing with |
| 1207 | an abuse of some kind, and so it drops the connection. |
| 1208 | |
| 1209 | |
| 1210 | Q0068: Exim times out when trying to connect to some hosts, though those hosts |
| 1211 | are known to be up and running. What's the problem? |
| 1212 | |
| 1213 | A0068: There could be a number of reasons for this (see also Q0017). The |
| 1214 | obvious one is that there is a networking problem between the hosts. |
| 1215 | If you can ping between the hosts or connect in other ways, the problem |
| 1216 | might be caused by ECN (Explicit Congestion Notification) being enabled |
| 1217 | in your kernel. ECN uses TCP flags originally assigned to TOS - it's a |
| 1218 | "new" invention, and some hosts and routers are known to be confused if |
| 1219 | a client uses it. If you are running Linux, you can turn ECN off by |
| 1220 | running this command: |
| 1221 | |
| 1222 | ==> /bin/echo "0" > /proc/sys/net/ipv4/tcp_ecn |
| 1223 | |
| 1224 | This has also been reported to cure web connection problems from Mozilla |
| 1225 | and Netscape browsers in Linux when there were no problems with Windows |
| 1226 | Netscape browsers. |
| 1227 | |
| 1228 | |
| 1229 | Q0069: What does the error \*SMTP data timeout (message abandoned) on connection |
| 1230 | from...*\ mean? |
| 1231 | |
| 1232 | A0069: It means that there was a timeout while Exim was reading the contents of |
| 1233 | a message on an incoming SMTP connection. That is, it had successfully |
| 1234 | accepted a MAIL command, one or more RCPT commands, and a DATA command, |
| 1235 | and was in the process of reading the data itself. The length of timeout |
| 1236 | is controlled by the \smtp_receive_timeout\ option. |
| 1237 | |
| 1238 | If you get this error regularly, the cause may be incorrect handling of |
| 1239 | large packets by a router or firewall. The maximum size of a packet is |
| 1240 | restricted on some links; routers should split packets that are larger. |
| 1241 | There is a feature called ``path MTU discovery'' that enables a sender |
| 1242 | to discover the maximum packet size over an entire path (multiple |
| 1243 | Internet links). This can be broken by misconfigured firewalls and |
| 1244 | routers. There is a good explanation at \?http://www.netheaven.com/pmtu.html?\. |
| 1245 | Reducing the MTU on your local network can sometimes work round this |
| 1246 | problem. See Q0017 (3) for further discussion. |
| 1247 | |
| 1248 | |
| 1249 | Q0070: What does the error \*SMTP command timeout on connection from...*\ mean? |
| 1250 | |
| 1251 | A0070: Exim was expecting to read an SMTP command from the client, but no |
| 1252 | command was read within the \smtp_receive_timeout\ time limit. |
| 1253 | |
| 1254 | |
| 1255 | Q0071: What does the error \*failed to open DB file \(/var/spool/exim//db/retry)\: |
| 1256 | Illegal argument*\ mean? |
| 1257 | |
| 1258 | A0071: See Q0058. The cause of this error is usually the same. |
| 1259 | |
| 1260 | |
| 1261 | Q0072: Exim will deliver to normal aliases, and aliases that are pipes or |
| 1262 | files, but it objects to aliases that involve \":include:"\ items, |
| 1263 | complaining that it can't change gid or uid. Why is this? |
| 1264 | |
| 1265 | A0072: See Q0066 for a general answer. The problem happens during verification |
| 1266 | of an incoming SMTP message, not during delivery itself. In this |
| 1267 | particular case, you must have set up your aliasing router with a \user\ |
| 1268 | setting. This causes Exim to change uid/gid when reading \":include:"\ |
| 1269 | files. If you do not need the detailed verification provided by the |
| 1270 | router, the easy solution is to set \no_verify\ so that the router isn't |
| 1271 | used during verification. |
| 1272 | |
| 1273 | Otherwise, if you set \user\ on the router in order to provide a user |
| 1274 | for delivery to pipes or files, one solution is to put the \user\ |
| 1275 | setting on the transports instead of on the router. You may need to |
| 1276 | create some special transports just for this router. The alternative is |
| 1277 | to supply two different routers, one with \user\ and \no_verify\, and |
| 1278 | the with \verify_only\ but no \user\ setting. |
| 1279 | |
| 1280 | |
| 1281 | Q0073: I'm seeing log file corruption, with parts of log lines getting mangled |
| 1282 | by other log entries. |
| 1283 | |
| 1284 | A0073: The only time this has been seen is when several servers were writing to |
| 1285 | the same log files over NFS. Exim assumes that its log file is on local |
| 1286 | disk, and using NFS, especially for more than one server, will not work. |
| 1287 | |
| 1288 | |
| 1289 | Q0074: What does the error message \*remote delivery process count got out of |
| 1290 | step*\ mean? |
| 1291 | |
| 1292 | A0074: Exim uses subprocesses for remote deliveries; this error means that the |
| 1293 | master process expected to have a child process running, but found there |
| 1294 | were none. Prior to release 4.11, this error could be caused by running |
| 1295 | Exim under \^strace^\ on a Linux system, because stracing causes |
| 1296 | children to be ``stolen'' such that a parent that tries to wait for |
| 1297 | ``any of my children'' is told that it has none. Current releases of |
| 1298 | Exim have code to get round this problem. |
| 1299 | |
| 1300 | |
| 1301 | Q0075: I'm using LDAP, and some email addresses that contain special characters |
| 1302 | are causing parsing errors in my LDAP lookups. |
| 1303 | |
| 1304 | A0075: You should be using \"${quote_ldap:$local_part}"\ instead of just |
| 1305 | \"$local_part"\ in your lookups. |
| 1306 | |
| 1307 | |
| 1308 | Q0076: I've configured Exim to use \^syslog^\ for its logs, with the main and |
| 1309 | reject logs sent to different files, but whenever a message is rejected, |
| 1310 | I get one message on the reject log and two messages on the main log. |
| 1311 | |
| 1312 | A0076: You are probably putting your reject items into the main log as well; |
| 1313 | remember \^syslog^\ levels are inclusive (for example, \"mail.info"\ |
| 1314 | includes all higher levels, so a \"mail.notice"\ message will be caught |
| 1315 | by a \"mail.info"\ descriptor). |
| 1316 | Test this by running the command: |
| 1317 | |
| 1318 | ==> logger -p mail.notice test |
| 1319 | |
| 1320 | and seeing which logs it goes into. From Exim release 4.31 it is |
| 1321 | possible to disable the rejectlog by setting \write_rejectlog\ false. |
| 1322 | |
| 1323 | |
| 1324 | Q0077: I've installed Exim and it is delivering mail just fine. However, when I |
| 1325 | try to read mail from my PC I get \*connection rejected*\ or \*unable to |
| 1326 | connect*\. |
| 1327 | |
| 1328 | A0077: See Q5021. |
| 1329 | |
| 1330 | |
| 1331 | Q0078: Exim is logging the unknown SMTP command \"XXXX"\ from my client hosts, |
| 1332 | and they are unable to authenticate. |
| 1333 | |
| 1334 | A0078: This is a sign of a Cisco PIX firewall getting in the way. It does not |
| 1335 | support ESMTP, and turns EHLO commands into XXXX. You should configure |
| 1336 | the Pix to leave SMTP alone; see Q0053 for how to do this. |
| 1337 | |
| 1338 | |
| 1339 | Q0079: Our new PIX firewall is causing problems with incoming mail. How can |
| 1340 | this be fixed? |
| 1341 | |
| 1342 | A0079: See Q0053 and Q0078. If some messages get through and others do not, |
| 1343 | see also Q0017. |
| 1344 | |
| 1345 | |
| 1346 | Q0080: Am I to understand that the database lookups must only return one value? |
| 1347 | They can not return a list of values? The documentation seems to |
| 1348 | indicate that it's possible to return a list. |
| 1349 | |
| 1350 | A0080: Lookups can be used in two different situations, and what they return is |
| 1351 | different in the two cases. (Be thankful Exim 3 is gone; there was yet |
| 1352 | another case!) |
| 1353 | |
| 1354 | (1) You can use a lookup in any expanded string. The syntax is |
| 1355 | |
| 1356 | ==> ${lookup ..... } |
| 1357 | |
| 1358 | In this case, whatever is looked up replaces the expansion item. It |
| 1359 | may be one value or a list of values. Whether a single value or a |
| 1360 | list is acceptable or not depends on where you are using the string |
| 1361 | expansion. If it is for an option that expects just one value, then |
| 1362 | only one value is allowed (for example). |
| 1363 | |
| 1364 | (2) You can make use of the lookup mechanism to test whether something |
| 1365 | (typically a host name or IP address) is in a list. For example, |
| 1366 | |
| 1367 | ==> hosts = a : b : c |
| 1368 | |
| 1369 | in an ACL tests whether the calling host's name matches ``a'', or |
| 1370 | ``b'', or ``c''. Now, suppose you want to keep the list of names in |
| 1371 | a database, or cdb file, or NIS map, or... By writing |
| 1372 | |
| 1373 | ==> hosts = pgsql;select .... |
| 1374 | |
| 1375 | you are saying to Exim: ``Run this lookup; if it succeeds, behave as |
| 1376 | if the host is in the list; if it fails, the host is not in the |
| 1377 | list.'' You are using the indexing mechanism of the database as a |
| 1378 | fast way of checking a list. A simpler example is |
| 1379 | |
| 1380 | ==> hosts = lsearch;/some/file |
| 1381 | |
| 1382 | where the file contains the list of hosts to be searched. |
| 1383 | |
| 1384 | The complication happens when a list is first expanded before being |
| 1385 | interpreted as a list. This happens in a lot of cases. You can therefore |
| 1386 | write either of these: |
| 1387 | |
| 1388 | ==> hosts = cdb;/some/file |
| 1389 | hosts = ${lookup{something}cdb{/some/file}} |
| 1390 | |
| 1391 | but they have different meanings. The first means ``see if the host name |
| 1392 | is in the list in this file''. The second means ``run this lookup and |
| 1393 | use the result of the lookup as a list of host items to check''. In the |
| 1394 | second case, the list could contain multiple values (colon separated), |
| 1395 | and one of those values could even be ``cdb;/some/file''. |
| 1396 | |
| 1397 | Flexibility does lead to complexity, I'm afraid. |
| 1398 | |
| 1399 | |
| 1400 | Q0081: What does \*error in redirect data: included file xxxx is too big*\ |
| 1401 | mean? |
| 1402 | |
| 1403 | A0081: You are trying to include a very large file in a redirection list, using |
| 1404 | the \":include:"\ feature. Exim has a built-in limit on the size, as a |
| 1405 | safety precaution. The default is 1 megabyte. If you want to increase |
| 1406 | this, you have to rebuild Exim. In your \(Local/Makefile)\, put |
| 1407 | |
| 1408 | ==> MAX_INCLUDE_SIZE = whatever |
| 1409 | |
| 1410 | and then rebuild Exim. The value is a number of bytes, but you can give |
| 1411 | it as a parenthesized arithmetic expression such as \"(3*1024*1024)"\. |
| 1412 | However, an included file of more than a megabyte is likely to be quite |
| 1413 | inefficient. How many addresses does yours contain? You get the best |
| 1414 | performance out of Exim if you arrange to send mailing list messages |
| 1415 | with no more than about 100 recipients (in order to get parallelism in |
| 1416 | the routing). |
| 1417 | |
| 1418 | |
| 1419 | Q0082: What does \*relocation error: /lib/libnss_dns.so.2: symbol |
| 1420 | __libc_res_nquery, version GLIBC_PRIVATE not defined in file |
| 1421 | libresolv.so.2 with link time reference*\ mean? |
| 1422 | |
| 1423 | A0082: You have updated \^glibc^\ while an Exim daemon is running. Stop and |
| 1424 | restart the daemon. |
| 1425 | |
| 1426 | |
| 1427 | Q0083: Netscape on Unix is sending messages containing an unqualified user name |
| 1428 | in the ::Sender:: header line, which Exim is rejecting because I have |
| 1429 | set \"verify = header_syntax"\. How can I fix this? |
| 1430 | |
| 1431 | A0083: The only thing you can do in Exim is to set the |
| 1432 | \sender_unqualified_hosts\ option to allow unqualified sender addresses |
| 1433 | form the relevant hosts; of course, this applies to all sender |
| 1434 | addresses, not just the ::Sender:: header line. |
| 1435 | |
| 1436 | Alternatively, you can configure Netscape not to include the header line |
| 1437 | in the first place. Add the following line to the |
| 1438 | \($HOME/.netscape/preferences.js)\ and \($HOME/.netscape/liprefs.js)\ |
| 1439 | files: |
| 1440 | |
| 1441 | ==> user_pref("mail.suppress_sender_header", true); |
| 1442 | |
| 1443 | Netscape must be shut down while doing this. |
| 1444 | |
| 1445 | |
| 1446 | Q0084: I want to set up an alias that pipes a message to \^gpg^\ and then pipes |
| 1447 | the result to \^mailx^\ to resubmit the message, but when I use my |
| 1448 | tested command in an alias file, I get an error from \^gpg^\. |
| 1449 | |
| 1450 | A0084: Probably you are using a shell command with two pipe symbols in it. An |
| 1451 | alias like this: |
| 1452 | |
| 1453 | ==> gpg-xxx: "|gpg <options> | mailx <options" |
| 1454 | |
| 1455 | does not work, because Exim does not run pipes under a shell by default. |
| 1456 | You must call a shell explicitly if you want to make use of the shell's |
| 1457 | features for double-piping, either by piping to \"/bin/sh"\ with a |
| 1458 | suitable \"-c"\ option, or by piping to a shell script. |
| 1459 | |
| 1460 | |
| 1461 | Q0085: I see a lot of \*rejected EHLO ... syntactically invalid argument(s)*\. |
| 1462 | I know it's because of the underscore in the host name, but is there a |
| 1463 | switch to allow Exim to accept mail from such hosts? |
| 1464 | |
| 1465 | A0085: Yes. Add this to your configuration: |
| 1466 | |
| 1467 | ==> helo_allow_chars = _ |
| 1468 | |
| 1469 | For more seriously malformed host names, see \helo_accept_junk_hosts\. |
| 1470 | See also Q0732. |
| 1471 | |
| 1472 | |
| 1473 | Q0086: What does \*SMTP protocol violation: synchronization error (next input |
| 1474 | sent too soon)*\ mean? |
| 1475 | |
| 1476 | A0086: SMTP is a ``lock-step'' protocol, which means that, at certain points in |
| 1477 | the protocol, the client must wait for the server to respond before |
| 1478 | sending more data. Exim checks for correct behaviour, and issues this |
| 1479 | error if the client sends data too soon. This protects against |
| 1480 | malefactious clients who send a bunch of SMTP commands (usually to |
| 1481 | transmit spam) without waiting for any replies. |
| 1482 | |
| 1483 | This error is also provoked if a client unexpectedly tries to start up a |
| 1484 | TLS session immediately on connection, without using the STARTTLS |
| 1485 | command. See Q1707 for a discussion of this case. |
| 1486 | |
| 1487 | |
| 1488 | Q0087: What does \*rejected after DATA: malformed address: xx@yy may not follow |
| 1489 | <xx@yy> : failing address in "from" header*\ mean? |
| 1490 | |
| 1491 | A0087: Your DATA ACL contains |
| 1492 | |
| 1493 | ==> verify = header_syntax |
| 1494 | |
| 1495 | and an incoming message contained the line |
| 1496 | |
| 1497 | ==> From: xx@yy <xx@yy> |
| 1498 | |
| 1499 | This is syntactically invalid. The contents of an address in a header |
| 1500 | line are either just the address, or a ``phrase'' followed by an address |
| 1501 | in angle brackets. In the latter case, the ``phrase'' must be quoted if |
| 1502 | it contains special characters such as @. The following are valid |
| 1503 | versions of the bad header: |
| 1504 | |
| 1505 | ==> From: xx@yy |
| 1506 | From: "xx@yy" <xx@yy> |
| 1507 | |
| 1508 | though why on earth anything generates this kind of redundant nonsense I |
| 1509 | can't think. |
| 1510 | |
| 1511 | |
| 1512 | Q0088: The Windows mailer SENDFILE.EXE sometimes hangs while trying to send a |
| 1513 | message to Exim 4, and eventually times out. It worked flawlessly with |
| 1514 | Exim 3. What has changed? |
| 1515 | |
| 1516 | A0088: Exim 4 sets an obscure TCP/IP parameter called TCP_NODELAY. This |
| 1517 | disables the "Nagle algorithm" for the TCP/IP transmission. The Nagle |
| 1518 | algorithm can improve network performance in interactive situations such |
| 1519 | as a human typing at a keyboard, by buffering up outgoing data until the |
| 1520 | previous packet has been acknowledged, and thereby reducing the number |
| 1521 | of packets used. This is not relevant for mail transmission, which |
| 1522 | mostly consists of quite large blocks of data; setting TCP_NODELAY |
| 1523 | should improve performance. However, it seems that some Windows clients |
| 1524 | do not function correctly if the server turns off the Nagle algorithm. |
| 1525 | If you are using Exim 4.23 or later, you can set |
| 1526 | |
| 1527 | ==> tcp_nodelay = false |
| 1528 | |
| 1529 | This stops Exim setting TCP_NODELAY on the sockets created by the |
| 1530 | listening daemon. |
| 1531 | |
| 1532 | |
| 1533 | Q0089: What does the error \*kernel: application bug: exim(12099) has SIGCHLD |
| 1534 | set to SIG_IGN but calls wait()*\ mean? |
| 1535 | |
| 1536 | A0089: This was a bad interaction between a change to the Linux kernel and some |
| 1537 | ``belt and braces'' programming in Exim. The following explanation is |
| 1538 | taken from Exim's change log: |
| 1539 | |
| 1540 | When Exim is receiving multiple messages on a single connection, and |
| 1541 | spinning off delivery processess, it sets the SIGCHLD signal handling to |
| 1542 | SIG_IGN, because it doesn't want to wait for these processes. However, |
| 1543 | because on some OS this didn't work, it also has a paranoid call to |
| 1544 | \^waitpid()^\ in the loop to reap any children that have finished. Some |
| 1545 | versions of Linux now complain (to the system log) about this |
| 1546 | ``illogical'' call to \^waitpid()^\. I have therefore put it inside a |
| 1547 | conditional compilation, and arranged for it to be omitted for Linux. |
| 1548 | |
| 1549 | I am pretty sure I caught all the places in Exim where this happened. |
| 1550 | However, there are still occasional reports of this error. I have not |
| 1551 | heard of any resolutions, but my current belief is that they are caused |
| 1552 | by something that Exim calls falling foul of the same check. There was |
| 1553 | at one time a suspicion that the IPv6 stack was involved. |
| 1554 | |
| 1555 | |
| 1556 | Q0090: I can't seem to get a pipe command to run when I include a \"${lookup"\ |
| 1557 | expansion in it. |
| 1558 | |
| 1559 | A0090: See Q0025. |
| 1560 | |
| 1561 | |
| 1562 | Q0091: Why is Exim giving the error \*Failed to send message from address_reply |
| 1563 | transport*\ when I run it using -C to specify an alternate |
| 1564 | configuration? |
| 1565 | |
| 1566 | A0091: See Q0065. |
| 1567 | |
| 1568 | |
| 1569 | Q0092: The error message \*Program received signal SIGINT, Interrupt.*\ occurs |
| 1570 | when I try to use Exim with PostgreSQL. |
| 1571 | |
| 1572 | A0092: Check that you have not set |
| 1573 | |
| 1574 | ==> log_statement=true |
| 1575 | |
| 1576 | in the PostgreSQL configuration file. It seems that this causes |
| 1577 | PostgreSQL to return logging information as the first row in a query |
| 1578 | result, which totally confuses Exim. |
| 1579 | |
| 1580 | |
| 1581 | |
| 1582 | 1. BUILDING AND INSTALLING |
| 1583 | |
| 1584 | Q0101: I'm having a problem with an Exim RPM. |
| 1585 | |
| 1586 | A0101: Normally the thing to do if you have a problem with an RPM package is |
| 1587 | to contact the person who built the package first, not the person who |
| 1588 | made the software that's in the package. You can usually find out who |
| 1589 | made a package using the following command: |
| 1590 | |
| 1591 | ==> rpm --query --package --queryformat '%{PACKAGER}\n' <rpm-package-file> |
| 1592 | |
| 1593 | where \[rpm-package-file]\ is the actual file, e.g. \(exim-3.03-2.i386.rpm)\. |
| 1594 | Or, if the package is installed on your system: |
| 1595 | |
| 1596 | ==> rpm --query --queryformat '%{PACKAGER}\n' <package-name> |
| 1597 | |
| 1598 | where \[package-name]\ is the name component of the package, e.g. \"exim"\. |
| 1599 | If the packager is unable or unwilling to help, only then should you |
| 1600 | contact the actual author or associated mailing list of the software. |
| 1601 | |
| 1602 | If you discover through the querying process that you can't tell who |
| 1603 | the person (or company or group) is who built the package, or that they |
| 1604 | no longer exist at the given address, then you should reconsider |
| 1605 | whether you want a package from an unknown source on your system. |
| 1606 | |
| 1607 | If you discover through the querying process that you yourself are the |
| 1608 | person who built the package, then you should either (a) contact the |
| 1609 | author or associated mailing list, or (b) reconsider whether you ought |
| 1610 | to be building and distributing RPM packages of software you don't |
| 1611 | understand. |
| 1612 | |
| 1613 | Similar rules of thumb govern other binary package formats, including |
| 1614 | debs, tarballs, and POSIX packages. |
| 1615 | |
| 1616 | |
| 1617 | Q0102: I can't get Exim to compile with Berkeley DB version 2.x or 3.x. |
| 1618 | |
| 1619 | A0102: Have you set \"USE_DB=yes\" in \(Local/Makefile)\? This causes Exim to use the |
| 1620 | native interface to the DBM library instead of the compatibility |
| 1621 | interface, which needs a header called \(ndbm.h)\ that may not exist on your |
| 1622 | system. |
| 1623 | |
| 1624 | |
| 1625 | Q0103: I'm getting an \*undefined symbol*\ error for \"hosts_ctl"\ when I try to |
| 1626 | build Exim. (On some systems this error is \*undefined reference to |
| 1627 | 'hosts_ctl'*\.) |
| 1628 | |
| 1629 | A0103: You should either remove the definition of \\USE_TCP_WRAPPERS\\ or add |
| 1630 | \"-lwrap"\ to your \\EXTRALIBS\\ setting in Local/Makefile. |
| 1631 | |
| 1632 | |
| 1633 | Q0104: I'm about to upgrade to a new Exim release. Do I need to ensure the |
| 1634 | spool is empty, or take any other special action? |
| 1635 | |
| 1636 | A0104: It depends on where you are coming from. |
| 1637 | |
| 1638 | (1) If you are changing to release 4.00 or later from a release prior to |
| 1639 | 4.00, you will need to make changes to the run time configuration file. |
| 1640 | See the file \(doc/Exim4.upgrade)\ for details. If you are coming from |
| 1641 | before release 3.00, you should also see \(doc/Exim3.upgrade)\. |
| 1642 | |
| 1643 | (2) If you are upgrading from an Exim 4 release to a later release, you |
| 1644 | do not need to take special action. New releases are made backwards |
| 1645 | compatible with old spool files and hints databases, so that upgrading |
| 1646 | can be done on a running system. All that should be necessary is to |
| 1647 | install a new binary and then HUP the daemon. |
| 1648 | |
| 1649 | \**Warning**\: If you have changed the release of your DBM library, so |
| 1650 | that your new Exim is linked with a different release than the old one, |
| 1651 | you may encounter errors when Exim attempts to access the old hints |
| 1652 | databases. See Q0055. |
| 1653 | |
| 1654 | |
| 1655 | Q0105: What does the error \*install-info: command not found*\ mean? |
| 1656 | |
| 1657 | A0105: You have set \\INFO_DIRECTORY\\ in your \(Local/Makefile)\, and Exim is trying |
| 1658 | to install the Texinfo documentation, but cannot find the command called |
| 1659 | \(install-info)\. If you have a version of Texinfo prior to 3.9, you |
| 1660 | should upgrade. Otherwise, check your installation of Texinfo to see why |
| 1661 | the \(install-info)\ command is not available. |
| 1662 | |
| 1663 | |
| 1664 | Q0106: Exim doesn't seem to be recognizing my operating system type correctly, |
| 1665 | and so is failing to build. |
| 1666 | |
| 1667 | A0106: Run the command \"scripts/os-type -generic"\. The output should be one of |
| 1668 | the known OS types, and should correspond to your operating system. You |
| 1669 | can see which OS are supported by obeying \"ls OS/Makefile-*"\ and looking |
| 1670 | at the file name suffixes. |
| 1671 | |
| 1672 | If there is a discrepancy, it means that the script is failing to |
| 1673 | interpret the output from the \"uname"\ command correctly, or that the |
| 1674 | output is wrong. Meanwhile, you can build Exim by obeying |
| 1675 | |
| 1676 | ==> EXIM_OSTYPE=xxxx make |
| 1677 | |
| 1678 | instead of just \"make"\, provided you are running a Bourne-compatible |
| 1679 | shell, or otherwise by setting \\EXIM_OSTYPE\\ correctly in your |
| 1680 | environment. It is probably best to start again from a clean |
| 1681 | distribution, to avoid any wreckage left over from the failed attempt. |
| 1682 | |
| 1683 | |
| 1684 | Q0107: Exim fails to build, complaining about the absence of the \"killpg"\ |
| 1685 | function. |
| 1686 | |
| 1687 | A0107: This function should be present in all modern flavours of Unix. If you |
| 1688 | are using an older version, you should be able to get round the problem |
| 1689 | by inserting |
| 1690 | |
| 1691 | ==> #define killpg(pgid,sig) kill(-(pgid),sig) |
| 1692 | |
| 1693 | into the file called \(OS/os.h-xxx)\, where xxx identifies your operating |
| 1694 | system, and is the output of the command \"scripts/os-type -generic"\. |
| 1695 | |
| 1696 | |
| 1697 | Q0108: I'm getting an unresolved symbol \"ldap_is_ldap_url"\ when trying to build |
| 1698 | Exim. |
| 1699 | |
| 1700 | A0108: You must have specified \"LOOKUP_LDAP=yes"\ in the configuration. Have you |
| 1701 | remembered to set \"-lldap"\ somewhere (e.g. in \\LOOKUP_LIBS\\)? You need that |
| 1702 | in order to get the LDAP library scanned when linking. |
| 1703 | |
| 1704 | |
| 1705 | Q0109: I'm getting an unresolved symbol \"mysql_close"\ when trying to build Exim. |
| 1706 | |
| 1707 | A0109: You must have specified \"LOOKUP_MYSQL=yes"\ in the configuration. Have you |
| 1708 | remembered to set \"-lmysqlclient"\ somewhere (e.g. in \\LOOKUP_LIBS\\)? You |
| 1709 | need that in order to get the MySQL library scanned when linking. |
| 1710 | |
| 1711 | |
| 1712 | Q0110: I'm trying to build Exim with PAM support. I have included \"-lpam"\ in |
| 1713 | \\EXTRALIBS\\, but I'm still getting a linking error: |
| 1714 | |
| 1715 | ==> /lib/libpam.so: undefined reference to `dlerror' |
| 1716 | /lib/libpam.so: undefined reference to `dlclose' |
| 1717 | /lib/libpam.so: undefined reference to `dlopen' |
| 1718 | /lib/libpam.so: undefined reference to `dlsym' |
| 1719 | |
| 1720 | A0110: Add \"-ldl"\ to \\EXTRALIBS\\. In some systems these dynamic loading functions |
| 1721 | are in their own library. |
| 1722 | |
| 1723 | |
| 1724 | Q0111: I'm getting the error \*db.h: No such file or directory*\ when I try to |
| 1725 | build Exim. |
| 1726 | |
| 1727 | A0111: This problem has been seen with RedHat 7.0, but could also happen in |
| 1728 | other environments. If your system is using the DB library, you |
| 1729 | need to install the DB development package in order to build Exim. |
| 1730 | The package is called something like \"db3-devel-3.1.14-16.i386.rpm"\ for |
| 1731 | Linux systems, but you should check which version of DB you have |
| 1732 | installed (current releases are DB 4). |
| 1733 | |
| 1734 | |
| 1735 | Q0112: I'm getting the error \*/usr/bin/ld: cannot find -ldb*\ when I try to |
| 1736 | build Exim. |
| 1737 | |
| 1738 | A0112: This is probably the same problem as Q0111. |
| 1739 | |
| 1740 | |
| 1741 | Q0113: I've compiled Exim and I've managed to start it but there was one |
| 1742 | problem - it always complained that \(libmsqlclient.so.10)\ was not found, |
| 1743 | even though this file is in \(/usr/local/lib/mysql/)\. |
| 1744 | |
| 1745 | A0113: Solaris: ensure you have this in your \(Local/Makefile)\: |
| 1746 | |
| 1747 | ==> LOOKUP_LIBS=-L/usr/local/lib/mysql -R/usr/local/lib/mysql |
| 1748 | |
| 1749 | Net/Open/FreeBSD: Run this command (or ensure it gets run automatically |
| 1750 | at boot time): |
| 1751 | |
| 1752 | ==> ldconfig -m /usr/local/lib/mysql |
| 1753 | |
| 1754 | Linux: add \(/usr/local/lib/mysql)\ to \(/etc/ld.so.conf)\ and re-run \(ldconfig)\. |
| 1755 | Alternatively, add |
| 1756 | |
| 1757 | ==> -Wl,-rpath -Wl,/usr/local/lib/mysql |
| 1758 | |
| 1759 | to EXTRA_LIBS and then re-link (this is similar to the Solaris solution |
| 1760 | above). This will probably also work on other systems that use GNU |
| 1761 | Binutils. |
| 1762 | |
| 1763 | |
| 1764 | Q0114: How can I remove Sendmail from my system? I've built Exim and run \"make |
| 1765 | install"\, but it still doesn't seem to be fully operational. |
| 1766 | |
| 1767 | A0114: If you are running FreeBSD, see Q9201. Otherwise, you need to arrange |
| 1768 | that whichever of the paths \(/usr/sbin/sendmail)\ or \(/usr/lib/sendmail)\ |
| 1769 | exists on your system is changed to refer to Exim. For example, you |
| 1770 | could use these commands (as \/root/\): |
| 1771 | |
| 1772 | ==> mv /usr/sbin/sendmail /usr/sbin/sendmail.original |
| 1773 | chmod u-s /usr/sbin/sendmail.original |
| 1774 | ln -s /path/to/exim /usr/sbin/sendmail |
| 1775 | |
| 1776 | The second command removes the setuid privilege from the old MTA, as a |
| 1777 | general safety precaution. In the third command, substitute the actual |
| 1778 | path to the Exim binary for \(/path/to/exim)\. |
| 1779 | |
| 1780 | |
| 1781 | Q0115: What does \*Can't open \(../scripts/newer)\: No such file or directory*\ |
| 1782 | mean? I got it while trying to build Exim. |
| 1783 | |
| 1784 | A0115: You are using FreeBSD, or another OS that has a \^make^\ command which |
| 1785 | tries to optimize the running of commands. Exim's \(Makefile)\ contains |
| 1786 | targets with sequential commands like this: |
| 1787 | |
| 1788 | ==> buildpcre: |
| 1789 | @cd pcre; $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" \ |
| 1790 | CFLAGS="$(CFLAGS) $(PCRE_CFLAGS)" \ |
| 1791 | RANLIB="$(RANLIB)" HDRS="$(PHDRS)" \ |
| 1792 | INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE)" |
| 1793 | @if $(SHELL) $(SCRIPTS)/newer pcre/libpcre.a exim; then \ |
| 1794 | /bin/rm -f exim eximon.bin; fi |
| 1795 | |
| 1796 | The second command assumes that the \"cd pcre"\ in the first command is |
| 1797 | no longer in effect. If you have \"-j3"\ in your default set of |
| 1798 | \"MAKEFLAGS"\, FreeBSD \^make^\ tries to optimize, and ends up up with both |
| 1799 | commands in the same shell process. The result is that \"$(SCRIPTS)"\ |
| 1800 | (which has a value of \"../scripts"\) is not found. |
| 1801 | |
| 1802 | The simplest solution is to force \^make^\ to use backwards compatibility |
| 1803 | mode with each command in its own shell, by using the \-B\ flag. To |
| 1804 | ensure that this happens throughout the build, it's best to export it in |
| 1805 | your environment: |
| 1806 | |
| 1807 | ==> MAKEFLAGS='-B' |
| 1808 | export MAKEFLAGS |
| 1809 | make |
| 1810 | |
| 1811 | |
| 1812 | Q0116: I have tried to build Exim with Berkeley DB 3 and 4, but I always get |
| 1813 | errors. |
| 1814 | |
| 1815 | A0116: One common problem, especially when you have several different versions |
| 1816 | of BDB installed on the same host, is that the header files and library |
| 1817 | files for BDB are not in a standard place. You therefore need to tell |
| 1818 | Exim where they are, by setting INCLUDE and DBMLIB in your |
| 1819 | \(Local/Makefile)\. For example, you could use this when you want to |
| 1820 | build with DB 4.1: |
| 1821 | |
| 1822 | ==> INCLUDE=-I/usr/local/include/db-4.1 |
| 1823 | DBMLIB=/usr/local/lib/db-4.1/libdb.a |
| 1824 | |
| 1825 | Specifying the complete library file like this will cause it to be |
| 1826 | statically linked with Exim. You'll have to check to see where these |
| 1827 | files are on your system. For example, on FreeBSD 5, the header is in |
| 1828 | \(/usr/local/include/db4)\ and the library is in \(/usr/local/lib)\ and |
| 1829 | called \(libdb4)\. In that environment, you could use: |
| 1830 | |
| 1831 | ==> INCLUDE=-I/usr/local/include/db4 |
| 1832 | DBMLIB=-L/usr/local/lib -ldb4 |
| 1833 | |
| 1834 | This time, DBMLIB is specifying the library directory (\(/usr/local/lib)\) |
| 1835 | and the name of the library (\(db4)\) separately. The name of the actual |
| 1836 | library file is \(/usr/local/lib/libdb4.something)\. If the library was |
| 1837 | compiled for dynamic linking, that will be used. |
| 1838 | |
| 1839 | |
| 1840 | Q0117: Is there a quick walk-through of an Exim install from source anywhere? |
| 1841 | |
| 1842 | A0117: Here! This is a contribution from a RedHat user, somewhat edited. On |
| 1843 | other operating systems things may be slightly different, but the |
| 1844 | general approach is the same. |
| 1845 | |
| 1846 | (1) Install the db needed for Exim. This needs to be done first if you |
| 1847 | don't have a DBM library installed. Go to \?http://www.sleepycat.com?\ |
| 1848 | and download \(db-4.1.25.tar.gz)\, or whatever the current release is. |
| 1849 | Then: |
| 1850 | |
| 1851 | ==> gunzip db-4.1.25.tar.gz |
| 1852 | tar -xvf db-4.1.25.tar |
| 1853 | cd db-4.1.25 |
| 1854 | cd build_unix |
| 1855 | ../dist/configure |
| 1856 | make |
| 1857 | make install |
| 1858 | |
| 1859 | (2) Add a user for use by Exim, unless you want to use an existing user |
| 1860 | such as \/mail/\: |
| 1861 | |
| 1862 | ==> adduser exim |
| 1863 | |
| 1864 | (3) Now you can prepare to build Exim. Go to \?http://www.exim.org?\ or |
| 1865 | one of its mirrors, or the master ftp site |
| 1866 | \?ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4?\, and download |
| 1867 | \(exim-4.20.tar.gz)\ or whatever the current release is. Then: |
| 1868 | |
| 1869 | ==> gunzip exim-4.20.tar.gz |
| 1870 | tar -xvf exim-4.20.tar |
| 1871 | cd exim-4.20 |
| 1872 | cp src/EDITME Local/Makefile |
| 1873 | cp exim_monitor/EDITME Local/eximon.conf |
| 1874 | |
| 1875 | (4) Edit \(Local/Makefile)\: |
| 1876 | |
| 1877 | Comment out EXIM_MONITOR= unless you want to install the Exim |
| 1878 | monitor (it requires X-windows). |
| 1879 | |
| 1880 | Set the user you want Exim to use for itself: |
| 1881 | |
| 1882 | ==> EXIM_USER=exim |
| 1883 | |
| 1884 | If your DBM library is Berkeley DB, set up to use its native interface: |
| 1885 | |
| 1886 | ==> USE_DB=yes |
| 1887 | |
| 1888 | Make sure Exim's build can find the DBM library and its headers. If |
| 1889 | you've installed Berkeley DB 4 you'll need to have settings like this |
| 1890 | in \(Local/Makefile)\: |
| 1891 | |
| 1892 | ==> INCLUDE=-I/usr/local/BerkeleyDB.4.1/include |
| 1893 | DBMLIB=/usr/local/BerkeleyDB.4.1/lib/libdb.a |
| 1894 | |
| 1895 | (Check that the first directory contains the db.h file and that the |
| 1896 | second library exists.) |
| 1897 | |
| 1898 | You don't need to change anything else, but you might want to review |
| 1899 | the default settings in the ``must specify'' section. |
| 1900 | |
| 1901 | (4) Build Exim by running the \/make/\ command. |
| 1902 | |
| 1903 | (5) Install Exim by running, as \/root/\: |
| 1904 | |
| 1905 | ==> make install |
| 1906 | |
| 1907 | You must be \/root/\ to do this. You do not have to be root for any of |
| 1908 | the previous building activity. |
| 1909 | |
| 1910 | (6) Run some tests on Exim; see if it will do local and remote |
| 1911 | deliveries. Change the configuration if necessary (for example, |
| 1912 | uncommenting \group\ on the \%local_delivery%\ transport if you don't |
| 1913 | use a ``sticky bit'' directory). |
| 1914 | |
| 1915 | (7) Change Sendmail to Exim (of course you need to have had Sendmail |
| 1916 | installed to do this). |
| 1917 | |
| 1918 | ==> /etc/init.d/sendmail stop |
| 1919 | mv /usr/sbin/sendmail /usr/sbin/sendmail.org |
| 1920 | ln -s /usr/exim/bin/exim /usr/sbin/sendmail |
| 1921 | /etc/init.d/sendmail start |
| 1922 | |
| 1923 | (8) Check the Exim log. Either use the Exim monitor, or: |
| 1924 | |
| 1925 | ==> tail -f /var/spool/exim/log/mainlog |
| 1926 | |
| 1927 | |
| 1928 | Q0118: I've set \"LOOKUP_INCLUDE=-I/client/include"\ in Local/Makefile, but the |
| 1929 | compilation of \^exim_dumpdb^\ is ignoring this option and failing. Why? |
| 1930 | |
| 1931 | A0118: LOOKUP_INCLUDE is the special include file for lookup modules in Exim |
| 1932 | (e.g. mysql, LDAP). Confusingly, it doesn't apply to basic DBM code |
| 1933 | which is used also for other things. Try setting INCLUDE and DBMLIB |
| 1934 | instead. For example: |
| 1935 | |
| 1936 | ==> USE_DB=yes |
| 1937 | INCLUDE=-I/client/include |
| 1938 | DBMLIB=/client/lib/libdb.a |
| 1939 | |
| 1940 | |
| 1941 | Q0119: I know there are some 3rd-party patches for Exim, for exiscan and |
| 1942 | other things. Where are they? |
| 1943 | |
| 1944 | A0119: Exiscan is at \?http://duncanthrax.net/exiscan-acl/?\. |
| 1945 | [[br]] |
| 1946 | Scanexi is at \?http://w1.231.telia.com/~u23107873/scanexi.html?\ |
| 1947 | [[br]] |
| 1948 | A sample \^^local_scan()^^\ function for interfacing to \^uvscan^\ is |
| 1949 | at \?http://www.dcs.qmul.ac.uk/~mb/local_scan/?\. |
| 1950 | [[br]] |
| 1951 | An interface to SpamAssassin at SMTP time is at |
| 1952 | \?http://marc.merlins.org/linux/exim/sa.html?\. |
| 1953 | [[br]] |
| 1954 | A mini-HOWTO (PDF file) about scanning and virus scanning, and some RPMs |
| 1955 | can be found at \?http://www.timj.co.uk/linux/exim.php?\. |
| 1956 | |
| 1957 | |
| 1958 | Q0120: I'm trying to compile with LOOKUP_WHOSON, but I keep getting \*In |
| 1959 | function `whoson_find': undefined reference to `wso_query'*\. |
| 1960 | |
| 1961 | A0120: Try adding \"-lwhoson"\ to your LOOKUP_LIBS setting in \(Local/Makefile)\. |
| 1962 | |
| 1963 | |
| 1964 | |
| 1965 | 2. ROUTING IN GENERAL |
| 1966 | |
| 1967 | Q0201: How can I arrange that messages larger than some limit are handled by |
| 1968 | a special router? |
| 1969 | |
| 1970 | A0201: You can use a \condition\ option on the router line this: |
| 1971 | |
| 1972 | ==> condition = ${if >{$message_size}{100K}{yes}{no}} |
| 1973 | |
| 1974 | |
| 1975 | Q0202: Can I specify a list of domains to explicitly reject? |
| 1976 | |
| 1977 | A0202: Set up a named domain list containing the domains in the first section |
| 1978 | of the configuration, for example: |
| 1979 | |
| 1980 | ==> domainlist reject_domains = list:of:domains:to:reject |
| 1981 | |
| 1982 | You can use this list in an ACL to reject any SMTP recipients in those |
| 1983 | domains. You can also give a customized error message, like this: |
| 1984 | |
| 1985 | ==> deny message = The domain $domain is no longer supported |
| 1986 | domains = +reject_domains |
| 1987 | |
| 1988 | If you also want to reject these domains in messages that are submitted |
| 1989 | from the command line (not using SMTP), you need to set up a router to |
| 1990 | do it, like this: |
| 1991 | |
| 1992 | ==> reject_domains: |
| 1993 | driver = redirect |
| 1994 | domains = +reject_domains |
| 1995 | allow_fail |
| 1996 | data = :fail: The domain $domain is no longer supported |
| 1997 | |
| 1998 | |
| 1999 | Q0203: How can I arrange to do my own qualification of non-fully-qualified |
| 2000 | domains, and then pass them on to the next router? |
| 2001 | |
| 2002 | A0203: If you have some list of domains that you want to qualify, you can do |
| 2003 | this using a redirect router. For example, |
| 2004 | |
| 2005 | ==> qualify: |
| 2006 | driver = redirect |
| 2007 | domains = *.a.b |
| 2008 | data = ${quote:$local_part}@$domain.c.com |
| 2009 | |
| 2010 | This adds \".c.com"\ to any domain that matches \"*.a.b"\. |
| 2011 | If you want to do this in conjunction with a \%dnslookup%\ router, the |
| 2012 | \widen_domains\ option of that router may be another way of achieving |
| 2013 | what you want. |
| 2014 | |
| 2015 | |
| 2016 | Q0204: Every system has a \"nobody"\ account under which httpd etc run. I would |
| 2017 | like to know how to restrict mail which comes from that account to users |
| 2018 | on that host only. |
| 2019 | |
| 2020 | A0204: Set up a first router like this: |
| 2021 | |
| 2022 | ==> fail_nobody: |
| 2023 | driver = redirect |
| 2024 | senders = nobody@your.domain |
| 2025 | domains = ! +local_domains |
| 2026 | allow_fail |
| 2027 | data = :fail: Nobody may not mail off-site |
| 2028 | |
| 2029 | This assumes you have defined \+local_domains\ as in the default |
| 2030 | configuration. |
| 2031 | |
| 2032 | |
| 2033 | Q0205: How can I get Exim to deliver to me locally and everyone else at the same |
| 2034 | domain via SMTP to the MX record specified host? |
| 2035 | |
| 2036 | A0205: Create an \%accept%\ router to pick off the one address and pass it to |
| 2037 | an appropriate transport. Put this router before the one that does MX |
| 2038 | routing: |
| 2039 | |
| 2040 | ==> me: |
| 2041 | driver = accept |
| 2042 | domains = dom.com |
| 2043 | local_parts = me |
| 2044 | transport = local_delivery |
| 2045 | |
| 2046 | In the transport you will have to specify the \user\ option. An |
| 2047 | alternative way of doing this is to add a condition to the router that |
| 2048 | does MX lookups to make it skip your address. Subsequent routers can then |
| 2049 | deliver your address locally. You'll need a condition like this: |
| 2050 | |
| 2051 | ==> condition = \ |
| 2052 | ${if and {{eq{$domain}{dom.com}}{eq{$local_part}{me}}}{no}{yes}} |
| 2053 | |
| 2054 | |
| 2055 | Q0206: How can I get Exim to deliver certain domains to a different SMTP port |
| 2056 | on my local host? |
| 2057 | |
| 2058 | A0206: You must set up a special \%smtp%\ transport, where you can specify the |
| 2059 | \port\ option, and then set up a router to route the domains to that |
| 2060 | transport. There are two possibilities for specifying the host: |
| 2061 | |
| 2062 | (1) If you use a \%manualroute%\ router, you can specify the local host |
| 2063 | in the router options. You must also set |
| 2064 | |
| 2065 | ==> self = send |
| 2066 | |
| 2067 | so that it does not object to sending to the local host. |
| 2068 | |
| 2069 | (2) If you use a router that cannot specify hosts (for example, an |
| 2070 | \%accept%\ router with appropriate conditions), you have to specify |
| 2071 | the host using the \hosts\ option of the transport. In this case, |
| 2072 | you must also set \allow_localhost\ on the transport. |
| 2073 | |
| 2074 | |
| 2075 | Q0207: Why does Exim lower-case the local-part of a non-local domain when |
| 2076 | routing? |
| 2077 | |
| 2078 | A0207: Because \caseful_local_part\ is not set (in the default configuration) |
| 2079 | for the \%dnslookup%\ router. This does not matter because the local |
| 2080 | part takes no part in the routing, and the actual local part that is |
| 2081 | sent out in the RCPT command is always the original local part. |
| 2082 | |
| 2083 | |
| 2084 | Q0208: I can't get a lookup to work in a domain list. I'm trying this: |
| 2085 | |
| 2086 | ==> domainlist local_domains = @:localhost:${lookup pgsql{SELECT ... |
| 2087 | |
| 2088 | A0208: Does the lookup return a colon separated list of domains? If not, you |
| 2089 | are using the wrong kind of lookup. The most common way of using a |
| 2090 | lookup in a domain list is something like this: |
| 2091 | |
| 2092 | ==> domainlist local_domains = @:localhost:pgsql;SELECT ... |
| 2093 | |
| 2094 | Using that syntax, if the query succeeds, the domain is considered to be |
| 2095 | in the list. The value that is returned is not relevant. |
| 2096 | |
| 2097 | |
| 2098 | |
| 2099 | 3. ROUTING TO REMOTE HOSTS |
| 2100 | |
| 2101 | Q0301: What do \*lowest numbered MX record points to local host*\ and \*remote |
| 2102 | host address is the local host*\ mean? |
| 2103 | |
| 2104 | A0301: They mean exactly what they say. Exim expected to route an address to a |
| 2105 | remote host, but the IP address it obtained from a router was for the |
| 2106 | local host. If you really do want to send over TCP/IP to the local host |
| 2107 | (to a different version of Exim or another MTA, for example), see Q0206. |
| 2108 | |
| 2109 | More commonly, these errors arise when Exim thinks it is routing some |
| 2110 | foreign domain. For example, the router configuration causes Exim to |
| 2111 | look up the domain in the DNS, but when Exim examines the DNS output, |
| 2112 | either the lowest numbered MX record points at the local host, or there |
| 2113 | are no MX records, and the address record for the domain contains an |
| 2114 | IP address that belongs to the local host. |
| 2115 | |
| 2116 | There has been a rash of instances of domains being deliberately set up |
| 2117 | with MX records pointing to \"localhost"\ (or other names with A records |
| 2118 | that specify 127.0.0.1), which causes this behaviour. You can use the |
| 2119 | \ignore_target_hosts\ option to get Exim to ignore these records. The |
| 2120 | default contiguration does this. For more discussion, see Q0319. For |
| 2121 | other cases: |
| 2122 | |
| 2123 | (1) If the domain is meant to be handled as a local domain, there |
| 2124 | is a problem with the configuration, because it should not then have |
| 2125 | been looked up in the DNS. Check the \domains\ settings on your |
| 2126 | routers. |
| 2127 | |
| 2128 | (2) If the domain is one for which the local host is providing a |
| 2129 | relaying service (called ``mail hubbing''), possibly as part of a |
| 2130 | firewall, you need to set up a router to tell Exim where to send |
| 2131 | messages addressed to this domain, because the DNS directs them to |
| 2132 | the local host. You should put a router like this one before the one |
| 2133 | that does DNS lookups: |
| 2134 | |
| 2135 | ==> hubbed_hosts: |
| 2136 | driver = manualroute |
| 2137 | transport = remote_smtp |
| 2138 | route_list = see discussion below |
| 2139 | |
| 2140 | The contents of the \route_list\ option depend on how many hosts you |
| 2141 | are hubbing for, and how their names are related to the domain name. |
| 2142 | Suppose the local host is a firewall, and all the domains in |
| 2143 | \(*.foo.bar)\ have MX records pointing to it, and each domain |
| 2144 | corresponds to a host of the same name. Then the setting could be |
| 2145 | |
| 2146 | ==> route_list = *.foo.bar $domain |
| 2147 | |
| 2148 | If there isn't a convenient relationship between the domain names |
| 2149 | and the host names, you either have to list each domain separately, |
| 2150 | or use a lookup expansion to look up the host from the domain, or |
| 2151 | put the routing information in a file and use the \route_data\ |
| 2152 | option with a lookup expansion. |
| 2153 | |
| 2154 | (3) If neither (1) nor (2) is the case, the lowest numbered MX record or |
| 2155 | the address record for the domain should not be pointing to your |
| 2156 | host. You should arrange to get the DNS mended. |
| 2157 | |
| 2158 | |
| 2159 | Q0302: Why does Exim say \*all relevant MX records point to non-existent hosts*\ |
| 2160 | when MX records point to IP addresses? |
| 2161 | |
| 2162 | A0302: MX records cannot point to IP addresses. They are defined to point to |
| 2163 | host names, so Exim always interprets them that way. (An IP address is a |
| 2164 | syntactically valid host name.) The DNS for the domain you are having |
| 2165 | problems with is misconfigured. |
| 2166 | |
| 2167 | However, it appears that more and more DNS zones are breaking the rules |
| 2168 | and putting IP addresses on the RHS of MX records. Exim follows the |
| 2169 | rules and rejects this, but other MTAs do support it, so the |
| 2170 | \allow_mx_to_ip\ was regretfully added at release 3.14 to permit this |
| 2171 | heinous activity. |
| 2172 | |
| 2173 | |
| 2174 | Q0303: How do I configure Exim to send all messages to a central server? I |
| 2175 | don't want to do any local deliveries at all on this host. |
| 2176 | |
| 2177 | A0303: Use this as your first and only router: |
| 2178 | |
| 2179 | ==> send_to_gateway: |
| 2180 | driver = manualroute |
| 2181 | transport = remote_smtp |
| 2182 | route_list = * central.server.host |
| 2183 | |
| 2184 | |
| 2185 | Q0304: How do I configure Exim to send all non-local mail to a gateway host? |
| 2186 | |
| 2187 | A0304: Replace the \%dnslookup%\ router in the default configuration with the |
| 2188 | following: |
| 2189 | |
| 2190 | ==> send_to_gateway: |
| 2191 | driver = manualroute |
| 2192 | domains = !+local_domains |
| 2193 | transport = remote_smtp |
| 2194 | route_list = * gate.way.host |
| 2195 | |
| 2196 | If there are several hosts you can send to, you can specify them as a |
| 2197 | colon-separated list. |
| 2198 | |
| 2199 | |
| 2200 | Q0305: How can I arrange for mail on my local network to be delivered directly |
| 2201 | to the relevant hosts, but all other mail to be sent to my ISP's mail |
| 2202 | server? The local hosts are all DNS-registered and behave like normal |
| 2203 | Internet hosts. |
| 2204 | |
| 2205 | A0305: Set up a first router to pick off all the domains for your local |
| 2206 | network. There are several ways you might do this. For example |
| 2207 | |
| 2208 | ==> local_network: |
| 2209 | driver = dnslookup |
| 2210 | transport = remote_smtp |
| 2211 | domains = *.mydomain.com |
| 2212 | |
| 2213 | This does a perfectly conventional DNS routing operation, but only for |
| 2214 | the domains that match \(*.mydomain.com)\. Follow this with a `smart |
| 2215 | host' router: |
| 2216 | |
| 2217 | ==> internet: |
| 2218 | driver = manualroute |
| 2219 | domains = !+local_domains |
| 2220 | transport = remote_smtp |
| 2221 | route_list = * mail.isp.net |
| 2222 | |
| 2223 | This routes any other non-local domains to the smart host. |
| 2224 | |
| 2225 | |
| 2226 | Q0306: How do I configure Exim to send all non-local mail to a central server |
| 2227 | if it cannot be immediately delivered by my host? I don't want to have |
| 2228 | queued mail waiting on my host. |
| 2229 | |
| 2230 | A0306: Add to the \%remote_smtp%\ transport the following: |
| 2231 | |
| 2232 | ==> fallback_hosts = central.server.name(s) |
| 2233 | |
| 2234 | If there are several names, they must be separated by colons. |
| 2235 | |
| 2236 | |
| 2237 | Q0307: The \route_list\ setting \"^foo$:^bar$ $domain"\ in a \%manualroute%\ |
| 2238 | router does not work. |
| 2239 | |
| 2240 | A0307: The first thing in a \route_list\ item is a single pattern, not a list of |
| 2241 | patterns. You need to write that as \"^(foo|bar)$ $domain"\. |
| 2242 | Alternatively, you could use several items and write |
| 2243 | |
| 2244 | ==> route_list = foo $domain; bar $domain |
| 2245 | |
| 2246 | Note the semicolon separator. This is because the second thing in each |
| 2247 | item can itself be a colon-separated list of hosts. |
| 2248 | |
| 2249 | |
| 2250 | Q0308: I have a domain for which some local parts must be delivered locally, |
| 2251 | but the remainder are to be treated like any other remote addresses. |
| 2252 | |
| 2253 | A0308: One possible way of doing this is as follows: Assuming you are using a |
| 2254 | configuration that is similar to the default one, first exclude your |
| 2255 | domain from the first router by changing it to look like this: |
| 2256 | |
| 2257 | ==> non_special_remote: |
| 2258 | driver = dnslookup |
| 2259 | domains = ! +local_domains : ! special.domain |
| 2260 | transport = remote_smtp |
| 2261 | ignore_target_hosts = 127.0.0.0/8 |
| 2262 | no_more |
| 2263 | |
| 2264 | Then add a second router to handle the local parts that are not to |
| 2265 | be delivered locally: |
| 2266 | |
| 2267 | ==> special_remote: |
| 2268 | driver = dnslookup |
| 2269 | domains = special.domain |
| 2270 | local_parts = ! lsearch;/list/of/special/localparts |
| 2271 | transport = remote_smtp |
| 2272 | ignore_target_hosts = 127.0.0.0/8 |
| 2273 | no_more |
| 2274 | |
| 2275 | The remaining local parts will fall through to the remaining routers, |
| 2276 | which can delivery them locally. |
| 2277 | |
| 2278 | |
| 2279 | Q0309: How can I configure Exim on a firewall machine so that if mail arrives |
| 2280 | addressed to a domain whose MX points to the firewall, it is forwarded |
| 2281 | to the internal mail server, without having to have a list of all the |
| 2282 | domains involved? |
| 2283 | |
| 2284 | A0309: As your first router, have the standard \%dnslookup%\ router from the |
| 2285 | default configuration, with the added option |
| 2286 | |
| 2287 | ==> self = pass |
| 2288 | |
| 2289 | This will handle all domains whose lowest numbered MX records do not |
| 2290 | point to your host. Because of the \no_more\ setting, if it encounters |
| 2291 | an unknown domain, routing will fail. However, if it hits a domain whose |
| 2292 | lowest numbered MX points to your host, the \self\ option comes into |
| 2293 | play, and overrides \no_more\. The \"pass"\ setting causes it to pass |
| 2294 | the address on to the next router. (The default causes it to generate an |
| 2295 | error.) |
| 2296 | |
| 2297 | The only non-local domains that reach the second router are those with |
| 2298 | MX records pointing to the local host. Set it up to send them to the |
| 2299 | internal mail server like this: |
| 2300 | |
| 2301 | ==> internal: |
| 2302 | driver = manualroute |
| 2303 | domains = ! +local_domains |
| 2304 | transport = remote_smtp |
| 2305 | route_list = * internal.server |
| 2306 | |
| 2307 | |
| 2308 | Q0310: If a DNS lookup returns no MX records why doesn't Exim just bin the |
| 2309 | message? |
| 2310 | |
| 2311 | A0310: If a DNS lookup returns no MXs, Exim looks for an address record, in |
| 2312 | accordance with the rules that are defined in the RFCs. If you want to |
| 2313 | break the rules, you can set \mx_domains\ in the \%dnslookup%\ router, but |
| 2314 | you will cut yourself off from those sites (and there still seem to be |
| 2315 | plenty) who do not set up MX records. |
| 2316 | |
| 2317 | |
| 2318 | Q0311: When a DNS lookup for MX records fails to complete, why doesn't Exim |
| 2319 | send the messsage to the host defined by the A record? |
| 2320 | |
| 2321 | A0311: The RFCs are quite clear on this. Only if it is known that there are no |
| 2322 | MX records is an MTA allowed to make use of the A record. When an MX |
| 2323 | lookup fails to complete, Exim does not know whether there are any MX |
| 2324 | records or not. There seem to be some name servers (or some |
| 2325 | configurations of some name servers) that give a ``server fail'' error when |
| 2326 | asked for a non-existent MX record. Exim uses standard resolver calls, |
| 2327 | which unfortunately do not distinguish between this case and a timeout, |
| 2328 | so all Exim can do is try again later. |
| 2329 | |
| 2330 | |
| 2331 | Q0312: Is it possible to use a conditional expression for the host item in a |
| 2332 | \route_list\ for \%manualroute%\ router? I tried the following, but it |
| 2333 | doesn't work: |
| 2334 | |
| 2335 | ==> route_list = * ${if match{$header_from:}{\N.*\.usa\.net$\N} \ |
| 2336 | {<smarthost1>}{<smarthost2>} |
| 2337 | |
| 2338 | A0312: The problem is that the second item in \route_list\ contains white |
| 2339 | space, which means that it gets terminated prematurely. To avoid this, |
| 2340 | you must put the second item in quotes: |
| 2341 | |
| 2342 | ==> route_list = * "${if match{$header_from:}{\N.*\.usa\.net$\N} \ |
| 2343 | {<smarthost1>}{<smarthost2>}}" |
| 2344 | |
| 2345 | |
| 2346 | Q0313: I send all external mail to a smart host, but this means that bad |
| 2347 | addresses also get passed to the smart host. Can I avoid this? |
| 2348 | |
| 2349 | A0313: Assuming you have DNS availability, set up a conventional \%dnslookup%\ |
| 2350 | router to do the routing, but in the \%remote_smtp%\ transport set this: |
| 2351 | |
| 2352 | ==> hosts = your.smart.host |
| 2353 | hosts_override |
| 2354 | |
| 2355 | This will override the hosts that the router finds so that everything |
| 2356 | goes to the smart host, but any non-existent domains will be failed by |
| 2357 | the router. |
| 2358 | |
| 2359 | |
| 2360 | Q0314: I have a really annoying intermittent problem where attempts to mail to |
| 2361 | valid sites are rejected with \*unknown mail domain*\. This only happens a |
| 2362 | few times a day and there is no particular pattern to the sites it |
| 2363 | rejects. If I try to lookup the same domain a few minutes later then it |
| 2364 | is OK. |
| 2365 | |
| 2366 | A0314: This is almost certainly a problem with the DNS resolver or the the |
| 2367 | domain's name servers. |
| 2368 | |
| 2369 | (1) Have you linked Exim against the newest DNS resolver library that |
| 2370 | comes with Bind? If you are using SunOS4 that may be your problem, as |
| 2371 | the resolver that comes with that OS is known to be buggy and to give |
| 2372 | intermittent false negatives. |
| 2373 | |
| 2374 | (2) Effects like this are sometimes seen if a domain's name servers get |
| 2375 | out of step with each other. |
| 2376 | |
| 2377 | |
| 2378 | Q0315: I'd like route all mail with addresses that can't be resolved (the DNS |
| 2379 | lookup times out) to a relay machine. |
| 2380 | |
| 2381 | A0315: Set \pass_on_timeout\ on your \%dnslookup%\ router, and add below it a |
| 2382 | \%manualroute%\ router that routes all relevant domains to the relay. |
| 2383 | |
| 2384 | |
| 2385 | Q0316: I would like to forward all incoming email for a particular domain to |
| 2386 | another host via SMTP. Whereabouts would I configure that? |
| 2387 | |
| 2388 | A0316: Use this as your first router: |
| 2389 | |
| 2390 | ==> special: |
| 2391 | driver = manualroute |
| 2392 | transport = remote_smtp |
| 2393 | route_list = the.particular.domain the.other.host |
| 2394 | |
| 2395 | You will also need to adjust the ACL for incoming SMTP so that this |
| 2396 | domain is accepted for relaying. If you are using the default |
| 2397 | configuration, there is a domain list called \relay_domains\ that is |
| 2398 | set up for this. |
| 2399 | |
| 2400 | |
| 2401 | Q0317: What I'd like to do is have alternative smart hosts, where the one to be |
| 2402 | used is determined by which ISP I'm connected to. |
| 2403 | |
| 2404 | A0317: The simplest way to do this is to arrange for the name of the smart host |
| 2405 | du jour to be placed in a file when you connect, say \(/etc/smarthost)\. |
| 2406 | Then you can read this file from a \%manualroute%\ router like this: |
| 2407 | |
| 2408 | ==> smarthost: |
| 2409 | driver = manualroute |
| 2410 | transport = remote_smtp |
| 2411 | route_list = * ${readfile{/etc/smarthost}{}} |
| 2412 | |
| 2413 | The second argument of the \"readfile"\ item is a string that replaces |
| 2414 | any newline characters in the file (in this case, with nothing). |
| 2415 | By keeping the data out of the main configuration file, you avoid having |
| 2416 | to HUP the daemon when it changes. |
| 2417 | |
| 2418 | |
| 2419 | Q0318: Exim won't route to a host with no MX record. |
| 2420 | |
| 2421 | A0318: More than one thing may cause this. |
| 2422 | |
| 2423 | (1) Are you sure there really is no MX record? Sometimes a typo results |
| 2424 | in a malformed MX record in the zone file, in which case some name |
| 2425 | servers give a SERVFAIL error rather than NXDOMAIN. Exim has to treat |
| 2426 | this as a temporary error, so it can't go on to look for address records. |
| 2427 | You can check for this state using one of the DNS interrogation commands, |
| 2428 | such as \(nslookup)\, \(host)\, or \(dig)\. |
| 2429 | |
| 2430 | (2) Is there a wildcard MX record for \(your)\ domain? Is the |
| 2431 | \search_parents\ option on in your \%dnslookup%\ router? If the answer to |
| 2432 | both these questions is ``yes'', that is the cause of the problem. When |
| 2433 | the DNS resolver fails to find the MX record, it tries adding on your |
| 2434 | domain if \search_parents\ is true, and thereby finds your wildcard MX |
| 2435 | record. For example: |
| 2436 | |
| 2437 | . There is a wildcard MX record for \(*.a.b.c)\. |
| 2438 | |
| 2439 | . There is a host called \(x.y.z)\ that has an A record and no MX record. |
| 2440 | |
| 2441 | . Somebody on the host \(m.a.b.c)\ domain tries to mail to \(user@x.y.z)\. |
| 2442 | |
| 2443 | . Exim calls the DNS to look for an MX record for \(x.y.z)\. |
| 2444 | |
| 2445 | . The DNS doesn't find any MX record. Because \search_parents\ is true, |
| 2446 | it then tries searching the current host's parent domain, so it |
| 2447 | looks for \(x.y.z.a.b.c)\ and picks up the wildcard MX record. |
| 2448 | |
| 2449 | Setting \search_parents\ false makes this case work while retaining the |
| 2450 | wildcard MX record. However, anybody on the host \(m.a.b.c)\ who mails to |
| 2451 | \(user@n.a)\ (expecting it to go to \(user@n.a.b.c)\) now has a problem. The |
| 2452 | \widen_domains\ option of the \%dnslookup%\ router may be helpful in this |
| 2453 | circumstance. |
| 2454 | |
| 2455 | |
| 2456 | Q0319: I have some mails on my queues that are sticking around longer than |
| 2457 | the retry time indicates they should. They are all getting frozen |
| 2458 | because some remote admin has set their MX record to 127.0.0.1. |
| 2459 | |
| 2460 | A0319: The admin in question is an idiot. Exim will always freeze such messages |
| 2461 | because they are apparently routed to the local host. To bounce these |
| 2462 | messages immediately, set |
| 2463 | |
| 2464 | ==> ignore_target_hosts = 127.0.0.1 |
| 2465 | |
| 2466 | on the \%dnslookup%\ router. This causes Exim to completely ignore any hosts |
| 2467 | with that IP address. In fact, there are quite a number of IP addresses |
| 2468 | that should never be used. Here is a suggested configuration list for |
| 2469 | the IPv4 ones: |
| 2470 | |
| 2471 | ==> # Don't allow domains whose single MX (or A) record is a |
| 2472 | # "special-use IPv4 address", as listed in RFC 3330. |
| 2473 | ignore_target_hosts = \ |
| 2474 | # Hosts on "this network"; RFC 1700 (page 4) states that these |
| 2475 | # are only allowed as source addresses |
| 2476 | 0.0.0.0/8 : \ |
| 2477 | # Private networks, RFC 1918 |
| 2478 | 10.0.0.0/8 : 172.16.0.0/12 : 192.168.0.0/16 : \ |
| 2479 | # Internet host loopback address, RFC 1700 (page 5) |
| 2480 | 127.0.0.0/8 : \ |
| 2481 | # "Link local" block |
| 2482 | 169.254.0.0/16 : \ |
| 2483 | # "TEST-NET" - should not appear on the public Internet |
| 2484 | 192.0.2.0/24 : \ |
| 2485 | # 6to4 relay anycast addresses, RFC 3068 |
| 2486 | 192.88.99.0/24 : \ |
| 2487 | # Network interconnect device benchmark testing, RFC 2544 |
| 2488 | 198.18.0.0/15 : \ |
| 2489 | # Multicast addresses, RFC 3171 |
| 2490 | 224.0.0.0/4 : \ |
| 2491 | # Reserved for future use, RFC 1700 (page 4) |
| 2492 | 240.0.0.0/4 |
| 2493 | |
| 2494 | |
| 2495 | Q0320: How can I arrange for all mail to \*user@some.domain*\ to be forwarded |
| 2496 | to \*user@other.domain*\? |
| 2497 | |
| 2498 | A0320: Put this as your first router: |
| 2499 | |
| 2500 | ==> forward: |
| 2501 | driver = redirect |
| 2502 | domains = some.domain |
| 2503 | data = ${quote:$local_part}@other.domain |
| 2504 | |
| 2505 | |
| 2506 | Q0321: How can I tell an Exim router to use only IPv4 or only IPv6 addresses |
| 2507 | when it finds both types in the DNS? |
| 2508 | |
| 2509 | A0321: You can do this by making it ignore the addresses you don't want. This |
| 2510 | example ignores all IPv6 addresses and all IPv4 addresses in the 127 |
| 2511 | network: |
| 2512 | |
| 2513 | ==> ignore_target_hosts = <; 0000::0000/0 ; 127.0.0.0/8 |
| 2514 | |
| 2515 | To ignore all IPv4 addresses, use |
| 2516 | |
| 2517 | ==> ignore_target_hosts = 0.0.0.0/0 |
| 2518 | |
| 2519 | See Q0319 for a general discussion of \ignore_target_hosts\. |
| 2520 | |
| 2521 | |
| 2522 | Q0322: How can I reroute all messages bound for 192.168.10.0 and 10.0.0.0 to |
| 2523 | a specific mail server? |
| 2524 | |
| 2525 | A0322: That is an odd requirement. However, there is an obscure feature in |
| 2526 | Exim, originally implemented for packet radio people, that perhaps can |
| 2527 | help. Check out the \translate_ip_address\ generic router option. |
| 2528 | |
| 2529 | |
| 2530 | |
| 2531 | 4. ROUTING FOR LOCAL DELIVERY |
| 2532 | |
| 2533 | Q0401: I need to have any mail for \(virt.dom.ain)\ that doesn't match one of the |
| 2534 | aliases in \(/usr/lib/aliases.virt)\ delivered to a particular address, for |
| 2535 | example, \(postmaster@virt.dom.ain)\. |
| 2536 | |
| 2537 | A0401: Adding an asterisk to a search type causes Exim to look up ``*'' when the |
| 2538 | normal lookup fails. So if your aliasing router is something like this: |
| 2539 | |
| 2540 | ==> virtual: |
| 2541 | driver = redirect |
| 2542 | domains = virt.dom.ain |
| 2543 | data = ${lookup{$local_part}lsearch{/usr/lib/aliases.virt}} |
| 2544 | no_more |
| 2545 | |
| 2546 | you should change \"lsearch"\ to \"lsearch*"\, and put this in the alias |
| 2547 | file: |
| 2548 | |
| 2549 | ==> *: postmaster@virt.dom.ain |
| 2550 | |
| 2551 | This solution has the feature that if there are several unknown |
| 2552 | addresses in the same message, only one copy gets sent to the |
| 2553 | postmaster, because of Exim's normal de-duplication rules. |
| 2554 | |
| 2555 | NOTE: This solution works only if there is also an entry for \(postmaster)\ |
| 2556 | in the alias file, ultimately resolving to an address that is not in |
| 2557 | \(virt.dom.ain)\. See also Q0434. |
| 2558 | |
| 2559 | |
| 2560 | Q0402: How do I arrange for all incoming email for \(*@some.domain)\ to go into one |
| 2561 | pop3 mail account? The customer doesn't want to add a list of specific |
| 2562 | local parts to the system. |
| 2563 | |
| 2564 | A0402: Set up a special transport that writes to the mailbox like this: |
| 2565 | |
| 2566 | ==> special_transport: |
| 2567 | driver = appendfile |
| 2568 | file = /pop/mailbox |
| 2569 | envelope_to_add |
| 2570 | return_path_add |
| 2571 | delivery_date_add |
| 2572 | user = exim |
| 2573 | |
| 2574 | The file will be written as the user \"exim"\. Then arrange to route all |
| 2575 | mail for that domain to that transport, with a router like this: |
| 2576 | |
| 2577 | ==> special_router: |
| 2578 | driver = accept |
| 2579 | domains = some.domain |
| 2580 | transport = special_transport |
| 2581 | |
| 2582 | |
| 2583 | Q0403: How do I configure Exim to send messages for unknown local users to a |
| 2584 | central server? |
| 2585 | |
| 2586 | A0403: Assuming you are using something like the default configuration, where |
| 2587 | local users are processed by the later routers, you should add the |
| 2588 | following router at the end: |
| 2589 | |
| 2590 | ==> unknown: |
| 2591 | driver = manualroute |
| 2592 | transport = remote_smtp |
| 2593 | route_list = * server.host.name |
| 2594 | no_verify |
| 2595 | |
| 2596 | However, you should if possible try to verify that the user is known on |
| 2597 | the central server before accepting the message in the first place. This |
| 2598 | can be done by making use of Exim's ``call forward'' facility. |
| 2599 | |
| 2600 | |
| 2601 | Q0404: How can I arrange for messages submitted by (for example) Majordomo to |
| 2602 | be handled specially? |
| 2603 | |
| 2604 | A0404: You can use the \condition\ option on a router, with a setting such as |
| 2605 | |
| 2606 | ==> condition = ${if and {{eq {$sender_host_address}{}} \ |
| 2607 | {eq {$sender_ident}{majordom}}} {yes}{no}} |
| 2608 | |
| 2609 | This first tests for a locally-submitted message, by ensuring there is |
| 2610 | no sending host address, and then it checks the identity of the user |
| 2611 | that ran the submitting process. |
| 2612 | |
| 2613 | |
| 2614 | Q0405: On a host that accepts mail for several domains, do I have to use fully |
| 2615 | qualified addresses in \(/etc/aliases)\ or do I have to set up an alias |
| 2616 | file for each domain? |
| 2617 | |
| 2618 | A0405: You can do it either way. The default aliasing router contains this line: |
| 2619 | |
| 2620 | ==> data = ${lookup{$local_part}lsearch{/etc/aliases}} |
| 2621 | |
| 2622 | which is what does the actual lookup. To make it look up the complete |
| 2623 | address instead of just the local part, use |
| 2624 | |
| 2625 | ==> data = ${lookup{$local_part@$domain}lsearch{/etc/aliases}} |
| 2626 | |
| 2627 | If you want to use a separate file for each domain, use |
| 2628 | |
| 2629 | ==> data = ${lookup{$local_part}lsearch{/etc/aliases/$domain}} |
| 2630 | |
| 2631 | |
| 2632 | Q0406: Some of my users are using the \(.forward)\ to pipe to a shell command which |
| 2633 | appends to the user's INBOX. How can I forbid this? |
| 2634 | |
| 2635 | A0406: If you allow your users to run shells in pipes, you cannot control which |
| 2636 | commands they run or which files they write to. However, you should point |
| 2637 | out to them that writing to an INBOX by arbitrary commands is not |
| 2638 | interlocked with the MTA and MUAs, and is liable to mess up the contents |
| 2639 | of the file. |
| 2640 | |
| 2641 | If a user simply wants to choose a specific file for the delivery of |
| 2642 | messages, this can be done by putting a file name in a \(.forward)\ file |
| 2643 | rather than using a pipe, or by using the \"save"\ command in an Exim |
| 2644 | filter file. |
| 2645 | |
| 2646 | You can set \forbid_pipe\ on the router, but that will prevent them from |
| 2647 | running any pipe commands at all. Alternatively, you can restrict which |
| 2648 | commands they may run in their pipes by setting the \allow_commands\ |
| 2649 | and/or \restrict_to_path\ options in the \%address_pipe%\ transport. |
| 2650 | |
| 2651 | |
| 2652 | Q0407: How can I arrange for a default value when using a query-style lookup |
| 2653 | such as LDAP or NIS+ to handle aliases? |
| 2654 | |
| 2655 | A0407: Use a second query in the failure part of the original lookup, like |
| 2656 | this: |
| 2657 | |
| 2658 | ==> data = ${lookup ldap\ |
| 2659 | {ldap://x.y.z/l=yvr?aliasaddress?sub?(&(mail=$local_part@$domain))}\ |
| 2660 | {$value}\ |
| 2661 | {\ |
| 2662 | ${lookup ldap \ |
| 2663 | {ldap://x.y.z/l=yvr?aliasaddress?sub?(&(mail=default@$domain))}}\ |
| 2664 | }} |
| 2665 | |
| 2666 | Of course, if the default is a fixed value you can just include it |
| 2667 | directly. |
| 2668 | |
| 2669 | |
| 2670 | Q0408: If I don't fully qualify the addresses in a virtual domain's alias file |
| 2671 | then mail to aliases which also match the local domain get delivered to |
| 2672 | the local domain. |
| 2673 | |
| 2674 | A0408: Set the \qualify_preserve_domain\ option on the \%redirect%\ router. |
| 2675 | |
| 2676 | |
| 2677 | Q0409: I want mail for any local part at certain virtual domains to go |
| 2678 | to a single address for each domain. |
| 2679 | |
| 2680 | A0409: One way to do this is |
| 2681 | |
| 2682 | ==> virtual: |
| 2683 | driver = redirect |
| 2684 | data = ${lookup{$domain}lsearch{/etc/virtual}} |
| 2685 | |
| 2686 | The \(/etc/virtual)\ file contains a list of domains and the addresses to |
| 2687 | which their mail should be sent. For example: |
| 2688 | |
| 2689 | ==> domain1: postmaster@some.where.else |
| 2690 | domain2: joe@xyz.plc |
| 2691 | |
| 2692 | If the number of domains is large, using a DBM or cdb file would be more |
| 2693 | efficient. If the lookup fails to find the domain in the file, the value |
| 2694 | of the \data\ option is empty, causing the router to decline. |
| 2695 | |
| 2696 | |
| 2697 | Q0410: How can I make Exim look in the alias NIS map instead of \(/etc/aliases)\? |
| 2698 | |
| 2699 | A0410: The default configuration does not use NIS (many hosts don't run it). |
| 2700 | You need to change this line in the \%system_aliases%\ router: |
| 2701 | |
| 2702 | ==> data = ${lookup{$local_part}lsearch{/etc/aliases}} |
| 2703 | |
| 2704 | Change it to |
| 2705 | |
| 2706 | ==> data = ${lookup{$local_part}nis{mail.aliases}} |
| 2707 | |
| 2708 | If you want to use \(/etc/aliases)\ as well as NIS, put this router (with |
| 2709 | a different name) before or after the default one, depending on which |
| 2710 | data source you want to take precedence. |
| 2711 | |
| 2712 | |
| 2713 | Q0411: Why will Exim deliver a message locally to any username that is longer |
| 2714 | than 8 characters as long as the first 8 characters match one of the |
| 2715 | local usernames? |
| 2716 | |
| 2717 | A0411: The problem is in your operating system. Exim just calls the \^^getpwnam()^^\ |
| 2718 | function to test a local part for being a local login name. It does not |
| 2719 | presume to guess the maximum length of user name for the underlying |
| 2720 | operating system. Many operating systems correctly reject names that are |
| 2721 | longer than the maximum length; yours is apparently deficient in this |
| 2722 | regard. To cope with such systems, Exim has an option called |
| 2723 | \max_user_name_length\ which you can set to the maximum allowed length. |
| 2724 | |
| 2725 | |
| 2726 | Q0412: Why am I seeing the error \*bad mode (100664) for /home/test/.forward*\? |
| 2727 | I've looked through the documentation but can't see anything to suggest |
| 2728 | that Exim has to do anything other than read the \(.forward)\ file. |
| 2729 | |
| 2730 | A0412: For security, Exim checks for mode bits that shouldn't be set, by |
| 2731 | default 022. You can change this by setting the \modemask\ option of the |
| 2732 | \%redirect%\ router that is handling \(.forward)\ files. |
| 2733 | |
| 2734 | |
| 2735 | Q0413: When a user's \(.forward)\ file is syntactially invalid, Exim defers |
| 2736 | delivery of all messages to that user, which sometimes include the |
| 2737 | user's own test messages. Can it be told to ignore the \(.forward)\ file |
| 2738 | and/or inform the user of the error? |
| 2739 | |
| 2740 | A0413: Setting \skip_syntax_errors\ on the redirect router causes syntax |
| 2741 | errors to be skipped. When dealing with users' \(.forward)\ files it is best |
| 2742 | to combine this with a setting of \syntax_errors_to\ in order to send |
| 2743 | a message about the error to the user. However, to avoid an infinite |
| 2744 | cascade of messages, you have to be able to send to an address that |
| 2745 | bypasses \(.forward)\ file processing. This can be done by including a |
| 2746 | router like this one |
| 2747 | |
| 2748 | ==> real_localuser: |
| 2749 | driver = accept |
| 2750 | check_local_user |
| 2751 | transport = local_delivery |
| 2752 | local_part_prefix = real- |
| 2753 | |
| 2754 | before the \%redirect%\ router that handles \(.forward)\ files. This will |
| 2755 | do an ordinary local delivery without \(.forward)\ processing, if the |
| 2756 | local part is prefixed by \"real-"\. You can then set something like |
| 2757 | the following options on the \%redirect%\ router: |
| 2758 | |
| 2759 | ==> skip_syntax_errors |
| 2760 | syntax_errors_to = real-$local_part@$domain |
| 2761 | syntax_errors_text = "\ |
| 2762 | This is an automatically generated message. An error has been \ |
| 2763 | found\nin your .forward file. Details of the error are reported \ |
| 2764 | below. While\nthis error persists, messages addressed to you will \ |
| 2765 | get delivered into\nyour normal mailbox and you will receive a \ |
| 2766 | copy of this message for\neach one." |
| 2767 | |
| 2768 | A final tidying setting to go with this is a rewriting rule that changes |
| 2769 | \"real-username"\ into just \"username"\ in the headers of the message: |
| 2770 | |
| 2771 | ==> \N^real-([^@]+)@your\.dom\.ain$\N $1@your.dom.ain h |
| 2772 | |
| 2773 | This means that users won't ever see the \"real-"\ prefix, unless they |
| 2774 | look at the ::Envelope-To:: header. |
| 2775 | |
| 2776 | |
| 2777 | Q0414: I have set \caseful_local_part\ on the routers that handle my local |
| 2778 | domain because my users have upper case letters in their login names, |
| 2779 | but incoming mail now has to use the correct case. Can I relax this |
| 2780 | somehow? |
| 2781 | |
| 2782 | A0414: If you really have to live with caseful user names but want incoming |
| 2783 | local parts to be caseless, then you have to maintain a file, indexed by |
| 2784 | the lower case forms, that gives the correct case for each login, like |
| 2785 | this: |
| 2786 | |
| 2787 | ==> admin: Admin |
| 2788 | steven: Steven |
| 2789 | mcdonald: McDonald |
| 2790 | lamanch: LaManche |
| 2791 | ... |
| 2792 | |
| 2793 | and at the start of the routers that handle your local domain, put one |
| 2794 | like this: |
| 2795 | |
| 2796 | ==> set_case_router: |
| 2797 | driver = redirect |
| 2798 | data = ${lookup{${lc:$local_part}}lsearch{/the/file}} |
| 2799 | qualify_preserve_domain |
| 2800 | |
| 2801 | For efficiency, you should also set the \redirect_router\ option to cause |
| 2802 | processing of the changed address to begin at the next router. If you |
| 2803 | are otherwise using the default configuration, the setting would be |
| 2804 | |
| 2805 | ==> redirect_router = system_aliases |
| 2806 | |
| 2807 | If there are lots of users, then a DBM or cdb file would be more |
| 2808 | efficient than a linear search. If you are handling several domains, |
| 2809 | you will have to extend this configuration to cope appropriately. |
| 2810 | |
| 2811 | |
| 2812 | Q0415: Can I use my existing alias files and forward files as well as procmail |
| 2813 | and effectively drop in Exim in place of Sendmail ? |
| 2814 | |
| 2815 | A0415: Yes, as long as your alias and forward files don't assume that pipes are |
| 2816 | going to run under a shell. If they do, you either have to change them, |
| 2817 | or configure Exim to use a shell (which it doesn't by default). |
| 2818 | |
| 2819 | |
| 2820 | Q0416: What is quickest way to set up Exim so any message sent to a |
| 2821 | non-existing user would bounce back with a different message, based |
| 2822 | on the name of non-existing user? |
| 2823 | |
| 2824 | A0416: Place this router last, so that it catches any local addresses that |
| 2825 | are not otherwise handled: |
| 2826 | |
| 2827 | ==> non_exist: |
| 2828 | driver = accept |
| 2829 | transport = non_exist_reply |
| 2830 | no_verify |
| 2831 | |
| 2832 | Then add the following transport to the transports section: |
| 2833 | |
| 2834 | ==> non_exist_reply: |
| 2835 | driver = autoreply |
| 2836 | user = exim |
| 2837 | to = $sender_address |
| 2838 | subject = User does not exist |
| 2839 | text = You sent mail to $local_part. That's not a valid user here. \ |
| 2840 | The subject was: $subject. |
| 2841 | |
| 2842 | If you want to pick up a message from a file, you can use the \file\ |
| 2843 | option (use \file_expand\ if you want its contents expanded). |
| 2844 | |
| 2845 | |
| 2846 | Q0417: What do I need to do to make Exim handle \(/usr/ucb/vacation)\ processing |
| 2847 | automatically, so that people could just create a \(.vacation.msg)\ file in |
| 2848 | their home directory and not have to edit their \(.forward)\ file? |
| 2849 | |
| 2850 | A0417: Add a new router like this, immediately before the normal \%localuser%\ |
| 2851 | router: |
| 2852 | |
| 2853 | ==> vacation: |
| 2854 | driver = accept |
| 2855 | check_local_user |
| 2856 | require_files = $home/.vacation.msg |
| 2857 | transport = vacation_transport |
| 2858 | unseen |
| 2859 | |
| 2860 | and a matching new transport like this: |
| 2861 | |
| 2862 | ==> vacation_transport: |
| 2863 | driver = pipe |
| 2864 | command = /usr/ucb/vacation $local_part |
| 2865 | |
| 2866 | However, some versions of \(/usr/ucb/vacation)\ do not work properly unless |
| 2867 | the DBM file(s) it uses are created in advance - it won't create them |
| 2868 | itself. You also need a way of removing them when the vacation is over. |
| 2869 | |
| 2870 | Another possibility is to use a fixed filter file which is run whenever |
| 2871 | \(.vacation.msg)\ exists, for example: |
| 2872 | |
| 2873 | ==> vacation: |
| 2874 | driver = redirect |
| 2875 | check_local_user |
| 2876 | require_files = $home/.vacation.msg |
| 2877 | file = /some/central/filter |
| 2878 | allow_filter |
| 2879 | |
| 2880 | The filter file should use the \"if personal"\ check before sending mail, |
| 2881 | to avoid generating automatic responses to mailing lists. If sending a |
| 2882 | message is all that it does, this doesn't count as a ``significant'' |
| 2883 | delivery, so the original message goes on to be delivered as normal. |
| 2884 | |
| 2885 | Yet another possibility is to make use of Exim's \%autoreply%\ transport, |
| 2886 | and not use \(/usr/ucb/vacation)\ at all. |
| 2887 | |
| 2888 | |
| 2889 | Q0418: I want to use a default entry in my alias file to handle unknown local |
| 2890 | parts, but it picks up the local parts that the aliases generate. For |
| 2891 | example, if the alias file is |
| 2892 | |
| 2893 | ==> luke.skywalker: luke |
| 2894 | ls: luke |
| 2895 | *: postmaster |
| 2896 | |
| 2897 | then messages addressed to \/luke.skywalker/\ end up at \/postmaster/\. |
| 2898 | |
| 2899 | A0418: The default mechanism works best with virtual domains, where the |
| 2900 | generated address is not in the same domain. If you just want to pick up |
| 2901 | all unknown local parts and send them to postmaster, an easier way to do |
| 2902 | it is to put this as your last router: |
| 2903 | |
| 2904 | ==> unknown: |
| 2905 | driver = redirect |
| 2906 | data = postmaster |
| 2907 | no_verify |
| 2908 | |
| 2909 | Another possibility is to put the redirect router for these aliases |
| 2910 | after all the other routers, so that local parts which are user names |
| 2911 | get picked off first. You will need to have two aliasing routers if |
| 2912 | there are some local parts (e.g. \/root/\) which are login names, but which |
| 2913 | you want to handle as aliases. |
| 2914 | |
| 2915 | |
| 2916 | Q0419: I have some obsolete domains which people have been warned not to use |
| 2917 | any more. How can I arrange to delete any mail that is sent to them? |
| 2918 | |
| 2919 | A0419: To reject them at SMTP time, with a customized error message, place |
| 2920 | statments like this in the ACL: |
| 2921 | |
| 2922 | ==> deny message = The domain $domain is obsolete |
| 2923 | domains = lsearch;/etc/exim/obsolete.domains |
| 2924 | |
| 2925 | For messages that don't arrive over SMTP, you can use a router like |
| 2926 | this to bounce them: |
| 2927 | |
| 2928 | ==> obsolete: |
| 2929 | driver = redirect |
| 2930 | domains = lsearch;/etc/exim/obsolete.domains |
| 2931 | allow_fail |
| 2932 | data = :fail: the domain $domain is obsolete |
| 2933 | |
| 2934 | If you just want to throw away mail to those domains, accept them at |
| 2935 | SMTP time, and use a router like this: |
| 2936 | |
| 2937 | ==> obsolete: |
| 2938 | domains = lsearch;/etc/exim/obsolete.domains |
| 2939 | data = :blackhole: |
| 2940 | |
| 2941 | |
| 2942 | Q0420: How can I arrange that mail addressed to \(anything@something.mydomain.com)\ |
| 2943 | gets delivered to \(something@mydomain.com)\? |
| 2944 | |
| 2945 | A0420: Set up a router like this: |
| 2946 | |
| 2947 | ==> user_from_domain: |
| 2948 | driver = redirect |
| 2949 | data = ${if match{$domain}{\N^(.+)\.mydomain\.com$\N}\ |
| 2950 | {$1@mydomain.com}} |
| 2951 | |
| 2952 | |
| 2953 | Q0421: I can't get a regular expression to work in a \local_parts\ option on |
| 2954 | one of my routers. |
| 2955 | |
| 2956 | A0421: Have you remembered to protect any backslash and dollar characters in |
| 2957 | your regex from unwanted expansion? The easiest way is to use the |
| 2958 | \"@\N"\ facility, like this: |
| 2959 | |
| 2960 | ==> local_parts = \N^0740\d{6}\N |
| 2961 | |
| 2962 | |
| 2963 | Q0422: How can I arrange for all addresses in a group of domains \(*.example.com)\ |
| 2964 | to share the same alias file? I have a number of such groups. |
| 2965 | |
| 2966 | A0422: For a single group you could just hard wire the file name into a router |
| 2967 | that had |
| 2968 | |
| 2969 | ==> domains = *.example.com |
| 2970 | |
| 2971 | set, to restrict it to the relevant domains. For a number of such groups |
| 2972 | you can create a file containing the domains, like this: |
| 2973 | |
| 2974 | ==> *.example1.com example1.com |
| 2975 | *.example2.com example2.com |
| 2976 | ... |
| 2977 | |
| 2978 | Then create a router like this |
| 2979 | |
| 2980 | ==> domain_aliases: |
| 2981 | driver = redirect |
| 2982 | domains = partial-lsearch;/that/file |
| 2983 | data = ${lookup{$local_part}lsearch*{/etc/aliases.d/$domain_data}} |
| 2984 | |
| 2985 | The variable \$domain_data$\ contains the data that was looked up when the |
| 2986 | \domains\ option was matched, i.e. \"example1.com"\, \"example2.com"\, etc. |
| 2987 | in this case. |
| 2988 | |
| 2989 | |
| 2990 | Q0423: Some of our users have no home directories; the field in the password |
| 2991 | file contains \(/no/home/dir)\. This causes the error \*failed to stat |
| 2992 | /no/home/dir (No such file or directory)*\ when Exim tries to look for a |
| 2993 | \(.forward file)\, and the delivery is deferred. |
| 2994 | |
| 2995 | A0423: There are two issues involved here: |
| 2996 | |
| 2997 | (1) With the default configuration, you are asking Exim to check for a |
| 2998 | \(.forward)\ file in the user's home directory. If no file is found, |
| 2999 | Exim tries to \^^stat()^^\ the home directory. This is so that it will |
| 3000 | notice a missing NFS home directory, and not treat it as if the |
| 3001 | \(.forward)\ file did not exist. This \^^stat()^^\ is failing when the |
| 3002 | home directory really doesn't exist. You should arrange for the |
| 3003 | \%userforward%\ router not to run for these special users, by adding |
| 3004 | this line: |
| 3005 | |
| 3006 | ==> condition = ${if eq {$home}{/no/home/dir}{no}{yes}} |
| 3007 | |
| 3008 | (2) If you use \check_local_user\ on another router to route to a local |
| 3009 | transport (again, this is what is in the default configuration), you |
| 3010 | will also have to specify a current directory for the transport, because |
| 3011 | by default it makes the home directory current. This is easily done by |
| 3012 | adding |
| 3013 | |
| 3014 | ==> current_directory = / |
| 3015 | |
| 3016 | to the transport or |
| 3017 | |
| 3018 | ==> transport_current_directory = / |
| 3019 | |
| 3020 | to the router. Or you can add \home_directory\ to the transport, because |
| 3021 | the current directory defaults to the home directory. |
| 3022 | |
| 3023 | |
| 3024 | Q0424: How can I disable Exim's de-duplication features? I want it to do two |
| 3025 | deliveries if two different aliases expand to the same address. |
| 3026 | |
| 3027 | A0424: This is not possible. Duplication has other ramifications other than |
| 3028 | just (in)convenience. Consider: |
| 3029 | |
| 3030 | . Message is addressed to A and to B. |
| 3031 | |
| 3032 | . Both A and B are aliased to C. |
| 3033 | |
| 3034 | . Without de-duplication, two deliveries to C are scheduled. |
| 3035 | |
| 3036 | . One delivery happens, Exim records that it has delivered the message |
| 3037 | to C. |
| 3038 | |
| 3039 | . The next delivery fails (C's mailbox is over quota, say). |
| 3040 | |
| 3041 | Next time round, Exim wants to know if it has already delivered to C or |
| 3042 | not, before scheduling a new delivery. Has it? Obviously, if duplicate |
| 3043 | deliveries are supported, it has to remember not only that it has |
| 3044 | delivered to C but also the ``history'' of how that delivery happened - in |
| 3045 | effect an ancestry list back to the original envelope address. This it |
| 3046 | does not do, and changing it to work in that way would be a lot of work |
| 3047 | and a big upheaval. |
| 3048 | |
| 3049 | The best way to get duplicate deliveries if you want them is not to use |
| 3050 | aliases, but to route the addresses directly to a transport, e.g. |
| 3051 | |
| 3052 | ==> duplicates: |
| 3053 | driver = accept |
| 3054 | local_parts = lsearch;/etc/list/of/special/local/parts |
| 3055 | transport = local_delivery |
| 3056 | user = exim |
| 3057 | |
| 3058 | |
| 3059 | Q0425: My users' mailboxes are distributed between several servers according to |
| 3060 | the first letter of the user name. All the servers receive incoming mail |
| 3061 | at random. I would like to have the same configuration file for all the |
| 3062 | servers, which does local delivery for the mailboxes it holds, and sends |
| 3063 | other addresses to the correct other server. Is this possible? |
| 3064 | |
| 3065 | A0425: It is easiest if you arrange for all the users to have password entries |
| 3066 | on all the servers. This means that non-existent users can be detected |
| 3067 | at the first server they reach. Set up a file containing a mapping from |
| 3068 | the first letter of the user names to the servers where their mailboxes |
| 3069 | are held. For example: |
| 3070 | |
| 3071 | ==> a: server1 |
| 3072 | b: server1 |
| 3073 | c: server2 |
| 3074 | ... |
| 3075 | |
| 3076 | Before the normal \%localuser%\ router, place the following router: |
| 3077 | |
| 3078 | ==> mailbox_host: |
| 3079 | driver = manualroute |
| 3080 | check_local_user |
| 3081 | transport = remote_smtp |
| 3082 | route_list = * ${lookup{${substr_0_1:$local_part}}lsearch{/etc/mapfile}} |
| 3083 | self = pass |
| 3084 | |
| 3085 | This router checks for a local account, then looks up the host from the |
| 3086 | first character of the local part. If the host is not the local host, |
| 3087 | the address is routed to the \%remote_smtp%\ transport, and sent to the |
| 3088 | correct host. If the host is the local host, the \self\ option causes |
| 3089 | the router to pass the address to the next router, which does a local |
| 3090 | delivery. |
| 3091 | |
| 3092 | The router is skipped for local parts that are not the names of local |
| 3093 | users, and so these addresses fail. |
| 3094 | |
| 3095 | |
| 3096 | Q0426: One of the things I want to set up is for \(anything@onedomain)\ to forward |
| 3097 | to \(anything@anotherdomain)\. I tried adding \($local_part@anotherdomain)\ to |
| 3098 | my aliases but it did not expand - it sent it to that literal address. |
| 3099 | |
| 3100 | A0426: If you want to do it that way, you can use the \"expand"\ operator on |
| 3101 | the lookup used in the data option of the redirect router. For example: |
| 3102 | |
| 3103 | ==> data = ${expand:${lookup{$local_part}lsearch*{/etc/aliases}}} |
| 3104 | |
| 3105 | Another approach is to use a router like this: |
| 3106 | |
| 3107 | ==> forwarddomain: |
| 3108 | driver = redirect |
| 3109 | domains = onedomain |
| 3110 | data = $local_part@anotherdomain |
| 3111 | |
| 3112 | The value of \data\ can, of course, be more complicated, involving |
| 3113 | lookups etc. if you have lots of different cases. |
| 3114 | |
| 3115 | |
| 3116 | Q0427: How can I have an address looked up in two different alias files, and |
| 3117 | delivered to all the addresses that are found? |
| 3118 | |
| 3119 | A0427: Use a router like this: |
| 3120 | |
| 3121 | ==> multi_aliases: |
| 3122 | driver = redirect |
| 3123 | data = ${lookup{$local_part}lsearch{/etc/aliases1}\ |
| 3124 | {$value${lookup{$local_part}lsearch{/etc/aliases2}{,$value}}}\ |
| 3125 | {${lookup{$local_part}lsearch{/etc/aliases2}{$value}fail}}}\ |
| 3126 | |
| 3127 | If the first lookup succeeds, the result is its data, followed by the |
| 3128 | data from the second lookup, if any, separated by a comma. If the first |
| 3129 | lookup fails, the result is the data from the third lookup (which also |
| 3130 | looks in the second file), but if this also fails, the entire expansion |
| 3131 | is forced to fail, thereby causing the router to decline. |
| 3132 | |
| 3133 | Another approach is to use two routers, with the first re-generating the |
| 3134 | original local part when it succeeds. This won't get processed by the |
| 3135 | same router again. For example: |
| 3136 | |
| 3137 | ==> multi_aliases1: |
| 3138 | driver = redirect |
| 3139 | data = ${lookup{$local_part}lsearch{/etc/aliases1}{$value,$local_part}} |
| 3140 | |
| 3141 | ==> multi_aliases2: |
| 3142 | data = ${lookup{$local_part}lsearch{/etc/aliases2}} |
| 3143 | |
| 3144 | This scales more easily to three or more alias files. |
| 3145 | |
| 3146 | |
| 3147 | Q0428: I've converted from Sendmail, and I notice that Exim doesn't make use |
| 3148 | of the \"owner-"\ entries in my alias file to change the sender address in |
| 3149 | outgoing messages to a mailing list. |
| 3150 | |
| 3151 | A0428: If you have an alias file with entries like this: |
| 3152 | |
| 3153 | ==> somelist: a@b, c@d, ... |
| 3154 | owner-somelist: postmaster |
| 3155 | |
| 3156 | Sendmail assumes that the second entry specifies a new sender address |
| 3157 | for the first. Exim does not make this assumption. However, you can make |
| 3158 | it take the same action, by adding |
| 3159 | |
| 3160 | ==> errors_to = owner-$local_part@whatever.domain |
| 3161 | |
| 3162 | to the configuration for your aliasing router. This is fail-safe, |
| 3163 | because Exim verifies a new sender address before using it. Thus, the |
| 3164 | change of sender address occurs only when the owner entry exists. |
| 3165 | |
| 3166 | |
| 3167 | Q0429: I would like to deliver mail addressed to a given domain to local |
| 3168 | mailboxes, but also to generate messages to the envelope senders. |
| 3169 | |
| 3170 | A0429: You can do this with an ``unseen'' router and an \%autoreply%\ transport, |
| 3171 | along the following lines: |
| 3172 | |
| 3173 | ==> # Router |
| 3174 | auto_warning_r: |
| 3175 | driver = accept |
| 3176 | check_local_user |
| 3177 | domains = <domains you want to do this for> |
| 3178 | condition = ${if eq{$sender_address}{}{no}{yes}} |
| 3179 | transport = warning_t |
| 3180 | no_verify |
| 3181 | unseen |
| 3182 | |
| 3183 | Place this router immediately before the normal \%localuser%\ router. The |
| 3184 | \unseen\ option means that the address is still passed on to the next |
| 3185 | router. The transport is configured like this: |
| 3186 | |
| 3187 | ==> # Transport |
| 3188 | warning_t: |
| 3189 | driver = autoreply |
| 3190 | file = /usr/local/mail/warning.txt |
| 3191 | file_expand |
| 3192 | from = postmaster@your.domain |
| 3193 | to = $sender_address |
| 3194 | user = exim |
| 3195 | subject = Re: Your mail to $local_part@$domain |
| 3196 | |
| 3197 | Note the use of the \condition\ option to avoid attempting to send a |
| 3198 | message when there is no sender (that is, when the incoming message is a |
| 3199 | bounce message). You can of course extend this to include other |
| 3200 | conditions. If you want to log the sending of messages, you can add |
| 3201 | |
| 3202 | ==> log = /some/file |
| 3203 | |
| 3204 | to the transport and also make use of the \once\ option if you want to |
| 3205 | send only one message to each sender. |
| 3206 | |
| 3207 | |
| 3208 | Q0430: Whenever Exim tries to route a local address, it gives a permission |
| 3209 | denied error for the \(.forward)\ file, like this: |
| 3210 | |
| 3211 | ==> 1998-08-10 16:55:32 0z5y2W-0000B8-00 == xxxx@yyy.zzz <xxxx@yyy.zz> |
| 3212 | D=userforward defer (-1): failed to open /home/xxxx/.forward |
| 3213 | (userforward router): Permission denied (euid=1234 egid=101) |
| 3214 | |
| 3215 | A0430: Have you remembered to make Exim setuid \/root/\? |
| 3216 | |
| 3217 | |
| 3218 | Q0431: How do I configure Exim to allow arbitrary extensions in local parts, of |
| 3219 | the form \/+extension/\? |
| 3220 | |
| 3221 | A0431: Add this pre-condition to the relevant router: |
| 3222 | |
| 3223 | ==> local_part_suffix = +* |
| 3224 | |
| 3225 | If you want the extensions to be optional, also add the option |
| 3226 | |
| 3227 | ==> local_part_suffix_optional |
| 3228 | |
| 3229 | When the router runs, \$local_part$\ contains the local part with the |
| 3230 | extension removed, and the extension (if any) is in \$local_part_suffix$\. |
| 3231 | If you have set \check_local_user\, the test is carried out after the |
| 3232 | extension is removed. |
| 3233 | |
| 3234 | |
| 3235 | Q0432: I use NIS for my user data. How can I stop Exim rejecting mail when my |
| 3236 | NIS servers are being restarted? |
| 3237 | |
| 3238 | A0432: Exim doesn't know that you are using NIS; it just calls the \^^getpwnam()^^\ |
| 3239 | function, which is routed by nsswitch. Unfortunately, \^^getpwnam()^^\ |
| 3240 | was never designed to be routed through NIS, and it returns NULL if the |
| 3241 | entry is not found or if the connection to the NIS server fails. This |
| 3242 | means that Exim cannot tell the difference between ``no such user'' and |
| 3243 | ``NIS is down''. |
| 3244 | |
| 3245 | Crutches to help with this problem are \finduser_retries\ in Exim, and |
| 3246 | \^nscd^\ on the Unix side, but they are not perfect, and mail can still |
| 3247 | be lost. However, Nico Erfurth pointed out that you can create a router |
| 3248 | for Exim that tests for the availability of NIS, and force a defer if |
| 3249 | NIS is not running: |
| 3250 | |
| 3251 | ==> check_nis: |
| 3252 | driver = redirect |
| 3253 | data = ${lookup {$local_part} nis {passwd}{}} |
| 3254 | |
| 3255 | This should be placed before any router that makes any use of NIS, |
| 3256 | typically at the start of your local routers. How does it work? If |
| 3257 | your NIS server is reachable, the lookup will take place, and whether it |
| 3258 | succeeds or fails, the result is an empty string. This causes the |
| 3259 | router to decline, and the address is passed to the following routers. |
| 3260 | If your NIS server is down, the lookup defers, and this causes the |
| 3261 | router to defer. A verification of an incoming address gets a temporary |
| 3262 | rejection, and a delivery is deferred till later. |
| 3263 | |
| 3264 | |
| 3265 | Q0433: How can I arrange for a single address to be processed by both |
| 3266 | \%redirect%\ and \%accept%\? |
| 3267 | |
| 3268 | A0433: Check out the \unseen\ option. |
| 3269 | |
| 3270 | |
| 3271 | Q0434: How can I redirect all local parts that are not in my system aliases to |
| 3272 | a single address? I tried using an asterisk in the system alias file |
| 3273 | with an \"lsearch*"\ lookup, but that sent all messages to the |
| 3274 | default address. |
| 3275 | |
| 3276 | A0434: If your alias file generates addresses in the local domain, they are |
| 3277 | also processed as a potential aliases. For example, suppose this is your |
| 3278 | alias file: |
| 3279 | |
| 3280 | ==> caesar: jc |
| 3281 | anthony: ma |
| 3282 | *: brutus |
| 3283 | |
| 3284 | The local part \/caesar/\ is aliased to \/jc/\, but that address is then |
| 3285 | reprocessed by the routers. As the address is in the local domain, the |
| 3286 | alias file is again consulted, and this time the default matches. In |
| 3287 | fact after the second aliasing, \/brutus/\ is also processed again from |
| 3288 | the start, and is aliased to itself. However, this happens only once, |
| 3289 | because the next time, Exim notices that the aliasing router has already |
| 3290 | processed \/brutus/\, so the router is skipped in order to avoid |
| 3291 | looping. |
| 3292 | |
| 3293 | There are several ways of solving this problem; which one you use |
| 3294 | depends on your aliasing data. |
| 3295 | |
| 3296 | (1) If the result of aliasing is always a local user name, that is, |
| 3297 | aliasing never generates another alias, you can use the |
| 3298 | \redirect_router\ option on the router to specify that processing |
| 3299 | the generated addresses must start at the next router. For example: |
| 3300 | |
| 3301 | ==> redirect_router = userforward |
| 3302 | |
| 3303 | assuming that the next router is called \%userforward%\. This |
| 3304 | ensures that there is at most one pass through the aliasing router. |
| 3305 | |
| 3306 | (2) If you cannot rely on aliases generating non-aliases, it is often |
| 3307 | easier not to use a default alias, but instead to place a router |
| 3308 | such as the one below after all the other local routers (for the |
| 3309 | relevant domains): |
| 3310 | |
| 3311 | ==> catch_unknown: |
| 3312 | driver = redirect |
| 3313 | domains = ... |
| 3314 | data = brutus@$domain |
| 3315 | |
| 3316 | Note that the default aliasing technique works more successfully for |
| 3317 | virtual domains (see Q0401) because the generated address for the |
| 3318 | default is not usually in the same virtual domain as the incoming |
| 3319 | address. |
| 3320 | |
| 3321 | |
| 3322 | Q0435: My alias file contains fully qualified addresses as keys, and some |
| 3323 | wildcard domains in the form @foo.bar. Can Exim handle these? |
| 3324 | |
| 3325 | A0435: You can handle fully qualified addresses with this router: |
| 3326 | |
| 3327 | ==> qualified_aliases: |
| 3328 | driver = redirect |
| 3329 | data = ${lookup{$local_part@$domain}lsearch{/etc/aliases}} |
| 3330 | |
| 3331 | (Add any other options you need for the \%redirect%\ router.) Place this |
| 3332 | router either before or after the default aliases router that looks up |
| 3333 | the local part only. (Or, if you have no unqualified aliases, replace |
| 3334 | the default router.) |
| 3335 | |
| 3336 | To handle wildcards in the form @foo.bar you will need yet another |
| 3337 | router. (Wildcards of the form *@foo.bar can be handled by an lsearch*@ |
| 3338 | lookup.) Something like this: |
| 3339 | |
| 3340 | ==> wildcard_aliases: |
| 3341 | driver = redirect |
| 3342 | data = ${lookup{@$domain}lsearch{/etc/aliases}} |
| 3343 | |
| 3344 | Place this after the routers that handle the more specific aliases. |
| 3345 | |
| 3346 | |
| 3347 | |
| 3348 | 5. FILTERING |
| 3349 | |
| 3350 | Q0501: My filter isn't working. How can I test it? |
| 3351 | |
| 3352 | A0501: Use the \-bf-\ option (\-bF-\ for a system filter) to test the basic operation |
| 3353 | of your filter. You can request debugging information for filtering only |
| 3354 | by adding \"-d-all+filter"\ to the command. |
| 3355 | |
| 3356 | |
| 3357 | Q0502: What I really need is the ability to obtain the result of a pipe |
| 3358 | command so that I can filter externally and redirect internally. Is |
| 3359 | this possible? |
| 3360 | |
| 3361 | A0502: The result of a pipe command is not available to a filter, because Exim |
| 3362 | does not run any actual deliveries while filtering. It just sets up |
| 3363 | deliveries at this time. They all actually happen later. If you want to |
| 3364 | run pipes and examine their results, you need to set up a single |
| 3365 | delivery to a delivery agent such as \^procmail^\ which provides this kind |
| 3366 | of facility. |
| 3367 | |
| 3368 | An possible alternative is to use the \"${run"\ expansion item to run an |
| 3369 | external command while filtering. In this case, you can make use of some |
| 3370 | of the results of the command. |
| 3371 | |
| 3372 | |
| 3373 | Q0503: I received a message with a ::Subject:: line that contained a non-printing |
| 3374 | character (a carriage return). This messed up my filter file. Is there a |
| 3375 | way to get round it? |
| 3376 | |
| 3377 | A0503: Instead of \"$h_subject:"\ use \"${escape:$h_subject:}"\ |
| 3378 | |
| 3379 | |
| 3380 | Q0504: I want to search for \"$"\ in the subject line, but I can't seem to get |
| 3381 | the syntax. |
| 3382 | |
| 3383 | A0504: Try one of these: |
| 3384 | |
| 3385 | ==> if $h_subject: contains \$ then ... |
| 3386 | if $h_subject: contains "\\$" then ... |
| 3387 | |
| 3388 | |
| 3389 | Q0505: My problem is that Exim replaces \$local_part$\ with an empty string in the |
| 3390 | system filtering. What's wrong or what did I miss? |
| 3391 | |
| 3392 | A0505: A message may have many recipients. The system filter is run just once |
| 3393 | at the start of a delivery attempt. Consequently, it does not make sense |
| 3394 | to set \$local_part$\. Which recipient should it be set to? However, you |
| 3395 | can access all the recipients from a system filter via the variable |
| 3396 | called \$recipients$\. |
| 3397 | |
| 3398 | |
| 3399 | Q0506: Using \$recipients$\ in a system filter gives me another problem: how can |
| 3400 | I do a string lookup if \$recipients$\ is a list of addresses? |
| 3401 | |
| 3402 | A0506: Check out the section of the filter specification called \*Testing a list of |
| 3403 | addresses*\. If that doesn't help, you may have to resort to calling an |
| 3404 | embedded Perl interpreter - but that is expensive. |
| 3405 | |
| 3406 | |
| 3407 | Q0507: What are the main differences between using an Exim filter and using |
| 3408 | \^procmail^\? |
| 3409 | |
| 3410 | A0507: Exim filters and \^procmail^\ provide different facilities. Exim filters run |
| 3411 | at routing time, before any deliveries are done. A filter is like a |
| 3412 | ``\(.forward)\ file with conditions''. One of the benefits is de-duplication. |
| 3413 | Another is that if you forward, you are forwarding the original message. |
| 3414 | |
| 3415 | However, this does mean that pipes etc. are not run at filtering time, |
| 3416 | nor can you change the headers, because the message may have other |
| 3417 | recipients and Exim keeps only a single set of headers. |
| 3418 | |
| 3419 | \^procmail^\ runs at delivery time. This is for one recipient only, and so |
| 3420 | it can change headers, run pipes and check the results, etc. However, if |
| 3421 | it wants to forward, it has to create a new message containing a copy |
| 3422 | of the original message. |
| 3423 | |
| 3424 | It's your choice as to which of these you use. You can of course use |
| 3425 | both. |
| 3426 | |
| 3427 | |
| 3428 | Q0508: How can I allow the use of relative paths in users' filter files when |
| 3429 | the directories concerned are not available from the password data? |
| 3430 | |
| 3431 | A0508: You need to be running Exim 4.11 or later. You can then specify a value |
| 3432 | for \$home$\ by setting the router_home_directory option on the |
| 3433 | \%redirect%\ router. |
| 3434 | |
| 3435 | For earlier releases, there is no way to specify the value of \$home$\ |
| 3436 | for a \%redirect%\ router; it either comes from the password data as a |
| 3437 | result of \check_local_user\, or is unset. |
| 3438 | |
| 3439 | |
| 3440 | Q0509: How can I set up a filter file to detect and block virus attachments? |
| 3441 | |
| 3442 | A0509: Exim's filter facilities aren't powerful enough to do much more than |
| 3443 | very crude testing. Most people that want virus checking are nowadays |
| 3444 | using one of the separate scanning programs such as \^exiscan^\ (see |
| 3445 | \?http://duncanthrax.net/exiscan/?\). There is some further information |
| 3446 | about scanning with Exim via \?http://www.timj.co.uk/linux/exim.php?\. |
| 3447 | |
| 3448 | |
| 3449 | Q0510: Is it possible to write code for scanning messages in Python? |
| 3450 | |
| 3451 | A0510: \^elspy^\ is a layer of glue code that enables you to write Python code |
| 3452 | to scan email messages at SMTP time. \^elspy^\ also includes a small |
| 3453 | Python library with common mail-scanning tools, including an interface |
| 3454 | to SpamAssassin and a simple but effective virus detector. You can |
| 3455 | optain \^elspy^\ from \?http://elspy.sourceforge.net/?\. |
| 3456 | |
| 3457 | |
| 3458 | Q0511: Whenever my system filter uses a \mail\ command to send a message, I get |
| 3459 | the error \*User 0 set for address_reply transport is on the never_users |
| 3460 | list*\. What does this mean? |
| 3461 | |
| 3462 | A0511: The system filter runs as \/root/\ in Exim 4, unless you set |
| 3463 | \system_filter_user\ to specify otherwise. When you set up a delivery |
| 3464 | direct from a system filter (an autoreply is a special kind of |
| 3465 | ``delivery'') the transport runs as the same user, unless it has a |
| 3466 | \user\ setting of its own. Normally, deliveries are not allowed to run |
| 3467 | as \/root/\ as a security precaution; this is implemented by the |
| 3468 | \never_users\ option (see Q0039). |
| 3469 | |
| 3470 | The easiest solution is to add this to your configuration: |
| 3471 | |
| 3472 | ==> system_filter_user = exim |
| 3473 | |
| 3474 | The system filter then runs as \/exim/\ instead of \/root/\. |
| 3475 | Alternatively, you can arrange for autoreplies from the system filter to |
| 3476 | use a special transport of their own, and set the \user\ option on that |
| 3477 | transport. |
| 3478 | |
| 3479 | |
| 3480 | Q0512: I'm trying to reference the ::Envelope-To:: header in my filter, but |
| 3481 | \$h_envelope-to:$\ is always empty. |
| 3482 | |
| 3483 | A0512: ::Envelope-To:: is added at delivery time, by the transport. Therefore, |
| 3484 | the header doesn't exist at filter time. In a user filter, the values |
| 3485 | you probably want are in \$original_local_part$\ and |
| 3486 | \$original_domain$\. In a system filter, the complete list of all |
| 3487 | envelope recipients is in \$recipients$\. |
| 3488 | |
| 3489 | |
| 3490 | Q0513: I want my system filter to freeze all mails greater than 500K in size, |
| 3491 | but to exclude those to a specific domain. However, I don't seem to be |
| 3492 | able to use \$domain$\ in a system filter. |
| 3493 | |
| 3494 | A0513: You cannot do this in a system filter, because a single message may have |
| 3495 | multiple recipients, some in the special domain, and some not. That is |
| 3496 | also the reason why \$domain$\ is not set in a system filter. |
| 3497 | |
| 3498 | If you want to take actions on a per-recipient basis, you have to do it |
| 3499 | in a router. However, freezing is not appropriate, because freezing |
| 3500 | stops all deliveries. You could, however, delay delivery to all but the |
| 3501 | special domains by using something like this: |
| 3502 | |
| 3503 | ==> delay_if_too_big: |
| 3504 | driver = redirect |
| 3505 | domains = !the.special.domain |
| 3506 | condition = ${if >{$message_size}{500K}{yes}{no}} |
| 3507 | allow_defer |
| 3508 | data = :defer: message too big. |
| 3509 | |
| 3510 | However, there isn't an easy way of ``releasing'' such messages at |
| 3511 | present. |
| 3512 | |
| 3513 | |
| 3514 | Q0514: When I try to send to two addresses I get an error in the filter |
| 3515 | file \*malformed address: , e@fgh.com may not follow a@bcd.com*\. What |
| 3516 | is going on? |
| 3517 | |
| 3518 | A0514: Have you got |
| 3519 | |
| 3520 | ==> deliver "a@bcd.com, e@fgh.com" |
| 3521 | |
| 3522 | in your filter? If so, that is your problem. You should have |
| 3523 | |
| 3524 | ==> deliver a@bcd.com |
| 3525 | deliver e@fgh.com |
| 3526 | |
| 3527 | Each \deliver\ command expects just one address. |
| 3528 | |
| 3529 | |
| 3530 | |
| 3531 | 6. DELIVERY |
| 3532 | |
| 3533 | Q0601: What does the error \*Neither the xxx router nor the yyy transport set |
| 3534 | a uid for local delivery of...*\ mean? |
| 3535 | |
| 3536 | A0601: Whenever Exim does a local delivery, it runs a process under a specific |
| 3537 | user and group id (uid and gid). For deliveries into mailboxes, and to |
| 3538 | pipes and files set up by forwarding, it normally picks up the uid/gid |
| 3539 | of the receiving user. However, if an address is directed to a pipe or a |
| 3540 | file by some other means, such an entry in the system alias file of the |
| 3541 | form |
| 3542 | |
| 3543 | ==> majordomo: |/local/mail/majordomo ... |
| 3544 | |
| 3545 | then Exim has to be told what uid/gid to use for the delivery. This can |
| 3546 | be done either on the routerr that handles the address, or on the |
| 3547 | transport that actually does the delivery. If a pipe is going to run a |
| 3548 | setuid program, then it doesn't matter what uid Exim starts it out with, |
| 3549 | and so the most straightforward thing is to put |
| 3550 | |
| 3551 | ==> user = exim |
| 3552 | |
| 3553 | on either the router or the transport. A setting on the transport |
| 3554 | overrides a setting on the router, so if the same transport is being |
| 3555 | used with several routers, you should set the user on it only if you |
| 3556 | want the same uid to be used in all cases. |
| 3557 | |
| 3558 | In the default configuration, the transports used for file and pipe |
| 3559 | deliveries are the ones called \address_file\ and \address_pipe\. You |
| 3560 | can specify different transports by setting, for example, |
| 3561 | |
| 3562 | ==> pipe_transport = special_pipe_transport |
| 3563 | |
| 3564 | on the \%system_aliases%\ router. Then you can set up \%special_pipe_transport%\ |
| 3565 | |
| 3566 | ==> special_pipe_transport: |
| 3567 | driver = pipe |
| 3568 | user = ???? |
| 3569 | |
| 3570 | which will be used only for pipe deliveries from that one router. |
| 3571 | What you put for the ???? is up to you, and depends on the particular |
| 3572 | circumstances. |
| 3573 | |
| 3574 | |
| 3575 | Q0602: Exim keeps crashing with segmentation errors (signal 11 or 139) during |
| 3576 | delivery. This seems to happen when it is about to contact a remote |
| 3577 | host or when a delivery is deferred. |
| 3578 | |
| 3579 | A0602: This could be a problem with Exim's databases. Try running a delivery |
| 3580 | with debugging turned on. If the last line of the debug output is |
| 3581 | something like this: |
| 3582 | |
| 3583 | ==> locked /var/spool/exim/db/retry.lockfile |
| 3584 | |
| 3585 | the crash is happening inside the DBM library. Check that your DBM |
| 3586 | library is correctly installed. In particular, if you have installed a |
| 3587 | second DBM library onto a system that already had one, check that its |
| 3588 | version of \(ndbm.h)\ is being seen first. For example, if the new |
| 3589 | version is in \(/usr/local/include)\, check that there isn't another |
| 3590 | version in \(/usr/include)\. If you are using Berkeley db, you can set |
| 3591 | |
| 3592 | ==> USE_DB=yes |
| 3593 | |
| 3594 | in your \(Local/Makefile)\ to avoid using \(ndbm.h)\ altogether. This is |
| 3595 | particularly relevant for version 2 (or later) of Berkeley db, because |
| 3596 | no \(ndbm.h)\ file is distributed with it. Another thing you can try is |
| 3597 | to run |
| 3598 | |
| 3599 | ==> exim_dumpdb /var/spool/exim retry |
| 3600 | |
| 3601 | to see if it also crashes, or build the \^test_dbfn^\ tool and fiddle |
| 3602 | around with it. If both fail, it is most almost certainly a problem with |
| 3603 | your DBM library. You could try to update it, or force Exim to use |
| 3604 | another library. See the file \(doc/dbm.discuss.txt)\ for hints about |
| 3605 | this. |
| 3606 | |
| 3607 | |
| 3608 | Q0603: How can mails that are being routed through routers that do not set |
| 3609 | \check_local_user\ be delivered under the uid of the recipient? |
| 3610 | |
| 3611 | A0603: Q0601 contains background information on this. If you are using, say, an |
| 3612 | alias file to direct messages to specific mailboxes, you can use |
| 3613 | the \user\ option on either the router or the transport to set the uid. |
| 3614 | What you put in the setting depends on how the required uid is to be |
| 3615 | found. It could be looked up in a file or computed somehow from the |
| 3616 | local part, for example. |
| 3617 | |
| 3618 | |
| 3619 | Q0604: I want to use MMDF-style mailboxes. How can I get Exim to append the |
| 3620 | ctrl-A characters that separate indvidual emails? |
| 3621 | |
| 3622 | A0604: Set the \message_suffix\ option in the \%appendfile%\ transport. In fact, |
| 3623 | for MMDF mailboxes you need a prefix as well as a suffix to get it |
| 3624 | working right, so your transport should contain these settings: |
| 3625 | |
| 3626 | ==> message_prefix = "\1\1\1\1\n" |
| 3627 | message_suffix = "\1\1\1\1\n" |
| 3628 | |
| 3629 | Also, you need to change the \check_string\ and \escape_string\ settings so |
| 3630 | that the escaping happens for lines in the message that happen to begin |
| 3631 | with the MMDF prefix or suffix string, rather than ``From'' (the default): |
| 3632 | |
| 3633 | ==> check_string = "\1\1\1\1\n" |
| 3634 | escape_string = "\1\1\1\1 \n" |
| 3635 | |
| 3636 | Adding a space to the line is sufficient to prevent it being taken as a |
| 3637 | separator. |
| 3638 | |
| 3639 | |
| 3640 | Q0605: If a user's mailbox is over quota, is there a way for me to set it up so |
| 3641 | that the mail bounces to the sender and is not stored in the mail queue? |
| 3642 | |
| 3643 | A0605: In the retry section of the configuration, put |
| 3644 | |
| 3645 | ==> *@your.dom.ain quota |
| 3646 | |
| 3647 | That is, provide no retry timings for over quota errors. They will then |
| 3648 | bounce immediately. Alternatively, you can set up retries for a short |
| 3649 | time only, or use something like this: |
| 3650 | |
| 3651 | ==> *@your.dom.ain quota_7d |
| 3652 | *@your.dom.ain quota F,2h,15m; F,3d,1h |
| 3653 | |
| 3654 | which bounces immediately if the user's mailbox hasn't been read for 7 |
| 3655 | days, but otherwise tries for up to 3 days after the first quota |
| 3656 | failure. |
| 3657 | |
| 3658 | |
| 3659 | Q0606: I'm using tmail to do local deliveries, but when I turned on the |
| 3660 | \use_crlf\ option on the \%pipe%\ transport (tmail prefers \"@\r@\n"\ |
| 3661 | terminations) message bodies started to vanish. |
| 3662 | |
| 3663 | A0606: You need to unset the \mesage_prefix\ option, or change it so that its |
| 3664 | default \"@\n"\ terminator becomes \"@\r@\n"\. For example, the |
| 3665 | transport could be: |
| 3666 | |
| 3667 | ==> local_delivery_mbx: |
| 3668 | driver = pipe |
| 3669 | command = /usr/local/bin/tmail $local_part |
| 3670 | user = exim |
| 3671 | current_directory = / |
| 3672 | use_crlf |
| 3673 | message_prefix = |
| 3674 | |
| 3675 | The reason for this is as follows: tmail uses the line terminator on |
| 3676 | the first line it sees to determine whether lines are terminated by |
| 3677 | \"@\r@\n"\ or \"@\n"\. If the latter, it moans to stderr and changes subsequent |
| 3678 | \"@\n"\ terminators to \"@\r@\n"\. The default setting of the \message_prefix\ |
| 3679 | option is \"From ...@\n"\, and this is unaffected by the \use_crlf\ option. |
| 3680 | If you don't change this, tmail sees the first line terminated by |
| 3681 | \"@\n"\ and prepends \"@\r"\ to the \"@\n"\ terminator on all subsequent |
| 3682 | lines. However, if \use_crlf\ is set, Exim makes all other lines |
| 3683 | \"@\r@\n"\ terminated, leading to doubled \"@\r@\r@\n"\ lines and |
| 3684 | corrupt mbx mailboxes. |
| 3685 | |
| 3686 | |
| 3687 | Q0607: When I activate ``return receipt'' for example in Netscape Mailbox |
| 3688 | sending options, then I get an error message from Exim... something |
| 3689 | like \*not supported*\. Can I activate delivery confirmations? |
| 3690 | |
| 3691 | A0607: Exim does not support any kind of delivery notification. |
| 3692 | |
| 3693 | (1) You can configure it to recognize headers such as |
| 3694 | \Return-receipt-to:\ if you wish. |
| 3695 | |
| 3696 | (2) Some people want MSN (message status notification). Such services |
| 3697 | are implemented in MUAs, and don't impact on the MTA at all. |
| 3698 | |
| 3699 | (3) I investigated the RFCs which describe the DSN (delivery status |
| 3700 | notification) system. However, I was unable to specify any sensible way |
| 3701 | of actually doing anything with the data. There were comments on the |
| 3702 | mailing list at the time; many people, including me, conclude that DSN |
| 3703 | is in practice unworkable. The killer problem is with forwarding and |
| 3704 | aliasing. Do you propagate the DSN data with the generated addresses? |
| 3705 | Do you send back a ``reached end of the DSN world'' or ``expanded'' message? |
| 3706 | Do you do this differently for different kinds of aliasing/forwarding? |
| 3707 | For a user who has a \(.forward)\ file with a single address in, this |
| 3708 | might seem easy - just propagate the data. But what if there are several |
| 3709 | forwardings? If you propagate the DSN data, the sender may get back |
| 3710 | several DSN messages - and should the sender really know about the |
| 3711 | detail of the receiver's forwarding arrangements? There isn't really |
| 3712 | any way to distinguish between a \(.forward)\ file that is forwarding |
| 3713 | and one that is a mini mailing list. And so on, and so on. There are so |
| 3714 | many questions that don't have obvious answers. |
| 3715 | |
| 3716 | |
| 3717 | Q0608: What does the message \*retry time not reached [for any host]*\ on the log |
| 3718 | mean? Why won't Exim try to deliver the message? |
| 3719 | |
| 3720 | A0608: That is not an error. It means exactly what it says. A previous attempt |
| 3721 | to deliver to that address failed with a temporary error, and Exim |
| 3722 | computed the earliest time at which to try again. This can apply to |
| 3723 | local as well as to remote deliveries. For remote deliveries, each host |
| 3724 | (if there are several) has its own retry time. |
| 3725 | |
| 3726 | If you are running on a dial-up host, the rest of this answer probably |
| 3727 | does not apply to you. Go and read Q1404 instead. If your host is |
| 3728 | permanently online, read on... |
| 3729 | |
| 3730 | Some MTAs have a retrying schedule for each message. Exim does not work |
| 3731 | like this. Retry timing is normally host-based for remote deliveries and |
| 3732 | address-based for local deliveries. (There are some exceptions for certain |
| 3733 | kinds of remote failure - see \*Errors in outgoing SMTP*\ in the manual.) |
| 3734 | |
| 3735 | If a new message arrives for a failing address and the retry time has |
| 3736 | not yet arrived, Exim will log \*retry time not reached*\ and leave the |
| 3737 | message on the queue, without attempting delivery. Similarly, if a queue |
| 3738 | runner notices the message before the time to retry has arrived, it |
| 3739 | writes the same log entry. When the retry time has past, Exim attempts |
| 3740 | delivery at the next queue run. If you want to know when that will be, |
| 3741 | run the exinext utility on the address, for example: |
| 3742 | |
| 3743 | ==> exinext user@some.domain |
| 3744 | |
| 3745 | You can suppress these messages on the log by including \"-retry_defer"\ |
| 3746 | in the setting of \log_selector\. You can force a delivery attempt on a |
| 3747 | specific message (overriding the retry time) by means of the -M option: |
| 3748 | |
| 3749 | ==> exim -M 10hCET-0000Bf-00 |
| 3750 | |
| 3751 | If you want to do this for the entire queue, use the \-qf-\ option. |
| 3752 | |
| 3753 | |
| 3754 | Q0609: Exim seems to be sending the same message twice, according to the log, |
| 3755 | although there is a difference in capitalization of the local part of |
| 3756 | the address. |
| 3757 | |
| 3758 | A0609: That is correct. The RFCs are explicit in stating that capitalization |
| 3759 | matters for local parts. For remote domains, Exim is not entitled to |
| 3760 | assume case independence of local parts. I know, it is utterly silly, |
| 3761 | and it causes a lot of grief, but that's what the rules say. Here is a |
| 3762 | quote from RFC 2821: |
| 3763 | |
| 3764 | ... a command verb, an argument value other than a mailbox local-part, |
| 3765 | and free form text MAY be encoded in upper case, lower case, or any |
| 3766 | mixture of upper and lower case with no impact on its meaning. This |
| 3767 | is NOT true of a mailbox local-part. The local-part of a mailbox |
| 3768 | MUST BE treated as case sensitive. Therefore, SMTP implementations |
| 3769 | MUST take care to preserve the case of mailbox local-parts. Mailbox |
| 3770 | domains are not case sensitive. In particular, for some hosts the |
| 3771 | user "smith" is different from the user "Smith". However, exploiting |
| 3772 | the case sensitivity of mailbox local-parts impedes interoperability |
| 3773 | and is discouraged. |
| 3774 | |
| 3775 | |
| 3776 | Q0610: How can I force the next retry time for a host to be now? |
| 3777 | |
| 3778 | A0610: You can change the retry time with the \^exim_fixdb^\ utility, but its |
| 3779 | interface is very clumsy. If you have a message for the host on the |
| 3780 | queue, the simplest thing to do is to force a delivery with the \-M-\ |
| 3781 | command line option. If delivery succeeds, the retry data will get |
| 3782 | cleared. If the host is past the cutoff time, so that messages are |
| 3783 | bouncing immediately without trying a delivery, you can use \-odq-\ to |
| 3784 | put a message on the queue without a delivery attempt, and then use |
| 3785 | \-M-\ on it. |
| 3786 | |
| 3787 | |
| 3788 | Q0611: I set up \"|/bin/grep Subject|/usr/bin/smbclient -M <netbiosname>"\ as an |
| 3789 | alias but it doesn't work. |
| 3790 | |
| 3791 | A0611: That is a shell command line. Exim does not run pipe commands under a |
| 3792 | shell by default (for added security - and it saves a process). You |
| 3793 | need something like |
| 3794 | |
| 3795 | ==> "|/bin/sh -c '/bin/grep Subject|/usr/bin/smbclient -M <netbiosname>'" |
| 3796 | |
| 3797 | |
| 3798 | Q0612: Why does the \%pipe%\ transport add a line starting with \">From"\ to |
| 3799 | messages? |
| 3800 | |
| 3801 | A0612: Actually, it adds a line starting with \"From"\ followed by a space. |
| 3802 | This is commonly referred to as the \"From_"\ line, to emphasize the |
| 3803 | fact that \"From"\ is followed by a space and not a colon. This is a |
| 3804 | pseudo-header line that contains the envelope sender address and the |
| 3805 | time of delivery. It originated as a separator line in Berkeley format |
| 3806 | mailboxes, but is also used in other contexts. (And yes, it is often |
| 3807 | confused with the ::From:: header line, and this causes a lot of grief. |
| 3808 | The use of \"From_"\ was one of the really bad email design decisions.) |
| 3809 | |
| 3810 | Exim's \%pipe%\ transport adds this pseudo-header line by default |
| 3811 | because \(/usr/ucb/vacation)\ needs it, and that is one of the the most |
| 3812 | common uses of piping. The \^procmail^\ local delivery agent also makes |
| 3813 | use of the \"From_"\ line. If you do not want it, change the setting of |
| 3814 | \message_prefix\ on the \%pipe%\ transport. For example, to remove the |
| 3815 | line altogether, use |
| 3816 | |
| 3817 | ==> message_prefix = |
| 3818 | |
| 3819 | If you are not piping to \(/usr/ucb/vacation)\ or \^procmail^\, it is |
| 3820 | likely that you do not need a \"From_"\ line, and indeed it may cause |
| 3821 | problems if it is present. |
| 3822 | |
| 3823 | One user reported that this line gave trouble when a pipe was used to |
| 3824 | send messages to Courier's \^deliverquota^\ program. The line was |
| 3825 | retained with the message, and caused problems for MS Exchange 2000 when |
| 3826 | retrieving messages with its built-in POP collector. Specifically, it |
| 3827 | caused Exchange to not be able to recognise message attachments. |
| 3828 | |
| 3829 | |
| 3830 | Q0613: I have set \fallback_hosts\ on my \%smtp%\ transport, but after the error |
| 3831 | \*sem@chat.ru cannot be resolved at this time*\ Exim isn't using them. |
| 3832 | |
| 3833 | A0613: \fallback_hosts\ works only if an attempt at delivery to the original |
| 3834 | host(s) fails. In this case, Exim couldn't even resolve the domain |
| 3835 | \(chat.ru)\ to discover what the original hosts were, so it never got as far |
| 3836 | as the transport. However, see Q0315 for a possible solution. |
| 3837 | |
| 3838 | |
| 3839 | Q0614: After the holidays my ISP has always hundreds of e-mails waiting for me. |
| 3840 | These are forced down Exim's throat in one go. Exim spawns a lot of |
| 3841 | kids, but is there some limit to the number of processes it creates? |
| 3842 | |
| 3843 | A0614: Unless you have changed \smtp_accept_queue_per_connection\ it should |
| 3844 | spawn only that many processes per connection (default 10). Your ISP |
| 3845 | may be making many connections, of course. That is limited by |
| 3846 | \smtp_accept_max\. |
| 3847 | |
| 3848 | |
| 3849 | Q0615: When a message in the queue got to 12h old, Exim wrote \*retry timeout |
| 3850 | exceeded*\ and removed all messages in the queue to this host - even |
| 3851 | recent messages. How I can avoid this behaviour? I only want to remove |
| 3852 | messages that have exceeded the maximum retry time. |
| 3853 | |
| 3854 | A0615: Exim's retrying is host-based rather than message-based. The philosophy |
| 3855 | is that if a host has been down for a very long time, there is no point |
| 3856 | in keeping messages hanging around. However, you might like to check |
| 3857 | out \delay_after_cutoff\ in the \%smtp%\ transport. It doesn't do what you |
| 3858 | want, but it might help. |
| 3859 | |
| 3860 | |
| 3861 | Q0616: Can Exim add a ::Content-Length:: header to messages it delivers? |
| 3862 | |
| 3863 | A0616: You could include something like |
| 3864 | |
| 3865 | ==> headers_remove = "content-length" |
| 3866 | headers_add = "Content-Length: $message_body_size" |
| 3867 | |
| 3868 | to the \%appendfile%\ transport. However, the use of ::Content-Length:: can |
| 3869 | cause several problems, and is not recommended unless you really know |
| 3870 | what you are doing. There is a discussion of the problems in |
| 3871 | \?http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/content-length.html?\. |
| 3872 | |
| 3873 | |
| 3874 | Q0617: Exim seems to be trying to deliver a message every 10 minutes, though |
| 3875 | the retry rules specify longer times after a while, because it is |
| 3876 | writing a log entry every time, like this: |
| 3877 | |
| 3878 | ==> 1999-08-26 14:51:19 11IVsE-000MuP-00 == example@example.com T=smtp defer |
| 3879 | (-34): some host address lookups failed and retry time not reached for |
| 3880 | other hosts or connection limit reached |
| 3881 | |
| 3882 | A0617: It is looking at the message every 10 minutes, but it isn't actually |
| 3883 | trying to deliver. It's looking up \(example.com)\ in the DNS and finding |
| 3884 | this information: |
| 3885 | |
| 3886 | ==> example.com. MX 10 example-com.isp.example.com. |
| 3887 | example.com. MX 0 mail.example.com. |
| 3888 | mail.example.com. A 202.77.183.45 |
| 3889 | A lookup for example-com.isp.example.com. yielded NXDOMAIN |
| 3890 | |
| 3891 | The last line means that there is no address (A) record in the DNS for |
| 3892 | \(example-com.isp.example.com)\. That accounts for \*some host address |
| 3893 | lookups failed*\, but the retry time for \(mail.example.com)\ hasn't been |
| 3894 | reached, which accounts for \*retry time not reached for other hosts*\. |
| 3895 | |
| 3896 | |
| 3897 | Q0618: I am trying to set exim up to have a automatic failover if it sees that |
| 3898 | the system that it is sending all mail to is down. |
| 3899 | |
| 3900 | A0618: Add to the \%remote_smtp%\ transport the following: |
| 3901 | |
| 3902 | ==> fallback_hosts = failover.server.name(s) |
| 3903 | |
| 3904 | If there are several names, they must be separated by colons. |
| 3905 | |
| 3906 | |
| 3907 | Q0619: I can't get Exim to deliver over NFS. I get the error \*fcntl() failed: |
| 3908 | No locks available*\, though the lock daemon is running on the NFS server |
| 3909 | and other hosts are able to access it. |
| 3910 | |
| 3911 | A0619: Check that you have \(lockd)\ running on the NFS client. This is not |
| 3912 | always running by default on some systems (Red Hat is believed to be one |
| 3913 | such system). |
| 3914 | |
| 3915 | |
| 3916 | Q0620: Why does Exim bounce messages without even attempting delivery, giving |
| 3917 | the error \*retry time not reached for any host after a long failure |
| 3918 | period*\? |
| 3919 | |
| 3920 | A0620: This message means that all hosts to which the message could be sent |
| 3921 | have been failing for so long that the end of the retry period |
| 3922 | (typically 4 or 5 days) has been reached. In this situation, Exim still |
| 3923 | computes a next time to retry, but any messages that arrive in the |
| 3924 | meantime are bounced straight away. You can alter this behaviour by |
| 3925 | unsetting the \delay_after_cutoff\ option on the smtp transport. Then Exim |
| 3926 | will try most messages for those hosts once before giving up. |
| 3927 | |
| 3928 | |
| 3929 | Q0621: My \(.forward)\ file is \"|/usr/bin/procmail -f-"\ and mail gets delivered, |
| 3930 | but there was a bounce to the sender, sending him the output of procmail. |
| 3931 | How can I prevent this? |
| 3932 | |
| 3933 | A0621: Exim's default configuration is set up like this: |
| 3934 | |
| 3935 | ==> address_pipe: |
| 3936 | driver = pipe |
| 3937 | return_output |
| 3938 | |
| 3939 | The \return_output\ option requests that any output that the pipe |
| 3940 | produces be returned to the sender. That is the safest default. If you |
| 3941 | don't want this, you can either remove the option altogether, or change |
| 3942 | it to \return_fail_output\, to return output only if the command fails. |
| 3943 | Note that this will affect all pipes that users run, not just your |
| 3944 | procmail one. It might be better to arrange for procmail not to produce |
| 3945 | any output when it succeeds. |
| 3946 | |
| 3947 | |
| 3948 | Q0622: Can I write an ordinary file when I run a perl script as a transport |
| 3949 | filter for the \%remote_smtp%\ and \%address_pipe%\ transports? |
| 3950 | |
| 3951 | A0622: Yes, provided the file is writeable by the uid under which the transport |
| 3952 | runs (the Exim user in the case of the remote transport). However, if two |
| 3953 | messages are being delivered at once, their data will get mixed up in |
| 3954 | the file unless you implement your own locking scheme. If all you want |
| 3955 | to do is to take a copy of the message, another approach that avoids |
| 3956 | the locking problem is to use a system filter to set up an ``unseen'' |
| 3957 | delivery to a file. If you only want the message's headers, you can |
| 3958 | set \message_filter_file_transport\ to point to a special \%appendfile%\ |
| 3959 | transport that has \headers_only\ set. |
| 3960 | |
| 3961 | |
| 3962 | Q0623: My \(/var/spool/mail)\ has grown drastically. Is there any possibility of |
| 3963 | using two directories? |
| 3964 | |
| 3965 | A0623: You can use an expansion string to split mailboxes between two |
| 3966 | directories. For example, |
| 3967 | |
| 3968 | ==> file = /var/spool/mail${nhash_2:$local_part}/$local_part |
| 3969 | |
| 3970 | which does a hash on the local part, producing either 0 or 1, thereby |
| 3971 | using \(mail0) or \(mail1)\. But remember, the MUAs that read these mailboxes |
| 3972 | also have to know where they are. |
| 3973 | |
| 3974 | |
| 3975 | Q0624: Sendmail has a program called \^smrsh^\ that restricts what binaries |
| 3976 | can be run from sendmail aliases. Is there something like this in Exim ? |
| 3977 | |
| 3978 | A0624: Check out the \allow_commands\ option in the \%pipe%\ transport. |
| 3979 | |
| 3980 | |
| 3981 | Q0625: I wish to have large emails go out one at a time. |
| 3982 | |
| 3983 | A0625: One possibility is to set up a router that defers all large messages, |
| 3984 | except in queue runs. Since queue runners deliver just one |
| 3985 | message at a time, if you limited the number of simultaneous queue |
| 3986 | runners to 1, you would get the effect you wanted. A suitable router |
| 3987 | might be |
| 3988 | |
| 3989 | ==> defer_if_large_unless_queue_run: |
| 3990 | driver = redirect |
| 3991 | condition = ${if or{{queue_running}{<{$message_size}{200K}}}{no}{yes}} |
| 3992 | allow_defer |
| 3993 | data = :defer: too large for immediate delivery |
| 3994 | no_verify |
| 3995 | |
| 3996 | Of course, this would always delay any large message until the next |
| 3997 | queue runner, but if you run them fairly regularly, this shouldn't be a |
| 3998 | huge problem, and may even be desirable. Note the use of \no_verify\ to |
| 3999 | ensure that this router is not used when Exim is verifying addresses. |
| 4000 | |
| 4001 | |
| 4002 | Q0626: Exim can route local parts independent of their case, but the Cyrus LMTP |
| 4003 | daemon requires the correct case. How can I fix this? |
| 4004 | |
| 4005 | A0626: You need to rewrite the local part to the correct case before running |
| 4006 | the router that routes to Cyrus. For example, if you require all lower |
| 4007 | case, and your router is called \local_user\, put this router in front |
| 4008 | of it: |
| 4009 | |
| 4010 | ==> lowercase_local: |
| 4011 | driver = redirect |
| 4012 | redirect_router = local_user |
| 4013 | domains = +local_domains |
| 4014 | data = ${lc:$local_part}@$domain |
| 4015 | |
| 4016 | The setting of \redirect_router\ causes processing of the rewritten |
| 4017 | address to start at the next router, instead of the first router. See |
| 4018 | also Q0630 and Q0414, and see C045 for a more complete Cyrus |
| 4019 | configuration. |
| 4020 | |
| 4021 | |
| 4022 | Q0627: Is there a command I can send to Exim to retry all queued messages |
| 4023 | regardless of their retry schedule? |
| 4024 | |
| 4025 | A0627: The \-qff-\ option starts a queue runner that forces a delivery attempt |
| 4026 | for all messages, including frozen ones. If you use \-qf-\, frozen |
| 4027 | messages are skipped. |
| 4028 | |
| 4029 | |
| 4030 | Q0628: I have the default retry rule, which I thought meant that Exim should |
| 4031 | keep trying for four days, but it seems to be bouncing some messages |
| 4032 | immediately. |
| 4033 | |
| 4034 | A0628: See Q0615 and Q0620. |
| 4035 | |
| 4036 | |
| 4037 | Q0629: I'm having trouble with quotas and Courier, because Exim is not handling |
| 4038 | maildirsize files. |
| 4039 | |
| 4040 | A0629: You must be using an old version of Exim; it has supported maildirsize |
| 4041 | files since release 4.30. |
| 4042 | |
| 4043 | |
| 4044 | Q0630: How can I configure Exim to deliver to a Cyrus message store? |
| 4045 | |
| 4046 | A0630: (1) The reference manual contains an example that uses pipe delivery. |
| 4047 | |
| 4048 | (2) Here is a transport that uses LMTP delivery, assuming that |
| 4049 | \$local_part$\ contains the username: |
| 4050 | |
| 4051 | ==> cyrus_inbox: |
| 4052 | driver =lmtp |
| 4053 | user = cyrus |
| 4054 | socket = /var/cyrus/socket/lmtp |
| 4055 | |
| 4056 | (3) This is a transport that delivers direct to a non-inbox mailbox: |
| 4057 | |
| 4058 | ==> cyrus_mailbox: |
| 4059 | driver = pipe |
| 4060 | user = $local_part |
| 4061 | message_prefix = |
| 4062 | message_suffix = |
| 4063 | log_fail_output |
| 4064 | return_output |
| 4065 | command = "/usr/cyrus/bin/deliver -a $local_part \ |
| 4066 | -m <mailbox-name> $local_part" |
| 4067 | |
| 4068 | This delivers to the Cyrus mailbox \"user.$local_part.<mailbox-name>"\. |
| 4069 | Using \"user = $local_part"\ and \"-a $local_part"\ makes it work |
| 4070 | without needing an explicit `p' ACL set for `anyone' on the mailbox. |
| 4071 | |
| 4072 | |
| 4073 | Q0631: I would like to choose a retry rule based on on the sender rather than |
| 4074 | the recipient address. Is this possible? |
| 4075 | |
| 4076 | A0631: Yes. In release 4.43 and later releases, you can do this directly by |
| 4077 | adding a third item to a retry rule of the form "senders=<address |
| 4078 | list>". The retry timings themselves then become the fourth item. For |
| 4079 | example: |
| 4080 | |
| 4081 | ==> * * senders=: F,1h,30m |
| 4082 | |
| 4083 | would match all bounce messages. If the address list contains white |
| 4084 | space, it must be enclosed in quotes. For example: |
| 4085 | |
| 4086 | ==> a.domain timeout senders="x@b.dom : y@c.dom" G,8h,10m,1.5 |
| 4087 | |
| 4088 | If you are using an earlier release of Exim, you can still achieve the |
| 4089 | effect, but in a more complicated way. The address part of a retry rule |
| 4090 | is matched as a single-item address list. Such lists are always |
| 4091 | expanded, so you can use something like this: |
| 4092 | |
| 4093 | ==> "${if eq{$sender_address}{xxx}{*@*}{no@no}}" quota F,1h,10m; ... |
| 4094 | |
| 4095 | If the sender address is ``xxx'', the pattern expands to ``*@*'', which |
| 4096 | matches all recipient addresses; if you want to, you can make this a |
| 4097 | more restrictive pattern. If the sender address is not ``xxx'', the |
| 4098 | pattern expands to ``no@no'', which is assumed to be a recipient address |
| 4099 | that can never match, so the retry rule is skipped. |
| 4100 | |
| 4101 | |
| 4102 | Q0632: What does the error \*User 1 set for local_mbx_delivery transport is on |
| 4103 | the never_users list*\ mean? |
| 4104 | |
| 4105 | A0632: You have configured the \%local_mbx_delivery%\ to run as the user whose |
| 4106 | id (uid) is 1. However, this user is on the list defined by the |
| 4107 | \never_users\ runtime option, or the \\FIXED_NEVER_USERS\\ compile-time |
| 4108 | option. These are ``safety catch'' lists; Exim refuses to deliver to any |
| 4109 | user that is on them. The most common use of \never_users\ is to avoid |
| 4110 | doing any deliveries as \/root/\, but it can contain other uids. |
| 4111 | |
| 4112 | |
| 4113 | Q0633: Why is \$domain$\ not set in the \%smtp%\ transport? |
| 4114 | |
| 4115 | A0633: The \%smtp%\ transport can handle several recipient addresses at once. |
| 4116 | This happens by default if the host lists for the addresses are |
| 4117 | identical. A single copy of the message is sent, using multiple \\RCPT\\ |
| 4118 | commands to transmit multiple envelope recipients. The \$domain$\ |
| 4119 | variable is set in the \%smtp%\ transport only if all the recipient |
| 4120 | addresses have the same domain. You must have a case where several |
| 4121 | addresses with different domains resolve to the same set of hosts. |
| 4122 | |
| 4123 | If you want to restrict the transport so that it handles only a single |
| 4124 | domain at once (but still possibly with more than one recipient), set |
| 4125 | |
| 4126 | ==> multi_domain = false |
| 4127 | |
| 4128 | If you want to restrict the transport so that it handles only a single |
| 4129 | address at once, set |
| 4130 | |
| 4131 | ==> max_rcpt = 1 |
| 4132 | |
| 4133 | |
| 4134 | Q0634: How can I stop a local transport from trying to access the user's home |
| 4135 | directory, even when the delivery is to a file that is elsewhere? |
| 4136 | |
| 4137 | A0634: See answer (2) for Q0423. |
| 4138 | |
| 4139 | |
| 4140 | Q0635: The log message \*error ignored*\ appears after some delivery failures. |
| 4141 | What does it mean? |
| 4142 | |
| 4143 | A0635: This message is written when Exim fails to deliver a bounce message whose |
| 4144 | age is greater than \ignore_bounce_errors_after\. It indicates that the |
| 4145 | failing bounce message has been discarded. |
| 4146 | |
| 4147 | The same message is written after failed deliveries when a filter file |
| 4148 | uses the \noerror\ feature when setting up a delivery, or if a router |
| 4149 | has the setting |
| 4150 | |
| 4151 | ==> errors_to = <> |
| 4152 | |
| 4153 | Both of these specify that delivery failures are to be discarded. |
| 4154 | |
| 4155 | |
| 4156 | |
| 4157 | 7. POLICY CONTROLS |
| 4158 | |
| 4159 | Q0701: How do I block unwanted messages from outside my host? |
| 4160 | |
| 4161 | A0701: Exim uses Access Control Lists (ACLs) for controlling incoming mail from |
| 4162 | other hosts. A whole chapter in the reference manual is devoted to |
| 4163 | describing how they work. A wide variety of conditions can be imposed on |
| 4164 | incoming messages. |
| 4165 | |
| 4166 | The default Exim run time configuration contains an example of an ACL |
| 4167 | which blocks all relaying, and messages whose senders cannot be |
| 4168 | verified. This example is heavily commented and worth studying. |
| 4169 | |
| 4170 | |
| 4171 | Q0702: I don't want to block spam entirely; how can I inspect each message |
| 4172 | before deciding whether or not to deliver it? |
| 4173 | |
| 4174 | A0702: Wherever possible, inspection and rejection is best done automatically |
| 4175 | in an ACL, that is, before the message is accepted. If you want to |
| 4176 | verify manually each message that is classified as spam by an automatic |
| 4177 | check, you can arrange for a system filter to freeze such messages after |
| 4178 | they have been accepted. |
| 4179 | |
| 4180 | If, after inspection, you decide not to deliver the message, it is |
| 4181 | safest to discard it, using the \-Mrm-\ option. Use of the \-Mg-\ option |
| 4182 | to force a bounce carries the risk of ``collateral spam'' if the sender |
| 4183 | address is faked (as it usually is in spam). |
| 4184 | |
| 4185 | |
| 4186 | Q0703: How can I test that my spam blocks are working? |
| 4187 | |
| 4188 | A0703: The \-bh-\ option allows you to run a testing SMTP session as if from a |
| 4189 | given IP address. For example, |
| 4190 | |
| 4191 | ==> exim -bh 192.168.178.39 |
| 4192 | |
| 4193 | In addition to the normal SMTP replies, it outputs commentary about |
| 4194 | which tests have succeeded or failed. If you are not interested in the |
| 4195 | details, but just want to know if a particular sender at a particular IP |
| 4196 | address is able to mail to a particular recipient, you can use the |
| 4197 | \exim_checkaccess\ utility, which provides a ``packaged'' version of |
| 4198 | \-bh-\. You call it like this: |
| 4199 | |
| 4200 | ==> exim_checkaccess 192.168.53.23 recip@my.domain -f sender@some.domain |
| 4201 | |
| 4202 | If you don't give a sender, \"<>"\ is used (that it, it acts like a |
| 4203 | bounce message). |
| 4204 | |
| 4205 | |
| 4206 | Q0704: How can I test that Exim is correctly configured to use a DNS black list |
| 4207 | such as the Realtime Blackhole List (RBL)? |
| 4208 | |
| 4209 | A0704: The \-bh-\ option allows you to run a testing SMTP session as if from a |
| 4210 | given address. The \^exim_checkaccess^\ utility provides a more packaged |
| 4211 | version of this facility. You need to know a blocked IP address with |
| 4212 | which to test. Such a testing address is kindly provided by Russell |
| 4213 | Nelson: |
| 4214 | |
| 4215 | ==> linux.crynwr.com [192.203.178.39] |
| 4216 | |
| 4217 | You can also send mail to \(nelson@linux.crynwr.com)\ from the server |
| 4218 | whose RBL block you are testing. The robot that receives that email |
| 4219 | will attempt to send a piece of test email in reply. If your RBL block |
| 4220 | didn't work, you get a message to that effect. Regardless of whether the |
| 4221 | RBL block succeeds or not, it emails you the results of the SMTP |
| 4222 | conversation from a host that is not on the RBL, so you can see how your |
| 4223 | server looks from the view of someone on the RBL. |
| 4224 | |
| 4225 | |
| 4226 | Q0705: How can I use tcpwrappers in conjunction with Exim? |
| 4227 | |
| 4228 | A0705: Exim's own control facilities can do all that tcpwrappers can do. |
| 4229 | However, if you are already using tcpwrappers for other things it might |
| 4230 | be convenient to include Exim controls in the same place. |
| 4231 | |
| 4232 | First of all, ensure that Exim is built to call the tcpwrappers library, |
| 4233 | by including \\USE_TCPWRAPPERS=yes\\ in \(Local/Makefile)\. You also need to |
| 4234 | ensure that the header file \(tcpd.h)\ is available at compile time, and the |
| 4235 | \(libwrap.a)\ library is available at link time, typically by including it in |
| 4236 | \\EXTRALIBS\\. You may need to copy these two files from the tcpwrappers |
| 4237 | build directory to, for example, \(/usr/local/include)\ and \(/usr/local/lib)\, |
| 4238 | respectively. Then you could reference them by |
| 4239 | |
| 4240 | ==> CFLAGS=-I/usr/local/include |
| 4241 | EXTRALIBS=-L/usr/local/lib -lwrap |
| 4242 | |
| 4243 | in \(Local/Makefile)\. There are two ways to make use of the functionality, |
| 4244 | depending on how you have tcpwrappers set up. If you have it set up to |
| 4245 | use only one file, you ought to have something like: |
| 4246 | |
| 4247 | ==> /etc/hosts.allow: |
| 4248 | |
| 4249 | ==> exim : <client_list> : <allow_or_deny> |
| 4250 | |
| 4251 | For example: |
| 4252 | |
| 4253 | ==> exim : LOCAL 192.168.0. .friendly.domain special.host : ALLOW |
| 4254 | exim : ALL : DENY |
| 4255 | |
| 4256 | This allows connections from local hosts (chiefly //localhost//), from |
| 4257 | the subnet 192.168.0.0/24, from all hosts in \(*.friendly.domain)\, and |
| 4258 | from a specific host called \(special.host)\. All other connections are |
| 4259 | denied. If you have tcpwrappers set up to use two files, use the |
| 4260 | following: |
| 4261 | |
| 4262 | ==> /etc/hosts.allow: |
| 4263 | |
| 4264 | ==> exim : <client_list> |
| 4265 | |
| 4266 | ==> /etc/hosts.deny: |
| 4267 | |
| 4268 | ==> exim : <client_list> |
| 4269 | |
| 4270 | Read the \^hosts_access^\ man page for more ways of specifying clients, |
| 4271 | including ports, etc., and on logging connections. |
| 4272 | |
| 4273 | |
| 4274 | Q0706: How can I get POP-auth-before-relay (aka POP-before-SMTP) support in |
| 4275 | Exim? |
| 4276 | |
| 4277 | A0706: A cleaner way of authentication is to use the SMTP AUTH facility, which |
| 4278 | does not require a prior use of POP. However, it is possible to do what |
| 4279 | you have asked for: |
| 4280 | |
| 4281 | Exim 4 supports the ``whoson'' (\?http://whoson.sourceforge.net?\) |
| 4282 | facility for doing this. If you set this up, you can do the check in an |
| 4283 | Exim ACL by a statement like this: |
| 4284 | |
| 4285 | ==> require condition = \ |
| 4286 | ${lookup whoson {$sender_host_address}{yes}{no}} |
| 4287 | |
| 4288 | Otherwise you need to arrange for a list of permitted IP addresses to be |
| 4289 | maintained in a file or database, and use this in a \hosts\ condition in |
| 4290 | an ACL statement. An Exim user has published this recipe: |
| 4291 | |
| 4292 | \#\#\#\#\?http://www.zeiss.cx/memo/computer/linux/email/exim-s-a-p.html?\ |
| 4293 | |
| 4294 | Another Exim user submitted the following idea: |
| 4295 | |
| 4296 | Use a script to grab authenticated IP addresses from the log files of |
| 4297 | the POP3 and IMAP4 daemons. These are used to create files in the |
| 4298 | directory tree \(/var/db/popb4smtp)\. The existence of a file represents a |
| 4299 | valid ``popped recently token'' for the IP address used as the filename. |
| 4300 | |
| 4301 | Another script periodically removes stale files from the tree (after two |
| 4302 | hours). There's a small race condition here; it's possible for a file |
| 4303 | to be deleted just after it has been updated by the script that watches |
| 4304 | the logs. For low-volume servers, the odds of hitting this window are |
| 4305 | low. |
| 4306 | |
| 4307 | A POPB4SMTP_CLIENT macro in the Exim configure file provides a reusable |
| 4308 | ``has this sender popped recently?'' query: |
| 4309 | |
| 4310 | ==> POPB4SMTP_SUBDIR = /var/db/popb4smtp/${substr_-1_1:$sender_host_address} |
| 4311 | POPB4SMTP_CLIENT = ${if exists {POPB4SMTP_SUBDIR/$sender_host_address} \ |
| 4312 | {$sender_host_address} {0} } |
| 4313 | |
| 4314 | Now you can use it just about anywhere, including in your ACLs. Simple |
| 4315 | examples include: |
| 4316 | |
| 4317 | ==> hostlist relay_hosts = 127.0.0.1/32 : ... : POPB4SMTP_CLIENT |
| 4318 | host_lookup = !127.0.0.1/32 : ... : !POPB4SMTP_CLIENT |
| 4319 | rfc1413_hosts = !127.0.0.1/32 : ... : !POPB4SMTP_CLIENT |
| 4320 | |
| 4321 | The two scripts (and a FreeBSD startup script for them) are available |
| 4322 | for download at: |
| 4323 | |
| 4324 | \#\#\#\#\?http://people.FreeBSD.org/~sheldonh/popb4smtp-nodb.tar.gz?\ |
| 4325 | |
| 4326 | |
| 4327 | Q0707: I have one or two cases where my host correctly rejects messages, but |
| 4328 | the remote host is quite persistent, and keeps trying over and over. |
| 4329 | |
| 4330 | A0707: It is an unfortunate fact that a number of SMTP clients, in violation of |
| 4331 | the SMTP RFC, do not treat a permanent error code that is given after |
| 4332 | the DATA portion of the transaction as a permanent error. Consequently |
| 4333 | they keep resending the message, and the worst offenders do so at very |
| 4334 | short intervals. |
| 4335 | |
| 4336 | The only way to stop such behaviour is to blacklist the IP address, or |
| 4337 | the envelope sender, or both, in such a way that future messages get |
| 4338 | rejected at RCPT time instead of at DATA time. You could also complain |
| 4339 | to the remote host's administrators. |
| 4340 | |
| 4341 | |
| 4342 | Q0708: How can I run customized verification checks on incoming addresses? |
| 4343 | |
| 4344 | A0708: There are a number of possibilities: |
| 4345 | |
| 4346 | (1) If you can implement your checks in Perl, you can use Exim's |
| 4347 | facility for running an embedded Perl interpreter. For example, if you |
| 4348 | want to run special checks on local addresses, you could use ACL |
| 4349 | an statement like this: |
| 4350 | |
| 4351 | ==> require domains = my.local.domain |
| 4352 | condition = ${perl{verify}{$local_part}} |
| 4353 | |
| 4354 | The result of the Perl function should be ``yes'' or ``no''. |
| 4355 | |
| 4356 | (2) You could also run an external program in a similar way, by a |
| 4357 | statement such as: |
| 4358 | |
| 4359 | ==> require domains = my.local.domain |
| 4360 | condition = ${run{/my/verifier $local_part}} |
| 4361 | |
| 4362 | This requires the use of another process, so could prove more expensive |
| 4363 | than Perl. |
| 4364 | |
| 4365 | (3) If you are prepared to write C code, read the chapter in the manual |
| 4366 | entitled \*Adding a local scan function to Exim*\. |
| 4367 | |
| 4368 | |
| 4369 | Q0709: Does Exim apply RBL checks to error messages, those with an envelope |
| 4370 | sender of \"<>"\ ? |
| 4371 | |
| 4372 | A0709: This depends on the ACL configuration. You can test for bounce messages |
| 4373 | (by looking for an empty sender address) and thereby exclude them from |
| 4374 | RBL checking if you want. This ACL statement does that: |
| 4375 | |
| 4376 | ==> deny senders = ! : |
| 4377 | dnslist = blackholes.mail-abuse.org |
| 4378 | |
| 4379 | However, some spam does come with an empty sender address, so this may |
| 4380 | not be a good idea. |
| 4381 | |
| 4382 | |
| 4383 | Q0710: I want to reject certain sender-recipient combinations, with a specific |
| 4384 | message for each such combination. |
| 4385 | |
| 4386 | A0710: Set up a file (or database) containing the messages, keyed by the |
| 4387 | combination, for example: |
| 4388 | |
| 4389 | ==> sender1@sdomain1=>recipient1@rdomain1: blocked because... |
| 4390 | sender2@sdomain2=>recipient2@rdomain2: blocked because... |
| 4391 | |
| 4392 | If you have lots of recipients for the same sender, it might be easier |
| 4393 | to generate this file from more convenient data. In your ACL that is run |
| 4394 | for each RCPT command, you can then put: |
| 4395 | |
| 4396 | ==> deny message = ${lookup{$sender_address=>$local_part@$domain}\ |
| 4397 | lsearch{/that/file}} |
| 4398 | condition = ${lookup{$sender_address=>$local_part@$domain}\ |
| 4399 | lsearch{/that/file}{yes}{no}} |
| 4400 | |
| 4401 | The condition is tested first. If the lookup succeeds, the condition |
| 4402 | succeeds so access is denied. The message is then expanded, but the |
| 4403 | lookup won't be repeated, because Exim will have cached the previous |
| 4404 | result. |
| 4405 | |
| 4406 | This approach blocks only incoming SMTP messages. If you need to do |
| 4407 | similar blocks for messages that do not arrive over SMTP, you have to |
| 4408 | set up a suitable \%redirect%\ router with a \:fail:\ setting. |
| 4409 | |
| 4410 | |
| 4411 | Q0711: Will Exim allow me to create a file of regexs and match incoming |
| 4412 | external email to the list - and if a match is found file the offending |
| 4413 | message into a special location? Also is it possible to make Exim only |
| 4414 | filter parts of an incoming email - e.g. ignore large MIME attachments |
| 4415 | for example and only process text/plain? |
| 4416 | |
| 4417 | A0711: You can do some of this in a system filter. For example: |
| 4418 | |
| 4419 | ==> if $message_body matches <...some complicated regex...> or |
| 4420 | $message_body matches <...some other regex...> or |
| 4421 | $header_from: matches <...regex...> or |
| 4422 | etc. |
| 4423 | then |
| 4424 | save /some/special/file |
| 4425 | endif |
| 4426 | |
| 4427 | or instead of \"save"\ you could have \"deliver"\ (to some address) or |
| 4428 | \"pipe"\ (to some script). |
| 4429 | |
| 4430 | There isn't any mechanism for ignoring attachments, but \$message_body$\ |
| 4431 | only looks at the first n bytes of the body, where n defaults to 500 but |
| 4432 | can be changed. |
| 4433 | |
| 4434 | A more expensive alternative would be to run a Perl subroutine using the |
| 4435 | embedded Perl mechanism. If you passed over the message id, the Perl |
| 4436 | code could read the message files on the spool and implement any |
| 4437 | algorithm it liked for deciding what should be done. |
| 4438 | |
| 4439 | |
| 4440 | Q0712: I've hacked sendmail to make an ioctl call at the time of the SMTP RCPT |
| 4441 | command, to check if a user has exceeded their email quota. If they have |
| 4442 | I issue a temporary failure and a message - can I do this with Exim? |
| 4443 | |
| 4444 | A0712: If you can make this happen in Perl you can use the embedded Perl |
| 4445 | facility, and use it from a \condition\ condition in an ACL statement. |
| 4446 | You can also use the expansion facility to run an external program, but |
| 4447 | this uses more resources because it uses another process. |
| 4448 | |
| 4449 | |
| 4450 | Q0713: I'd like to pass all messages through a virus-scanning system before |
| 4451 | delivery. Can Exim do this? |
| 4452 | |
| 4453 | A0713: One way of achieving this is to deliver all messages via a pipe to a |
| 4454 | checking program that resubmits them for delivery in some private way |
| 4455 | that can be checked (e.g. on a specific SMTP port, or IP address). One |
| 4456 | possibility is to use the `received protocol` field that can be set |
| 4457 | for locally submitted mail via the \-oMr-\ command line option. This |
| 4458 | router sends all messages that are not from the local host and whose |
| 4459 | received protocol is not \"scanned-ok"\ to the \%virus_scan%\ transport: |
| 4460 | |
| 4461 | ==> vircheck: |
| 4462 | driver = accept |
| 4463 | transport = virus_scan |
| 4464 | condition = ${if or {{eq {$received_protocol}{scanned-ok}} \ |
| 4465 | {eq {$sender_host_address}{127.0.0.1}}}\ |
| 4466 | {0}{1}} |
| 4467 | |
| 4468 | One problem is that this approach, by default, scans the message for |
| 4469 | each recipient, not just once per message. However, you can set the |
| 4470 | \batch_max\ option on the transport to allow it to send a single copy |
| 4471 | for multiple recipients. |
| 4472 | |
| 4473 | The virus_scan transport should be set up to pipe the message to a |
| 4474 | suitable checking program or script which runs as a trusted user. This |
| 4475 | can then re-submit the message to Exim, using \-oMr-\ to set the received |
| 4476 | protocol to \"scanned-ok"\. It is probably easiest to use the Batch SMTP |
| 4477 | (BSMTP) facilities for passing the sender address and the recipient |
| 4478 | addresses to the checker and then back to Exim (using the \-bS-\ |
| 4479 | command line option). \**Warning:**\ If you forget to make the |
| 4480 | resubmitting process run as a trusted user, the sender address will be |
| 4481 | incorrect and what is worse, the received protocol does not get set, and |
| 4482 | you are likely to generate a loop. |
| 4483 | |
| 4484 | |
| 4485 | Q0714: Is there a way to configure Exim to reject mail to a certain local host? |
| 4486 | |
| 4487 | A0714: No, only to certain domains. To reject at SMTP time, you can put a line |
| 4488 | like this in your ACL: |
| 4489 | |
| 4490 | ==> deny message = this domain is deliberately rejected |
| 4491 | domains = a.certain.domain |
| 4492 | |
| 4493 | To fail addresses in messages that do not arrive over SMTP, you can set |
| 4494 | up a router like this: |
| 4495 | |
| 4496 | ==> reject_a_certain_domain: |
| 4497 | driver = redirect |
| 4498 | domains = a.certain.domain |
| 4499 | allow_fail |
| 4500 | data = :fail: this domain is deliberately rejected |
| 4501 | |
| 4502 | |
| 4503 | Q0715: How can I get Exim to remove attachments from messages? |
| 4504 | |
| 4505 | A0715: Exim does not contain facilities for modifying messages. You must use |
| 4506 | an external program if you want to do this. You can route messages that |
| 4507 | have a ::Content-type:: header line via a pipe to a command that does |
| 4508 | the job and then re-submits the message to Exim. Alternatively, you |
| 4509 | could use a transport filter to do this job. |
| 4510 | |
| 4511 | |
| 4512 | Q0716: How can I arrange for each user to have a file listing the only sender |
| 4513 | addresses from which she will accept mail? I want to do this so my |
| 4514 | family members don't get any spam (or other inappropriate mail). |
| 4515 | |
| 4516 | A0716: Let's assume each user has a file called \(.acceptlist)\ in the home |
| 4517 | directory. You can put in your ACL a line like this: |
| 4518 | |
| 4519 | ==> require senders = /home/$local_part/.acceptlist |
| 4520 | |
| 4521 | This will reject RCPT commands when the sender is not in the accept |
| 4522 | list for the recipient. (Replace \(/home/$local_part)\ with whatever |
| 4523 | the correct path to your user's home directories is.) |
| 4524 | |
| 4525 | One problem with this is that it will block bounce messages, which have |
| 4526 | empty senders. You can get round this, by changing the line to this: |
| 4527 | |
| 4528 | ==> require senders = : /home/$local_part/.acceptlist |
| 4529 | |
| 4530 | However, this will, of course, let in spam that has a null sender. |
| 4531 | |
| 4532 | |
| 4533 | Q0717: When using Nessus on a system that runs Exim, a number of security |
| 4534 | issues are raised. Nessus complains that Exim answers to EXPN and/or |
| 4535 | VRFY; sometimes it even complains that Exim allows relaying. |
| 4536 | |
| 4537 | A0717: Exim supports EXPN and VRFY only if you permit it to do so in the ACLs |
| 4538 | defined by \acl_smtp_expn\ and \acl_smtp_vrfy\, respectively. Otherwise, |
| 4539 | its responses are |
| 4540 | |
| 4541 | ==> 550 Administrative prohibition |
| 4542 | 252 Administrative prohibition |
| 4543 | |
| 4544 | Maybe the use of 252 is the ``problem''. It is recommended that this be |
| 4545 | done (by those that discuss these things) because there are stupid |
| 4546 | clients that attempt VRFY before sending a message. |
| 4547 | |
| 4548 | |
| 4549 | Q0718: Could anyone points me to right rules to prevent sending/receiving |
| 4550 | messages to/for domains which have one MX to localhost or only have |
| 4551 | address 127.0.0.1 ? |
| 4552 | |
| 4553 | A0718: See Q0319. |
| 4554 | |
| 4555 | |
| 4556 | Q0719: I would like to have a per-user limit for the maximum size of messages |
| 4557 | that can be sent. |
| 4558 | |
| 4559 | A0719: The simplest way to do this is to put something in a system filter along |
| 4560 | these lines: |
| 4561 | |
| 4562 | ==> if $message_size is above |
| 4563 | "${lookup{$sender_address}lsearch{/some/file}{$value}{10M}}" |
| 4564 | then |
| 4565 | fail "Message is larger than $sender_address is allowed to send" |
| 4566 | endif |
| 4567 | |
| 4568 | In practice, an additional check that the message has arrived from your |
| 4569 | local host or local network is probably wise because sender addresses |
| 4570 | are easily forged. |
| 4571 | |
| 4572 | |
| 4573 | Q0720: I set \"accept hosts=192.168.122.96/32"\ in order to accept mail for |
| 4574 | relaying from my local LAN, but it doesn't work. What's wrong? |
| 4575 | |
| 4576 | A0720: 192.168.122.96/32 is not a network, it is a single host. Exim uses CIDR |
| 4577 | notation for specifying networks, where the number after the slash is |
| 4578 | the number of bits in the IP address that must match. Your setting says |
| 4579 | ``32 bits must match''. If you really mean to specify ``the next 32 |
| 4580 | IP addresses'', you need 192.168.122.96/27. |
| 4581 | |
| 4582 | |
| 4583 | Q0721: I have POP-before-SMTP set up on my Exim server, but some clients use |
| 4584 | Outlook Express, which sends queued messages before checking the |
| 4585 | mailbox, so it doesn't work. |
| 4586 | |
| 4587 | A0721: Implement SMTP authentication. |
| 4588 | |
| 4589 | |
| 4590 | Q0722: I installed Amavis and it is working, but bounces are simply vanishing. |
| 4591 | |
| 4592 | A0722: Check that you haven't inadvertently set up the transport like this: |
| 4593 | |
| 4594 | ==> amavis: |
| 4595 | driver = pipe |
| 4596 | command = "/usr/sbin/amavis -f ${sender_address} -d ${pipe_addresses}" |
| 4597 | |
| 4598 | The last line should be: |
| 4599 | |
| 4600 | ==> command = /usr/sbin/amavis -f <$sender_address> -d $pipe_addresses |
| 4601 | |
| 4602 | The important thing is the <> around the sender address; removal of |
| 4603 | the unnecessary "" and {} is just tidying. See the amavis FAQ at |
| 4604 | \?http://www.amavis.org/amavis-faq.php3?\. |
| 4605 | |
| 4606 | |
| 4607 | Q0723: I can't get Pine to work with PLAIN authentication; Exim keeps |
| 4608 | responding "535 Incorrect authentication data". |
| 4609 | |
| 4610 | A0723: You need to have this setting in your PLAIN authenticator: |
| 4611 | |
| 4612 | ==> server_prompts = : |
| 4613 | |
| 4614 | This is missing in the examples in early Exim documentation, because it |
| 4615 | was not realized that PLAIN authentication could be requested by a |
| 4616 | client without sending the data with the request. If the data is not |
| 4617 | sent, an empty prompt is expected. |
| 4618 | |
| 4619 | |
| 4620 | Q0724: I have used \":fail:"\ in some aliases; when one of these addresses is |
| 4621 | refused, I see the message on the log, but the response to the remote |
| 4622 | user is ``unknown user'' instead of the message from the alias file. |
| 4623 | How can I change this? |
| 4624 | |
| 4625 | A0724: Have you got a \message\ qualifier in the relevant ACL? Exim uses the |
| 4626 | message line in the ACL in preference to the message returned by the |
| 4627 | router. This is so you can restrict the amount of information that |
| 4628 | ``escapes'' from your site via SMTP if you want to. Remove the \message\ |
| 4629 | line in the ACL entry that has \"verify = recipient"\ and your message |
| 4630 | will get through. |
| 4631 | |
| 4632 | Alternatively, if you are running Exim 4.10 or later, you can use the |
| 4633 | \$acl_verify_message$\ variable in your message to include the message |
| 4634 | from the router. See also Q0725. |
| 4635 | |
| 4636 | |
| 4637 | Q0725: I've set up some specific rejection messages for certain recipients, but |
| 4638 | when I test them, the SMTP message is always \*550 5.1.1 |
| 4639 | <user@mydomain.com>... User unknown*\. |
| 4640 | |
| 4641 | A0725: That is not an Exim message (the ``5.1.1'' is a clue; Exim doesn't use |
| 4642 | those extended codes). You are probably being defeated by software that |
| 4643 | sees the 550 error code, and insists on putting in its own text. There |
| 4644 | is stupid software that does this. You can test Exim by using \-bh-\ or |
| 4645 | making a telnet call to the SMTP port. That way, there's no other |
| 4646 | software intervening. |
| 4647 | |
| 4648 | |
| 4649 | Q0726: My SMTP authentication can be bypassed by sending an unknown user name |
| 4650 | and an empty password. What is wrong with this condition in a PLAIN |
| 4651 | authenticator? |
| 4652 | |
| 4653 | ==> server_condition = ${if eq{$2} {${lookup mysql{SELECT password FROM \ |
| 4654 | accounts WHERE username='${local_part:$1}'}}}{1}{0}} |
| 4655 | |
| 4656 | A0726: Your lookup item returns an empty string when the user does not exist. |
| 4657 | You should instead arrange for the lookup to fail: |
| 4658 | |
| 4659 | ==> server_condition = ${if eq{$2} {${lookup mysql{SELECT password FROM \ |
| 4660 | accounts WHERE username='${local_part:$1}'}{$value}fail}}{1}{0}} |
| 4661 | |
| 4662 | |
| 4663 | Q0727: When a message has many recipients, how can I stop SpamAssassin from |
| 4664 | being called for each of them? I'm running it from a pipe transport. |
| 4665 | |
| 4666 | A0727: In the transport configuration, set \batch_max\ to a value greater than |
| 4667 | one. |
| 4668 | |
| 4669 | |
| 4670 | Q0728: How do I use Exiscan, SA-Exim, SpamAssassin, Clam Antivirus, Sophos |
| 4671 | SAVI, or sophie with Exim? |
| 4672 | |
| 4673 | A0728: There's a mini-HOWTO about these available via |
| 4674 | \?http://www.timj.co.uk/linux/exim.php?\. |
| 4675 | See also sample configuration C047. |
| 4676 | |
| 4677 | |
| 4678 | Q0729: How can I screen out addresses that are neither valid usernames or |
| 4679 | distribution lists on mail being forwarded to an internal Win2K server? |
| 4680 | |
| 4681 | A0729: A user suggested using a router like this to do the recipient |
| 4682 | verification: |
| 4683 | |
| 4684 | ==> verify_user_router: |
| 4685 | driver = accept |
| 4686 | domains = win2kdomain.com |
| 4687 | local_parts=\ |
| 4688 | ldap;user="cn=ldap-guest,cn=Users,dc=win2kdomain,dc=com"\ |
| 4689 | pass=guest \ |
| 4690 | ldap:://win2kpdc/dc=win2kdomain,dc=com?mailNickname?\ |
| 4691 | sub?(&(mailNickname=$local_part)\ |
| 4692 | (showInAddressBook=*)(sAMAccountName=*)) |
| 4693 | verify_only |
| 4694 | |
| 4695 | Set up ldap-guest as a normal domain user on the Win2K PDC. |
| 4696 | |
| 4697 | Also, you need to set \no_verify\ on all the other routers that handle |
| 4698 | that domain. |
| 4699 | |
| 4700 | |
| 4701 | Q0730: How can I use the same passwords for SMTP authentication as I use for |
| 4702 | Courier IMAP access to my server? |
| 4703 | |
| 4704 | A0730: You can access the Courier authdaemon from an Exim authenticator. You |
| 4705 | must arrange for the Exim user (often \/exim/\ but sometimes \/mail/\) |
| 4706 | to be able to access \(/var/run/courier/authdaemon/socket)\. The |
| 4707 | configuration is something of a hack, but it is reported to work. Here |
| 4708 | is a LOGIN authenticator: |
| 4709 | |
| 4710 | ==> login: |
| 4711 | driver = plaintext |
| 4712 | public_name = LOGIN |
| 4713 | server_prompts = Username:: : Password:: |
| 4714 | server_condition = \ |
| 4715 | ${if eq {${readsocket{/var/run/courier/authdaemon/socket}\ |
| 4716 | {AUTH 76\n${length_76:exim\nlogin\n$1\n$2\ |
| 4717 | \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ |
| 4718 | \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ |
| 4719 | \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n}}}}{FAIL\n} {no}{yes}} |
| 4720 | server_set_id = $1 |
| 4721 | |
| 4722 | Here is a PLAIN authenticator: |
| 4723 | |
| 4724 | ==> plain: |
| 4725 | driver = plaintext |
| 4726 | public_name = PLAIN |
| 4727 | server_prompts = : |
| 4728 | server_condition = \ |
| 4729 | ${if eq {${readsocket{/var/run/courier/authdaemon/socket}\ |
| 4730 | {AUTH 76\n${length_76:exim\nlogin\n$2\n$3\ |
| 4731 | \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ |
| 4732 | \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ |
| 4733 | \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n}}}}{FAIL\n} {no}{yes}} |
| 4734 | server_set_id = $2 |
| 4735 | |
| 4736 | |
| 4737 | Q0731: Is there any defence I can use against spam sent through an open proxy? |
| 4738 | |
| 4739 | A0731: The \*ident*\ feature can be used in some cases. See the discussion in |
| 4740 | Q5023. |
| 4741 | |
| 4742 | |
| 4743 | Q0732: I would like to either warn or deny when a host uses an underscore in |
| 4744 | the EHLO command. |
| 4745 | |
| 4746 | A0732: First, set |
| 4747 | |
| 4748 | ==> helo_allow_chars = _ |
| 4749 | |
| 4750 | This tells Exim not to reject the EHLO or HELO command immediately. Once |
| 4751 | you have done that, you can test for the underscore in an ACL. For |
| 4752 | example, to log a warning for hosts in your LAN, and reject for other |
| 4753 | hosts, you could do something like this: |
| 4754 | |
| 4755 | ==> deny message = Underscores are not valid in host names |
| 4756 | hosts = ! +lan_hosts |
| 4757 | condition = ${if match{$sender_helo_name}{_}{yes}{no}} |
| 4758 | |
| 4759 | ==> warn log_message = Accepted underscore from [$sender_host_address] |
| 4760 | condition = ${if match{$sender_helo_name}{_}{yes}{no}} |
| 4761 | |
| 4762 | |
| 4763 | Q0733: Is there any way to tell Exim not to lookup the IP address against any |
| 4764 | DNS black list if the connection is over IPv6? |
| 4765 | |
| 4766 | A0733: Use this condition in your ACL: |
| 4767 | |
| 4768 | ==> condition = ${if match{${mask:$sender_host_address/0}}\ |
| 4769 | {${mask:::0/0}}{no}{yes}} |
| 4770 | |
| 4771 | From Exim 4.23 onwards, this can be simplified to |
| 4772 | |
| 4773 | ==> condition = ${if isip6{$sender_host_address}{no}{yes}} |
| 4774 | |
| 4775 | |
| 4776 | Q0734: How do MailScanner and Exiscan compare? What are the pros and cons? |
| 4777 | |
| 4778 | A0734: The big advantage of Exiscan is that it can reject messages at SMTP time |
| 4779 | before you have accepted responsibility for them, which means you don't |
| 4780 | have to deal with bouncing messages and thereby becoming a collateral |
| 4781 | spammer. |
| 4782 | |
| 4783 | The big advantage of MailScanner is that it gives you much greater |
| 4784 | control over the load on your machines. You configure it according to |
| 4785 | the maximum processing capacity of your computer and it will not exceed |
| 4786 | that; in fact because it deals with messages in batches the cost of |
| 4787 | processing a message actually goes down slightly as the load increases, |
| 4788 | because the per-batch costs are shared by more messages. |
| 4789 | |
| 4790 | With Exiscan, you have to rely on Exim's load protection mechanisms, |
| 4791 | which basically means that you have to stop accepting messages when your |
| 4792 | machine gets too loaded. This is bad if the machine happens to be an |
| 4793 | SMTP smarthost. You therefore need more overcapacity with Exiscan than |
| 4794 | with MailScanner. |
| 4795 | |
| 4796 | |
| 4797 | Q0735: How can I block non-FQDNs in HELO/EHLOs? |
| 4798 | |
| 4799 | A0735: Many workstation clients send single-component names; take care that you |
| 4800 | do not block legitimate mail. With that proviso, you can do it using |
| 4801 | something like this in an ACL: |
| 4802 | |
| 4803 | ==> drop message = HELO doesn't look like a hostname |
| 4804 | log_message = Not a hostname |
| 4805 | condition = ${if match{$sender_helo_name} \ |
| 4806 | {\N^[^.].*\.[^.]+$\N}{no}{yes}} |
| 4807 | |
| 4808 | This means: Drop the HELO unless it contains a dot somewhere in the HELO |
| 4809 | string, but the string may not begin or end with a dot. Thus, the |
| 4810 | imposed minimum length is 3 characters. |
| 4811 | |
| 4812 | The data for HELO/EHLO doesn't have to be a host name; it may |
| 4813 | legitimately be an IP address literal instead. The above test succeeds |
| 4814 | with an IPv4 address literal, but if you want also to accept IPv6 |
| 4815 | address literals, you will have to modify the regular expression. |
| 4816 | |
| 4817 | |
| 4818 | Q0736: Is it possible to tell exim to drop the connection after a server |
| 4819 | attempts to send a message to a number of unknown users? |
| 4820 | |
| 4821 | A0736: Yes. Use \$rcpt_fail_count$\ and the \^drop^\ ACL command, as in this |
| 4822 | example: |
| 4823 | |
| 4824 | ==> drop message = Too many unknown users |
| 4825 | condition = ${if >{$rcpt_fail_count}{15}{yes}{no}} |
| 4826 | |
| 4827 | |
| 4828 | Q0737: Is there some way to tell Exim not to consider 127.0.0.1 as a valid MX? |
| 4829 | |
| 4830 | A0737: See Q0319. |
| 4831 | |
| 4832 | |
| 4833 | Q0738: How can I configure Exim to delay the SMTP connection if more than 10 |
| 4834 | invalid recipients are received in one message? |
| 4835 | |
| 4836 | A0738: Put something like this in your RCPT ACL: |
| 4837 | |
| 4838 | ==> deny message = Max $rcpt_fail_count failed recipients allowed |
| 4839 | condition = ${if >{$rcpt_fail_count}{10} {1}} |
| 4840 | ! verify = recipient |
| 4841 | delay = ${eval: $rcpt_fail_count * 10}s |
| 4842 | log_message = $rcpt_fail_count failed recipient attempts |
| 4843 | |
| 4844 | This example increases the delay for each failed recipient. |
| 4845 | |
| 4846 | |
| 4847 | Q0739: Does Exim support SPF? |
| 4848 | |
| 4849 | A0739: An Exim ACL can be used. See \?http://spf.pobox.com/downloads.html?\. |
| 4850 | |
| 4851 | |
| 4852 | Q0740: How can I change the MAIL FROM address that is used for callouts? |
| 4853 | |
| 4854 | A0740: It depends on which type of callout you are using. |
| 4855 | |
| 4856 | (1) For envelope sender verification callouts, you cannot make any |
| 4857 | change. My view is that an envelope sender verification is testing |
| 4858 | whether Exim could send a bounce to that address. Therefore, it must |
| 4859 | use \"MAIL FROM:<>"\ because that is what it would do if it were |
| 4860 | sending a bounce message. If \"MAIL FROM:<>"\ is rejected, it means |
| 4861 | Exim could not send a bounce. Therefore the callout fails. |
| 4862 | |
| 4863 | (2) For verifying addresses in the ::From::, ::Sender::, or ::Reply-to:: |
| 4864 | header lines (the \"verify = header_sender"\ condition), it is |
| 4865 | possible to make a change, on the grounds that these addresses are |
| 4866 | not necessarily ones that must accept bounce messages. You can do |
| 4867 | this by adding a \"mailfrom"\ option, like this: |
| 4868 | |
| 4869 | ==> require verify = header_sender/callout=mailfrom=abcd@x.y.z |
| 4870 | |
| 4871 | (3) It is also possible to make a change for the postmaster verification |
| 4872 | option, also on the grounds that a postmaster address need not |
| 4873 | accept bounces if it is never used as an envelope sender. Instead of |
| 4874 | just \"postmaster"\, \"postmaster_mailfrom"\ is used, like this: |
| 4875 | |
| 4876 | ==> require verify = sender/callout=postmaster_mailfrom=abcd@x.y.z |
| 4877 | |
| 4878 | (4) For recipient verification, there are three possibilities. The |
| 4879 | default is to use \"MAIL FROM:<>"\. If the \use_postmaster\ option |
| 4880 | is given, for example: |
| 4881 | |
| 4882 | ==> require verify = recipient/callout=use_postmaster |
| 4883 | |
| 4884 | then the address for MAIL FROM is made up from the local part |
| 4885 | \"postmaster"\ and the contents of \$qualify_domain$\. |
| 4886 | |
| 4887 | Alternatively, if the \use_sender\ option is given, the sender |
| 4888 | address of the incoming message is used. You should use this option |
| 4889 | only when you know that the receiving host makes use of the sender |
| 4890 | address when verifying. The reason is that the callout cache is much |
| 4891 | less effective in this case, causing many more callouts to be |
| 4892 | performed. |
| 4893 | |
| 4894 | In all cases when you configure Exim to use a non-empty address in MAIL |
| 4895 | FROM during callout processing, you should think carefully about what |
| 4896 | might happen if this causes the called host to make its own callout back |
| 4897 | to your host. Make sure that callout loops cannot happen. |
| 4898 | |
| 4899 | |
| 4900 | Q0741: How can I get Outlook Express to use TLS when authenticating? |
| 4901 | |
| 4902 | A0741: If you check \"auth required"\ in OE, it will authenticate as soon as |
| 4903 | it sees AUTH LOGIN, in preference to STARTTLS. The trick is to |
| 4904 | advertise things to OE in a certain order. The first EHLO should |
| 4905 | advertise STARTTLS but not AUTH, and only the second EHLO (after TLS |
| 4906 | starts) should advert AUTH. One way of achieving this is to put, in |
| 4907 | the main section of your Exim configuration: |
| 4908 | |
| 4909 | ==> auth_advertise_hosts = ${if eq{$tls_cipher}{}{127.0.0.1}{*}} |
| 4910 | |
| 4911 | This means that the only host to which AUTH is advertised is 127.0.0.1 |
| 4912 | when the session is not encrypted (that is, before TLS has started). The |
| 4913 | idea here is that there's no need for encryption for anything coming via |
| 4914 | the loopback interface. For an encrypted session, however, AUTH is |
| 4915 | advertised to all hosts. |
| 4916 | |
| 4917 | You can also block the AUTH command itself for unencrypted connections, |
| 4918 | by creating an ACL for \acl_smtp_auth\ that is something like this: |
| 4919 | |
| 4920 | ==> accept encrypted = * |
| 4921 | accept hosts = 127.0.0.1 |
| 4922 | deny message = TLS encryption required before AUTH |
| 4923 | |
| 4924 | |
| 4925 | |
| 4926 | 8. REWRITING ADDRESSES |
| 4927 | |
| 4928 | Q0801: How can I get Exim to strip the hostname from the sender's address? |
| 4929 | |
| 4930 | A0801: If you set up a rewriting rule in the following form: |
| 4931 | |
| 4932 | ==> *@*.your.domain $1@your.domain |
| 4933 | |
| 4934 | then Exim will rewrite all addresses in the envelope and the headers, |
| 4935 | removing anything between \"@"\ and \"your.domain"\. This applies to all |
| 4936 | messages that Exim processes. If you want to rewrite sender addresses |
| 4937 | only, the the rule should be |
| 4938 | |
| 4939 | ==> *@*.your.domain $1@your.domain Ffrs |
| 4940 | |
| 4941 | This applies the rule only to the envelope sender address and to the |
| 4942 | ::From::, ::Reply-to::, and ::Sender:: headers. |
| 4943 | |
| 4944 | |
| 4945 | Q0802: I have Exim configured to remove the hostname portion of the domain on |
| 4946 | outgoing mail, and yet the hostname is present when the mail gets |
| 4947 | delivered. |
| 4948 | |
| 4949 | A0802: Check the DNS record for your domain. If the MX record points to a CNAME |
| 4950 | record instead of to an A record, some MTAs (not Exim) are liable to |
| 4951 | rewrite addresses, changing your domain name to its ``canonical'' form, |
| 4952 | as obtained from the CNAME record. |
| 4953 | |
| 4954 | |
| 4955 | Q0803: I want to rewrite local addresses in mail that goes to the outside |
| 4956 | world, but not for messages that remain within the local intranet. |
| 4957 | |
| 4958 | A0803: You can use the \headers_rewrite\ option on a transport to do this. |
| 4959 | The rewriting will then apply to just those copies of a message that |
| 4960 | pass through the transport. The \return_path\ option can similarly be |
| 4961 | used to rewrite the sender address. There is no way of rewriting |
| 4962 | recipient addresses at transport time. However, as these are by |
| 4963 | definition remote addresses, you probably don't want to rewrite them. |
| 4964 | |
| 4965 | You have to set up the configuration so that it uses different SMTP |
| 4966 | transports for internal and external mail. If you are using a single |
| 4967 | router in both cases, you could configure it like this: |
| 4968 | |
| 4969 | ==> dnslookup: |
| 4970 | driver = dnslookup |
| 4971 | transport = ${if match{$domain}{\N\.my\.domain$\N}{int_smtp}{ext_smtp}} |
| 4972 | |
| 4973 | This example uses the \%int_smtp%\ transport for domains ending in |
| 4974 | \(.my.domain)\, and \%ext_smtp%\ for everything else. The \%ext_smtp%\ transport |
| 4975 | could be something like this: |
| 4976 | |
| 4977 | ==> ext_smtp: |
| 4978 | driver = smtp |
| 4979 | headers_rewrite = *@*.my.domain \ |
| 4980 | ${lookup{$1}cdb{/etc/$2/mail.handles.cdb}{$value}fail} |
| 4981 | return_path = \ |
| 4982 | ${if match{$return_path}{\N^([^@]+)@(.*)\.my\.domain$\N}\ |
| 4983 | {\ |
| 4984 | ${lookup{$1}cdb{/etc/$2/mail.handles.cdb}{$value}fail}\ |
| 4985 | }\ |
| 4986 | fail} |
| 4987 | |
| 4988 | This example uses a separate file of local-to-external address |
| 4989 | translations for each domain. This is not the only possibility, of |
| 4990 | course. The \headers_rewrite\ and \return_path\ options apply the same |
| 4991 | rewriting to the header lines and the envelope sender address, |
| 4992 | respectively. |
| 4993 | |
| 4994 | |
| 4995 | Q0804: I'm using this rewriting rule to change login names into ``friendly'' |
| 4996 | names, but if mail comes in for an upper case login name, it doesn't |
| 4997 | get rewritten. |
| 4998 | |
| 4999 | ==> *@my.domain ${lookup{$1}dbm{/usr/lib/exim/longforms}\ |
| 5000 | {$value}fail}@my.domain bcfrtFT |
| 5001 | |
| 5002 | The longforms database has entries of the form: |
| 5003 | |
| 5004 | ==> ano23: A.N.Other |
| 5005 | |
| 5006 | A0804: Replace \"$1"\ in your rule by \"${lc:$1}"\ to force the local part to lower |
| 5007 | case before it is used as a lookup key. |
| 5008 | |
| 5009 | |
| 5010 | Q0805: Is it possible to completely fail a message if the rewrite rules fail? |
| 5011 | |
| 5012 | A0805: It depends on what you mean by ``fail a message'' and what addresses you |
| 5013 | are rewriting. If you are rewriting recipient addresses for your local |
| 5014 | domain, you can do: |
| 5015 | |
| 5016 | ==> *@dom.ain ${lookup{$1}dbm{/wher/ever}{$value}{failaddr}} Ehq |
| 5017 | |
| 5018 | and in your alias file put something like |
| 5019 | |
| 5020 | ==> failaddr: :fail: Rewriting failed |
| 5021 | |
| 5022 | This fails a single recipient - others are processed independently. |
| 5023 | |
| 5024 | |
| 5025 | Q0806: I'm using \$domain$\ as the key for a lookup in a rewriting rule, but its |
| 5026 | contents are not being lowercased. Aren't domains supposed to be handled |
| 5027 | caselessly? |
| 5028 | |
| 5029 | A0806: The value of \$domain$\ is the actual domain that appears in the address. |
| 5030 | It could of course be lower cased, but I know that would cause some |
| 5031 | unhappiness, because some people have mixed-case domain names which look |
| 5032 | silly if the case is changed. Thus, one wants to preserve the case in |
| 5033 | rewrites such as |
| 5034 | |
| 5035 | ==> *@*.TheRap.com something@$domain |
| 5036 | |
| 5037 | because ``therap'' doesn't look like two words. I know it seems trivial, |
| 5038 | but it is important to some people - especially if by some unfortunate |
| 5039 | accident the lowercased word is something indecent. |
| 5040 | |
| 5041 | You can trivally force lower casing by means of the \"${lc:"\ operator. |
| 5042 | Instead of \"$domain"\ write \"${lc:$domain}"\. |
| 5043 | |
| 5044 | |
| 5045 | Q0807: I want to rewrite local sender addresses depending on the domain of the |
| 5046 | recipient. |
| 5047 | |
| 5048 | A0807: In general, this is not possible, because a message may have more than |
| 5049 | one recipient and Exim keeps just a single copy of each message. It may |
| 5050 | also deliver one copy of a message with several recipient addresses. |
| 5051 | You can do an incomplete job by using a regular expression match in a |
| 5052 | rewrite rule to test, for example, the contents of the ::To:: header. This |
| 5053 | would work except in cases of multiple recipients. |
| 5054 | |
| 5055 | |
| 5056 | |
| 5057 | 9. HEADERS |
| 5058 | |
| 5059 | Q0901: I would like add some custom headers to selected outgoing mail based on |
| 5060 | a specific domain and the subject line. |
| 5061 | |
| 5062 | A0901: To the remote_smtp transport, add something like |
| 5063 | |
| 5064 | ==> headers_add = ${if and{\ |
| 5065 | {eq{$domain}{spec.dom}}\ |
| 5066 | {matches{$h_subject:}{whatever}}}\ |
| 5067 | {Content-Type: text/html; charset="us-ascii"} fail } |
| 5068 | |
| 5069 | This example shows a ::Content-Type:: header, but you can have anything you |
| 5070 | like, and multiple headers can be inserted by using \"@\n"\ to separate them. |
| 5071 | |
| 5072 | |
| 5073 | Q0902: Is it possible to have Exim add a header to only certain local parts of |
| 5074 | outgoing mail? |
| 5075 | |
| 5076 | A0902: Only if you arrange for each such local part to receive its own private |
| 5077 | copy of the mail. See \max_rcpt\ in the SMTP transport. If you set this |
| 5078 | to 1, you could use conditions in an expansion string to add or not add |
| 5079 | a header. |
| 5080 | |
| 5081 | |
| 5082 | Q0903: How can I remove some part of the ::Received:: header? |
| 5083 | |
| 5084 | A0903: Set \received_header_text\. |
| 5085 | |
| 5086 | |
| 5087 | Q0904: How I can insert the PGP header line using Exim filters? |
| 5088 | |
| 5089 | A0904: You can't insert headers in a user filter. A system filter can do so, |
| 5090 | but the inserted lines then are included for all recipients. |
| 5091 | |
| 5092 | |
| 5093 | Q0905: I know I can use a system filter to replace certain headers in messages, |
| 5094 | but how can I add text to existing headers? I want to add [SPAM] to |
| 5095 | the subject line of messages that appear to be spam. |
| 5096 | |
| 5097 | A0905: You can only do this in a round about way, using filter commands like |
| 5098 | this: |
| 5099 | |
| 5100 | ==> headers add "New-Subject: SPAM: $h_subject:" |
| 5101 | headers remove subject |
| 5102 | neaders add "Subject: $h_new-subject:" |
| 5103 | headers remove new-subject |
| 5104 | |
| 5105 | This trick works only in system filters, where the commands are obeyed |
| 5106 | in order, and affect the master list of headers that apply to the whole |
| 5107 | message. You cannot do this with the \headers_add\ and \headers_remove\ |
| 5108 | options on drivers. |
| 5109 | |
| 5110 | |
| 5111 | |
| 5112 | 10. PERFORMANCE |
| 5113 | |
| 5114 | Q1001: I'm running a large mail server. Should I set \split_spool_directory\ to |
| 5115 | improve performance? |
| 5116 | |
| 5117 | A1001: Splitting the spool directory has most benefit if there are times when |
| 5118 | there are a large number of messages on the queue. If all mail is |
| 5119 | delivered very quickly, and the queue is always less than, say, a few |
| 5120 | hundred messages, there isn't any need to do this. With larger queues, |
| 5121 | there is a definite performance benefit to splitting the spool. It shows |
| 5122 | up earlier on some types of file system, compared with others. |
| 5123 | |
| 5124 | Exim was not designed for handling large queues. If you are in an |
| 5125 | enviroment where lots of messages remain on the queue for long periods |
| 5126 | of time, consider implementing a back up host to which you pass these |
| 5127 | messages, so that the main host's queue remains short. You can use |
| 5128 | \fallback_hosts\ to do this, or a router that is conditional on |
| 5129 | \$message_age$\. |
| 5130 | |
| 5131 | |
| 5132 | Q1002: How well does Exim scale? |
| 5133 | |
| 5134 | A1002: Although the author did not specifically set out to write a high- |
| 5135 | performance MTA, Exim does seem to be fairly efficient. The biggest |
| 5136 | server at the University of Cambridge (a large Sun box) goes over |
| 5137 | 100,000 deliveries per day on busy days (it has over 20,000 users). |
| 5138 | There was a report of a mailing list exploder that sometimes handles |
| 5139 | over 100,000 deliveries a day on a big Linux box, the record being |
| 5140 | 177,000 deliveries (791MB in total). Up to 13,000 deliveries an hour |
| 5141 | have been reported. |
| 5142 | |
| 5143 | These are quotes from some Exim users: |
| 5144 | |
| 5145 | "... Canada's largest internet provider, uses Exim on all of our mail |
| 5146 | machines, and we're absolutely delighted with it. It brought life back |
| 5147 | into one of our machines plagued with backlogs and high load averages. |
| 5148 | Here's just an example of how much email our largest mail server |
| 5149 | (quad SS1000) is seeing ... " [230,911 deliveries in a day: 4,475MB] |
| 5150 | |
| 5151 | "... Exim has to ... do gethostbyname()s and RBL lookups on all of the |
| 5152 | incoming mail servers, and he runs from inetd (TCP Wrappers connected). |
| 5153 | All the same, it seems to me that he runs as fast as lightning on our |
| 5154 | SCO 5.0.4 box (1 Pentium 166) - far faster than MMDF which I (and many |
| 5155 | customers) had before." |
| 5156 | |
| 5157 | "On a PII 400 with 128M of RAM running Linux 2.2.5, I have achieved |
| 5158 | 36656 messages per hour (outgoing unique messages and recipients). For |
| 5159 | about a 5 minute period, I was able to achieve an average of 30 messages |
| 5160 | per second (that would be 108000 m/hour)! We are using: (options that |
| 5161 | make a difference): |
| 5162 | |
| 5163 | ==> queue_only |
| 5164 | split_spool_directory |
| 5165 | queue_run_max = 1 |
| 5166 | remote_max_parallel = 1 |
| 5167 | |
| 5168 | We have a cron job hat runs every five minutes that spawns 5 \"exim -q"\ if |
| 5169 | there are less that 120 exim processes currently running. We found |
| 5170 | that by manually controlling the concurrency of \"exim -q"\ processes |
| 5171 | contending for the spool for \%remote_smtp%\ delivery that we gained |
| 5172 | considerable performance - 10000 m/hour." |
| 5173 | |
| 5174 | |
| 5175 | Q1003: We have a large password file. Can Exim use alternative lookups during |
| 5176 | delivery to speed things up? |
| 5177 | |
| 5178 | A1003: If you are using FreeBSD, this problem should not arise, because it |
| 5179 | automatically uses an indexed password file. In some other operating |
| 5180 | systems you can arrange for this to happen too. On Linux, for example, |
| 5181 | all you need to do is |
| 5182 | |
| 5183 | ==> # cd /var/db |
| 5184 | # make |
| 5185 | |
| 5186 | and put \"db"\ before \"files"\ in any \(/etc/nsswitch.conf)\ lines you want to |
| 5187 | use db for. |
| 5188 | |
| 5189 | On systems that do not include support for indexed password files, you |
| 5190 | can build one yourself, and reference it from the Exim configuration. |
| 5191 | For example, for routing to local mailboxes you could use this: |
| 5192 | |
| 5193 | ==> localuser: |
| 5194 | driver = accept |
| 5195 | condition = ${lookup{$local_part}cdb{/etc/passwd.cdb}{yes}{no}} |
| 5196 | transport = local_delivery |
| 5197 | user = ${extract{1}{:}{${lookup{$local_part}cdb{/etc/passwd.cdb}}} |
| 5198 | |
| 5199 | This assumes a cdb version of the password file. |
| 5200 | |
| 5201 | |
| 5202 | Q1004: I just wondered if it might be helpful to put the hints database on a |
| 5203 | RAM disk during regular operation. Did anybody try that yet? |
| 5204 | |
| 5205 | A1004: A user reported thus: ``I have found that this works great under Solaris. |
| 5206 | Make a RAM disk partition and keep everything in the \(db)\ directory on |
| 5207 | it. However, when I try the same thing on Linux, I don't see the same |
| 5208 | boost. I think that Linux's file buffer cache works about the same. |
| 5209 | Plus, this leave more room for processes to run.'' |
| 5210 | |
| 5211 | There have been other reports that Linux's delayed buffer write provides |
| 5212 | better overall performance in general. |
| 5213 | |
| 5214 | Apparently there is support in the Solaris kernel for a delayed writing, |
| 5215 | as in Linux, but Sun's server policy is to have it disabled so that you |
| 5216 | don't lose so much if the server crashes. There is a program called |
| 5217 | \^fastfs^\ to enable and disable this support. You have to download and |
| 5218 | compile it yourself; find it by looking for \"fastfs.c"\ in a search |
| 5219 | engine. Solaris performance is reported to be much improved, but you |
| 5220 | should take care to understand the potential hazards. In particular, |
| 5221 | \^fsck^\ may be unable to ``fix'' disks automatically after a crash. |
| 5222 | |
| 5223 | |
| 5224 | Q1005: A lot of incoming mail is pushing up my system load too much, and there |
| 5225 | are many Exim processes. How can I control this? |
| 5226 | |
| 5227 | A1005: Have you set any of the Exim configuration options that limit what it |
| 5228 | does under high load? For example, queue_only_load, deliver_queue_load_max? |
| 5229 | See the list in the section entitled \*Resource control*\ in the manual. |
| 5230 | |
| 5231 | It sounds like a lot of simultaneous incoming mail pushes your system |
| 5232 | into uncontrolled overload. The multiple Exim processes are probably |
| 5233 | just multiple incoming messages. You can use the \^exiwhat^\ utility to |
| 5234 | confirm this. |
| 5235 | |
| 5236 | |
| 5237 | |
| 5238 | 11. MAJORDOMO |
| 5239 | |
| 5240 | Q1101: How do I set up Majordomo to work with Exim? |
| 5241 | |
| 5242 | A1101: Users have found several ways of setting up Exim for use with Majordomo. |
| 5243 | One way has been documented at |
| 5244 | \?http://www.averillpark.net/exim/majordomo.html?\. |
| 5245 | |
| 5246 | Somewhere in the Majordomo docs or FAQ it mentions using batchmail or |
| 5247 | other additional programs to improve the performance of large lists. |
| 5248 | They are not needed with Exim, and their use can actually make things |
| 5249 | worse. However, it's a good idea to set \remote_max_parallel\ to a value |
| 5250 | greater than 1 in the Exim configuration. |
| 5251 | |
| 5252 | |
| 5253 | Q1102: I have set \$mailer$\ in \(majordomo.cf)\, but it still isn't setting the |
| 5254 | sender correctly in the messages it sends. |
| 5255 | |
| 5256 | A1102: Make sure you have got the quoting correct in the \$mailer$\ setting. For |
| 5257 | example, |
| 5258 | |
| 5259 | ==> $mailer = "$sendmail_command -oi -oee -f$sender\@lists.mydomain.de"; |
| 5260 | |
| 5261 | is not correct. It needs three backslashes, not one, and the $ at the |
| 5262 | start of \$sender$\ has to be escaped with a backslash. |
| 5263 | |
| 5264 | |
| 5265 | Q1103: I'm trying to set up majordomo, but I'm getting a wrong mode error |
| 5266 | when I try to send it mail. |
| 5267 | |
| 5268 | A1103: Check the mode of \(/var/lib/majordomo/lists/lists.aliases)\ and compare it |
| 5269 | with the setting of the \modemask\ option in the Majordomo aliases |
| 5270 | router. This option specifies bits which must not be set for the alias |
| 5271 | file, and it defaults to 022. |
| 5272 | |
| 5273 | |
| 5274 | Q1104: I'm getting return code 9 from \(/home/majordomo/majordomo-1.94.4/wrapper)\ |
| 5275 | when it is passed a message from Exim. |
| 5276 | |
| 5277 | A1104: A problem like this turned out to be the Perl version that came with |
| 5278 | RedHat 5.2. Rebuilding Perl 5.005x solved it. |
| 5279 | |
| 5280 | |
| 5281 | Q1105: Exim is complaining about an invalid command line when Majordomo tries |
| 5282 | to send it a message for delivery. |
| 5283 | |
| 5284 | A1105: Take a look at your \(majordomo.cf)\ file, It should have something that |
| 5285 | looks like |
| 5286 | |
| 5287 | ==> $sendmail_command = "/usr/lib/sendmail"; |
| 5288 | |
| 5289 | and another line like |
| 5290 | |
| 5291 | ==> $mailer = "$sendmail_command -oi -oee -f\$sender"; |
| 5292 | |
| 5293 | If you have modified \^resend^\ (one of the majordomo programs) to use |
| 5294 | \$sendmail_command$\ instead of \$mailer$\ you will be calling Exim with no |
| 5295 | command line arguments. |
| 5296 | |
| 5297 | |
| 5298 | |
| 5299 | 12. FETCHMAIL |
| 5300 | |
| 5301 | Q1201: When I run fetchmail, I get the error \*SMTP listener doesn't like |
| 5302 | recipient address xxx@localhost*\. |
| 5303 | |
| 5304 | A1201: Make sure that //localhost// is recognized as a domain that is to be |
| 5305 | delivered locally. If you are using the default Exim run time |
| 5306 | configuration, you'll see a line near the top like this: |
| 5307 | |
| 5308 | ==> domainlist local_domains = @ |
| 5309 | |
| 5310 | Change it to |
| 5311 | |
| 5312 | ==> domainlist local_domains = @ : localhost |
| 5313 | |
| 5314 | |
| 5315 | Q1202: I'm currently using Exim with fetchmail and I'd like to use the RBL on |
| 5316 | Exim, but will it work? Do I need to configure fetchmail any particular |
| 5317 | way? As far as Exim knows, all mail is coming from 127.0.0.1. Will it |
| 5318 | check the source address against RBL? Or will it check the ::From:: header? |
| 5319 | |
| 5320 | A1202: It will check 127.0.0.1 (not very useful). The point of the RBL is to |
| 5321 | keep messages from black-listed hosts out of your machine. If you are |
| 5322 | using fetchmail, you have got the messages into your machine before you |
| 5323 | approach Exim. That kind of defeats the purpose of the RBL. The right |
| 5324 | way to do this would be for the host from which you fetch your mail to |
| 5325 | do the RBL checking and insert some kind of warning header for you to |
| 5326 | test, as Exim does if you run RBL checks in warning mode. |
| 5327 | |
| 5328 | |
| 5329 | |
| 5330 | 13. PERL |
| 5331 | |
| 5332 | Q1301: Exim built with Perl support exits with the error message \*./exim: can't |
| 5333 | load library 'libperl.so'*\. |
| 5334 | |
| 5335 | A1301: If you are using BSDI, see Q9401. |
| 5336 | |
| 5337 | |
| 5338 | Q1302: Exim built with Perl support exits with several error messages of the |
| 5339 | form \*undefined reference to `PL_stack_sp'*\. |
| 5340 | |
| 5341 | A1302: This has been seen on FreeBSD systems that had two different versions of |
| 5342 | Perl installed, the older with an \^a.out^\ library and the newer with an |
| 5343 | ELF library. Ensure that the older package is removed. |
| 5344 | |
| 5345 | |
| 5346 | |
| 5347 | 14. DIAL-UP AND ISDN |
| 5348 | |
| 5349 | Q1401: When I'm not connected to the Internet, how can I arrange for mail to |
| 5350 | other hosts on my local network to be delivered, while at the |
| 5351 | same time mail to Internet hosts is queued without any delivery |
| 5352 | attempts? |
| 5353 | |
| 5354 | A1401: Use the \queue_domains\ option to control which domains are held |
| 5355 | on the queue for later delivery. For example, |
| 5356 | |
| 5357 | ==> queue_domains = ! *.localnet |
| 5358 | |
| 5359 | allows delivery to domains ending in \(.localnet)\, while queueing all the |
| 5360 | others. |
| 5361 | |
| 5362 | |
| 5363 | Q1402: I have a dial-up machine, and I use the \queue_smtp_domains\ option so |
| 5364 | that remote mail only goes out when I do a queue run. However, any email |
| 5365 | I send with an address \(anything@aol.com)\ is returned within about 15 |
| 5366 | minutes saying \*retry time exceeded*\, and all addresses are affected. |
| 5367 | |
| 5368 | A1402: You should be using \queue_domains\ rather than \queue_smtp_domains\. |
| 5369 | With the latter, Exim is trying to route the addresses, which involves a |
| 5370 | DNS lookup. This is presumably timing out, causing a retry time to be |
| 5371 | set for the domain, and somehow a valid lookup never happened before the |
| 5372 | maximum retry time (default of 4 days) passed. Hence the bounce. The |
| 5373 | fact that it is \(aol.com)\ is probably not relevant. You should probably |
| 5374 | also be using \-qq-\ to do your queue run rather than \-q-\. |
| 5375 | |
| 5376 | |
| 5377 | Q1403: How should Exim be configured when it is acting as a temporary storage |
| 5378 | system for a domain on a dial-up host? |
| 5379 | |
| 5380 | A1403: Exim isn't really designed for this, but... The lowest-numbered MX |
| 5381 | record for the domain should be pointing to the dial-up host. A higher |
| 5382 | numbered MX record (lower priority) should point to the Exim server that |
| 5383 | is acting as a temporary storage system. |
| 5384 | |
| 5385 | You should set a large retry time for the domain, so that Exim doesn't |
| 5386 | keep trying to deliver when the host is offline. When the host comes |
| 5387 | online, the waiting messages have to be kicked somehow. This can be done |
| 5388 | by calling Exim with the \-R-\ option, or via the SMTP ETRN command. |
| 5389 | |
| 5390 | This works provided the number of messages is low. If you are handling |
| 5391 | lots of mail, keeping messages waiting for their host to connect and |
| 5392 | those that are having delivery problems to remote hosts all in the same |
| 5393 | queue doesn't work so well. It is better in this case to get Exim to |
| 5394 | deliver the mail for the dial-in hosts into some local files which then |
| 5395 | get transmitted by other software when the host connects. One tool for |
| 5396 | doing this can be found at \?http://cr.yp.to/serialmail.html?\. |
| 5397 | |
| 5398 | For further discussion, see section entitled \*Intermittently connected |
| 5399 | hosts*\ in the manual, and also the section in the Exim book with the |
| 5400 | same name. |
| 5401 | |
| 5402 | |
| 5403 | Q1404: I have \queue_domains\ or \queue_smtp_domains\ set, and use \-qf-\ to |
| 5404 | force delivery of waiting mail when I dial in. How can I arrange for any |
| 5405 | new messages that arrive while I'm connected to be delivered immediately? |
| 5406 | |
| 5407 | A1404: Instead of \queue_domains\ or \queue_smtp_domains\, use the \queue_only_file\ |
| 5408 | option. This causes messages to be queued if a particular file exists. |
| 5409 | If you put the word ``smtp'' before the file name, the queueing applies |
| 5410 | only to domains that are delivered by SMTP, thus not affecting local |
| 5411 | deliveries: |
| 5412 | |
| 5413 | ==> queue_only_file = smtp/etc/present/when/not/connected |
| 5414 | |
| 5415 | Then, in the scripts which are run when you connect and disconnect, |
| 5416 | arrange to remove the file after connection, and create it just before |
| 5417 | disconnection. |
| 5418 | |
| 5419 | |
| 5420 | Q1405: I have an ISDN connection and would like a way of running the queue |
| 5421 | automatically when it is up. |
| 5422 | |
| 5423 | A1405: The following shell commands test for the interface being up and then |
| 5424 | run the queue: |
| 5425 | |
| 5426 | ==> ifconfig ppp0 | fgrep UP >/dev/null |
| 5427 | if [ $? -eq 0 ] ; then exim -q ; fi |
| 5428 | |
| 5429 | You could put these commands into a script which runs them at regular |
| 5430 | intervals. You might want to use \-qq-\ instead of \-q-\. |
| 5431 | |
| 5432 | With Linux, the script \(/etc/ppp/ip-up)\ is run after a ISDN connection |
| 5433 | or a more general PPP connection has been established. If you are using |
| 5434 | Linux, you could put the call to Exim in that script. |
| 5435 | |
| 5436 | |
| 5437 | Q1406: When I dial up to collect mail from my ISP, only the first 10 messages |
| 5438 | get delivered immediately; the remainder just sit on the queue until a |
| 5439 | queue runner process finds them. |
| 5440 | |
| 5441 | A1406: See Q0049. |
| 5442 | |
| 5443 | |
| 5444 | Q1407: RFC 1985 specifies that the SMTP command \"ETRN host.domain"\ causes all |
| 5445 | mail queued for that host, no matter what domain it's for, to be |
| 5446 | delivered. Why doesn't Exim support this? |
| 5447 | |
| 5448 | A1407: Exim does not keep queues of mail for specific destinations. It just |
| 5449 | keeps one pool of undelivered messages. What is more, once you start a |
| 5450 | delivery of a message, it tries to deliver to all the addresses in the |
| 5451 | message, not just the one you may be interested in. (Of course, this |
| 5452 | doesn't usually do any harm.) |
| 5453 | |
| 5454 | The only way it could be done within Exim would be, for every message |
| 5455 | on the queue, to go through the motions of routing each undelivered |
| 5456 | address and see if that resulted in a delivery to the host of interest. |
| 5457 | This could be extremely expensive (e.g. 1,000 messages on the queue, |
| 5458 | only 1 for the given host). |
| 5459 | |
| 5460 | The bottom line is that Exim just wasn't designed for this kind of |
| 5461 | operation, that is, holding messages for intermittently connected hosts. |
| 5462 | The queueing arrangements are designed for handling delivery problems |
| 5463 | that are not expected to be common. |
| 5464 | |
| 5465 | A better way to do this is to implement the required queues separately. |
| 5466 | After all, keeping such mail on an active queue (where Exim will keep |
| 5467 | trying to deliver) is silly. If there is a lot of mail for these hosts, |
| 5468 | it also masks genuine delivery problems when you inspect the queue. |
| 5469 | |
| 5470 | Large ISPs who provide this kind of functionality do not usually leave |
| 5471 | waiting mail on the MTA's queue. Instead, they get it delivered into |
| 5472 | per-host directories, one message per file, in one of the special |
| 5473 | formats (BSMTP, maildir, or mailstore) and when an ETRN arrives, it |
| 5474 | kicks off some completely different program that establishes an SMTP |
| 5475 | connection to the host and shovels the waiting mail down it. That seems |
| 5476 | to me to be a much neater way of doing this. It means you can easily add |
| 5477 | additional functionality such as archiving or throwing away uncollected |
| 5478 | mail. |
| 5479 | |
| 5480 | One program that has this functionality is \^ssmtp^\, which can be |
| 5481 | found in \?ftp://metalab.unc.edu/pub/Linux/system/mail/mta/?\. |
| 5482 | Alternatively, sample configuration C037 demonstrates an elegant way of |
| 5483 | using Exim itself to deliver the saved messages when the client issues |
| 5484 | an ETRN. |
| 5485 | |
| 5486 | |
| 5487 | Q1408: If email has been deferred to a member on a local mailing list |
| 5488 | (implemented through forward files), and one of our ETRN clients is on |
| 5489 | this mailing list, the \-R-\ won't flush the mailing list message for |
| 5490 | that client. |
| 5491 | |
| 5492 | A1408: That is because \-R-\ matches only original recipient addresses, not those |
| 5493 | produced as a result of expansion, because these are not (by default) |
| 5494 | preserved from delivery to delivery. You can get round this by setting |
| 5495 | \one_time\ on the forwarding router, but you are not allowed to have |
| 5496 | expansions to pipes or files on routers that have \one_time\ set. |
| 5497 | Therefore, you will have to have a separate router for mailing lists |
| 5498 | (with \one_time\ set) to the one used for normal forward files that might |
| 5499 | specify pipe or file deliveries. However, the problem will still be |
| 5500 | present for any user who sets up a \(.forward)\ file to redirect to any of |
| 5501 | the ETRN domains. See the last 3 paragraphs of Q1407 for a discussion of |
| 5502 | an alternative approach. |
| 5503 | |
| 5504 | |
| 5505 | Q1409: I would like to have a separate queue per domain for hosts which dial |
| 5506 | in to collect their mail. |
| 5507 | |
| 5508 | A1409: Exim isn't really designed for this kind of operation. The only way to |
| 5509 | do this would be to cause it to send those messages to a differently |
| 5510 | configured version of Exim with its own spool area. This could be done |
| 5511 | via a pipe or SMTP to a private port. The main Exim, listening on port |
| 5512 | 25, would then be configured to run an appropriate command to prod one |
| 5513 | of the others when it received ETRN, by means of the \smtp_etrn_command\ |
| 5514 | option. |
| 5515 | |
| 5516 | You could probably manage this with a single Exim binary and a number of |
| 5517 | different configuration files, passed to the special versions using the |
| 5518 | \-C-\ option. For this application they could all run as \^exim^\, since no |
| 5519 | root privilege would be needed. |
| 5520 | |
| 5521 | An alternative approach id to get Exim to deliver mail for such hosts |
| 5522 | in batch SMTP format into some directory, and have the ETRN run |
| 5523 | something to pass such messages to the dialled-in host. See also Q1403. |
| 5524 | |
| 5525 | |
| 5526 | |
| 5527 | 15. UUCP |
| 5528 | |
| 5529 | Q1501: The MX records for some UUCP domains point to my local host. How do I |
| 5530 | get it to pass the messages on to UUCP? |
| 5531 | |
| 5532 | A1501: The simplest way is to create a file containing a list of domains, and |
| 5533 | the hosts to which their messages should be sent, like this: |
| 5534 | |
| 5535 | ==> uucp1.domain.example: uucp1.host.example |
| 5536 | uucp2.domain.example: uucp2.host.example |
| 5537 | .... |
| 5538 | |
| 5539 | Then you can use a router like this: |
| 5540 | |
| 5541 | ==> uucp_router: |
| 5542 | driver = accept |
| 5543 | domains = lsearch;/etc/uucp/domains |
| 5544 | transport = uucp_transport |
| 5545 | |
| 5546 | and a transport like this: |
| 5547 | |
| 5548 | ==> uucp_transport: |
| 5549 | driver = pipe |
| 5550 | user = nobody |
| 5551 | command = /usr/local/bin/uux - -r $domain_data!rmail $local_part |
| 5552 | return_fail_output |
| 5553 | |
| 5554 | The \$domain_data$\ variable retains the value that is looked up when |
| 5555 | the \domains\ option in the router is matched. |
| 5556 | |
| 5557 | |
| 5558 | Q1502: How can I get Exim to handle ``bang path'' addresses? |
| 5559 | |
| 5560 | A1502: In general, you can't (Exim is an Internet mailer and recognizes only |
| 5561 | RFC 2822 domain-style addresses) but some restricted kinds of bang path |
| 5562 | can be dealt with by appropriate rewriting - but please note the warning |
| 5563 | below. |
| 5564 | |
| 5565 | Exim treats a bang path address as an unqualified local part, and so |
| 5566 | will qualify it with your domain. A rule such as |
| 5567 | |
| 5568 | ==> \N^([^!]+)!(.+)@your\.domain$\N $2@$1 |
| 5569 | |
| 5570 | turns \(a!b@your.domain)\ into \(b@a)\. You can also use a repeating rule to |
| 5571 | turn multi-component paths into the ``percent hack'' notation with a rule |
| 5572 | such as |
| 5573 | |
| 5574 | ==> \N^([^!]+)!([^@%]+)(.+)$\N $2%$1$3 R |
| 5575 | |
| 5576 | which turns \(a!b@c)\ into \(b%a@c)\ and \(a!b!c@d)\ first into \(b!c%a@d)\ and then, |
| 5577 | because of the R flag, into \(c%b%a@d)\. The R flag causes repetition up to |
| 5578 | 10 times. |
| 5579 | |
| 5580 | \**Warning:**\ If you install a general rewriting rule like the above, you are |
| 5581 | opening yourself up to the possibility of unwanted relaying. A host that |
| 5582 | is not permitted to relay through your system could send a message with |
| 5583 | an SMTP command line such as |
| 5584 | |
| 5585 | ==> RCPT TO:<victim-host!victim-user@your.domain> |
| 5586 | |
| 5587 | and this would be accepted because it is addressed to your domain. |
| 5588 | However, the rewriting then converts the address, and the message does |
| 5589 | in fact get relayed. One way round this, if all your bang path messages |
| 5590 | are passed to Exim via SMTP, is to use the \"S"\ rewriting flag. This |
| 5591 | applies a rewriting rule to incoming SMTP addresses as soon as they are |
| 5592 | received, before checking for qualification, relaying, etc. So a rule |
| 5593 | such as |
| 5594 | |
| 5595 | ==> \N^([^!]+)!(.+)$\N $2@$1 S |
| 5596 | |
| 5597 | rewrites simple two-component bang paths before the result is checked |
| 5598 | for relaying. However, this does not rewrite addresses in the headers of |
| 5599 | the message. |
| 5600 | |
| 5601 | |
| 5602 | Q1503: We see something strange on our system in regards to mail coming in via |
| 5603 | rmail from a UUCP link. The sender is being set to mailmaster instead of |
| 5604 | the real sender, and a ::Sender:: header is being added to the message. |
| 5605 | |
| 5606 | A1503: If \(mailmaster)\ is the user that is running rmail, you need to include |
| 5607 | that user in the \trusted_users\ configuration option. Only trusted users |
| 5608 | are permitted to specify senders when mail is passed to Exim via the |
| 5609 | command line. |
| 5610 | |
| 5611 | |
| 5612 | |
| 5613 | 16. MODIFYING MESSAGE BODIES |
| 5614 | |
| 5615 | Q1601: How can I add a disclaimer or an advertisement to a message? |
| 5616 | |
| 5617 | A1601: There are a number of technical and potential legal problems that arise |
| 5618 | in connection with message modification. Some of them are listed below. |
| 5619 | Some comment on the legal position of email disclaimers in English law |
| 5620 | can be found at \?http://www.weblaw.co.uk/artemail.htm?\. |
| 5621 | |
| 5622 | See also \?http://www.goldmark.org/jeff/stupid-disclaimers/?\. There is |
| 5623 | some discussion about the problems of actually adding disclaimers in |
| 5624 | \?http://www.goldmark.org/jeff/stupid-disclaimers/apply.html?\. |
| 5625 | |
| 5626 | In many cases, email disclaimers will make your company look ridiculous, |
| 5627 | at the very least. At worst, they may interfere with the normal |
| 5628 | processing of mail. |
| 5629 | |
| 5630 | If, despite these considerations, you still want to modify messages, you |
| 5631 | can do so using Exim, but not directly in Exim itself. It is not the job |
| 5632 | of an MTA to modify messages, something that requires understanding of |
| 5633 | their content and format. |
| 5634 | |
| 5635 | Exim provides a hook called a ``transport filter'' that lets you pass |
| 5636 | any outgoing message through a program or script of your choice. It |
| 5637 | is the job of this script to make any changes to the message that you |
| 5638 | require. By this means, you have full control over what changes are |
| 5639 | made, and Exim does not need to know anything about message bodies. |
| 5640 | However, using a transport filter requires additional resources, and may |
| 5641 | slow down mail delivery. |
| 5642 | |
| 5643 | You can use Exim's routers to arrange for those messages that you want |
| 5644 | to modify to be delivered via a transport filter. For example, suppose |
| 5645 | you want to do this for messages from addresses in your domain that are |
| 5646 | being delivered to a remote host. First you need to set up a special |
| 5647 | \%smtp%\ transport that uses a filter, like this: |
| 5648 | |
| 5649 | ==> remote_smtp_filter: |
| 5650 | driver = smtp |
| 5651 | transport_filter = /your/filter/command |
| 5652 | |
| 5653 | Then you need to modify the \%dnslookup%\ router to use this transport |
| 5654 | when the conditions are right: |
| 5655 | |
| 5656 | ==> dnslookup: |
| 5657 | driver = dnslookup |
| 5658 | domains = ! +local_domains |
| 5659 | transport = ${if eq {$sender_address_domain}{your.domain}\ |
| 5660 | {remote_smtp_filter}{remote_smtp}} |
| 5661 | ignore_target_hosts = 127.0.0.0/8 |
| 5662 | no_more |
| 5663 | |
| 5664 | This is the standard \%dnslookup%\ router, but with a modified setting of |
| 5665 | the \transport\ option. When the sender address is in your domain, it |
| 5666 | routes to the special transport instead of the standard one. |
| 5667 | |
| 5668 | The entire message is passed to your filter command on its standard |
| 5669 | input. It must write the modified version to the standard output, taking |
| 5670 | care not to break the RFC 2822 syntax. The command is run as the Exim |
| 5671 | user. |
| 5672 | |
| 5673 | There are a number of potential problems in doing this kind of |
| 5674 | modification in an MTA. Many people believe that to attempt is it wrong, |
| 5675 | because: |
| 5676 | |
| 5677 | 1. It breaks digital signatures, which are becoming legally binding |
| 5678 | in some countries. It may well also break encryption. |
| 5679 | |
| 5680 | 2. It is likely to break MIME encoding, that is, it is likely to wreck |
| 5681 | attachments, unless great care is taken. And what about the case of a |
| 5682 | message containing only binary MIME parts? |
| 5683 | |
| 5684 | 3. It is illegal under German and Dutch law to change the body of |
| 5685 | a mail message in transit. It might potentially be illegal in |
| 5686 | the UK under European law. This consideration applies to ISPs and |
| 5687 | other ``common carriers''. It would presumably not apply in a corporate |
| 5688 | environment where modification was done only to messages originating |
| 5689 | from the employees, before they left the company's network. It might |
| 5690 | also not apply if the senders have explicitly given their consent |
| 5691 | (e.g. agreed to have advertisements added to their incoming mail). |
| 5692 | |
| 5693 | 4. Since the delivered message body was produced by the MTA (not the |
| 5694 | originator, because it was modified), the MTA operator could |
| 5695 | potentially be sued for any content. This again applies to `common |
| 5696 | carrier' MTAs. It's interesting that adding a disclaimer of liability |
| 5697 | could be making you liable for the message, but this case seems |
| 5698 | more likely to involve adding advertisements than disclaimers. After |
| 5699 | all, no postal service in the world opens all the mail it carries to |
| 5700 | add disclaimers. |
| 5701 | |
| 5702 | 5. Some mail clients (old versions of MS outlook) crash if the message |
| 5703 | body of an incoming MIME message has been tampered with. |
| 5704 | |
| 5705 | There are also potential problems that could arise if a scheme to add |
| 5706 | disclaimers goes wrong for some messages: |
| 5707 | |
| 5708 | 1. False negatives: `Ah, this guy usually says he does not represent |
| 5709 | their views, but in this message he doesn't have the disclaimer'. |
| 5710 | |
| 5711 | 2. False positives: `This official announcement does not represent our |
| 5712 | views, oh no'. |
| 5713 | |
| 5714 | An alternative approach to the disclaimer problem would be to insist |
| 5715 | that all relevant messages have the disclaimer appended by the MUA. The |
| 5716 | MTA should refuse to accept any that do not. Again, however, the MTA |
| 5717 | must understand the format of messages in order to do this. Simply |
| 5718 | checking for appropriate wording at the end of the body is not good |
| 5719 | enough. It would probably be necessary to run a Perl script from within |
| 5720 | an Exim system filter, or write a \^^local_scan()^^\ function in order |
| 5721 | to adopt this approach. |
| 5722 | |
| 5723 | Finally, it's a trivial matter to add customized headers of the sort: |
| 5724 | |
| 5725 | ==> X-Disclaimer: This is a standard disclaimer that says that the views |
| 5726 | X-Disclaimer: contained within this message are somebody else's. |
| 5727 | |
| 5728 | which is a much easier alternative to modifying message bodies. |
| 5729 | |
| 5730 | |
| 5731 | Q1602: How can I remove attachments from messages? |
| 5732 | |
| 5733 | A1602: The answer to this is essentially the same as for Q1601. |
| 5734 | |
| 5735 | |
| 5736 | |
| 5737 | 17. ENCRYPTION (TLS/SSL) |
| 5738 | |
| 5739 | Q1701: I am trying to set up an Exim server that uses a self-signed certificate |
| 5740 | to enable my clients to use TLS. However, clients other than Exim |
| 5741 | refuse to accept this certificate. What's wrong? |
| 5742 | |
| 5743 | A1701: It seems that some clients require that the certificate presented by |
| 5744 | the server be a user (also called ``leaf'' or ``site'') certificate, and not |
| 5745 | a self-signed certificate. In this situation, the self-signed |
| 5746 | certificate must be installed on the client as a trusted root |
| 5747 | \*certification authority*\ (CA), and the certificate used by the server |
| 5748 | must be a user certificate signed with that self-signed certificate. |
| 5749 | |
| 5750 | For information on creating self-signed CA certificates and using them |
| 5751 | to sign user certificates, see the \*General implementation overview*\ |
| 5752 | chapter of the Open-source PKI book, available online at |
| 5753 | \?http://ospkibook.sourceforge.net/?\. Here is a quick overview. First, |
| 5754 | read this message: |
| 5755 | |
| 5756 | \?http://www.FreeBSD.org/cgi/mid.cgi?id=3C3F3A93.C1ECF9B0%40mindspring.com?\ |
| 5757 | |
| 5758 | Then, follow the instructions found on these two (consecutive) pages: |
| 5759 | |
| 5760 | \?http://ospkibook.sourceforge.net/docs/OSPKI-2.4.6/OSPKI/initialisation.htm?\ |
| 5761 | \?http://ospkibook.sourceforge.net/docs/OSPKI-2.4.6/OSPKI/keygensign.htm?\ |
| 5762 | |
| 5763 | Two points on the PKI Book literature: |
| 5764 | |
| 5765 | (1) It's assumed that it's okay to use a passphrase-protected key to |
| 5766 | encrypt the user/site/leaf certificate. If this isn't acceptable, |
| 5767 | you seem to be able to strip out the passphrase as follows: |
| 5768 | |
| 5769 | ==> openssl rsa -in user.key -our user.key.new |
| 5770 | mv user.key.new |
| 5771 | |
| 5772 | This should be done immediately after \(user.key)\ is created. |
| 5773 | |
| 5774 | (2) The \*sign.sh*\ script is available in the \*mod_ssl*\ distribution, |
| 5775 | available at \?http://www.modssl.org/source/?\. |
| 5776 | |
| 5777 | Having followed the instructions, you end up with the following files: |
| 5778 | |
| 5779 | (a) \(ca.crt)\ |
| 5780 | |
| 5781 | This file should be installed into the client software as a trusted |
| 5782 | root certification authority. In Windows XP, this can be done as follows: |
| 5783 | |
| 5784 | \#\#Call the file \(ca_cert.cer)\ |
| 5785 | [[br]] |
| 5786 | \#\#Double-click on the file |
| 5787 | [[br]] |
| 5788 | \#\#"Install Certificate"; |
| 5789 | [[br]] |
| 5790 | \#\#"Next" |
| 5791 | [[br]] |
| 5792 | \#\#"Place all certificates in the following store" |
| 5793 | [[br]] |
| 5794 | \#\#"Browse..." |
| 5795 | [[br]] |
| 5796 | \#\#"Trusted Root Certification Authorities" |
| 5797 | [[br]] |
| 5798 | \#\#"OK" |
| 5799 | [[br]] |
| 5800 | \#\#"Next" |
| 5801 | [[br]] |
| 5802 | \#\#"Finish" |
| 5803 | [[br]] |
| 5804 | \#\#"Yes" |
| 5805 | [[br]] |
| 5806 | \#\#"OK" |
| 5807 | |
| 5808 | (b) \(user.crt)\ and \(user.key)\ |
| 5809 | |
| 5810 | These files should be installed into the server software. In Exim, this |
| 5811 | can be done by adding these lines to the configuration file: |
| 5812 | |
| 5813 | ==> tls_certificate = /usr/local/etc/exim/tls_cert |
| 5814 | tls_privatekey = /usr/local/etc/exim/tls_key |
| 5815 | |
| 5816 | Then install \(user.crt)\ and \(user.key)\ under the names \(tls_cert)\ |
| 5817 | and \(tls_key)\ in the appropriate directory. |
| 5818 | |
| 5819 | |
| 5820 | Q1702: How can I arrange for Exim to advertise support for SMTP authentication |
| 5821 | only when the session is encrypted? |
| 5822 | |
| 5823 | A1702: Use this setting: |
| 5824 | |
| 5825 | ==> auth_advertise_hosts = ${if eq{$tls_cipher}{}{}{*}} |
| 5826 | |
| 5827 | |
| 5828 | Q1703: I have some legacy clients that don't use STARTTLS, but which expect to |
| 5829 | negotiate a TLS session automatically on connection to the ssmtp port |
| 5830 | (465). Can Exim handle this? |
| 5831 | |
| 5832 | A1703: If you are using release 4.43 or later, you can set |
| 5833 | |
| 5834 | ==> tls_on_connect_ports = 465 |
| 5835 | |
| 5836 | and then arrange for your daemon to listen on both port 25 and port 465 |
| 5837 | by setting \daemon_smtp_ports\ or \local_interfaces\ or the \-X-\ |
| 5838 | command line option. Or use \(inetd)\ to listen on port 465. |
| 5839 | |
| 5840 | If you are using an earlier release of Exim, you need to run two |
| 5841 | Exim listeners, on different ports, one of which is started with the |
| 5842 | \-tls-on-connect-\ option (which makes all ports act this way). You can |
| 5843 | either use two daemons, or a single daemon, with the other listener |
| 5844 | using \^inetd^\. For example, here are commands to start two daemons: |
| 5845 | |
| 5846 | ==> exim -bd -q15m |
| 5847 | exim -bd -oX '[0.0.0.0]::465' -tls-on-connect |
| 5848 | |
| 5849 | The first is a ``normal'' daemon; the second listens on port 465 and |
| 5850 | expects to negotiate a TLS session at the start of each connection. |
| 5851 | |
| 5852 | |
| 5853 | Q1704: When my Outlook Express 6.0 client sends a STARTTLS command to begin a |
| 5854 | TLS session, Exim doesn't seem to receive it. |
| 5855 | |
| 5856 | A1704: See Q0059. |
| 5857 | |
| 5858 | |
| 5859 | Q1705: I have listed some hosts in \tls_try_verify_hosts\, but when they |
| 5860 | connect, no data appears in \$tls_peerdn$\. |
| 5861 | |
| 5862 | A1705: This means that the clients have not sent certificates when asked by |
| 5863 | the server to do so. If the clients are running Exim, check that |
| 5864 | \tls_certificate\ is correctly set in their \%smtp%\ transports. Note |
| 5865 | that this value is not automatically inherited from the global |
| 5866 | \tls_certificate\ option. |
| 5867 | |
| 5868 | |
| 5869 | Q1706: I have listed some hosts in \tls_verify_hosts\ and provided them with |
| 5870 | certificates, but their connections are always rejected. |
| 5871 | |
| 5872 | A1706: Make sure that the server file containing the expected certificates |
| 5873 | (defined by \tls_verify_certificates\) is readable by the Exim user. |
| 5874 | See also the answer to Q1705. |
| 5875 | |
| 5876 | |
| 5877 | Q1707: I am trying to use TLS with Evolution as a client, and keep seeing this |
| 5878 | error: \*SMTP protocol violation: synchronization error (next input |
| 5879 | sent too soon): rejected "\200F^A^C".*\ What does it mean? |
| 5880 | |
| 5881 | A1707: See Q0086 for a general explanation of the error. In this case, it |
| 5882 | probably means that Evolution is trying to negotiate a TLS session |
| 5883 | immediately it connects, without first using the STARTTLS command. This |
| 5884 | was an older way of starting up TLS, before STARTTLS was defined. See |
| 5885 | Q1703 for how to deal with this. |
| 5886 | |
| 5887 | |
| 5888 | Q1708: I trying to use TLS with Outlook as a client on a box that is running |
| 5889 | Norton Antivirus, but all my email is being rejected with \*Unsupported |
| 5890 | command*\ errors. Why? |
| 5891 | |
| 5892 | A1708: Norton Antivirus does not support TLS or AUTH. It puts a broken SMTP |
| 5893 | proxy between you and the Exim server. You need to turn off outbound |
| 5894 | scanning of email. |
| 5895 | |
| 5896 | |
| 5897 | |
| 5898 | 20. MILLENNIUM |
| 5899 | |
| 5900 | Q2000: Are there any Y2K issues with Exim? |
| 5901 | |
| 5902 | A2000: The author of Exim believes that it is Y2K-compliant, as long as the |
| 5903 | underlying operating system and C library are. Exim does not parse dates |
| 5904 | or times at all. Internally, it makes some use of binary timestamps in |
| 5905 | Unix format (number of seconds since 1-Jan-1970) and uses C library |
| 5906 | services to convert these to printing forms (e.g. for logging). The |
| 5907 | printing forms all use 4-digit years. Some people have tried various |
| 5908 | tests. No problems have been reported, but details of what tests have |
| 5909 | been done are not available. |
| 5910 | |
| 5911 | Well, it's now November 2001, and no Y2K problems have been reported, so |
| 5912 | it looks like I was right. This entry is retained as historical |
| 5913 | nostalgia. |
| 5914 | |
| 5915 | |
| 5916 | |
| 5917 | 50. MISCELLANEOUS |
| 5918 | |
| 5919 | Q5001: How can I arrange to allow a limited set of users to perform a limited |
| 5920 | set of Exim administration functions? I don't want to put them all in |
| 5921 | the //exim// group. |
| 5922 | |
| 5923 | A5001: See \?http://www.chiark.greenend.org.uk/~ian/userv/?\. Using \^userv^\ you can |
| 5924 | arrange (for example) for certain users to be able to invoke \^mailq^\ or |
| 5925 | \^runq^\ or other preset commands as \^exim^\ (or any other user, as configured) |
| 5926 | with only \^userv^\ configuration. If you want to check the particular Exim |
| 5927 | options available you can easily do it with shell or Perl scripts and |
| 5928 | \^userv^\ configuration, and provided you know how to do argument |
| 5929 | ``unparsing'' properly in shell or Perl it will be secure. |
| 5930 | |
| 5931 | |
| 5932 | Q5002: I want to ``tail'' the Exim log, but I have a number of other logs I also |
| 5933 | want to ``tail'', and the number of tailing windows is getting to be a |
| 5934 | nuisance. |
| 5935 | |
| 5936 | A5002: Look for a program called \^xtail^\ (despite its name, it's not an |
| 5937 | X-windows application). It allows you to do multiple tails, even of |
| 5938 | entire directories. |
| 5939 | |
| 5940 | Alternately, get the GNU version of \^tail^\, from the GNU textutils |
| 5941 | package (\?ftp://ftp.gnu.org/gnu/textutils/?\). GNU tail lets you run |
| 5942 | \"tail -f\" on multiple files at the same time, although it doesn't work |
| 5943 | on entire directories like \^xtail^\ can. If you are running Linux, you |
| 5944 | probably already have a version of GNU \^tail^\ that can follow multiple |
| 5945 | files. |
| 5946 | |
| 5947 | |
| 5948 | Q5003: How can I persuade Exim to accept ETRN commands without the leading |
| 5949 | # character? |
| 5950 | |
| 5951 | A5003: Set the option |
| 5952 | |
| 5953 | ==> smtp_etrn_command = /usr/lib/sendmail -R $domain |
| 5954 | |
| 5955 | This causes Exim to run that command, with \$domain$\ replaced by the |
| 5956 | argument of ETRN. The default action of Exim is to require the # sign |
| 5957 | in order to be RFC-compliant, and to run the equivalent of |
| 5958 | |
| 5959 | ==> smtp_etrn_command = /usr/lib/sendmail -R ${substr_1:$domain} |
| 5960 | |
| 5961 | which uses the argument without the leading # as the value for the \-R-\ |
| 5962 | option. You aren't restricted to running Exim with the \-R-\ option, of |
| 5963 | course. You can specify any command you like, with any number of |
| 5964 | arguments. In particular, you can pass over the IP address of the caller |
| 5965 | via \$sender_host_address$\. However, if you make use of expansion strings |
| 5966 | in the arguments, each one must be entirely contained in a single |
| 5967 | argument. For example, if you want to remove the first character of the |
| 5968 | ETRN argument when it is @ or #, you could use |
| 5969 | |
| 5970 | ==> smtp_etrn_command = "/usr/lib/sendmail -R \ |
| 5971 | \"${if match {$domain}{^[@#]}{${substr_1:$domain}}{$domain}}\"" |
| 5972 | |
| 5973 | The internal quotes are necessary because of the white space inside the |
| 5974 | expansion string. |
| 5975 | |
| 5976 | |
| 5977 | Q5004: I've recently noticed that emails I send with a ::Bcc:: line are being |
| 5978 | delivered to their final destination with the ::Bcc:: line still present. |
| 5979 | |
| 5980 | A5004: Exim removes ::Bcc:: lines only if you call it with the \-t-\ option (i.e. |
| 5981 | when it is acting partly as an MUA). It does not remove ::Bcc:: lines that |
| 5982 | are present in incoming SMTP mail or command-line mail that does not |
| 5983 | use \-t-\. Indeed, it should not remove them, because only the |
| 5984 | initiating software (i.e. the MUA) can tell what to do with ::Bcc:: |
| 5985 | lines; any MTA software has to leave them alone. This is what RFC 2822 |
| 5986 | has to say about ::Bcc:: |
| 5987 | |
| 5988 | \*The ::Bcc:: field (where the ``Bcc'' means ``Blind Carbon Copy'') contains |
| 5989 | addresses of recipients of the message whose addresses are not to be |
| 5990 | revealed to other recipients of the message. There are three ways in |
| 5991 | which the ::Bcc:: field is used. In the first case, when a message |
| 5992 | containing a ::Bcc:: field is prepared to be sent, the ::Bcc:: line is |
| 5993 | removed even though all of the recipients (including those specified |
| 5994 | in the ::Bcc:: field) are sent a copy of the message. In the second |
| 5995 | case, recipients specified in the ::To:: and ::Cc:: lines each are sent |
| 5996 | a copy of the message with the ::Bcc:: line removed as above, but the |
| 5997 | recipients on the ::Bcc:: line get a separate copy of the message |
| 5998 | containing a ::Bcc:: line. (When there are multiple recipient |
| 5999 | addresses in the ::Bcc:: field, some implementations actually send a |
| 6000 | separate copy of the message to each recipient with a ::Bcc:: |
| 6001 | containing only the address of that particular recipient.) Finally, |
| 6002 | since a ::Bcc:: field may contain no addresses, a ::Bcc:: field can be |
| 6003 | sent without any addresses indicating to the recipients that blind |
| 6004 | copies were sent to someone. Which method to use with ::Bcc:: fields |
| 6005 | is implementation dependent, but refer to the ``Security |
| 6006 | Considerations'' section of this document for a discussion of each.*\ |
| 6007 | |
| 6008 | |
| 6009 | Q5005: I used \^gv^\ 3.5.8 (\^ghostview^\) to try printing \(spec.ps)\. After every |
| 6010 | printed page, the printer ejects a blank sheet. Is this something to do |
| 6011 | with using ``letter'' rather than A4 paper? |
| 6012 | |
| 6013 | A5005: This seems to be an effect of using \^ghostview^\. Although the PostScript |
| 6014 | is generated for A4 pages, the size of the page images is such that they |
| 6015 | should fit on a letter page (they are shorter than would normally be |
| 6016 | used on A4 paper). If the PostScript file is sent directly to a |
| 6017 | PostScript printer, there is no problem. An alternative is to get hold |
| 6018 | of the \^psutils^\ toolset, which is available from |
| 6019 | \?ftp://ftp.dcs.ed.ac.uk/pub/psutils/psutils.tar.gz?\. |
| 6020 | It contains utilities for extracting pages (which can be useful for |
| 6021 | double-sided printing) and for resizing pages. If you resize from A4 to |
| 6022 | letter the text shrinks a bit, but should then be printable via |
| 6023 | \^ghostview^\. |
| 6024 | |
| 6025 | |
| 6026 | Q5006: Why aren't there any man pages for Exim? I don't always carry my printed |
| 6027 | documentation. |
| 6028 | |
| 6029 | A5006: A single man page that lists the command line options is provided in |
| 6030 | file \(doc/exim.8)\ in the Exim distribution. Several other forms of |
| 6031 | online documentation are available. As well as plain ASCII text, the |
| 6032 | there are two forms - Texinfo and HTML - which have a certain amount of |
| 6033 | built-in indexing for ease of finding your way around. There are no man |
| 6034 | pages apart from the command line one because the author of Exim hasn't |
| 6035 | the time (or desire :-) to maintain yet another documentation format. |
| 6036 | Besides, it is hard to know how to split the Exim manual up. |
| 6037 | |
| 6038 | |
| 6039 | Q5007: When I send a message using the \-t-\ command line option, Exim sends only |
| 6040 | to the addresses within the message, not to those on the command line. |
| 6041 | |
| 6042 | A5007: There seems to be some confusion in the Sendmail community about the |
| 6043 | interpretation of recipient addresses on the command line if the \-t-\ |
| 6044 | option is used. Some versions do one thing, and some another. Here is an |
| 6045 | except from one version of the Sendmail documentation for \-t-\: |
| 6046 | |
| 6047 | \*Read message for recipients. ::To::, ::Cc::, and ::Bcc:: lines will |
| 6048 | be scanned for recipient addresses. The ::Bcc:: line will be |
| 6049 | deleted before transmission. Any addresses in the argument |
| 6050 | list will be suppressed, that is, they will not receive |
| 6051 | copies even if listed in the message header.*\ |
| 6052 | |
| 6053 | By default Exim follows this specification, and interprets addresses on |
| 6054 | the command line as addresses not to send to. You can set |
| 6055 | |
| 6056 | ==> extract_addresses_remove_arguments = false |
| 6057 | |
| 6058 | to change this behaviour so that command line addresses are added to the |
| 6059 | addresses that are taken from the header lines. |
| 6060 | |
| 6061 | |
| 6062 | Q5008: If I set up a domain list to contain //*customer.com//, it matches |
| 6063 | //customer.com// and //abc.customer.com// as required, but it also matches |
| 6064 | //noncustomer.com//, which is wrong. How can I get round this? |
| 6065 | |
| 6066 | A5008: You have to specify two entries in the list: |
| 6067 | |
| 6068 | ==> customer.com : *.customer.com |
| 6069 | |
| 6070 | because * in a domain list matches any characters, including \"."\ and |
| 6071 | including a null sequence. |
| 6072 | |
| 6073 | |
| 6074 | Q5009: I want to match all domains of the form //*.oyoy.org// but want a few |
| 6075 | exceptions. For instance I don't want //foo.oyoy.org// or //bar.oyoy.org// to be |
| 6076 | included. What is the best way to do this? |
| 6077 | |
| 6078 | A5009: Use negative items in the domain list, like this: |
| 6079 | |
| 6080 | ==> domainlist local_domains = !foo.oyoy.org : !bar.oyoy.org : *.oyoy.org |
| 6081 | |
| 6082 | If there are many exceptions, you can use a lookup instead of listing |
| 6083 | them all inline. If there are a number of exceptions that match a |
| 6084 | particular pattern, you could use a regular expression. |
| 6085 | |
| 6086 | |
| 6087 | Q5010: I can't seem to find a pre-built version of Exim anywhere. The machine |
| 6088 | is a Sparc 5 running Solaris 2.6. |
| 6089 | |
| 6090 | A5010: The primary distribution is source-only. However, some people have built |
| 6091 | and distributed RPMs and debs for Linux systems, and ports for FreeBSD. |
| 6092 | I haven't heard of anyone doing this for Solaris. The main problem with |
| 6093 | binary distributions is that there are a number of build-time options, |
| 6094 | requiring the answers to questions like: |
| 6095 | |
| 6096 | . Which DBM library do you have? (On Solaris probably ndbm, but no easy |
| 6097 | default on some other systems.) |
| 6098 | |
| 6099 | . Which uid/gid do you want to use for Exim? |
| 6100 | |
| 6101 | . Where do you want the configuration file to be? (Many different |
| 6102 | answers, even on the same OS, depending on local policy.) |
| 6103 | |
| 6104 | . Ditto for the binaries. |
| 6105 | |
| 6106 | . Which optional bits of Exim do you want to include? |
| 6107 | |
| 6108 | |
| 6109 | Q5011: Is there a version of Exim available that runs under Windows? |
| 6110 | |
| 6111 | A5011: A long time ago somebody took a copy of the Exim source with the aim of |
| 6112 | trying to port it to Windows NT. However, I never heard anything more. |
| 6113 | However, current versions of Exim can be made to run under Cygwin. |
| 6114 | |
| 6115 | |
| 6116 | Q5012: Does Exim support Delivery Status Notification (DSN), Message Status |
| 6117 | Notification (MSN), or any other form of delivery acknowledgement? |
| 6118 | |
| 6119 | A5012: See Q0607. |
| 6120 | |
| 6121 | |
| 6122 | Q5013: What does ``Exim'' stand for? |
| 6123 | |
| 6124 | A5013: Originally, it was ``EXperimental Internet Mailer'', which was the best I |
| 6125 | could come up with when I was starting out. At that point it was |
| 6126 | experimental - I wanted to see if the ideas I had for extending Smail's |
| 6127 | approach actually worked. Then somebody discovered about it and wanted |
| 6128 | to start using it, and told other people about it... |
| 6129 | |
| 6130 | |
| 6131 | Q5014: Although I haven't set \check_spool_space\, Exim is still checking the |
| 6132 | amount of space on the spool for incoming SMTP messages that use the |
| 6133 | SIZE option. Can I suppress this? |
| 6134 | |
| 6135 | A5014: The RFC for the SIZE option says: |
| 6136 | |
| 6137 | \*If the server currently lacks sufficient resources to accept a |
| 6138 | message of the indicated size, but may be able to accept the |
| 6139 | message at a later time, it responds with code ``452 |
| 6140 | insufficient system storage''.*\ |
| 6141 | |
| 6142 | and that is what Exim is trying to implement. This is entirely |
| 6143 | independent from \check_spool_space\, which says \*don't accept any mail |
| 6144 | if there is less than so much space in the spool partition*\, though the |
| 6145 | code is optimised to do both checks at the same time if required. |
| 6146 | However, you can suppress the SIZE check if you want to, by unsetting |
| 6147 | \smtp_check_spool_space\. |
| 6148 | |
| 6149 | |
| 6150 | Q5015: I just noticed log entries that start off \"<= <>"\. Am I correct in |
| 6151 | assuming that the \"<>"\ indicates that the envelope did not contain any |
| 6152 | ``From'' data? |
| 6153 | |
| 6154 | A5015: Yes. This indicates a delivery failure report (aka a ``bounce message''), |
| 6155 | as specified in RFC 2821. The reason for using empty sender addresses is |
| 6156 | to identify bounce messages so that they themselves do not cause further |
| 6157 | bounces. Empty senders are also used for other kinds of report which |
| 6158 | should not themselves cause the generation of bounce messages. For |
| 6159 | example, Exim uses them when sending out warnings about delivery delays. |
| 6160 | |
| 6161 | |
| 6162 | Q5016: I've received a message which does not have my address in the ::To:: |
| 6163 | line. It is a spam message with the same address in both the ::From:: and |
| 6164 | the ::To:: headers. How can this happen, and why doesn't Exim reject it? |
| 6165 | |
| 6166 | A5016: There is an important distinction between the ``envelope'' from and to and |
| 6167 | the ``header'' from and to. The former are sometimes called the ``sender'' |
| 6168 | and ``recipient''. An email message needs an ``envelope'' for the same |
| 6169 | reason that paper mail does - the envelope tells the delivery mechanism |
| 6170 | what to do with this copy of the message, whereas the ::To:: header lists |
| 6171 | all the recipients, including those who have been sent different copies |
| 6172 | of the message because their mailbox is on some other host. |
| 6173 | |
| 6174 | An MTA such as Exim works entirely with the ``envelope'' addresses, not |
| 6175 | with those in the header lines. Don't try to block mail where envelope |
| 6176 | from and the header from differ. There are common legitimate cases where |
| 6177 | this happens, for example, messages forwarded from mailing lists and |
| 6178 | delivery failure reports. |
| 6179 | |
| 6180 | |
| 6181 | Q5017: Can (or will) Exim ever handle a message delivery purely in memory, |
| 6182 | that is, it is handled without it ever hitting the disk? |
| 6183 | |
| 6184 | A5017: It doesn't, and never will. Accepting and delivering a message are two |
| 6185 | entirely separate, independent processes, which communicate only by |
| 6186 | writing/reading the message on the disk. |
| 6187 | |
| 6188 | |
| 6189 | Q5018: If I am using dbm files for data that Exim reads, can I rebuild them |
| 6190 | on the fly, or do I need to restart Exim every time I make a change? |
| 6191 | |
| 6192 | A5018: Exim re-reads the file every time it consults it, so if you are using a |
| 6193 | cdb or a DBM library that uses just a single file (i.e. not ndbm), |
| 6194 | you can just build the new file with a temporary file name, and use |
| 6195 | \^mv^\ to rename it into the correct place on the fly. If there are two |
| 6196 | files to rename, there is a window of time during which the DBM database |
| 6197 | is inconsistent. On lightly loaded systems this may not matter. |
| 6198 | |
| 6199 | |
| 6200 | Q5019: I need an option that is the opposite of \-bpa-\, that is, a listing of |
| 6201 | those addresses generated from a top-level address that have not yet |
| 6202 | been delivered. |
| 6203 | |
| 6204 | A5019: Exim does not keep this information. It saves only the top-level |
| 6205 | addresses and the list of addresses that are finished with. At each |
| 6206 | delivery attempt, generated addresses are recomputed from scratch. This |
| 6207 | makes it possible to correct errors in redirection data that is |
| 6208 | causing delivery delays. However, there is an option you can set on a |
| 6209 | \redirect\ router that changes things. It is called \one_time\, and if |
| 6210 | it is set, the list of generated addresses gets added to the top-level |
| 6211 | list at the first delivery attempt, and is never regenerated. Because |
| 6212 | top-level address lists must be real email addresses, this option cannot |
| 6213 | be used if any of the generated addresses are pipes, files, or |
| 6214 | autoreplies. |
| 6215 | |
| 6216 | |
| 6217 | Q5020: How can I make Exim receive incoming mail, queue it, but not attempt to |
| 6218 | deliver it? I want to be in this state while moving some mailboxes. |
| 6219 | |
| 6220 | A5020: Set \queue_only\ in the Exim configuration. Then kill your daemon, |
| 6221 | and restart it without the \-q-\ option (i.e. with just the \-bd-\ option), |
| 6222 | so that it does not spawn any queue runners. This stops all deliveries, |
| 6223 | remote as well as local. |
| 6224 | |
| 6225 | |
| 6226 | Q5021: What does Exim use for POP and IMAP as a default? Do I have to install |
| 6227 | anything else? |
| 6228 | |
| 6229 | A5021: Yes. Exim provides MTA functionality. That is, it delivers mail. POP and |
| 6230 | IMAP are two of several ways of reading previously-delivered mail. Exim |
| 6231 | does not provide that functionality. You need to install POP and/or IMAP |
| 6232 | daemons; there are several to choose from. |
| 6233 | |
| 6234 | |
| 6235 | Q5022: Is there an easy way of removing all queued messages at once in a safe |
| 6236 | way? |
| 6237 | |
| 6238 | A5022: Try this command: |
| 6239 | |
| 6240 | ==> exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | sh |
| 6241 | |
| 6242 | |
| 6243 | Q5023: Why does Exim do \*ident*\ callbacks by default? Isn't this just a waste |
| 6244 | of resources? I've been told this is an ancient way of authentication. |
| 6245 | Is it obsolete? |
| 6246 | |
| 6247 | A5023: This is a common misunderstanding, at least partially resulting from the |
| 6248 | incorrect naming of the protocol when it was first published. |
| 6249 | The service on port 113 is an identification service, which allows a |
| 6250 | target host to record information identifying the user responsible for |
| 6251 | making a connection to it. The information may not be intelligible to |
| 6252 | the recording host - it could, for example, be encrypted so that only |
| 6253 | someone on the calling host can make sense of it. It is useful for |
| 6254 | providing additional information in an audit trail. |
| 6255 | |
| 6256 | At least one site has found \^ident^\ effective against two rather |
| 6257 | prevalent kinds of open proxy (whether already blacklisted at the RBLs |
| 6258 | or not). An ACL statement is used to reject mail from servers that |
| 6259 | return \^ident^\ strings of \"squid"\ and \"CacheFlow Server"\. |
| 6260 | Snippets such as this in the RCPT ACL do the trick: |
| 6261 | |
| 6262 | ==> deny condition = ${if eq{$sender_ident}{CacheFlow Server}{1}{0}} |
| 6263 | message = Rejected - appears to be an unsecured proxy: $sender_ident |
| 6264 | |
| 6265 | The likelihood that a genuine mail process would return those specific |
| 6266 | ident strings is vanishingly small. |
| 6267 | |
| 6268 | The \^ident^\ data should not be used for authentication in any form |
| 6269 | except on a closed secure network between cooperating hosts (probably |
| 6270 | not even then). The information from the source host is only as reliable |
| 6271 | as the host itself. If it's not under your control then you have to |
| 6272 | treat the information as opaque data that can be used only by the |
| 6273 | sysadmin of the source system to trace back connection data. Some |
| 6274 | \^ident^\ implementations send out opaque cookies or DES encrypted |
| 6275 | information. \^Ident^\ is hugely useful at times - especially for |
| 6276 | checking back on connections from multiuser machines (as opposed to |
| 6277 | one-person desktop boxes). |
| 6278 | |
| 6279 | You can stop Exim making ident calls by adding |
| 6280 | |
| 6281 | ==> rfc1413_query_timeout = 0s |
| 6282 | |
| 6283 | to its configuration, but it is better to leave it active (reducing the |
| 6284 | timeout to 10s or less if it is causing problems) - it costs very |
| 6285 | little, and in cases of mail forgery from a multiuser system can track |
| 6286 | the sinner concerned very quickly. |
| 6287 | |
| 6288 | |
| 6289 | Q5024: I often have the problem that a message gets stuck in the mail queue and |
| 6290 | I want it to be bounced to a certain address. |
| 6291 | |
| 6292 | A5024: You can do this using a combination of four command line options, like |
| 6293 | this: |
| 6294 | |
| 6295 | ==> exim -Mf 14Fdlq-0003kM-00 |
| 6296 | exim -Mmad 14Fdlq-0003kM-00 |
| 6297 | exim -Mar 14Fdlq-0003kM-00 new@ddress |
| 6298 | exim -M 14Fdlq-0003kM-00 |
| 6299 | |
| 6300 | The first command freezes the message so that a queue runner won't start |
| 6301 | to deliver it while you are changing things. The second command marks |
| 6302 | all existing recipients as delivered. The third command adds a new |
| 6303 | recipient, and the fourth command forces a delivery of the message, |
| 6304 | which will cause it to be delivered to the new address, and then |
| 6305 | deleted. |
| 6306 | |
| 6307 | |
| 6308 | Q5025: What precautions should I take when editing Exim's run time |
| 6309 | configuration file? |
| 6310 | |
| 6311 | A5025: Edit the file and save the result in a new file. Test the syntax of |
| 6312 | the new file by running a command like this: |
| 6313 | |
| 6314 | ==> exim -bV -C exim.conf.new |
| 6315 | |
| 6316 | That will check for syntax errors without disturbing your running |
| 6317 | configuration. If you are paranoid enough, run, as \/root/\, |
| 6318 | |
| 6319 | ==> exim -C exim.conf.new <some address> |
| 6320 | <some message> |
| 6321 | . |
| 6322 | |
| 6323 | and see if it delivers it. Carry on testing until happy. When happy, |
| 6324 | |
| 6325 | ==> mv exim.conf.new exim.conf |
| 6326 | kill -HUP `cat /var/spool/exim/exim-daemon.pid` |
| 6327 | |
| 6328 | Then check the Exim log to be sure the daemon restarted OK. Watch the |
| 6329 | log for a bit to see that mail is flowing. |
| 6330 | |
| 6331 | |
| 6332 | Q5026: Is exim able to use RFC 2645, \*On-demand Mail Relay*\ (ODMR)? |
| 6333 | |
| 6334 | A5026: No. |
| 6335 | |
| 6336 | |
| 6337 | Q5027: Is there any way I can send bounces to the postmaster, and nobody else? |
| 6338 | Basically, I want to receive them, and I don't want the reply/from |
| 6339 | person to get them. If I think they need it I will forward it myself. |
| 6340 | |
| 6341 | A5027: Put \"errors_to=postmaster"\ on every router. |
| 6342 | |
| 6343 | |
| 6344 | Q5028: When I HUP the Exim daemon, the name shown in the process table changes |
| 6345 | from \(/usr/lib/sendmail)\ (which is a symlink) to the real binary name. |
| 6346 | Can I change this? |
| 6347 | |
| 6348 | A5028: Add this to your Exim configuration: |
| 6349 | |
| 6350 | ==> exim_path = /usr/lib/sendmail |
| 6351 | |
| 6352 | |
| 6353 | Q5029: A message with a recipient address that contains a non-printing character |
| 6354 | is stuck on my mail queue. How can I remove this address? |
| 6355 | |
| 6356 | A5029: You can use the \-Mmd-\ command line option to mark a recipient address |
| 6357 | ``delivered'', which effectively removes it. If you are using the Bash |
| 6358 | shell, you can enter non-printing characters using an escape sequence. |
| 6359 | For example: |
| 6360 | |
| 6361 | ==> exim -Mmd 15HKvU-00013Q-00 $'\240'abc@x.y.z |
| 6362 | |
| 6363 | In this example, the first character of the local part has a code value |
| 6364 | of 240. If you are using a shell that does not support this, create the |
| 6365 | command in a file and run it as a shell script. |
| 6366 | |
| 6367 | |
| 6368 | Q5030: I am using exim in a two queues scenario, with two different |
| 6369 | configuration files. How can I run a second copy of \^eximon^\ to |
| 6370 | inspect and modify the alternate queue? |
| 6371 | |
| 6372 | A5030: Use these commands (or put them in a script): |
| 6373 | |
| 6374 | ==> EXIMON_EXIM_CONFIG=/your/path/exim/configure.alternate |
| 6375 | export EXIMON_EXIM_CONFIG |
| 6376 | /your/path/exim/bin/eximon |
| 6377 | |
| 6378 | |
| 6379 | Q5031: Why is there no sender address on bounce messages? It shows up as "<>". |
| 6380 | |
| 6381 | A5031: See the answer to Q0042. |
| 6382 | |
| 6383 | |
| 6384 | Q5032: Are there any Exim web-based administration scripts? |
| 6385 | |
| 6386 | A5032: No (as far as is known). It seems likely that producing one that is |
| 6387 | generic enough would be a difficult task. |
| 6388 | |
| 6389 | |
| 6390 | Q5033: How can I send a copy of all outgoing messages to another mailbox? |
| 6391 | |
| 6392 | A5033: The most straightforward way is to set up a system filter, and include |
| 6393 | a command such as: |
| 6394 | |
| 6395 | ==> unseen deliver mailbox@whatever.domain |
| 6396 | |
| 6397 | This sends a copy of every message to //mailbox@whatever.domain// |
| 6398 | (unless the message already has that recipient - Exim never does |
| 6399 | duplicate deliveries). |
| 6400 | |
| 6401 | To save only ``outgoing'' messages, you need to come up with a |
| 6402 | definition of what ``outgoing'' means. Typically, this might be a check |
| 6403 | on the sender address and/or on the originating host. Here is an |
| 6404 | example: |
| 6405 | |
| 6406 | ==> if $sender_address_domain is mydomain.com and |
| 6407 | ${mask:$sender_host_address/24} is 192.168.324.0/24 |
| 6408 | then |
| 6409 | unseen deliver mailbox@whatever.domain |
| 6410 | endif |
| 6411 | |
| 6412 | |
| 6413 | Q5034: Is there any way to make the \queue_only\ option conditional? I would |
| 6414 | like the ability to queue messages from external sources while deliver |
| 6415 | locally generated email as normal. |
| 6416 | |
| 6417 | A5034: There is no direct way of doing this. However, you can achieve the |
| 6418 | effect. In one of your ACLs that checks incoming mail from external |
| 6419 | sources, put |
| 6420 | |
| 6421 | ==> warn control = queue_only |
| 6422 | |
| 6423 | You can add other conditions as well, of course. |
| 6424 | |
| 6425 | |
| 6426 | Q5035: Does Exim run with different permissions between \-bt-\ and \-bh-\, or |
| 6427 | between verifying and actual sending? |
| 6428 | |
| 6429 | A5035: Yes. For \-bt-\ it runs as root, as it would when delivering a message. |
| 6430 | For \-bh-\, \-bv-\, and when actually receiving a message, it runs as |
| 6431 | the Exim user. |
| 6432 | |
| 6433 | |
| 6434 | |
| 6435 | 91. MAC OS X |
| 6436 | |
| 6437 | Q9101: How can I install Exim on Mac OS X? |
| 6438 | |
| 6439 | A9101: (1) There is useful advice on this web page: |
| 6440 | \?http://www.afp548.com/Articles/Jaguar/exim410.html?\. |
| 6441 | |
| 6442 | (2) There is a package installer available at this URL: |
| 6443 | \?ftp://members.aol.com/AFP548dotcom/EximInstaller.sit?\. |
| 6444 | |
| 6445 | (3) There is another package installer for the combination of MySQL, |
| 6446 | Exim, Exiscan, CourierIMAP, and SpamAssassin at this URL: |
| 6447 | \?http://maxo.captainnet.net/installs/mail-install.html?\. |
| 6448 | |
| 6449 | |
| 6450 | |
| 6451 | 92. FREEBSD |
| 6452 | |
| 6453 | Q9201: On FreeBSD, \(/usr/sbin/sendmail)\ is a symbolic link to |
| 6454 | \(/usr/sbin/mailwrapper)\; it doesn't contain the Sendmail binary. How |
| 6455 | should I replace Sendmail with Exim on FreeBSD? |
| 6456 | |
| 6457 | A9201: There is a file called \(/etc/mail/mailer.conf)\ which selects what to |
| 6458 | run for various MTA calls. Instead of changing \(/usr/sbin/sendmail)\, |
| 6459 | you should edit this file instead, to read something like this: |
| 6460 | |
| 6461 | ==> sendmail /usr/exim/bin/exim |
| 6462 | send-mail /usr/exim/bin/exim |
| 6463 | mailq /usr/exim/bin/exim -bp |
| 6464 | newaliases /usr/bin/true |
| 6465 | |
| 6466 | You probably also need to edit \(/etc/periodic.conf)\; see Q9202. |
| 6467 | |
| 6468 | |
| 6469 | Q9202: A script that FreeBSD runs nightly uses \^mailq^\ with the \-Ac-\ |
| 6470 | parameter. Why doesn't Exim recognize this? |
| 6471 | |
| 6472 | A9202: \-Ac-\ is a Sendmail option that requests that mailq ``Show the mail |
| 6473 | submission queue specified in \(/etc/mail/submit.cf)\ instead of the |
| 6474 | MTA queue specified in \(/etc/mail/sendmail.cf)\''. Exim doesn't have |
| 6475 | the concept of a ``submission queue''. You can disable this feature |
| 6476 | of the nightly script by adding the line |
| 6477 | |
| 6478 | ==> daily_status_include_submit_mailq="NO" # No separate 'submit' queue |
| 6479 | |
| 6480 | to the file \(/etc/periodic.conf)\. |
| 6481 | |
| 6482 | |
| 6483 | Q9203: How can I use Exim for authenticated SMTP using Cyrus on FreeBSD? |
| 6484 | |
| 6485 | A9203: This web page may help: \?http://www.munk.nu/exim/exim-freebsd-asmtp.php?\. |
| 6486 | |
| 6487 | |
| 6488 | |
| 6489 | 93. HP-UX |
| 6490 | |
| 6491 | Q9301: I'm trying to compile on an HP machine and I don't have \^gcc^\ there. So I |
| 6492 | put \"CC=cc"\ in the \(Local/Makefile)\, but I got this error: |
| 6493 | |
| 6494 | ==> (Bundled) cc: "buildconfig.c", line 54: error 1705: Function prototypes |
| 6495 | are an ANSI feature. |
| 6496 | |
| 6497 | A9301: The bundled compiler is not an ANSI C compiler. You either have to get a |
| 6498 | copy of \^gcc^\ from the HPUX Software Porting Archives or buy the ANSI cc |
| 6499 | from HP. The advice given by one user of HP systems on the Exim |
| 6500 | mailing list was as follows: |
| 6501 | |
| 6502 | \*Personally, I wouldn't use anything but the ANSI C compiler. gcc |
| 6503 | works for compilation, but it doesn't know squat about PA-RISC chips |
| 6504 | past the 1.0 rev. Since then, HP has come out with PA-RISC 1.1, 2.0, |
| 6505 | and 2.1, each with better features. gcc will compile for them, but it |
| 6506 | doesn't produce anywhere near the optimization that HP's compiler |
| 6507 | does.*\ |
| 6508 | |
| 6509 | \*I took the gcc road when we moved from FreeBSD to HP-UX because I was |
| 6510 | familiar with it. After 6 months, I had to go and re-port everything |
| 6511 | over when we realized that gcc wasn't going to do it for us long-term. |
| 6512 | If I could give advice to any new HP-UX admin: don't use gcc if you |
| 6513 | can afford the ANSI C compiler. Based on the cost of even the lowest |
| 6514 | HP workstation, that usually isn't a problem.*\ |
| 6515 | |
| 6516 | |
| 6517 | |
| 6518 | 94. BSDI |
| 6519 | |
| 6520 | Q9401: On BSDI 4.0, Exim built with Perl support exits with the error message |
| 6521 | |
| 6522 | ==> ./exim: can't load library 'libperl.so' |
| 6523 | |
| 6524 | A9401: You probably compiled perl5 yourself, without looking into |
| 6525 | |
| 6526 | ==> /usr/src/contrib/perl5/perl5.004_02/hints/bsdos.sh |
| 6527 | |
| 6528 | first. The problem is that the command |
| 6529 | |
| 6530 | ==> perl5 -MExtUtils::Embed -e ldopts |
| 6531 | |
| 6532 | doesn't give you sufficient flags to link something with libperl. |
| 6533 | Since 5.004_02 the \(hints/bsdos.sh)\ file has changed to adapt to the |
| 6534 | changes between BSDI 3.1 and 4.0, but it is still not entirely right. |
| 6535 | |
| 6536 | The solution is, when you compile perl, change the \ccdlflags\ |
| 6537 | variable in config.sh to: |
| 6538 | |
| 6539 | ==> -rdynamic -Wl,-rpath,/usr/local/lib/perl5/5.00502/i386-bsdos/CORE |
| 6540 | |
| 6541 | (or something similar). Alternatively, you can run \(./Configure)\ and |
| 6542 | answering the question \*Any special flags to pass to cc to use dynamic |
| 6543 | loading?*\ with the above line. It is not known what \-rdynamic-\ means |
| 6544 | (it's not apparently documented in any man page), but that's what BSDI |
| 6545 | guys did to compile perl5 which comes with BSDI 4.0 distribution. |
| 6546 | |
| 6547 | |
| 6548 | |
| 6549 | 95. IRIX |
| 6550 | |
| 6551 | Q9501: The IP addresses for incoming calls are all being given as |
| 6552 | 255.255.255.255 or 0.0.0.0. |
| 6553 | |
| 6554 | A9501: This problem should no longer occur because a workaround has been |
| 6555 | installed in Exim. |
| 6556 | |
| 6557 | |
| 6558 | |
| 6559 | 96. LINUX |
| 6560 | |
| 6561 | Q9601: Exim is mysteriously crashing, usually when forking to send a delivery |
| 6562 | error message. |
| 6563 | |
| 6564 | A9601: This has been seen in cases where Exim has been incorrectly built with |
| 6565 | a muddled combination of an \(ndbm.h)\ include file and a non-matching |
| 6566 | DBM library. |
| 6567 | |
| 6568 | Faults like this have also been seen on systems with faulty motherboards. |
| 6569 | You could try to compile the Linux kernel 10 times - if the compile |
| 6570 | process stops with signal 11, your hardware is to blame. |
| 6571 | |
| 6572 | |
| 6573 | Q9602: I want to use \^logrotate^\ which is standard with RH5.2 Linux to rotate |
| 6574 | my mail logs. Anyone worked out the \^logrotate^\ config file that will |
| 6575 | do this? |
| 6576 | |
| 6577 | A9602: Here's one suggestion: |
| 6578 | |
| 6579 | ==> /var/log/exim/main.log { |
| 6580 | create 644 exim exim |
| 6581 | rotate 4 |
| 6582 | compress |
| 6583 | delaycompress |
| 6584 | } |
| 6585 | |
| 6586 | The sleep is added to allow things to close the log file prior to |
| 6587 | compression. You also need similar entries for the panic log and the |
| 6588 | reject log, of course. |
| 6589 | |
| 6590 | |
| 6591 | Q9603: I'm seeing the message \*inetd[334]: imap/tcp server failing (looping), |
| 6592 | service terminated*\ on a RedHat 5.2 system, causing \^imap^\ connections to |
| 6593 | be refused. The \^imapd^\ in use is Washington Univers 12.250. Could this |
| 6594 | be anything to do with Exim? |
| 6595 | |
| 6596 | A9603: No, it's nothing to do with Exim, but here's the answer anyway: there |
| 6597 | is a maximum connection rate for \^inetd^\. If connections come in faster |
| 6598 | than that, it thinks a caller is looping. The default setting on RedHat |
| 6599 | 5.2 is 40 calls in any one minute before \^inetd^\ thinks there's a problem |
| 6600 | and suspends further calls for 10 mins. This default setting is very |
| 6601 | conservative. You should probably increase it by a factor of 10 or 20. |
| 6602 | For example: |
| 6603 | |
| 6604 | ==> imap stream tcp nowait.400 root /usr/sbin/tcpd /usr/local/etc/imapd |
| 6605 | |
| 6606 | The rate setting is the number following ``nowait''. This syntax seems to |
| 6607 | be specific to the Linux version of \^inetd^\. Other operating systems |
| 6608 | provide similar functionality, but in different ways. |
| 6609 | |
| 6610 | |
| 6611 | Q9604: I get the \*too many open files*\ error especially when a lot of messages |
| 6612 | land for Majordomo at the same time. |
| 6613 | |
| 6614 | A9604: The problem appears to be the number of open files the system can |
| 6615 | handle. This is changable by using the proc filesystem. To your |
| 6616 | \(/etc/rc.d/rc.local)\ file append something like the following: |
| 6617 | |
| 6618 | ==> # Now System is up, Modify kernel parameters for max open etc. |
| 6619 | |
| 6620 | ==> if [ -f /proc/sys/kernel/file-max ]; then |
| 6621 | echo 16384 >> /proc/sys/kernel/file-max |
| 6622 | fi |
| 6623 | if [ -f /proc/sys/kernel/inode-max ]; then |
| 6624 | echo 24576 >> /proc/sys/kernel/inode-max |
| 6625 | fi |
| 6626 | if [ -f /proc/sys/kernel/file-nr ]; then |
| 6627 | echo 2160 >> /proc/sys/kernel/file-nr |
| 6628 | fi |
| 6629 | |
| 6630 | By echoing the value you want for file-max to the file \(file-max)\ etc., |
| 6631 | you actually change the kernel parameters. |
| 6632 | |
| 6633 | |
| 6634 | Q9605: I installed debian 2.2 linux on a small 325mb 486 laptop. When I try |
| 6635 | to test the Mail program, I get the following error: \*Failed to open |
| 6636 | configuration file /etc/exim.conf*\. |
| 6637 | |
| 6638 | A9605: The Debian installation should have given you \(/usr/sbin/eximconfig)\, |
| 6639 | which asks you some questions and then sets up the configuration file |
| 6640 | in \(/etc/exim.conf)\. Try running that (you'll probably need \/root/\) and see |
| 6641 | how it goes. In any case you get a thoroughly commented conf file at |
| 6642 | the end, which will give you a sample from which to work if you need |
| 6643 | further modification. |
| 6644 | |
| 6645 | The Exim docs in the Debian package are in \(/usr/doc/exim)\ where the full |
| 6646 | reference manual is \(spec.txt.gz)\. |
| 6647 | |
| 6648 | |
| 6649 | Q9606: I'm having trouble configuring Exim 4 on a Debian system. How does |
| 6650 | \(/etc/exim4/conf.d)\ work? |
| 6651 | |
| 6652 | A9606: The Debian Exim 4 package uses a quite uncommon, but elegant, |
| 6653 | method of configuration where the ``real'' Exim configuration file is |
| 6654 | assembled from a tree of snippets by a script invoked just before the |
| 6655 | daemon is started (see Q9608). |
| 6656 | |
| 6657 | This fits very well into the Debian system of configuration file |
| 6658 | management and is a great ease for the automatic configuration with |
| 6659 | Debconf. However, it is very different from the normal way Exim 4 is |
| 6660 | configured. Non-Debian users on the Exim mailing list will probably have |
| 6661 | difficulty in trying to answer specific questions about it. You may have |
| 6662 | to find a Debian expert. |
| 6663 | |
| 6664 | |
| 6665 | Q9607: I'm having difficulties trying to make Exim 4 with Redhat 9 and Berkeley |
| 6666 | DB 4. |
| 6667 | |
| 6668 | A9607: Have you remembered to install the db4-devel package? |
| 6669 | |
| 6670 | |
| 6671 | Q9608: I'm running Exim 3 under Debian, and want to upgrade to Exim 4. How |
| 6672 | difficult is it? |
| 6673 | |
| 6674 | A9608: A user who did this, using the Debian Exim 4 package, reported as |
| 6675 | follows: |
| 6676 | |
| 6677 | (1) The exim4 package installs easily, and the exim (3.38) package |
| 6678 | uninstalls at the same time. |
| 6679 | |
| 6680 | (2) Exim runs from \^inetd^\. Exim4 runs from \^/etc/init.d^\. Much nicer! |
| 6681 | |
| 6682 | (3) The exim conffile lives in \(/etc/exim/exim.conf)\. The exim4 conffile |
| 6683 | lives in \(/var/lib/exim4/config.autogenerated)\. It is, as the name |
| 6684 | suggests, autogenerated. |
| 6685 | |
| 6686 | (4) A new directory is created called \(/etc/exim4)\. This contains the |
| 6687 | conffiles to generate the above config. You make changes here. |
| 6688 | |
| 6689 | (5) Once you have made changes to the files in \(/etc/exim4)\ you run the |
| 6690 | script \^update-exim4.conf^\ which generates a replacement |
| 6691 | \(config.autogenerated)\. |
| 6692 | |
| 6693 | [Added comment by the Debian maintainer, slightly edited: |
| 6694 | You also need to tell the Exim daemon to reread the changed |
| 6695 | configuration. You can do this using SIGHUP by hand. Alternatively, |
| 6696 | instead of running \^update-exim4.conf^\ you can use |
| 6697 | |
| 6698 | ==> invoke-rc.d exim4 reload |
| 6699 | |
| 6700 | which does the rebuild and also tells Exim to reread the changed |
| 6701 | configuration.] |
| 6702 | |
| 6703 | (6) In my experience, you need to carefully check the generated |
| 6704 | configs. eg, it did not generate a system filter file reference in the |
| 6705 | \(config.autogenerated)\. I didn't bother too much, since this is a home |
| 6706 | setup. |
| 6707 | |
| 6708 | (7) All of this may be in the docs. I've read some of them, obviously, |
| 6709 | but didn't come across an actual upgrade guide. |
| 6710 | |
| 6711 | [The Debian maintainer says: |
| 6712 | \(/usr/share/doc/exim4-base/README.Debian.gz)\ and \^update-exim4.conf(8)^\ |
| 6713 | should answer most of the questions.] |
| 6714 | |
| 6715 | (8) I've still got some minor things to tweak to get back to where I |
| 6716 | was before with Exim 3. But overall, it's no drama. |
| 6717 | |
| 6718 | |
| 6719 | Q9609: Why do some servers refuse SMTP connections from my Linux box, but accept |
| 6720 | connections from hosts running other operating systems? |
| 6721 | |
| 6722 | A9609: If you are sure this isn't a policy issue (that is, your box isn't |
| 6723 | administratively blocked for some reason), this may be because your |
| 6724 | Linux box has ECN (Explicit Congestion Notification) enabled in its |
| 6725 | TCP/IP stack. There are many broken firewalls that refuse connections |
| 6726 | from ECN-enabled hosts. You can check the state of your box by running |
| 6727 | |
| 6728 | ==> cat /proc/sys/net/ipv4/tcp_ecn |
| 6729 | |
| 6730 | If the value is "1", you have ECN enabled. You can turn it off by |
| 6731 | running this command: |
| 6732 | |
| 6733 | ==> echo "0" > /proc/sys/net/ipv4/tcp_ecn |
| 6734 | |
| 6735 | |
| 6736 | |
| 6737 | 97. SUN SYSTEMS |
| 6738 | |
| 6739 | Q9701: Exim builds fine with \^gcc^\ on SunOS 4 but crashes inside \^^sscanf()^^\. |
| 6740 | |
| 6741 | A9701: Make sure you are linking with the GNU \^ld^\ linker and not the system |
| 6742 | version of \^ld^\. |
| 6743 | |
| 6744 | |
| 6745 | Q9702: How can I get rid of spurious \"^M"\ (carriage return) characters in |
| 6746 | messages sent from CDE \^dtmail^\? |
| 6747 | |
| 6748 | A9702: CDE \^dtmail^\ passes messages to Exim via the command line interface with |
| 6749 | lines terminated by CRLF, instead of the Unix convention of just LF. |
| 6750 | This should not be a problem if you are using Exim release 4.21 or |
| 6751 | later, as changes were made to detect CRLF line endings. |
| 6752 | |
| 6753 | In earlier versions of Exim, CR would be treated as just another data |
| 6754 | character. There was, however, a command line option called |
| 6755 | \-dropcr-\ which caused Exim to ignore all CR characters in an incoming |
| 6756 | non-SMTP message. (This option is a no-op in current releases.) |
| 6757 | |
| 6758 | If you are using a pre-4.21 version of Exim, you should configure |
| 6759 | \^dtmail^\ to add this option to the command it uses to call Exim (using |
| 6760 | the path \(/usr/lib/sendmail)\). However, it has been reported that it |
| 6761 | isn't possible to change this call from \^dtmail^\ by any official |
| 6762 | means. An alternative approach is to replace \(/usr/lib/sendmail)\ by a |
| 6763 | filtering script that removes the spurious CRs from the input before |
| 6764 | passing it to Exim. |
| 6765 | |
| 6766 | |
| 6767 | Q9703: On SunOS 4 Exim crashes when looking up domains in the DNS that have |
| 6768 | more than 10 A records. |
| 6769 | |
| 6770 | A9703: There are Sun library patches to fix this. It is not Exim's problem. |
| 6771 | For 4.13_U1 the patch is 101558-xx; for 4.1.3 the patch is 100891-xx. |
| 6772 | From the README: \*1054748 ftp, ping dump core when connecting to a host |
| 6773 | with multiple DNS A records.*\ An alternative is to build another |
| 6774 | resolver library - such as the ones that are part of the \^bind^\ |
| 6775 | distribution - and explicitly link against those. |
| 6776 | |
| 6777 | |
| 6778 | Q9704: I am experiencing mailbox locking problems with Sun's \^mailtool^\ used |
| 6779 | over a network. |
| 6780 | |
| 6781 | A9704: Under the \"Expert"\ settings of \^mailtool^\ is a option to turn on \*Use |
| 6782 | network aware mail file locking*\. By default \^dtmail^\ has this set, but |
| 6783 | \^mailtool^\ doesn't. You should set it. The help info on \^dtmail^\ has this |
| 6784 | to say about it: |
| 6785 | |
| 6786 | \*Mailer tries to prevent two different instances of itself from opening |
| 6787 | the same mail file at the same time through a technique that detects |
| 6788 | this access when both instances of Mailer and the file are all on the |
| 6789 | same machine. A network-aware mail file locking protocol is available |
| 6790 | that uses ToolTalk to coordinate instances of Mailer running from more |
| 6791 | than one machine, or mail files accessed over the network. Mailer can |
| 6792 | only change this option when first opening a mail file.*\ |
| 6793 | |
| 6794 | If you are using the SunOS4 version of \^mailtool^\, this apparently |
| 6795 | doesn't work. The only thing which does seem to work it getting the user |
| 6796 | to hit the \"done"\ button to make it release the lock. |
| 6797 | |
| 6798 | |
| 6799 | Q9705: Exim has been crashing on my Solaris x86 system, apparently while |
| 6800 | running DBM functions. |
| 6801 | |
| 6802 | A9705: The use of \^ndbm^\ with \^gcc^\ has caused problems on x86 Solaris systems. |
| 6803 | Try changing one or the other; using either DB with gcc, or Sun's |
| 6804 | WS compiler with \^ndbm^\, has fixed this in the past. |
| 6805 | |
| 6806 | |
| 6807 | Q9706: The \^exiwhat^\ utility isn't working for me on a Solaris 2 system. |
| 6808 | |
| 6809 | A9706: Have you got \(/usr/ucb)\ on your path? If so, it is probably picking up the |
| 6810 | wrong version of the \^ps^\ command. The \^exiwhat^\ script is built on |
| 6811 | Solaris to expect the normal Solaris version of \^ps^\. |
| 6812 | |
| 6813 | |
| 6814 | Q9707: How do I stop Sun's \^dtcm^\ from hanging? |
| 6815 | |
| 6816 | A9707: From qmail's FAQ: \*There is a novice programming error in dtcm, known as |
| 6817 | ``failure to close the output side of the pipe in the child.'' Sun has, |
| 6818 | at the time of this writing, not yet provided a patch.*\ |
| 6819 | |
| 6820 | |
| 6821 | Q9708: I want Exim to use only the resolver (i.e. ignore \(/etc/hosts)\), but don't |
| 6822 | want to alter the \(nsswitch.conf)\ file in Solaris 2. |
| 6823 | |
| 6824 | A9708: You need to rebuild Exim after fiddling with \(OS/os.h-SunOS5)\: |
| 6825 | |
| 6826 | ==> #define gethostbyaddr res_gethostbyaddr |
| 6827 | #define gethostbyname res_gethostbyname |
| 6828 | #define endhostent res_endhostent |
| 6829 | #define endnetent res_endnetent |
| 6830 | #define gethostent res_gethostent |
| 6831 | #define getnetbyaddr res_getnetbyaddr |
| 6832 | #define getnetbyname res_getnetbyname |
| 6833 | #define getnetent res_getnetent |
| 6834 | #define sethostent res_sethostent |
| 6835 | #define setnetent res_setnetent |
| 6836 | |
| 6837 | Note that \-lnsl-\ is still needed in the Makefile as it |
| 6838 | contains code used by the NIS lookup and also the \^^inet_addr()^^\ function |
| 6839 | that Exim uses. |
| 6840 | |
| 6841 | |
| 6842 | Q9709: When I try to compile Exim 4.x on Solaris 2.5.1 I get an error along the |
| 6843 | lines of \*no such field in struct as 'value.ui32'*\. |
| 6844 | |
| 6845 | A9709: Look in the Exim file \(OS/os.h-SunOS5.h)\ for the line |
| 6846 | |
| 6847 | ==> #define LOAD_AVG_FIELD value.ui32 |
| 6848 | |
| 6849 | and change \"ui32"\ to \"ul"\ (that's u followed by the letter ell, not |
| 6850 | the digit one). Solaris 2.5.1 is getting very old now... |
| 6851 | |
| 6852 | |
| 6853 | |
| 6854 | 98. CONFIGURATION COOKBOOK |
| 6855 | |
| 6856 | Q9801: How do I configure Exim as part of TPC (\?http://www.tpc.int?\)? |
| 6857 | |
| 6858 | A9801: Suppose you want to accept faxes destined for 1(801)539-*. These are |
| 6859 | addressed to the domain //9.3.5.1.0.8.1.tpc.int//. Set up a transport to |
| 6860 | handle the delivery: |
| 6861 | |
| 6862 | ==> tpc: |
| 6863 | driver = pipe |
| 6864 | command = /usr/local/tpc/tpcmailer.pl $local_part@$domain \ |
| 6865 | $sender_address |
| 6866 | pipe_as_creator |
| 6867 | |
| 6868 | \(/usr/local/tpc/tpcmailer.pl)\ is the mail processing script that can |
| 6869 | be obtained from the TPC distribution. Create a router to route mail |
| 6870 | for the TPC domain to that transport. This must be placed before your |
| 6871 | other routers: |
| 6872 | |
| 6873 | ==> tpc_router: |
| 6874 | driver = accept |
| 6875 | transport = tpc |
| 6876 | domains = *.9.3.5.1.0.8.1.tpc.int |
| 6877 | |
| 6878 | Of course, there are other things to do as well before your system is |
| 6879 | a functioning TPC server. |
| 6880 | |
| 6881 | |
| 6882 | Q9802: How do I configure Exim so that it sends mail to the outside world only |
| 6883 | from a restricted list of our local users? |
| 6884 | |
| 6885 | A9802: You will need to have a convenient way of checking the list. If it is |
| 6886 | only a handful of users, you could just list them inline. Otherwise, you |
| 6887 | need to put them in a file or database. Let's suppose you've just got a |
| 6888 | list in a file. Put this as your first router: |
| 6889 | |
| 6890 | ==> check_outgoing: |
| 6891 | driver = redirect |
| 6892 | domains = ! +local_domains |
| 6893 | senders = ! : ! lsearch;/etc/permitted/senders |
| 6894 | allow_fail |
| 6895 | data = :fail: you are not allowed to send outside |
| 6896 | |
| 6897 | The senders should be listed as complete addresses, with both a local |
| 6898 | part and a domain. For a large list, use a DBM or cdb file instead, or |
| 6899 | a database. The first item in the \senders\ list is empty, to match the |
| 6900 | empty sender. This is necessary because bounce messages have null |
| 6901 | senders. |
| 6902 | |
| 6903 | |
| 6904 | Q9803: A site for which I provide secondary MX is down for some time. Is there |
| 6905 | a way to run the queue for that destination separately from the main |
| 6906 | queue? |
| 6907 | |
| 6908 | A9803: No, because Exim does not have the concept of ``the queue for that |
| 6909 | destination''. It simply has a single pool of messages awaiting delivery |
| 6910 | (and some of them may have several destinations). The best approach to |
| 6911 | this is to arrange for all messages for the site to be saved somewhere |
| 6912 | other than the main spool, either on a separate dedicated MTA, or in |
| 6913 | BSMTP files. |
| 6914 | |
| 6915 | |
| 6916 | Q9804: We want to be able to temporarily lock out a user by disabling the |
| 6917 | password and moving the home directory to another place. How can we |
| 6918 | arrange to reject mail for users in this state? |
| 6919 | |
| 6920 | A9804: Change the home directory pointer in the passwd file to something |
| 6921 | distinctive. For example, we use \(/home/CANCELLED)\ for cancelled users. |
| 6922 | Then you can pick up such users with this router, which is placed |
| 6923 | immediately after \%system_aliases%\: |
| 6924 | |
| 6925 | ==> cancelled_users: |
| 6926 | driver = redirect |
| 6927 | check_local_user |
| 6928 | condition = ${if eq {$home}{/home/CANCELLED}{yes}{no}} |
| 6929 | allow_fail |
| 6930 | data = :fail: this account is cancelled |
| 6931 | |
| 6932 | |
| 6933 | Q9805: How can I configure Exim so that all mails addressed to |
| 6934 | //something@username.domain.net// get delivered to |
| 6935 | \(/var/spool/mail/username)\? |
| 6936 | |
| 6937 | A9805: Assuming that you have set up //username// as a normal user, with |
| 6938 | conventional routing for //username@domain.net// to that mailbox, all |
| 6939 | you need to do is set up a redirection, using a router like this: |
| 6940 | |
| 6941 | ==> user_in_domain: |
| 6942 | driver = redirect |
| 6943 | data = ${if match{$domain}{\N^(.*)\.domain\.net$\N}\ |
| 6944 | {$1}fail}@domain.net |
| 6945 | |
| 6946 | If you set \envelope_to\ in the \%appendfile%\ transport, the original |
| 6947 | envelope address is preserved in the message in an ::Envelope-to:: |
| 6948 | header line. |
| 6949 | |
| 6950 | |
| 6951 | Q9806: How do I get exim not to add a ::Sender:: header to locally originated |
| 6952 | mail? |
| 6953 | |
| 6954 | A9806: It adds it only if the ::From:: header doesn't correspond to the user |
| 6955 | sending the message. You can suppress this by setting |
| 6956 | \no_local_from_check\. If your real question is \*How do I submit mail |
| 6957 | from UUCP without it adding ::Sender::?*\, see Q1503. |
| 6958 | |
| 6959 | |
| 6960 | Q9807: Is there any way to have messages sent to a specific local address |
| 6961 | delayed by - say - 24 hours? |
| 6962 | |
| 6963 | A9807: Set up a router like this: |
| 6964 | |
| 6965 | ==> delay: |
| 6966 | driver = redirect |
| 6967 | domains = the.domain |
| 6968 | local_parts = thelocalpart |
| 6969 | condition = ${if < {$message_age}{86400}{yes}{no}} |
| 6970 | allow_defer |
| 6971 | data = :defer: message not old enough |
| 6972 | no_verify |
| 6973 | |
| 6974 | Of course, this will also have the effect of setting a retry time for |
| 6975 | the address. You may want to set a special retry rule for it. Note the |
| 6976 | use of \no_verify\ to ensure that this router is not used when Exim is |
| 6977 | verifying addresses. |
| 6978 | |
| 6979 | |
| 6980 | Q9808: I have a mailing list exploder on one host, and three other hosts where |
| 6981 | I want to do the actual deliveries from. How can I get Exim to split |
| 6982 | a message into groups of recipients between the three hosts? |
| 6983 | |
| 6984 | A9808: Set up a router that routes all remote addresses to a specific |
| 6985 | transport, with a list of your three hosts. For example: |
| 6986 | |
| 6987 | ==> send_to_three: |
| 6988 | driver = manualroute |
| 6989 | transport = to_three_smtp |
| 6990 | route_list = !+local_domains hostA:hostB:hostC |
| 6991 | |
| 6992 | The transport looks like this: |
| 6993 | |
| 6994 | ==> to_three_smtp: |
| 6995 | driver = smtp |
| 6996 | hosts_randomize |
| 6997 | |
| 6998 | By setting \hosts_randomize\, you request that the host list be sorted |
| 6999 | randomly each time the transport is called, in order to spread the load. |
| 7000 | The number of times the transport is called for each message depends on |
| 7001 | the setting of the global option \remote_max_parallel\. If it is set to |
| 7002 | 1, the transport is called only once for each message, so only one host |
| 7003 | is used, but different messages use different hosts because of the |
| 7004 | randomizing. |
| 7005 | |
| 7006 | The \max_rcpt\ option (default 100) controls the number of addresses |
| 7007 | sent in each copy of the message - several copies are sent over the |
| 7008 | same connection if necessary. |
| 7009 | |
| 7010 | If you want individual messages to be split between the three hosts, you |
| 7011 | must set the global option \remote_max_parallel\ to 3. This allows Exim |
| 7012 | to run 3 separate instances of the transport at once. It will pass |
| 7013 | one-third of all the addresses to each instance. Because the host list |
| 7014 | is randomized, not round-robinned, there is no guarantee that a single |
| 7015 | message will use all three hosts, but on average it should. |
| 7016 | |
| 7017 | |
| 7018 | Q9809: Can I configure Exim so that my gateway host sends a copy of each |
| 7019 | incoming message to each of two internal hosts? |
| 7020 | |
| 7021 | A9809: The easiest way to do this is to make use of the \unseen\ router option, |
| 7022 | and set up two separate routers. You need to be able to identify |
| 7023 | incoming messages somehow. Typically this can be done by testing the |
| 7024 | domain of the recipient address, in which case the configuration should |
| 7025 | contain something like this: |
| 7026 | |
| 7027 | ==> r1: |
| 7028 | driver = manualroute |
| 7029 | domains = ! *.your.domain.example |
| 7030 | route_data = * host1.your.domain.example |
| 7031 | transport = remote_smtp |
| 7032 | unseen |
| 7033 | |
| 7034 | ==> r2: |
| 7035 | driver = manualroute |
| 7036 | domains = ! *.your.domain.example |
| 7037 | route_data = * host2.your.domain.example |
| 7038 | transport = remote_smtp |
| 7039 | |
| 7040 | The \unseen\ setting on \%r1%\ means that after it has accepted an |
| 7041 | address, the address is also passed on to \%r2%\, and so two deliveries |
| 7042 | occur. |
| 7043 | |
| 7044 | |
| 7045 | Q9810: How can I implement ``SMTP-after-POP'' with Exim? |
| 7046 | |
| 7047 | A9810: See Q0706. |
| 7048 | |
| 7049 | |
| 7050 | Q9811: I would like to ``tap off'' a proportion of real mail traffic from my |
| 7051 | live mail server to use in tests of a new server. I want to preserve the |
| 7052 | envelope contents, but to suppress any error notifications to the |
| 7053 | original sender. |
| 7054 | |
| 7055 | A9811: See C046. |
| 7056 | |
| 7057 | |
| 7058 | Q9812: How can I lookup data from a single file using both single IP addresses |
| 7059 | and IP address blocks as keys? I want to set \smtp_accept_max_per_host\ |
| 7060 | by this means, and also include a default. |
| 7061 | |
| 7062 | A9812: You cannot do this in a single lookup, because you need separate lookups |
| 7063 | for individual addresses and address blocks. However, these lookups can |
| 7064 | be nested in a single expansion string. For example, suppose you are |
| 7065 | using an lsearch file with entries like this: |
| 7066 | |
| 7067 | ==> 192.168.34.35: 4 |
| 7068 | 192.168.34.0/24: 2 |
| 7069 | *: 1 |
| 7070 | |
| 7071 | You can use this setting: |
| 7072 | |
| 7073 | ==> smtp_accept_max_per_host = \ |
| 7074 | ${lookup{$sender_host_address}lsearch{/path/to/file}\ |
| 7075 | {$value}\ |
| 7076 | {\ |
| 7077 | ${lookup{${mask:$sender_host_address/24}}lsearch*{/path/to/file}}\ |
| 7078 | }} |
| 7079 | |
| 7080 | Note that the first lookup does not have an asterisk on the search |
| 7081 | type. If you have blocks of different sizes (/24, /26, etc) you have to |
| 7082 | configure it to do a separate lookup for each size, with just the final |
| 7083 | one using a default. |
| 7084 | |
| 7085 | |
| 7086 | |
| 7087 | 99. LIST OF SAMPLE CONFIGURATIONS |
| 7088 | |
| 7089 | As well as being hyperlinked from the HTML version of this document, each |
| 7090 | sample configuration is also available as a file in the \(config.samples)\ |
| 7091 | directory, which can be independently downloaded. |
| 7092 | |
| 7093 | Samples whose names are of the form Cnnn are Exim configurations; those with |
| 7094 | names of the form Fnnn are filter file fragments; those with names of the form |
| 7095 | Lnnn are sample \^^local_scan()^^\ functions, and those with names of thf form |
| 7096 | Snnn are scripts of various kinds. There are other examples of |
| 7097 | \^^local_scan()^^\ functions at a number of web sites (for example, |
| 7098 | \?http://marc.merlins.org/linux/exim/sa.html?\). |
| 7099 | |
| 7100 | There are gaps in the C and F numbers because I have omitted the Exim 3 samples |
| 7101 | that have not been converted for Exim 4. |
| 7102 | |
| 7103 | C002: ``Although exim not intended for use in UUCP environment (it doesn't |
| 7104 | know anything about bang!path addresses), I'm successfully using it for |
| 7105 | delivering mail to UUCP clients.'' |
| 7106 | |
| 7107 | C006: ``This is how I have configured a PP-inspired vacationnote, there is |
| 7108 | (was?) such a feature in PP. The user makes a file \(tripnote)\ in his/her |
| 7109 | home directory, the message is passed to the sender once with a short |
| 7110 | leading text.'' |
| 7111 | |
| 7112 | C022: ``This is the Exim configuration file of a machine which delivers mail to |
| 7113 | several local domains where the mail is delivered locally, several hairy |
| 7114 | domains, handled as described below, and a half-virtual domain, which is |
| 7115 | first processed by its special alias file, then processed as other local |
| 7116 | domains (including the processing by the global alias file).'' |
| 7117 | |
| 7118 | C037: An elegant way of using ETRN, which does immediate delivery if the host |
| 7119 | is online, but saves mail in a BSMTP file after some time on the queue. |
| 7120 | ETRN then re-injects the mail. |
| 7121 | |
| 7122 | C042: ``Since the Exim 4 configuration needed to get Mailman to work differs a |
| 7123 | little bit from Exim 3 and since I still haven't seen a recipe for |
| 7124 | Mailman with Exim 4, I'm providing my configuration (based heavily on |
| 7125 | \?http://www.exim.org/howto/mailman.html?\).'' |
| 7126 | |
| 7127 | C043: ``Attached is an Exim 4 config file which is designed for an Exim server |
| 7128 | that is put in front of an Exchange 5.5 system but which verifies the |
| 7129 | valid addresses that are stored in Exchange via LDAP lookups against the |
| 7130 | Exchange server.'' |
| 7131 | |
| 7132 | C044: ``I thought I'd submit this as an example of an authenticated mail hub |
| 7133 | configuration. Several people have asked for it so I thought it |
| 7134 | might be of interest.'' |
| 7135 | |
| 7136 | C045: ``Here it is, for Exim 4.10 and Cyrus IMAPD 2.1.5 using db3/db4-format |
| 7137 | mailbox database. This configuration delivers the messages to Cyrus |
| 7138 | IMAPD using LMTP over a TCP/IP socket.'' |
| 7139 | |
| 7140 | C046: ``Deliver a duplicate of some proportion of all messages to a special |
| 7141 | machine specified in the file \(/MAIL_TAP_HOST)\, if it exists.'' |
| 7142 | |
| 7143 | C047: A sample configuration for calling Spamassassin directly from Exim. |
| 7144 | |
| 7145 | C049: ``I've been seeing a whole bunch of IPs that send me spam or virus mail |
| 7146 | and HELOing as one of my own IPs, or as HELO one.of.my.own.domains (or |
| 7147 | maybe HELO \primary_hostname\).'' |
| 7148 | |
| 7149 | C050: A configuration that uses the DNS to implement virtual domains. |
| 7150 | |
| 7151 | C051: ``I've been working quite hard to come up with a config that reasonably |
| 7152 | matches the qmail-ldap setup, without the warts.'' |
| 7153 | |
| 7154 | F001: ``I thought that the rest of the list may be interested in reviewing our |
| 7155 | filter as a starting point for their own system message filter.'' |
| 7156 | |
| 7157 | F002: ``... program which refused mail from unknown addresses until they mailed |
| 7158 | me promising not to spam me ... since I'd already thought through how |
| 7159 | to do it in Exim, and knew it'd be slightly easier than falling out of |
| 7160 | bed, I went ahead and did it.'' |
| 7161 | |
| 7162 | F003: ``Here's four checks installed in our system wide filter that knock out |
| 7163 | a lot of otherwise hard to detect rubbish.'' |
| 7164 | |
| 7165 | F004: ``This is an Exim filter snippet to change locally-generated ::Message-Id:: |
| 7166 | and ::Resent-Message-Id:: headers to world-unique values.'' |
| 7167 | |
| 7168 | L001: A \^^local_scan()^^\ function for Exim that calls \^uvscan^\. |
| 7169 | |
| 7170 | S001: A Perl script for patching the name of the configuration file in an |
| 7171 | Exim binary. |
| 7172 | |
| 7173 | S002: ``When I moved from smail to exim I built a program that took individual |
| 7174 | config pieces, stripped all the comments, and built a config file.'' |
| 7175 | |
| 7176 | *** End of Exim FAQ *** |