update
[exim-website.git] / FAQ.html
1 <HTML>
2 <HEAD>
3 <TITLE>Exim FAQ</TITLE>
4 </HEAD>
5 <body bgcolor="#FFFFFF" text="#00005A">
6 <H1>Exim FAQ</H1>
7 <P>
8 This is the FAQ for the Exim Mail Transfer Agent. Thanks to the many
9 people who provided the original information. This file would be amazingly
10 cluttered if I tried to list them all. Suggestions for corrections,
11 improvements, and additions are welcome.
12
13 </P>
14 <P>
15 This version of the FAQ applies to Exim 3.10 and later releases. The syntax of
16 some of the options was altered and tidied up at release 3.00. Some of the
17 examples quoted here will not work with earlier releases.
18
19 </P>
20 <P>
21 References of the form Cnnn and Fnnn are to the sample configuration and filter
22 files that can be found in the separately distributed directory called
23 <B>config.samples.</B> The primary location is
24
25 </P>
26 <PRE>
27    <A HREF="ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/config.samples.tar.gz">ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/config.samples.tar.gz</A></PRE>
28 <P>
29 There are brief descriptions of these files at the end of this document.
30
31 </P>
32 The FAQ is divided into the following sections:
33 <A HREF="FAQ.html#TOC1">Debugging</A>,
34 <A HREF="FAQ.html#TOC37">Building exim</A>,
35 <A HREF="FAQ.html#TOC48">Mailbox locking</A>,
36 <A HREF="FAQ.html#TOC51">Routing</A>,
37 <A HREF="FAQ.html#TOC77">Directing</A>,
38 <A HREF="FAQ.html#TOC115">Delivery</A>,
39 <A HREF="FAQ.html#TOC151">UUCP</A>,
40 <A HREF="FAQ.html#TOC155">Performance</A>,
41 <A HREF="FAQ.html#TOC159">Policy controls</A>,
42 <A HREF="FAQ.html#TOC193">Majordomo</A>,
43 <A HREF="FAQ.html#TOC198">Rewriting addresses</A>,
44 <A HREF="FAQ.html#TOC206">Headers</A>,
45 <A HREF="FAQ.html#TOC211">Fetchmail</A>,
46 <A HREF="FAQ.html#TOC215">Perl</A>,
47 <A HREF="FAQ.html#TOC218">Dial-up</A>,
48 <A HREF="FAQ.html#TOC223">Modifying message bodies</A>,
49 <A HREF="FAQ.html#TOC226">Millennium</A>,
50 <A HREF="FAQ.html#TOC228">Miscellaneous</A>,
51 <A HREF="FAQ.html#TOC270">HP-UX</A>,
52 <A HREF="FAQ.html#TOC272">BSDI</A>,
53 <A HREF="FAQ.html#TOC274">IRIX</A>,
54 <A HREF="FAQ.html#TOC277">Linux</A>,
55 <A HREF="FAQ.html#TOC284">Sun systems</A>,
56 <A HREF="FAQ.html#TOC294">Cookbook</A>, and
57 <A HREF="FAQ.html#TOC318">List of sample configurations</A>.
58 <P>
59 Philip Hazel <B><B>&#60;ph10@cus.cam.ac.uk</B>&#62;</B><BR>
60 Last update: 13-June-2000 (addition of section 15)<BR>
61 Last general update: 15-December-1999<BR>
62 <BR>
63 </P>
64 <HR><BR>
65 <A NAME="TOC1" HREF="FAQ.html#SEC1">0. DEBUGGING</A>
66 <UL>
67 <LI><A NAME="TOC2" HREF="FAQ.html#SEC2">Q0001</A>: Exim is crashing. What is wrong?
68 <LI><A NAME="TOC3" HREF="FAQ.html#SEC3">Q0002</A>: Exim is not working. What is wrong?
69 <LI><A NAME="TOC4" HREF="FAQ.html#SEC4">Q0003</A>: What does the error "Child process of <TT>address_pipe</TT> transport returned
70        69 from command <I>xxx</I>" mean?
71 <LI><A NAME="TOC5" HREF="FAQ.html#SEC5">Q0004</A>: My virtual domain setup isn't working. How can I debug it?
72 <LI><A NAME="TOC6" HREF="FAQ.html#SEC6">Q0005</A>: Why is Exim giving "421 Unexpected log failure, please try later" when
73        receiving an SMTP message with a large number of recipients?
74 <LI><A NAME="TOC7" HREF="FAQ.html#SEC7">Q0006</A>: Why is Exim not rejecting incoming messages addressed to non-existent
75        users at SMTP time?
76 <LI><A NAME="TOC8" HREF="FAQ.html#SEC8">Q0007</A>: I've put an entry for <B>*.my.domain</B> in a DBM lookup file, but it isn't
77        getting recognized.
78 <LI><A NAME="TOC9" HREF="FAQ.html#SEC9">Q0008</A>: I've put the entry <B><B>*@domain.com</B></B> in a lookup database, but it isn't
79        working. The expansion I'm using is:
80 <LI><A NAME="TOC10" HREF="FAQ.html#SEC10">Q0009</A>: Is there a way to print recognized local domains?
81 <LI><A NAME="TOC11" HREF="FAQ.html#SEC11">Q0010</A>: If I run <B>"./exim</B> <B>-d9</B> <B>-bt</B> <B>user@domain</B>" all seems well, but when I send a
82        message from my User Agent, it does not arrive at its destination.
83 <LI><A NAME="TOC12" HREF="FAQ.html#SEC12">Q0011</A>: I am getting this message in mainlog every so often: "no immediate
84        delivery: too many connections (19, max 0)". What am I missing?
85 <LI><A NAME="TOC13" HREF="FAQ.html#SEC13">Q0012</A>: What does "no immediate delivery: too many messages received in one SMTP
86        connection" mean?
87 <LI><A NAME="TOC14" HREF="FAQ.html#SEC14">Q0013</A>: Exim puts "for &#60;address&#62;" in the Received: headers of some, but not all,
88        messages. Is this a bug?
89 <LI><A NAME="TOC15" HREF="FAQ.html#SEC15">Q0014</A>: Instead of <TT>exim_dbmbuild</TT>, I'm using a homegrown program to build DBM
90        (or cdb) files, but Exim doesn't seem to be able to use them.
91 <LI><A NAME="TOC16" HREF="FAQ.html#SEC16">Q0015</A>: Exim is unable to route to any remote domains. It doesn't seen to be
92        able to access the DNS.
93 <LI><A NAME="TOC17" HREF="FAQ.html#SEC17">Q0016</A>: I'm using ETRN to run a script that checks things and doesn't always
94        end up running "exim <B><B>-R".</B></B> However, after it has run once, subsequent
95        attempts fail with "458 Already processing".
96 <LI><A NAME="TOC18" HREF="FAQ.html#SEC18">Q0017</A>: What does the error message "transport <TT>system_aliases</TT>: cannot find
97        transport driver "<B>aliasfile</B>" in line 92" mean?
98 <LI><A NAME="TOC19" HREF="FAQ.html#SEC19">Q0018</A>: Exim is timing out after receiving and responding to the DATA command
99        from one particular host, and yet the client host also claims to be
100        timing out. This seems to affect only certain messages.
101 <LI><A NAME="TOC20" HREF="FAQ.html#SEC20">Q0019</A>: What does the message "Socket bind() to port 25 for address (any)
102        failed: address already in use" mean?
103 <LI><A NAME="TOC21" HREF="FAQ.html#SEC21">Q0020</A>: I've set <TT>headers_check_syntax</TT>, but this causes Exim to complain about
104        headers like "To: Work: Jim <B>&#60;jims@email</B>&#62;, Home: Bob <B>&#60;bobs@email</B>&#62;" which
105        look all right to me. Is this a bug?
106 <LI><A NAME="TOC22" HREF="FAQ.html#SEC22">Q0021</A>: Whenever Exim tries to deliver a specific message to a particular
107        server, it fails, giving the error "Remote end closed connection after
108        data" or "Broken pipe" or a timeout. What's going on?
109 <LI><A NAME="TOC23" HREF="FAQ.html#SEC23">Q0022</A>: Why do messages not get delivered down the same connection when I do
110        something like: exim <B>-v</B> <B>-R</B> <B>@aol.com</B> ? For other domains, I do this and
111        I see the appropriate "waiting for passed connections to get used"
112        messages.
113 <LI><A NAME="TOC24" HREF="FAQ.html#SEC24">Q0023</A>: What does the error "SEGV while reading ... from dbm file: record
114        assumed not to exist" mean?
115 <LI><A NAME="TOC25" HREF="FAQ.html#SEC25">Q0024</A>: There seems to be a problem in the string expansion code: it doesn't
116        recognize references to headers such as <B><B>${h_to}.</B></B>
117 <LI><A NAME="TOC26" HREF="FAQ.html#SEC26">Q0025</A>: Exim is timing out after sending the a message's data to one particular
118        host, and yet the remote host also claims to be timing out. This seems
119        to affect only certain messages.
120 <LI><A NAME="TOC27" HREF="FAQ.html#SEC27">Q0026</A>: When the Exim daemon forks a copy of itself to handle an incoming SMTP
121        request, the forked copy seems to go around in circles  for a
122        significant (up to 5 minutes, so far) amount of time before deciding to
123        accept the message.
124 <LI><A NAME="TOC28" HREF="FAQ.html#SEC28">Q0027</A>: What does "failed to create child process to send failure message" mean?
125        This is a busy mail server with <TT>smtp_accept_max</TT> set to 500, but this
126        problem started to occur at about 300 incoming connections.
127 <LI><A NAME="TOC29" HREF="FAQ.html#SEC29">Q0028</A>: What does "&#60;message filter&#62; transporting defer (-1): No transport set
128        by director" in a log line mean?
129 <LI><A NAME="TOC30" HREF="FAQ.html#SEC30">Q0029</A>: Why is Exim refusing to relay, saying "failed to find host name from IP
130        address" when I have the sender's IP address in <TT>host_accept_relay</TT>? My
131        configuration contains this:
132 <LI><A NAME="TOC31" HREF="FAQ.html#SEC31">Q0030</A>: When I run "exim <B>-bd</B> <B>-q10m"</B> I get "PANIC LOG: exec of exim <B>-q</B> failed".
133 <LI><A NAME="TOC32" HREF="FAQ.html#SEC32">Q0031</A>: Why do connections to my machine's SMTP port take a long time to respond
134        with the banner, when connections to other ports respond instantly?
135 <LI><A NAME="TOC33" HREF="FAQ.html#SEC33">Q0032</A>: I can't seem to get a pipe command to run when I include a <B>${if</B>
136        expansion in it. This fails:
137 <LI><A NAME="TOC34" HREF="FAQ.html#SEC34">Q0033</A>: I'm trying to get Exim to connect an alias to a pipe, but it always
138        gives error code 69, with the comment "(could mean service or program
139        unavailable)".
140 <LI><A NAME="TOC35" HREF="FAQ.html#SEC35">Q0034</A>: I'm having a problem with an Exim RPM.
141 <LI><A NAME="TOC36" HREF="FAQ.html#SEC36">Q0035</A>: What does the error "Spool file is locked" mean?
142 </UL>
143
144 <A NAME="TOC37" HREF="FAQ.html#SEC37">1. BUILDING EXIM</A>
145 <UL>
146 <LI><A NAME="TOC38" HREF="FAQ.html#SEC38">Q0101</A>: I get the error "conflicting types" when Exim is building the libident
147        library.
148 <LI><A NAME="TOC39" HREF="FAQ.html#SEC39">Q0102</A>: When I ran <B>make</B> I got the error "undefined reference to <TT>dbopen</TT>".
149 <LI><A NAME="TOC40" HREF="FAQ.html#SEC40">Q0103</A>: I can't get Exim to compile with Berkeley DB version 2.x.
150 <LI><A NAME="TOC41" HREF="FAQ.html#SEC41">Q0104</A>: I'm getting an "undefined symbol" error for <TT>hosts_ctl</TT> when I try to
151        build Exim. (On some systems this error is "undefined reference to
152        'hosts_ctl'".)
153 <LI><A NAME="TOC42" HREF="FAQ.html#SEC42">Q0105</A>: I'm about to upgrade to a new Exim release. Do I need to ensure the
154        spool is empty, or take any other special action?
155 <LI><A NAME="TOC43" HREF="FAQ.html#SEC43">Q0106</A>: What does the error "<B>install-info</B>: command not found" mean?
156 <LI><A NAME="TOC44" HREF="FAQ.html#SEC44">Q0107</A>: Exim doesn't seem to be recognizing my operating system type correctly,
157        and so is failing to build.
158 <LI><A NAME="TOC45" HREF="FAQ.html#SEC45">Q0108</A>: I am getting an error "`exim' undeclared here" when I compile, in the
159        <B>globals.c</B> module.
160 <LI><A NAME="TOC46" HREF="FAQ.html#SEC46">Q0109</A>: Exim fails to build, complaining about the absence of the "killpg"
161        function.
162 <LI><A NAME="TOC47" HREF="FAQ.html#SEC47">Q0110</A>: I'm getting an unresolved symbol <TT>ldap_is_ldap_url</TT> when trying to build
163        Exim.
164 </UL>
165
166 <A NAME="TOC48" HREF="FAQ.html#SEC48">2. MAILBOX LOCKING</A>
167 <UL>
168 <LI><A NAME="TOC49" HREF="FAQ.html#SEC49">Q0201</A>: Why do I get the error "Permission denied: creating lock file hitching
169        post" when Exim tries to do a local delivery?
170 <LI><A NAME="TOC50" HREF="FAQ.html#SEC50">Q0202</A>: I am experiencing mailbox locking problems with Sun's <B>mailtool</B> used
171        over a network.
172 </UL>
173
174 <A NAME="TOC51" HREF="FAQ.html#SEC51">3. ROUTING</A>
175 <UL>
176 <LI><A NAME="TOC52" HREF="FAQ.html#SEC52">Q0301</A>: What does "lowest numbered MX record points to local host" mean?
177 <LI><A NAME="TOC53" HREF="FAQ.html#SEC53">Q0302</A>: How do I configure Exim to send all non-local mail to a gateway host?
178 <LI><A NAME="TOC54" HREF="FAQ.html#SEC54">Q0303</A>: How do I configure Exim to send all non-local mail to a central server
179        if it cannot be immediately delivered by my host? I don't want to have
180        queued mail waiting on my host.
181 <LI><A NAME="TOC55" HREF="FAQ.html#SEC55">Q0304</A>: How can I arrange for messages submitted by (for example) Majordomo to
182        be routed specially?
183 <LI><A NAME="TOC56" HREF="FAQ.html#SEC56">Q0305</A>: How do I arrange for all incoming email for <B><B>*@some.domain</B></B> to go into one
184        pop3 mail account? The customer doesn't want to add a list of specific
185        local parts to the system.
186 <LI><A NAME="TOC57" HREF="FAQ.html#SEC57">Q0306</A>: The <TT>route_list</TT> setting 
187          <TT>^foo$:^bar$  $domain  byname</TT> in a <B>domainlist</B>
188        router does not work.
189 <LI><A NAME="TOC58" HREF="FAQ.html#SEC58">Q0307</A>: I'm getting "permission denied" when Exim attempts to check a
190        <TT>require_files</TT> option.
191 <LI><A NAME="TOC59" HREF="FAQ.html#SEC59">Q0308</A>: I have a domain for which some local parts must be delivered locally,
192        but the remainder are to be treated like any other remote addresses.
193 <LI><A NAME="TOC60" HREF="FAQ.html#SEC60">Q0309</A>: For certain domains, I don't want Exim to use MX records. Instead, I
194        want it just to look up the hosts' A records. I tried using a negative
195        entry in <TT>mx_domains</TT> in the smtp router, but it didn't work.
196 <LI><A NAME="TOC61" HREF="FAQ.html#SEC61">Q0310</A>: How can I configure Exim on a firewall machine so that if mail arrives
197        addressed to a domain whose MX points to the firewall, it is forwarded
198        to the internal mail server, without having to have a list of all the
199        domains involved?
200 <LI><A NAME="TOC62" HREF="FAQ.html#SEC62">Q0311</A>: How can I arrange that messages larger than some limit are handled by
201        a special router?
202 <LI><A NAME="TOC63" HREF="FAQ.html#SEC63">Q0312</A>: If a DNS lookup returns no MX records why doesn't Exim just bin the
203        message?
204 <LI><A NAME="TOC64" HREF="FAQ.html#SEC64">Q0313</A>: When a DNS lookup for MX records fails to complete, why doesn't Exim
205        send the messsage to the host defined by the A record?
206 <LI><A NAME="TOC65" HREF="FAQ.html#SEC65">Q0314</A>: Can you specify a list of domains to explicitly reject?
207 <LI><A NAME="TOC66" HREF="FAQ.html#SEC66">Q0315</A>: Is it possible to use a conditional expression for the host item in a
208        <TT>route_list</TT> for the <B>domainlist</B> router? I tried the following, but it
209        doesn't work:
210 <LI><A NAME="TOC67" HREF="FAQ.html#SEC67">Q0316</A>: I send all external mail to a smart host, but this means that bad
211        addresses also get passed to the smart host. Can I avoid this?
212 <LI><A NAME="TOC68" HREF="FAQ.html#SEC68">Q0317</A>: I have a dial-up machine, and I use the <TT>queue_smtp</TT> option so that remote
213        mail only goes out when I do a queue run. However, any email I send with
214        an address <B><B>&#60;anything&#62;@aol.com</B></B> is returned within about 15 mins saying
215        'retry time exceeded', and all addresses are affected.
216 <LI><A NAME="TOC69" HREF="FAQ.html#SEC69">Q0318</A>: How can I route mail for user <B>X@local</B> to a smarthost if X doesn't exist
217        on the local host?
218 <LI><A NAME="TOC70" HREF="FAQ.html#SEC70">Q0319</A>: How can I arrange to do my own qualification of non-fully-qualified
219        domains, and then pass them on to the next router?
220 <LI><A NAME="TOC71" HREF="FAQ.html#SEC71">Q0320</A>: Every system has a "nobody" account under which httpd etc run. I would
221        like to know how to restrict mail which comes from that account to users
222        on that host only.
223 <LI><A NAME="TOC72" HREF="FAQ.html#SEC72">Q0321</A>: I have a really annoying intermittent problem where attempts to mail to
224        valid sites are rejected with "unknown mail domain". This only happens a
225        few times a day and there is no particular pattern to the sites it
226        rejects.  If I try to lookup the same domain a few minutes later then it
227        is OK.
228 <LI><A NAME="TOC73" HREF="FAQ.html#SEC73">Q0322</A>: I'd like route all mail with unresolved addresses to a relay machine.
229 <LI><A NAME="TOC74" HREF="FAQ.html#SEC74">Q0323</A>: I would like to forward all incoming email for a particular domain to
230        another machine via SMTP. Whereabouts would I configure that?
231 <LI><A NAME="TOC75" HREF="FAQ.html#SEC75">Q0324</A>: Why does Exim say "all relevant MX records point to non-existent hosts"
232        when MX records point to IP addresses?
233 <LI><A NAME="TOC76" HREF="FAQ.html#SEC76">Q0325</A>: How can I arrange for mail on my local network to be delivered directly
234        to the relevant hosts, but all other mail to be sent to my ISP's mail
235        server? The local hosts are all DNS-registered and behave like normal
236        Internet hosts.
237 </UL>
238
239 <A NAME="TOC77" HREF="FAQ.html#SEC77">4. DIRECTING</A>
240 <UL>
241 <LI><A NAME="TOC78" HREF="FAQ.html#SEC78">Q0401</A>: I need to have any mail for <B>virt.dom.ain</B> that <EM>doesn't</EM> match one of the
242        aliases in <B><B>/usr/lib/aliases.virt</B></B> delivered to a particular address, for
243        example, <B><B>postmaster@virt.dom.ain.</B></B>
244 <LI><A NAME="TOC79" HREF="FAQ.html#SEC79">Q0402</A>: How do I configure Exim to send all messages to a central server?
245 <LI><A NAME="TOC80" HREF="FAQ.html#SEC80">Q0403</A>: How do I configure Exim to send messages for unknown local users to a
246        central server?
247 <LI><A NAME="TOC81" HREF="FAQ.html#SEC81">Q0404</A>: How can I arrange for messages submitted by (for example) Majordomo to
248        be handled specially?
249 <LI><A NAME="TOC82" HREF="FAQ.html#SEC82">Q0405</A>: On a host that accepts mail for several domains, do I have to use fully
250        qualified names in <B>/etc/aliases</B> or do I have to set up an alias file for
251        each domain?
252 <LI><A NAME="TOC83" HREF="FAQ.html#SEC83">Q0406</A>: Some of my users are using the <B>.forward</B> to pipe to a shell command which
253        appends to the user's INBOX. How can I forbid this?
254 <LI><A NAME="TOC84" HREF="FAQ.html#SEC84">Q0407</A>: How can I arrange for a default value when using a query-style lookup
255        such as LDAP or NIS+ to handle aliases?
256 <LI><A NAME="TOC85" HREF="FAQ.html#SEC85">Q0408</A>: If I don't fully qualify the addresses in a virtual domain's alias file
257        then mail to aliases which also match the local domain get delivered to
258        the local domain.
259 <LI><A NAME="TOC86" HREF="FAQ.html#SEC86">Q0409</A>: We've got users who chmod their home to 750, and home is NFS-mounted
260        without root privilege, so Exim cannot access <B>~user/.forward.</B>
261 <LI><A NAME="TOC87" HREF="FAQ.html#SEC87">Q0410</A>: I'm getting "permission denied" when Exim tries to check a for the
262        existence of a user's <B>.procmailrc</B> file using <TT>require_files</TT>.
263 <LI><A NAME="TOC88" HREF="FAQ.html#SEC88">Q0411</A>: How can I deliver mail into different directories for each virtual
264        domain, doing user lookups not against <B>/etc/passwd</B> but against
265        <B><B>/etc/passwd.domain</B>?</B>
266 <LI><A NAME="TOC89" HREF="FAQ.html#SEC89">Q0412</A>: I want mail for <EM>any</EM> local part at certain virtual domains to go
267        to a single address for each domain.
268 <LI><A NAME="TOC90" HREF="FAQ.html#SEC90">Q0413</A>: How can I make Exim look in the alias NIS map instead of <B>/etc/aliases</B>?
269 <LI><A NAME="TOC91" HREF="FAQ.html#SEC91">Q0414</A>: What does the error message "error in forward file (filtering not
270        enabled): missing or malformed local part ..." mean?
271 <LI><A NAME="TOC92" HREF="FAQ.html#SEC92">Q0415</A>: Exim isn't recognizing certain forms of local address.
272 <LI><A NAME="TOC93" HREF="FAQ.html#SEC93">Q0416</A>: I have a domain for which some local parts must be delivered locally,
273        but the remainder are to be treated like any other remote addresses.
274 <LI><A NAME="TOC94" HREF="FAQ.html#SEC94">Q0417</A>: What I really need is the ability to obtain the result of a pipe
275        command so that I can filter externally and redirect internally. Is
276        this possible?
277 <LI><A NAME="TOC95" HREF="FAQ.html#SEC95">Q0418</A>: When I set a suffix on one of my directors, it doesn't get stripped when
278        checking the <TT>local_parts</TT> option. Why is this?
279 <LI><A NAME="TOC96" HREF="FAQ.html#SEC96">Q0419</A>: Why will Exim deliver a message locally to any username that is longer
280        than 8 characters as long as the first 8 characters match one of the
281        local usernames?
282 <LI><A NAME="TOC97" HREF="FAQ.html#SEC97">Q0420</A>: Why am I seeing the error "bad mode (100664) for <B><B>/home/test/.forward</B></B>
283        (userforward director)"? I've looked through the documentation but can't
284        see anything to suggest that exim has to do anything other than read the
285        <B>.forward</B> file.
286 <LI><A NAME="TOC98" HREF="FAQ.html#SEC98">Q0421</A>: How can I arrange that messages larger than some limit are handled by
287        a special director?
288 <LI><A NAME="TOC99" HREF="FAQ.html#SEC99">Q0422</A>: When a user's <B>.forward</B> file is syntactially invalid, Exim defers
289        delivery of all messages to that user, which sometimes include the
290        user's own test messages. Can it be told to ignore the <B>.forward</B> file
291        and/or inform the user of the error?
292 <LI><A NAME="TOC100" HREF="FAQ.html#SEC100">Q0423</A>: I have some users on my system with upper case letters in their login
293        names, but these are not recognized.
294 <LI><A NAME="TOC101" HREF="FAQ.html#SEC101">Q0424</A>: I have unset <TT>locally_caseless</TT> because my users have upper case letters
295        in their login names, but incoming mail now has to use the correct case.
296        Can I relax this somehow?
297 <LI><A NAME="TOC102" HREF="FAQ.html#SEC102">Q0425</A>: I want to look up local users in an SQL database instead of looking in
298        the passwd file.
299 <LI><A NAME="TOC103" HREF="FAQ.html#SEC103">Q0426</A>: Is it possible for Exim to use a SQL database like MySQL for its lists
300        of virtual domains and explicit aliases?
301 <LI><A NAME="TOC104" HREF="FAQ.html#SEC104">Q0427</A>: Can I use my existing alias files and forward files as well as procmail
302        and effectively drop in exim in place of Sendmail ?
303 <LI><A NAME="TOC105" HREF="FAQ.html#SEC105">Q0428</A>: How can I route mail for user <B>X@local</B> to a smarthost if X doesn't exist
304        on the local host?
305 <LI><A NAME="TOC106" HREF="FAQ.html#SEC106">Q0429</A>: What is quickest way to set up Exim so any message sent to a non-
306        existing user would bounce back with a different message, based
307        on the name of non-existing user?
308 <LI><A NAME="TOC107" HREF="FAQ.html#SEC107">Q0430</A>: I am building some largish mailing lists with Majordomo, and was
309        wondering if it worth leaving the actually list expansion to the
310        <B>aliasfile</B> :include: mechanism or should I consider using the <B>forwardfile</B>
311        transport? Is there any real difference in terms of facilities and/or
312        performance, and are the expansions basically the same code anyway?
313 <LI><A NAME="TOC108" HREF="FAQ.html#SEC108">Q0431</A>: What do I need to do to make Exim handle <B>/usr/ucb/vacation</B> processing
314        automatically, so that people could just create a .<B>vacation.msg</B> file in
315        their home directory and not have to edit their <B>.forward</B> file?
316 <LI><A NAME="TOC109" HREF="FAQ.html#SEC109">Q0432</A>: I want to use a default entry in my alias file, but it picks up the
317        local parts that the aliases generate. For example, if the alias file
318        is
319 <LI><A NAME="TOC110" HREF="FAQ.html#SEC110">Q0433</A>: I have some obsolete domains which people have been warned not to use
320        any more. How can I arrange to delete any mail that is sent to them?
321 <LI><A NAME="TOC111" HREF="FAQ.html#SEC111">Q0434</A>: How can I arrange that mail addressed to <B><B>anything@something.mydomain.com</B></B>
322        gets delivered to <B><B>something@mydomain.com</B>?</B>
323 <LI><A NAME="TOC112" HREF="FAQ.html#SEC112">Q0435</A>: I can't get a regular expression to work in this <TT>local_parts</TT> option on
324        one of my directors:
325 <LI><A NAME="TOC113" HREF="FAQ.html#SEC113">Q0436</A>: How can I arrange for all addresses in a group of domains <B>*.example.com</B>
326        to share the same alias file? I have a number of such groups.
327 <LI><A NAME="TOC114" HREF="FAQ.html#SEC114">Q0437</A>: When Exim tries to read <B><B>/usr/lib/majordomo/lists/lists.aliases</B></B> it is
328        giving "Permission denied", but that file is world-readable!
329 </UL>
330
331 <A NAME="TOC115" HREF="FAQ.html#SEC115">5. DELIVERY</A>
332 <UL>
333 <LI><A NAME="TOC116" HREF="FAQ.html#SEC116">Q0501</A>: What does the error "Neither the <I>xxx</I> director nor the <I>yyy</I> transport set
334        a uid for local delivery of..." mean?
335 <LI><A NAME="TOC117" HREF="FAQ.html#SEC117">Q0502</A>: Exim won't deliver to a host with no MX record.
336 <LI><A NAME="TOC118" HREF="FAQ.html#SEC118">Q0503</A>: How should Exim be configured when it is acting as a temporary storage
337        system for a domain on a dial-up host?
338 <LI><A NAME="TOC119" HREF="FAQ.html#SEC119">Q0504</A>: I would like to deliver mail addressed to a given domain normally, but
339        also to generate a message to the envelope sender.
340 <LI><A NAME="TOC120" HREF="FAQ.html#SEC120">Q0505</A>: Exim keeps crashing with segmentation errors (signal 11 or 139) during
341        delivery. This seems to happen when it is about to contact a remote
342        host or when a delivery is deferred.
343 <LI><A NAME="TOC121" HREF="FAQ.html#SEC121">Q0506</A>: Whenever Exim tries to do a local delivery, it gives a permission denied
344        error for the <B>.forward</B> file, like this:
345 <LI><A NAME="TOC122" HREF="FAQ.html#SEC122">Q0507</A>: I have installed Exim, but now I can't mail to root any more. Why is
346        this?
347 <LI><A NAME="TOC123" HREF="FAQ.html#SEC123">Q0508</A>: How can I stop undeliverable bounce messages (e.g. to routeable, but
348        undeliverable, spammer senders) from clogging up the queue for days?
349 <LI><A NAME="TOC124" HREF="FAQ.html#SEC124">Q0509</A>: How can mails that are being routed through directors other than
350        localuser be delivered under the uid of the recipient?
351 <LI><A NAME="TOC125" HREF="FAQ.html#SEC125">Q0510</A>: I want to use MMDF-style mailboxes. How can I get Exim to append the
352        ctrl-A characters that separate indvidual emails?
353 <LI><A NAME="TOC126" HREF="FAQ.html#SEC126">Q0511</A>: I have an ISDN connection and would like a way of running the queue
354        automatically when it is up.
355 <LI><A NAME="TOC127" HREF="FAQ.html#SEC127">Q0512</A>: If a user's mailbox is over quota, is there a way for me to set it up so
356        that the mail bounces to the sender and is NOT stored in the mail queue?
357 <LI><A NAME="TOC128" HREF="FAQ.html#SEC128">Q0513</A>: I'm using tmail to do local deliveries, but when I turned on the
358        <TT>use_crlf</TT> option on the pipe transport (tmail prefers \r\n terminations)
359        message bodies started to vanish.
360 <LI><A NAME="TOC129" HREF="FAQ.html#SEC129">Q0514</A>: What does the message "Unable to get root to set uid and gid
361        for local delivery to <I>xxx</I>: uid=<I>yyy</I> euid=<I>zzz</I>" mean?
362 <LI><A NAME="TOC130" HREF="FAQ.html#SEC130">Q0515</A>: I upgraded to 2.04 and now my Envelope-To: header for my virtual domains
363        is gone. Any idea how to get it back?
364 <LI><A NAME="TOC131" HREF="FAQ.html#SEC131">Q0516</A>: The Exim log records the arrival of a message, and then "Completed",
365        without logging any deliveries. What's going on?
366 <LI><A NAME="TOC132" HREF="FAQ.html#SEC132">Q0517</A>: When I activate "return receipt" for example in Netscape Mailbox
367        sending options, then I get an error message from Exim... something
368        like "not supported". Can I activate delivery confirmations?
369 <LI><A NAME="TOC133" HREF="FAQ.html#SEC133">Q0518</A>: When I dial up to collect mail from my ISP, only the first 10 messages
370        get delivered immediately; the remainder just sit on the queue until a
371        queue runner process finds them.
372 <LI><A NAME="TOC134" HREF="FAQ.html#SEC134">Q0519</A>: My ISP's mail server is rejecting bounce messages from Exim, complaining
373        that they have no sender. The SMTP trace does indeed show that the
374        sender address is "&#60;&#62;". Why is the Sender on the bounce message empty?
375 <LI><A NAME="TOC135" HREF="FAQ.html#SEC135">Q0520</A>: What does the message "retry time not reached [for any host]" on the log
376        mean? Why won't Exim try to deliver the message?
377 <LI><A NAME="TOC136" HREF="FAQ.html#SEC136">Q0521</A>: RFC 1985 specifies that the SMTP command "ETRN <B>host.domain"</B> causes all
378        mail queued for that host, no matter what domain it's for, to be
379        dequeued. Why doesn't Exim support this?
380 <LI><A NAME="TOC137" HREF="FAQ.html#SEC137">Q0522</A>: If email has been deferred to a member on a local mailing list
381        (implemented through forward files), and one of our ETRN clients is on
382        this mailing list, the <B>-R</B> won't "flush" the mailing list message for
383        that client.
384 <LI><A NAME="TOC138" HREF="FAQ.html#SEC138">Q0523</A>: Exim seems to be sending the same message twice, according to the log,
385        although there is a difference in capitalization of the local part of
386        the address.
387 <LI><A NAME="TOC139" HREF="FAQ.html#SEC139">Q0524</A>: How can I force the next retry time for a host to be now?
388 <LI><A NAME="TOC140" HREF="FAQ.html#SEC140">Q0525</A>: I set up "|/bin/grep Subject|/usr/bin/smbclient <B>-M</B> &#60;netbiosname&#62;" as an
389        alias but it doesn't work.
390 <LI><A NAME="TOC141" HREF="FAQ.html#SEC141">Q0526</A>: Why does the pipe transport add a line starting with "&#62;From" to
391        messages?
392 <LI><A NAME="TOC142" HREF="FAQ.html#SEC142">Q0527</A>: I have set <TT>fallback_hosts</TT> on my smtp transport, but after the error
393        <B>"sem@chat.ru</B> cannot be resolved at this time" Exim isn't using them.
394 <LI><A NAME="TOC143" HREF="FAQ.html#SEC143">Q0528</A>: After the holidays my ISP has always hundreds of e-mails waiting for me.
395        These are forced down Exim's throat in one go. Exim spawns a lot of
396        kids, but is there some limit to the number of processes it creates?
397 <LI><A NAME="TOC144" HREF="FAQ.html#SEC144">Q0529</A>: When a message in the queue got to 12h old, Exim wrote 'retry timeout
398        exceeded' and removed <EM>all</EM> messages in the queue to this host - even
399        recent messages. How I can avoid this behaviour? I only want to remove
400        messages that have exceeded the maximum retry time.
401 <LI><A NAME="TOC145" HREF="FAQ.html#SEC145">Q0530</A>: Can Exim add a Content-Length: header to messages it delivers?
402 <LI><A NAME="TOC146" HREF="FAQ.html#SEC146">Q0531</A>: Exim seems to be trying to deliver a message every 10 minutes, though
403        the retry rules specify longer times after a while, because it is
404        writing a log entry every time, like this:
405 <LI><A NAME="TOC147" HREF="FAQ.html#SEC147">Q0532</A>: I am trying to set exim up to have a automatic failover if it sees that
406        the system that it is sending all mail to is down.
407 <LI><A NAME="TOC148" HREF="FAQ.html#SEC148">Q0533</A>: I can't get Exim to deliver over NFS. I get the error "fcntl() failed:
408        No locks available", though the lock daemon is running on the NFS server
409        and other hosts are able to access it.
410 <LI><A NAME="TOC149" HREF="FAQ.html#SEC149">Q0534</A>: Why does Exim bounce messages without even attempting delivery, giving
411        the error "retry time not reached for any host after a long failure
412        period"?
413 <LI><A NAME="TOC150" HREF="FAQ.html#SEC150">Q0535</A>: My <B>.forward</B> file is "|/usr/bin/procmail <B>-f-"</B> and mail gets delivered,
414        but there was a bounce to the sender, sending him the output of procmail.
415        How can I prevent this?
416 </UL>
417
418 <A NAME="TOC151" HREF="FAQ.html#SEC151">6. UUCP</A>
419 <UL>
420 <LI><A NAME="TOC152" HREF="FAQ.html#SEC152">Q0601</A>: The MX records for some UUCP domains point to my local host. How do I
421        get it to pass the messages on to UUCP?
422 <LI><A NAME="TOC153" HREF="FAQ.html#SEC153">Q0602</A>: How can I get Exim to handle "bang path" addresses?
423 <LI><A NAME="TOC154" HREF="FAQ.html#SEC154">Q0603</A>: We see something strange on our system in regards to mail comming in via
424        rmail from a UUCP link. The sender is being set to mailmaster instead of
425        the real sender, and a Sender: header is being added to the message.
426 </UL>
427
428 <A NAME="TOC155" HREF="FAQ.html#SEC155">7. PERFORMANCE</A>
429 <UL>
430 <LI><A NAME="TOC156" HREF="FAQ.html#SEC156">Q0701</A>: I'm running a large mail server. Should I set <TT>split_spool_directory</TT> to
431        improve performance?
432 <LI><A NAME="TOC157" HREF="FAQ.html#SEC157">Q0702</A>: How well does Exim scale?
433 <LI><A NAME="TOC158" HREF="FAQ.html#SEC158">Q0703</A>: We have a large password file. Can Exim use alternative lookups during
434        delivery to speed things up?
435 </UL>
436
437 <A NAME="TOC159" HREF="FAQ.html#SEC159">8. POLICY CONTROLS</A>
438 <UL>
439 <LI><A NAME="TOC160" HREF="FAQ.html#SEC160">Q0801</A>: How do I block unwanted messages from outside my host?
440 <LI><A NAME="TOC161" HREF="FAQ.html#SEC161">Q0802</A>: I don't want to block spam entirely; how can I inspect each message
441        before deciding whether to deliver it or not?
442 <LI><A NAME="TOC162" HREF="FAQ.html#SEC162">Q0803</A>: How can I test that my spam blocks are working?
443 <LI><A NAME="TOC163" HREF="FAQ.html#SEC163">Q0804</A>: How can I test that Exim is correctly configured to use the Realtime
444        Blocking List (RBL)?
445 <LI><A NAME="TOC164" HREF="FAQ.html#SEC164">Q0805</A>: How can I use <B>tcpwrappers</B> in conjunction with Exim?
446 <LI><A NAME="TOC165" HREF="FAQ.html#SEC165">Q0806</A>: How can I get POP-auth-before-relay support in Exim?
447 <LI><A NAME="TOC166" HREF="FAQ.html#SEC166">Q0807</A>: I have one or two cases where my machine correctly rejects messages, but
448        the remote machine is quite persistent, and keeps trying over and over.
449 <LI><A NAME="TOC167" HREF="FAQ.html#SEC167">Q0808</A>: I am seeing the error "no valid sender in message headers: return path
450        is &#60;&#62;" in the reject log. Isn't &#60;&#62; a valid return path for error
451        messages?
452 <LI><A NAME="TOC168" HREF="FAQ.html#SEC168">Q0809</A>: Let's say that we want to run a mail server that does not care if you
453        have proper reverse DNS. If you include <TT>host_reject</TT> lines in your
454        config file, Exim will always reject connections from such hosts. How
455        can this be avoided?
456 <LI><A NAME="TOC169" HREF="FAQ.html#SEC169">Q0810</A>: Is there a way to prevent lookups in the RBL for local hosts?
457 <LI><A NAME="TOC170" HREF="FAQ.html#SEC170">Q0811</A>: How can I set up the <TT>sender_reject</TT> option in my config file so I can
458        reject mail by matching regular expressions?
459 <LI><A NAME="TOC171" HREF="FAQ.html#SEC171">Q0812</A>: Normally <TT>sender_reject_recipients</TT> works fine, but addresses that have
460        some uppercase letters in them seem to come through.
461 <LI><A NAME="TOC172" HREF="FAQ.html#SEC172">Q0813</A>: I want to accept some sender addresses, even though they do not verify.
462        There doesn't seem to be an option for verification exceptions, so how
463        can I do this?
464 <LI><A NAME="TOC173" HREF="FAQ.html#SEC173">Q0814</A>: We are being plagued by forged mail coming from a number of different
465        hosts and sender addresses. The guy however leaves a fingerprint. The
466        first received line always contains 'Received: from baby'. What is the
467        best suggested way for eliminiating him from our systems?
468 <LI><A NAME="TOC174" HREF="FAQ.html#SEC174">Q0815</A>: I have set <TT>host_accept_relay</TT>, but my host still refuses to relay from
469        matching hosts.
470 <LI><A NAME="TOC175" HREF="FAQ.html#SEC175">Q0816</A>: How can I run customized verification checks on incoming addresses?
471 <LI><A NAME="TOC176" HREF="FAQ.html#SEC176">Q0817</A>: Does Exim apply RBL checks to error messages, those with an envelope
472        sender of "&#60;&#62;" ?
473 <LI><A NAME="TOC177" HREF="FAQ.html#SEC177">Q0818</A>: I want to be able to set up a list, similar to <TT>sender_reject_recipients</TT>,
474        but with a user-defined message. I believe I have to use a director for
475        this.
476 <LI><A NAME="TOC178" HREF="FAQ.html#SEC178">Q0819</A>: I want to reject certain sender-recipient combinations, with a specific
477        message for each such combination.
478 <LI><A NAME="TOC179" HREF="FAQ.html#SEC179">Q0820</A>: Will Exim allow me to create a file of regexs and match incoming
479        external email to the list - and if a match is found file the offending
480        message into a special location? Also is it possible to make exim only
481        filter parts of an incoming email - e.g. ignore large MIME attachments
482        for example and only process text/plain?
483 <LI><A NAME="TOC180" HREF="FAQ.html#SEC180">Q0821</A>: I've hacked sendmail to make an ioctl call at the time of the SMTP RCPT
484        command, to check if a user has exceeded their email quota. If they have
485        I issue a temporary failure and a message - can I do this with Exim?
486 <LI><A NAME="TOC181" HREF="FAQ.html#SEC181">Q0822</A>: I'm looking for a rule to reject special unknown recipients.
487 <LI><A NAME="TOC182" HREF="FAQ.html#SEC182">Q0823</A>: I'd like to pass all messages through a virus-scanning system before
488        delivery. Can Exim do this?
489 <LI><A NAME="TOC183" HREF="FAQ.html#SEC183">Q0824</A>: How can I accomplish this: a message sent from any host must either be
490        sending to a domain in a list (a dbm file) or the sender's address
491        domain must be in the list.
492 <LI><A NAME="TOC184" HREF="FAQ.html#SEC184">Q0825</A>: I've set <TT>relay_domains</TT> and <TT>sender_address_relay</TT>, but if <B>user@mydomain</B>
493        tries sending to an arbitrary domain, Exim rejects it.
494 <LI><A NAME="TOC185" HREF="FAQ.html#SEC185">Q0826</A>: I set <TT>sender_reject_recipients</TT>, but Exim is not rejecting those
495        recipients.
496 <LI><A NAME="TOC186" HREF="FAQ.html#SEC186">Q0827</A>: I can't find an option to deny "RCPT TO:" addresses.
497 <LI><A NAME="TOC187" HREF="FAQ.html#SEC187">Q0828</A>: My problem is that Exim replaces <B>$local_part</B> with an empty string in the
498        system filtering. What's wrong or what did I miss?
499 <LI><A NAME="TOC188" HREF="FAQ.html#SEC188">Q0829</A>: Using <B>$recipients</B> in a system filter gives me another problem: how can
500        I do a string lookup if <B>$recipients</B> is a list of addresses?
501 <LI><A NAME="TOC189" HREF="FAQ.html#SEC189">Q0830</A>: Is there a way to configure Exim to reject mail to a certain local host?
502 <LI><A NAME="TOC190" HREF="FAQ.html#SEC190">Q0831</A>: Exim sometimes rejects messages with bad senders after the DATA and
503        sometimes after the MAIL command. What is the difference?
504 <LI><A NAME="TOC191" HREF="FAQ.html#SEC191">Q0832</A>: How can I get Exim to remove attachments from messages?
505 <LI><A NAME="TOC192" HREF="FAQ.html#SEC192">Q0833</A>: I ran a relay test against my host and it failed with an address
506        containing a %, though I don't have <TT>percent_hack_domains</TT> set. Is Exim
507        broken? This is what the tester said:
508 </UL>
509
510 <A NAME="TOC193" HREF="FAQ.html#SEC193">9. MAJORDOMO</A>
511 <UL>
512 <LI><A NAME="TOC194" HREF="FAQ.html#SEC194">Q0901</A>: How do I set up Majordomo to work with Exim?
513 <LI><A NAME="TOC195" HREF="FAQ.html#SEC195">Q0902</A>: I have set <B>$mailer</B> in <B>majordomo.cf,</B> but it still isn't setting the
514        sender correctly in the messages it sends.
515 <LI><A NAME="TOC196" HREF="FAQ.html#SEC196">Q0903</A>: I'm trying to set up majordomo, but I'm getting a "wrong mode" error
516        when I try to send it mail. The panic log entry reads:
517 <LI><A NAME="TOC197" HREF="FAQ.html#SEC197">Q0904</A>: I'm getting return code 9 from <B><B>/home/majordomo/majordomo-1.94.4/wrapper</B></B>
518        when it is passed a message from Exim.
519 </UL>
520
521 <A NAME="TOC198" HREF="FAQ.html#SEC198">10. REWRITING ADDRESSES</A>
522 <UL>
523 <LI><A NAME="TOC199" HREF="FAQ.html#SEC199">Q1001</A>: How can I get Exim to strip the hostname from the sender's address?
524 <LI><A NAME="TOC200" HREF="FAQ.html#SEC200">Q1002</A>: I have Exim configured to remove the hostname portion of the domain on
525        outgoing mail, and yet the hostname is present when the mail gets
526        delivered.
527 <LI><A NAME="TOC201" HREF="FAQ.html#SEC201">Q1003</A>: I want to rewrite local addresses in mail that goes to the outside
528        world, but not for messages that remain within the local intranet.
529 <LI><A NAME="TOC202" HREF="FAQ.html#SEC202">Q1004</A>: I'm using this rewriting rule to change login names into "friendly"
530        names, but if mail comes in for an upper case login name, it doesn't
531        get rewritten.
532 <LI><A NAME="TOC203" HREF="FAQ.html#SEC203">Q1005</A>: Is it possible to completely fail a message if the rewrite rules fail?
533 <LI><A NAME="TOC204" HREF="FAQ.html#SEC204">Q1006</A>: I'm using <B>$domain</B> as the key for a lookup in a rewriting rule, but its
534        contents are not being lowercased. Aren't domains supposed to be handled
535        caselessly?
536 <LI><A NAME="TOC205" HREF="FAQ.html#SEC205">Q1007</A>: I want to rewrite local sender addresses depending on the domain of the
537        recipient.
538 </UL>
539
540 <A NAME="TOC206" HREF="FAQ.html#SEC206">11. HEADERS</A>
541 <UL>
542 <LI><A NAME="TOC207" HREF="FAQ.html#SEC207">Q1101</A>: I would like add some custom headers to selected outgoing mail based on
543        a specific domain and the subject line.
544 <LI><A NAME="TOC208" HREF="FAQ.html#SEC208">Q1102</A>: Is it possible to have Exim add a header to only certain <TT>local_parts</TT> of
545        outgoing mail?
546 <LI><A NAME="TOC209" HREF="FAQ.html#SEC209">Q1103</A>: How can I remove some part of the Received: header?
547 <LI><A NAME="TOC210" HREF="FAQ.html#SEC210">Q1104</A>: How I can insert the PGP header line using exim filters?
548 </UL>
549
550 <A NAME="TOC211" HREF="FAQ.html#SEC211">12. FETCHMAIL</A>
551 <UL>
552 <LI><A NAME="TOC212" HREF="FAQ.html#SEC212">Q1201</A>: When I run fetchmail, I get the error "SMTP listener doesn't like
553        recipient address <B><I>xxx</I>@localhost</B>".
554 <LI><A NAME="TOC213" HREF="FAQ.html#SEC213">Q1202</A>: Fetchmail is passing on bounce messages to Exim with the sender address
555        set to <B><B>&#60;@some.domain</B>&#62;</B> which causes Exim to complain, because there is no
556        local part.
557 <LI><A NAME="TOC214" HREF="FAQ.html#SEC214">Q1203</A>: I'm currently using Exim with fetchmail and I'd like to use the RBL on
558        Exim, but will it work? Do I need to configure fetchmail any particular
559        way? As far as Exim knows, all mail is coming from 127.0.01. Will it
560        check the source address against RBL? Or will it check the From: header?
561 </UL>
562
563 <A NAME="TOC215" HREF="FAQ.html#SEC215">13. PERL</A>
564 <UL>
565 <LI><A NAME="TOC216" HREF="FAQ.html#SEC216">Q1301</A>: Exim built with Perl support exits with the error message <B>"./exim:</B> can't
566        load library <B>'libperl.so'".</B>
567 <LI><A NAME="TOC217" HREF="FAQ.html#SEC217">Q1302</A>: Exim built with Perl support exits with several error messages of the
568        form "undefined reference to `PL_stack_sp'".
569 </UL>
570
571 <A NAME="TOC218" HREF="FAQ.html#SEC218">14. DIAL-UP</A>
572 <UL>
573 <LI><A NAME="TOC219" HREF="FAQ.html#SEC219">Q1401</A>: How can I arrange for mail to other hosts on my local network to be
574        delivered when I'm not connected to the Internet?
575 <LI><A NAME="TOC220" HREF="FAQ.html#SEC220">Q1402</A>: I have a dial-up machine, and I use the <TT>queue_smtp_domains</TT> option so
576        that remote mail only goes out when I do a queue run. However, any email
577        I send with an address <B><B>&#60;anything&#62;@aol.com</B></B> is returned within about 15
578        minutes saying 'retry time exceeded', and all addresses are affected.
579 <LI><A NAME="TOC221" HREF="FAQ.html#SEC221">Q1403</A>: How should Exim be configured when it is acting as a temporary storage
580        system for a domain on a dial-up host?
581 <LI><A NAME="TOC222" HREF="FAQ.html#SEC222">Q1404</A>: I have <TT>queue_remote_domains</TT> or <TT>queue_smtp_domains</TT> set, and use <B>-qf</B> to
582        force delivery of waiting mail when I dial in. How can I arrange for any
583        new messages that arrive while I'm connected to be delivered immediately?
584 </UL>
585
586 <A NAME="TOC223" HREF="FAQ.html#SEC223">15. MODIFYING MESSAGE BODIES</A>
587 <UL>
588 <LI><A NAME="TOC224" HREF="FAQ.html#SEC224">Q1501</A>: How can I add a disclaimer or an advertisement to a message?
589 <LI><A NAME="TOC225" HREF="FAQ.html#SEC225">Q1502</A>: How can I remove attachments from messages?
590 </UL>
591
592 <A NAME="TOC226" HREF="FAQ.html#SEC226">20. MILLENNIUM</A>
593 <UL>
594 <LI><A NAME="TOC227" HREF="FAQ.html#SEC227">Q2000</A>: Are there any Y2K issues with Exim?
595 </UL>
596
597 <A NAME="TOC228" HREF="FAQ.html#SEC228">50. MISCELLANEOUS</A>
598 <UL>
599 <LI><A NAME="TOC229" HREF="FAQ.html#SEC229">Q5001</A>: What does the error "Unable to get interface configuration: 22 Invalid
600        argument" mean?
601 <LI><A NAME="TOC230" HREF="FAQ.html#SEC230">Q5002</A>: How can I arrange to allow a limited set of users to perform a limited
602        set of Exim administration functions? I don't want to put them all in
603        the exim group.
604 <LI><A NAME="TOC231" HREF="FAQ.html#SEC231">Q5003</A>: How can I test for a message's size being greater or less than a given
605        value in an expansion string?
606 <LI><A NAME="TOC232" HREF="FAQ.html#SEC232">Q5004</A>: I want to "tail" the Exim log, but I have a number of other logs I also
607        want to "tail", and the number of tailing windows is getting to be a
608        nuisance.
609 <LI><A NAME="TOC233" HREF="FAQ.html#SEC233">Q5005</A>: I would like to have Exim log information written to syslog.
610 <LI><A NAME="TOC234" HREF="FAQ.html#SEC234">Q5006</A>: What does the error "Failed to create spool file" mean?
611 <LI><A NAME="TOC235" HREF="FAQ.html#SEC235">Q5007</A>: Exim keeps crashing with segmentation errors (signal 11 or 139).
612 <LI><A NAME="TOC236" HREF="FAQ.html#SEC236">Q5008</A>: Exim's databases keep getting corrupted.
613 <LI><A NAME="TOC237" HREF="FAQ.html#SEC237">Q5009</A>: I've been using an autoreply director to try and mimic a bounce message,
614        but I can't get it to have an envelope from of &#60;&#62;.
615 <LI><A NAME="TOC238" HREF="FAQ.html#SEC238">Q5010</A>: I see entries in the log that mention two different IP addresses for the
616        same connection. Why is this? For example:
617 <LI><A NAME="TOC239" HREF="FAQ.html#SEC239">Q5011</A>: How can I persuade Exim to accept ETRN commands without the leading
618        # character?
619 <LI><A NAME="TOC240" HREF="FAQ.html#SEC240">Q5012</A>: I've recently noticed that emails I send with a Bcc: line are being
620        delivered to their final destination with the Bcc: line still present.
621 <LI><A NAME="TOC241" HREF="FAQ.html#SEC241">Q5013</A>: I used gv <B>v3.5.8</B> (ghostview) to try printing <B>spec.ps.</B> After every
622        printed page, the printer ejects a blank sheet. Is this something to do
623        with using "letter" rather than A4 paper?
624 <LI><A NAME="TOC242" HREF="FAQ.html#SEC242">Q5014</A>: I would like to have a separate queue per domain for hosts which dial
625        in to collect their mail.
626 <LI><A NAME="TOC243" HREF="FAQ.html#SEC243">Q5015</A>: A short time after I start Exim I see a &#60;defunct&#62; process. What is
627        causing this?
628 <LI><A NAME="TOC244" HREF="FAQ.html#SEC244">Q5016</A>: On a reboot, or a restart of the mail system, I see the message "Mailer
629        daemons: exim abandoned: unknown, malformed, or incomplete option
630        <B>-bz</B> sendmail". What does this mean?
631 <LI><A NAME="TOC245" HREF="FAQ.html#SEC245">Q5017</A>: I would like to restrict e-mail usage for some users to the local
632        machine, ideally on a group basis.
633 <LI><A NAME="TOC246" HREF="FAQ.html#SEC246">Q5018</A>: Whenever exim restarts it takes up to 3-5 minutes to start responding on
634        the SMTP port. Why is this?
635 <LI><A NAME="TOC247" HREF="FAQ.html#SEC247">Q5019</A>: Why aren't there any man pages for Exim? I don't always carry my printed
636        documentation.
637 <LI><A NAME="TOC248" HREF="FAQ.html#SEC248">Q5020</A>: When I send a message using the <B>-t</B> command line option, Exim sends only
638        to the addresses within the message, not to those on the command line.
639 <LI><A NAME="TOC249" HREF="FAQ.html#SEC249">Q5021</A>: If I set up, for example, 
640           <TT>local_domains = *customer.com</TT>, then it matches
641        <B>"customer.com"</B> and <B>"abc.customer.com"</B> as required, but it also matches
642        <B>"noncustomer.com",</B> which is wrong. How can I get round this?
643 <LI><A NAME="TOC250" HREF="FAQ.html#SEC250">Q5022</A>: I want to match all local domains of the form <B>*.oyoy.org</B> but want a few
644        exceptions. For instance I don't want <B>foo.oyoy.org</B> or <B>bar.oyoy.org</B> to be
645        treated as local. What is the best way to do this?
646 <LI><A NAME="TOC251" HREF="FAQ.html#SEC251">Q5023</A>: I can't seem to find a pre-built version of Exim anywhere. The machine
647        is a Sparc 5 running Solaris 2.6.
648 <LI><A NAME="TOC252" HREF="FAQ.html#SEC252">Q5024</A>: Is there a Windows NT version of Exim available?
649 <LI><A NAME="TOC253" HREF="FAQ.html#SEC253">Q5025</A>: Does Exim support Delivery Status Notificaion (DSN), Message Status
650        Notification (MSN), or any other form of delivery acknowledgement?
651 <LI><A NAME="TOC254" HREF="FAQ.html#SEC254">Q5026</A>: What does "Exim" stand for?
652 <LI><A NAME="TOC255" HREF="FAQ.html#SEC255">Q5027</A>: What does the log message "no immediate delivery: more than 10 messages
653        received in one connection" mean?
654 <LI><A NAME="TOC256" HREF="FAQ.html#SEC256">Q5028</A>: Although I haven't set <TT>check_spool_space</TT>, Exim is still checking the
655        amount of space on the spool for incoming SMTP messages that use the
656        SIZE option. Can I suppress this?
657 <LI><A NAME="TOC257" HREF="FAQ.html#SEC257">Q5029</A>: I just noticed log entries that start off "&#60;= &#60;&#62;". Am I correct in
658        assuming that the "&#60;&#62;" indicates that the envelope did not contain any
659        "From" data?
660 <LI><A NAME="TOC258" HREF="FAQ.html#SEC258">Q5030</A>: I've received a message which does not have my address in the To:
661        line. It is a spam message with the same address in both the From: and
662        the To: headers. How can this happen, and why doesn't Exim reject it?
663 <LI><A NAME="TOC259" HREF="FAQ.html#SEC259">Q5031</A>: Can (or will) Exim ever handle a message delivery purely in memory,
664        that is, it is handled without it ever hitting the disc?
665 <LI><A NAME="TOC260" HREF="FAQ.html#SEC260">Q5032</A>: If I am using dbm files for data that Exim reads, can I rebuild them
666        on the fly, or do I need to restart Exim every time I make a change?
667 <LI><A NAME="TOC261" HREF="FAQ.html#SEC261">Q5033</A>: What are the main differences between using an Exim filter and using
668        procmail?
669 <LI><A NAME="TOC262" HREF="FAQ.html#SEC262">Q5034</A>: I need an option that is the opposite of <B>-bpa,</B> that is, a listing of
670        those addresses generated from a top-level address that have not yet
671        been delivered.
672 <LI><A NAME="TOC263" HREF="FAQ.html#SEC263">Q5035</A>: I am getting complaints from a customer who uses my EXIM server for
673        relaying that they are being blocked with a "Too many connections"
674        error.
675 <LI><A NAME="TOC264" HREF="FAQ.html#SEC264">Q5036</A>: When I try "exim <B>-bf"</B> to test a system filter, I received the following
676        error message: "Filter error: unavailable filtering command "fail" near
677        line 8 of filter file".
678 <LI><A NAME="TOC265" HREF="FAQ.html#SEC265">Q5037</A>: How can I make Exim receive incoming mail, queue it, but NOT attempt to
679        deliver it? I want to be in this state while moving some mailboxes.
680 <LI><A NAME="TOC266" HREF="FAQ.html#SEC266">Q5038</A>: What does the rejection message "reject all recipients: 3 times bad
681        sender" mean?
682 <LI><A NAME="TOC267" HREF="FAQ.html#SEC267">Q5039</A>: The menu in Eximon isn't working. It displays, but I can't select
683        anything from it.
684 <LI><A NAME="TOC268" HREF="FAQ.html#SEC268">Q5040</A>: What does "ridiculously long message header" in an error report mean?
685 <LI><A NAME="TOC269" HREF="FAQ.html#SEC269">Q5041</A>: What does Exim use for POP as a default?  Do I have to install anything
686        else?
687 </UL>
688
689 <A NAME="TOC270" HREF="FAQ.html#SEC270">93. HP-UX</A>
690 <UL>
691 <LI><A NAME="TOC271" HREF="FAQ.html#SEC271">Q9301</A>: I'm trying to compile on an HP machine and I don't have gcc there. So I
692        put <TT>CC=cc</TT> in the <B>Local/Makefile</B>, but I got this error:
693 </UL>
694
695 <A NAME="TOC272" HREF="FAQ.html#SEC272">94. BSDI</A>
696 <UL>
697 <LI><A NAME="TOC273" HREF="FAQ.html#SEC273">Q9401</A>: On BSDI 4.0, Exim built with Perl support exits with the error message
698        <B>"./exim:</B> can't load library <B>'libperl.so'".</B>
699 </UL>
700
701 <A NAME="TOC274" HREF="FAQ.html#SEC274">95. IRIX</A>
702 <UL>
703 <LI><A NAME="TOC275" HREF="FAQ.html#SEC275">Q9501</A>: I'm running IRIX 6.2 with a number of alias IP addresses set up, but
704        Exim doesn't seem to recognize them as local addresses.
705 <LI><A NAME="TOC276" HREF="FAQ.html#SEC276">Q9502</A>: The IP addresses for incoming calls are all being given as
706        255.255.255.255.
707 </UL>
708
709 <A NAME="TOC277" HREF="FAQ.html#SEC277">96. LINUX</A>
710 <UL>
711 <LI><A NAME="TOC278" HREF="FAQ.html#SEC278">Q9601</A>: Exim is mysteriously crashing, usually when forking to send a delivery
712        error message.
713 <LI><A NAME="TOC279" HREF="FAQ.html#SEC279">Q9602</A>: Exim has created a directory called <B>build-Linux-libc5-i386</B> but is
714        trying to reference <B>build-Linux-libc5-i386-linux</B> while building.
715 <LI><A NAME="TOC280" HREF="FAQ.html#SEC280">Q9603</A>: I want to use logrotate which is standard with <B>RH5.2</B> Linux to rotate
716        my mail logs. Anyone worked out the logrotate config file that will
717        do this?
718 <LI><A NAME="TOC281" HREF="FAQ.html#SEC281">Q9604</A>: I'm seeing the message "<B>inetd</B>[334]: imap/tcp server failing (looping),
719        service terminated" on a RedHat 5.2 system, causing imap connections to
720        be refused. The imapd in use is Washington Uni vers 12.250. Could this
721        be anything to do with Exim?
722 <LI><A NAME="TOC282" HREF="FAQ.html#SEC282">Q9605</A>: I get the "too many open files" error especially when a lot of messages
723        land for majordomo at the same time.
724 <LI><A NAME="TOC283" HREF="FAQ.html#SEC283">Q9606</A>: I'm having a problem with an Exim RPM.
725 </UL>
726
727 <A NAME="TOC284" HREF="FAQ.html#SEC284">97. SUN SYSTEMS</A>
728 <UL>
729 <LI><A NAME="TOC285" HREF="FAQ.html#SEC285">Q9701</A>: Exim builds fine with gcc on SunOS 4 but crashes inside <B>sscanf()</B>.
730 <LI><A NAME="TOC286" HREF="FAQ.html#SEC286">Q9702</A>: How can I get rid of spurious ^M characters in messages sent from
731        CDE <B>dtmail</B>?
732 <LI><A NAME="TOC287" HREF="FAQ.html#SEC287">Q9703</A>: On SunOS 4 Exim crashes when looking up domains in the DNS that have
733        more than 10 A records.
734 <LI><A NAME="TOC288" HREF="FAQ.html#SEC288">Q9704</A>: The menu in Eximon isn't working on my Sun system.
735 <LI><A NAME="TOC289" HREF="FAQ.html#SEC289">Q9705</A>: I am experiencing mailbox locking problems with Sun's <B>mailtool</B> used
736        over a network.
737 <LI><A NAME="TOC290" HREF="FAQ.html#SEC290">Q9706</A>: Exim has been crashing on my Solaris x86 system, apparently while
738        running DBM functions.
739 <LI><A NAME="TOC291" HREF="FAQ.html#SEC291">Q9707</A>: The exiwhat utility isn't working for me on a Solaris 2 system.
740 <LI><A NAME="TOC292" HREF="FAQ.html#SEC292">Q9708</A>: How do I stop Sun's <B>dtcm</B> from hanging?
741 <LI><A NAME="TOC293" HREF="FAQ.html#SEC293">Q9709</A>: I want Exim to use only the resolver (i.e. ignore <B>/etc/hosts</B>), but don't
742        want to alter the <B>nsswitch.conf</B> file in Solaris 2.
743 </UL>
744
745 <A NAME="TOC294" HREF="FAQ.html#SEC294">98. COOKBOOK</A>
746 <UL>
747 <LI><A NAME="TOC295" HREF="FAQ.html#SEC295">Q9801</A>: How do I configure Exim as part of TPC <B>(<A HREF="http://www.tpc.int">http://www.tpc.int</A>)?</B>
748 <LI><A NAME="TOC296" HREF="FAQ.html#SEC296">Q9802</A>: How do I configure Exim so that it sends mail to the outside world only
749        from a restricted list of our local users?
750 <LI><A NAME="TOC297" HREF="FAQ.html#SEC297">Q9803</A>: How do I configure Exim to run with SmartList?
751 <LI><A NAME="TOC298" HREF="FAQ.html#SEC298">Q9804</A>: How do I configure Exim to minic PP's "tripnote" facility?
752 <LI><A NAME="TOC299" HREF="FAQ.html#SEC299">Q9805</A>: How do I configure Exim to handle local parts with extensions?
753 <LI><A NAME="TOC300" HREF="FAQ.html#SEC300">Q9806</A>: How do I configure Exim so that only a restricted list of users can
754        receive mail from external domains?
755 <LI><A NAME="TOC301" HREF="FAQ.html#SEC301">Q9807</A>: I have <B><B>someuser@mydomain.com</B></B> that I only want certain users to be able
756        to mail to. How do I accomplish this?
757 <LI><A NAME="TOC302" HREF="FAQ.html#SEC302">Q9808</A>: A site for which I provide secondary MX is down for some time. Is there
758        a way to run the queue for that destination separately from the main
759        queue?
760 <LI><A NAME="TOC303" HREF="FAQ.html#SEC303">Q9809</A>: How do I implement VERP (Variable Envelope Return Paths) in Exim?
761 <LI><A NAME="TOC304" HREF="FAQ.html#SEC304">Q9810</A>: I'd like to make a copy of all outgoing messages to a local mailbox. Is
762        there a solution for this using an Exim filter?
763 <LI><A NAME="TOC305" HREF="FAQ.html#SEC305">Q9811</A>: I want to make a copy of outgoing messages to a specific file for each
764        user in a specific directory, using a "save" command in a system filter.
765        How can I arrange for Exim to write to these files under the correct
766        UID/GID?
767 <LI><A NAME="TOC306" HREF="FAQ.html#SEC306">Q9812</A>: How can I keep an archive of all mail for some specific local email
768        addresses?
769 <LI><A NAME="TOC307" HREF="FAQ.html#SEC307">Q9813</A>: How can I configure Exim to provide a vacation message when there are
770        no local users on my mail hub?
771 <LI><A NAME="TOC308" HREF="FAQ.html#SEC308">Q9814</A>: We want to be able to temporarily lock out a user by disabling the
772        password and moving the home directory to another place. How can we
773        arrange to reject mail for users in this state?
774 <LI><A NAME="TOC309" HREF="FAQ.html#SEC309">Q9815</A>: I need an alias, say "fakeaddress" that should receive a message,
775        strip all reply-to: headers present, substitute another one pointing to
776        "otheraddress" and forward a message to "realaddress".
777 <LI><A NAME="TOC310" HREF="FAQ.html#SEC310">Q9816</A>: How can I set up Exim to work with Listar?
778 <LI><A NAME="TOC311" HREF="FAQ.html#SEC311">Q9817</A>: I need to take copies of all incoming and outgoing mail for certain
779        users. For each user there may be a different monitoring address.
780 <LI><A NAME="TOC312" HREF="FAQ.html#SEC312">Q9818</A>: How can I add a disclaimer to the end of every message?
781 <LI><A NAME="TOC313" HREF="FAQ.html#SEC313">Q9819</A>: I would like to append a simple advertisement text to all outgoing
782        and local mails.
783 <LI><A NAME="TOC314" HREF="FAQ.html#SEC314">Q9820</A>: How can I configure Exim so that all mails adressed to
784        <B><B>something@username.domain.net</B></B> get delivered to <B>/var/spool/mail/username</B>?
785 <LI><A NAME="TOC315" HREF="FAQ.html#SEC315">Q9821</A>: How do I get exim not to add a Sender: header to locally originated
786        mail?
787 <LI><A NAME="TOC316" HREF="FAQ.html#SEC316">Q9822</A>: How can I get Exim to work with mailman?
788 <LI><A NAME="TOC317" HREF="FAQ.html#SEC317">Q9823</A>: Is there any way to have messages sent to a specific local address
789        delayed by - say - 24 hours?
790 </UL>
791
792 <A NAME="TOC318" HREF="FAQ.html#SEC318">99. LIST OF SAMPLE CONFIGURATIONS</A>
793 <UL>
794 </UL>
795 <BR><H2><A NAME="SEC1" HREF="FAQ.html#TOC1">0. DEBUGGING
796
797 </A></H2>
798 <A NAME="SEC2" HREF="FAQ.html#TOC2">Q0001</A>: Exim is crashing. What is wrong?
799
800
801 <P>
802 A0001: Exim should never crash. The author is always keen to know about
803        crashes, so that they can be diagnosed and fixed. However, before you
804        start sending email, please check that you are running the latest
805        release of Exim, in case the problem has already been fixed. The
806        techniques described below can also be useful in trying to pin down
807        exactly which circumstances caused the crash and what Exim was trying to
808        do at the time. If the crash is reproducable (by a particular message,
809        say) keep a copy of that message. If there is a core file (in Exim's
810        spool directory), see if you can get any information from it.
811
812 </P>
813 <P>
814        One thing that has caused crashes in the past has been incorrectly
815        installed DB libraries. In particular, if you are running any version of
816        Berkeley db, it is best to set <TT>USE_DB=yes</TT> in <B>Local/Makefile</B> before
817        building Exim. This then avoids the use of the "ndbm compatibility
818        interface" via the <B>ndbm.h</B> include file, which has been found to be
819        incorrect on some systems. If you have already built Exim, you can just
820        edit <B>Local/Makefile</B> and run <B>make</B> again to rebuild. Before restarting
821        Exim, delete any existing database files in the <B>spool/db</B> directory.
822
823 </P>
824 <A NAME="SEC3" HREF="FAQ.html#TOC3">Q0002</A>: Exim is not working. What is wrong?
825
826
827 <P>
828 A0002: Exactly how is it not working? Check the more specific questions in the
829        other sections of this FAQ. Some general techniques for debugging are:
830
831 </P>
832 <P>
833        1. Look for information in Exim's log files. These are in the "log"
834           directory in Exim's spool directory, unless you have configured a
835           different path for them. Serious operational problems are reported
836           in paniclog.
837
838 </P>
839 <P>
840        2. If the problem involves the delivery of one or more messages, try
841           forcing a delivery with the <B>-d</B> option, to cause Exim to output
842           debugging information. For example:
843
844 </P>
845 <PRE>
846             exim -d -M 0z6CXU-0005RR-00</PRE>
847 <P>
848           On its own, <B>-d</B> produces a small amount of information. Following it
849           with a number increases the amount given: <B>-d9</B> gives the maximum
850           amount of general information; <B>-d10</B> gives in addition details of the
851           interpretation of filter files, and <B>-d11</B> or higher also turns on the
852           debugging option for DNS lookups. The output is written to the
853           standard error stream.
854
855 </P>
856 <P>
857        3. If the problem involves incoming SMTP mail, try using the <B>-bh</B> option
858           to simulate an incoming connection from a specific host, for example:
859
860 </P>
861 <PRE>
862             exim -bh 10.9.8.7</PRE>
863 <P>
864           This goes through the motions of an SMTP session, without actually
865           accepting a message. Information about various policy checks is
866           output. You will need to know how to pretend to be an SMTP client.
867
868 </P>
869 <P>
870        4. If the problem involves lack of recognition or incorrect handling
871           of local addresses, try using the <B>-bt</B> option with debugging turned
872           on, to see how Exim is handling the address. For example,
873
874 </P>
875 <PRE>
876             exim -d2 -bt z6abc</PRE>
877 <P>
878           will show you how it would handle the local part "z6abc". Increase
879           the debug level to <B>-d9</B> for more information.
880
881 </P>
882 <A NAME="SEC4" HREF="FAQ.html#TOC4">Q0003</A>: What does the error "Child process of <TT>address_pipe</TT> transport returned
883        69 from command <I>xxx</I>" mean?
884
885
886 <P>
887 A0003: The most common meaning of exit code 69 is "unavailable", and this often
888        means that when Exim tried to exec the command <I>xxx</I>, it failed. One
889        cause of this might be incorrect permissions on the file containing the
890        command.
891
892 </P>
893 <A NAME="SEC5" HREF="FAQ.html#TOC5">Q0004</A>: My virtual domain setup isn't working. How can I debug it?
894
895
896 <P>
897 A0004: You can use an exim command with <B>-d</B> (or <B>-d2,</B> <B>-d3</B> ... <B>-d9)</B> to get it to
898        show you how it is processing addresses. You don't actually need to send
899        a message; use the <B>-bt</B> option like this:
900
901 </P>
902 <PRE>
903          exim -d2 -bt localpart@virtualhost</PRE>
904 <P>
905        This will show you which directors it is using. If the problem appears
906        to be with the expansion of an option setting, you can use the
907        <TT>debug_print</TT> option on a director (or router) to get Exim to output the
908        expanded string values as it goes along.
909
910 </P>
911 <A NAME="SEC6" HREF="FAQ.html#TOC6">Q0005</A>: Why is Exim giving "421 Unexpected log failure, please try later" when
912        receiving an SMTP message with a large number of recipients?
913
914
915 <P>
916 A0005: You are verifying recipients, and your configuration is one that does a
917        different lookup of some sort for each recipient. Exim keeps lookup
918        files open, in case there are several lookups in the same file. Versions
919        of Exim prior to 2.10 did not limit the number of open files used for
920        this purpose, and your operating system's maximum per process has been
921        reached. Exim is trying to log the failure to open a file, but cannot
922        open the log file, for the same reason. If upgrading Exim is not
923        immediately possible, you might be able to increase your operating
924        system's maximum number of open files per process.
925
926 </P>
927 <A NAME="SEC7" HREF="FAQ.html#TOC7">Q0006</A>: Why is Exim not rejecting incoming messages addressed to non-existent
928        users at SMTP time?
929
930
931 <P>
932 A0006: Have you remembered to set <TT>receiver_verify</TT>? It is not the default.
933
934 </P>
935 <A NAME="SEC8" HREF="FAQ.html#TOC8">Q0007</A>: I've put an entry for <B>*.my.domain</B> in a DBM lookup file, but it isn't
936        getting recognized.
937
938
939 <P>
940 A0007: You need to request "partial matching" by setting the search type to
941        "partial-dbm" in order for this to work.
942
943 </P>
944 <A NAME="SEC9" HREF="FAQ.html#TOC9">Q0008</A>: I've put the entry <B><B>*@domain.com</B></B> in a lookup database, but it isn't
945        working. The expansion I'm using is:
946
947
948 <PRE>
949          ${lookup{${lc:$sender_address}}dbm{/the/file} ...</PRE>
950 <P>
951 A0008: As no sender address will ever be <B><B>*@domain.com</B></B> this will indeed have
952        no effect as it stands. You need to tell Exim if you want it to look for
953        defaults after the normal lookup has failed. In this case, change the
954        search type from "dbm" to "dbm*@". See the section on "Default values in
955        single-key lookups" in the chapter entitled "File and database lookups".
956
957 </P>
958 <A NAME="SEC10" HREF="FAQ.html#TOC10">Q0009</A>: Is there a way to print recognized local domains?
959
960
961 <P>
962 A0009: If you run "exim <B>-bP</B> <TT>local_domains</TT>" it will output the string that is
963        set, but it won't print the contents of any files that are referenced.
964
965 </P>
966 <A NAME="SEC11" HREF="FAQ.html#TOC11">Q0010</A>: If I run <B>"./exim</B> <B>-d9</B> <B>-bt</B> <B>user@domain</B>" all seems well, but when I send a
967        message from my User Agent, it does not arrive at its destination.
968
969
970 <P>
971 A0010: Try sending a message directly to Exim by typing this:
972
973 </P>
974 <PRE>
975          exim -d9 user@domain
976          &#60;some message, could be empty&#62;
977          .</PRE>
978 <P>
979        If the message gets delivered to a remote host, but never arrives at its
980        final destination, then the problem is at the remote host. If, however,
981        the message gets through correctly, then the problem may be between your
982        User Agent and Exim. Try setting Exim's <TT>log_arguments</TT> option, to see
983        with which arguments the UA is calling Exim.
984
985 </P>
986 <A NAME="SEC12" HREF="FAQ.html#TOC12">Q0011</A>: I am getting this message in mainlog every so often: "no immediate
987        delivery: too many connections (19, max 0)". What am I missing?
988
989
990 <P>
991 A0011: A current release of Exim. :-)  The message you are getting is the wrong
992        message. What it should be saying is "too many messages received in one
993        SMTP connection" (see next question). This bug was fixed in release
994        2.051.
995
996 </P>
997 <A NAME="SEC13" HREF="FAQ.html#TOC13">Q0012</A>: What does "no immediate delivery: too many messages received in one SMTP
998        connection" mean?
999
1000
1001 <P>
1002 A0012: An SMTP client may send any number of messages down a single SMTP
1003        connection to a server. Initially, an Exim server starts up a delivery
1004        process as soon as a message is received. However, in order not to start
1005        up too many processes when lots of messages are arriving (typically
1006        after a period of downtime), it stops doing immediate delivery after a
1007        certain number of messages have arrived down the same connection. The
1008        threshold is set by <TT>smtp_accept_queue_per_connection</TT>, and the default
1009        value is 10. On large systems, the value should be increased. If you are
1010        running a dial-in host and expecting to get all your mail down a single
1011        SMTP connection, then you can disable the limit altogether by setting
1012        the value to zero.
1013
1014 </P>
1015 <A NAME="SEC14" HREF="FAQ.html#TOC14">Q0013</A>: Exim puts "for &#60;address&#62;" in the Received: headers of some, but not all,
1016        messages. Is this a bug?
1017
1018
1019 <P>
1020 A0013: No. It is deliberate. Exim inserts a "for" phrase only if the incoming
1021        message has precisely one recipient. If there is more than one
1022        recipient, nothing is inserted. The reason for this is that not all
1023        recipients appear in the To: or Cc: headers, and it is considered a
1024        breach of privacy to expose such recipients to the others. A common
1025        case is when a message has come from a mailing list.
1026
1027 </P>
1028 <A NAME="SEC15" HREF="FAQ.html#TOC15">Q0014</A>: Instead of <TT>exim_dbmbuild</TT>, I'm using a homegrown program to build DBM
1029        (or cdb) files, but Exim doesn't seem to be able to use them.
1030
1031
1032 <P>
1033 A0014: Exim expects there to be a binary zero value on the end of each key used
1034        in a DBM file if you use the "dbm" lookup type, but not for the "dbmnz"
1035        lookup type or for the keys of a cdb file. Check that you haven't
1036        slipped up in this regard.
1037
1038 </P>
1039 <A NAME="SEC16" HREF="FAQ.html#TOC16">Q0015</A>: Exim is unable to route to any remote domains. It doesn't seen to be
1040        able to access the DNS.
1041
1042
1043 <P>
1044 A0015: Try running "exim <B>-d11</B> <B>-bt</B> &#60;remote address&#62;". The <B>-d11</B> will make it show
1045        the resolver queries it is building and the results of its DNS queries.
1046        If it appears unable to contact any nameservers, check the contents and
1047        permissions of <B><B>/etc/resolv.conf</B>.</B>
1048
1049 </P>
1050 <A NAME="SEC17" HREF="FAQ.html#TOC17">Q0016</A>: I'm using ETRN to run a script that checks things and doesn't always
1051        end up running "exim <B><B>-R".</B></B> However, after it has run once, subsequent
1052        attempts fail with "458 Already processing".
1053
1054
1055 <P>
1056 A0016: Set <TT>no_smtp_etrn_serialize</TT>.
1057
1058 </P>
1059 <A NAME="SEC18" HREF="FAQ.html#TOC18">Q0017</A>: What does the error message "transport <TT>system_aliases</TT>: cannot find
1060        transport driver "<B>aliasfile</B>" in line 92" mean?
1061
1062
1063 <P>
1064 A0017: "<B>aliasfile</B>" is a director, not a transport. You have put a configuration
1065        for a director into the transports section of the configuration file.
1066
1067 </P>
1068 <A NAME="SEC19" HREF="FAQ.html#TOC19">Q0018</A>: Exim is timing out after receiving and responding to the DATA command
1069        from one particular host, and yet the client host also claims to be
1070        timing out. This seems to affect only certain messages.
1071
1072
1073 <P>
1074 A0018: (A) This problem has been seen with a network that was dropping all
1075        packets over a certain size, which mean that the first part of the SMTP
1076        transaction worked, but when the body of a large message started
1077        flowing, the main data bits never got through the network. See also
1078        
1079         <A HREF="FAQ.html#SEC22">Q0021</A>.
1080
1081 </P>
1082 <P>
1083        (B) This can also happen if a machine has a broken TCP stack and won't
1084        reassemble fragmented datagrams.
1085
1086 </P>
1087 <P>
1088        (C) A very few ISDN lines have been seen which failed when certain data
1089        patterns were sent through them, and replacing the routers at both end
1090        of the link did not fix things. One of them was triggered by more than 4
1091        X's in a row in the data.
1092
1093 </P>
1094 <A NAME="SEC20" HREF="FAQ.html#TOC20">Q0019</A>: What does the message "Socket bind() to port 25 for address (any)
1095        failed: address already in use" mean?
1096
1097
1098 <P>
1099 A0019: You are trying to run an Exim daemon when there is one already running -
1100        or maybe some other MTA is running, or perhaps you have an SMTP line in
1101        <B><B>/etc/inetd.conf</B></B> which is causing <B>inetd</B> to listen on port 25.
1102
1103 </P>
1104 <A NAME="SEC21" HREF="FAQ.html#TOC21">Q0020</A>: I've set <TT>headers_check_syntax</TT>, but this causes Exim to complain about
1105        headers like "To: Work: Jim <B>&#60;jims@email</B>&#62;, Home: Bob <B>&#60;bobs@email</B>&#62;" which
1106        look all right to me. Is this a bug?
1107
1108
1109 <P>
1110 A0020: No. Header lines such as From:, To:, <B>etc.,</B> which contain addresses, are
1111        structured, and have to be in a specific format which is defined in RFC
1112        822. Unquoted colons are not allowed in the "phrase" part of an email
1113        address (they are OK in other headers such as Subject:). The correct
1114        form for that header is
1115
1116 </P>
1117 <PRE>
1118          To: "Work: Jim" &#60;jims@email&#62;, "Home: Bob" &#60;bobs@email&#62;</PRE>
1119 <P>
1120        You will sometimes see unquoted colons in To: and Cc: headers, but only
1121        in connection with name lists (called "groups"), for example:
1122
1123 </P>
1124 <PRE>
1125          To: My friends: X &#60;x@y.x&#62;, Y &#60;y@w.z&#62;;,
1126              My enemies: A &#60;a@b.c&#62;, B &#60;b@c.d&#62;;</PRE>
1127 <P>
1128        Each list must be terminated by a semicolon, as shown.
1129
1130 </P>
1131 <A NAME="SEC22" HREF="FAQ.html#TOC22">Q0021</A>: Whenever Exim tries to deliver a specific message to a particular
1132        server, it fails, giving the error "Remote end closed connection after
1133        data" or "Broken pipe" or a timeout. What's going on?
1134
1135
1136 <P>
1137 A0021: "Broken pipe" is the error you get on some OS when the far end just
1138        drops the connection. The alternative is "connection reset by peer".
1139
1140 </P>
1141 <P>
1142        (A) There are some firewalls that fall over on \0 characters in the
1143        mail. Have a look, e.g. with hexdump <B>-c</B> mymail | tail to see if your
1144        mail contains any binary zero characters.
1145
1146 </P>
1147 <P>
1148        (B) There are broken SMTP servers around that just drop the connection
1149        after the data has been sent if they don't like the message for some
1150        reason (e.g. it is too big) instead of sending a 5xx error code. Have
1151        you tried sending a small message to the same address?
1152
1153 </P>
1154 <P>
1155        (C) If the problem occurs right at the start of the mail, then it could
1156        be a network problem with mishandling of large packets. Many emails are
1157        small and thus appear to propagate correctly, but big emails will
1158        generate big IP datagrams.
1159
1160 </P>
1161 <P>
1162        There have been problems when something in the middle of the network
1163        mishandles large packets due to IP tunnelling. In a tunnelled link, your
1164        IP datagrams gets wrapped in a larger datagram and sent over a network.
1165        This is how virtual private networks (VPNs), and some ISP's transit
1166        circuits work. Since the datagrams going over the tunnel require a
1167        larger packet size, the tunnel needs a bigger maximum transfer unit
1168        (MTU) in the network handling the tunnelled packets. However, MTUs
1169        are often fixed, so the tunnel will try to fragment the packets.
1170
1171 </P>
1172 <P>
1173        If the systems outside the tunnel are using MTU path discovery, (most
1174        Sun Sparc Solaris machines do by default), and set the DF (don't
1175        fragment) bit because they don't send packets larger than their <EM>local</EM>
1176        MTU, then ICMP control messages will be sent by the routers at the
1177        ends of the tunnel to tell them to reduce their MTU, since the tunnel
1178        can't fragment the data, and has to throw it away. If this mechanism
1179        stops working, e.g. a firewall blocks ICMP, then your host never
1180        knows it has hit the maximum path MTU, but it has received no ACK on
1181        the packet either, so it continues to resend the same packet and the
1182        connection stalls, eventually timing out.
1183
1184 </P>
1185 <P>
1186        You can test the link using pings of large packets and see what works:
1187
1188 </P>
1189 <PRE>
1190          ping -s host 2048</PRE>
1191 <P>
1192        Try reducing the MTU on the sending host:
1193
1194 </P>
1195 <PRE>
1196          ifconfig le0 mtu 1300</PRE>
1197 <P>
1198        Alternatively, you can reduce the size of the buffer Exim uses for SMTP
1199        output by putting something like
1200
1201 </P>
1202 <PRE>
1203          DELIVER_OUT_BUFFER_SIZE=512</PRE>
1204 <P>
1205        in your <B>Local/Makefile</B> and rebuilding Exim (the default is 8192).
1206
1207 </P>
1208 <A NAME="SEC23" HREF="FAQ.html#TOC23">Q0022</A>: Why do messages not get delivered down the same connection when I do
1209        something like: exim <B>-v</B> <B>-R</B> <B>@aol.com</B> ? For other domains, I do this and
1210        I see the appropriate "waiting for passed connections to get used"
1211        messages.
1212
1213
1214 <P>
1215 A0022: Recall that Exim does not keep separate queues for each domain, but
1216        operates in a distributed fashion. Messages get into its "waiting for
1217        host x" hints database only when a delivery has been tried, and has had
1218        a temporary error. Here are some possibilities:
1219
1220 </P>
1221 <P>
1222        (1) The messages to <B>aol.com</B> got put in your queue, but no previous
1223        delivery attempt occured before you did the <B><B>-R.</B></B> This might have been
1224        because of your settings of <TT>queue_only_load</TT>, <TT>smtp_accept_queue</TT>, or any
1225        other option that caused no immediate delivery attempt on arrival. If
1226        this is the case, you can try using <B>-qqR</B> instead of <B><B>-R.</B></B>
1227
1228 </P>
1229 <P>
1230        (2) You have set <TT>batch_max</TT> on the smtp transport, and that limit was
1231        reached. This would show as a sequence of n messages down one
1232        connection, then another n down a new connection, etc.
1233
1234 </P>
1235 <P>
1236        (3) Exim tried to pass on the SMTP connection to another message, but
1237        that message was in the process of being delivered to <B>aol.com</B> by some
1238        other process (typically, a normal queue runner). This will break the
1239        sequence, though the other delivery should pass its connection on to
1240        other messages if there are any.
1241
1242 </P>
1243 <P>
1244        (4) The folk at <B>aol.com</B> changed the MX records so the host names have
1245        changed - or a new host has been added. I don't know how likely this is.
1246
1247 </P>
1248 <P>
1249        (5) Exim is not performing as it should in this regard, for some reason.
1250        Next time you have mail queued up for <B>aol.com,</B> try running
1251
1252 </P>
1253 <PRE>
1254          exim_dumpdb /var/spool/exim wait-remote_smtp</PRE>
1255 <P>
1256        to see if those messages are listed among those waiting for the relevant
1257        <B>aol.com</B> hosts.
1258
1259 </P>
1260 <A NAME="SEC24" HREF="FAQ.html#TOC24">Q0023</A>: What does the error "SEGV while reading ... from dbm file: record
1261        assumed not to exist" mean?
1262
1263
1264 <P>
1265 A0023: A crash is occuring when Exim calls your DBM library in order to read a
1266        record from one of its hints files. This kind of problem can be related
1267        to incorrectly installed DBM libraries. If you are using Slackware 3.6,
1268        the problem is that libgdbm is incorrectly installed on that system, and
1269        you will need to re-install it from source.
1270
1271 </P>
1272 <A NAME="SEC25" HREF="FAQ.html#TOC25">Q0024</A>: There seems to be a problem in the string expansion code: it doesn't
1273        recognize references to headers such as <B><B>${h_to}.</B></B>
1274
1275
1276 <P>
1277 A0024: The only valid syntax for header references is (for example) <B>$h_to:</B>
1278        because header names are permitted by RFC 822 to contain a very wide
1279        range of characters. A colon (or white space) is required as the
1280        terminator.
1281
1282 </P>
1283 <A NAME="SEC26" HREF="FAQ.html#TOC26">Q0025</A>: Exim is timing out after sending the a message's data to one particular
1284        host, and yet the remote host also claims to be timing out. This seems
1285        to affect only certain messages.
1286
1287
1288 <P>
1289 A0025: See 
1290         <A HREF="FAQ.html#SEC19">Q0018</A>.
1291
1292 </P>
1293 <A NAME="SEC27" HREF="FAQ.html#TOC27">Q0026</A>: When the Exim daemon forks a copy of itself to handle an incoming SMTP
1294        request, the forked copy seems to go around in circles  for a
1295        significant (up to 5 minutes, so far) amount of time before deciding to
1296        accept the message.
1297
1298
1299 <P>
1300 A0026: These kinds of delay are usually caused by some kind of network problem
1301        that affects outgoing calls made by Exim at the start of an incoming
1302        message. Configuration options that cause outgoing calls are:
1303
1304 </P>
1305 <P>
1306        (1) <TT>rfc1413_query_hosts</TT> and <TT>rfc1413_query_timeout</TT> (for ident calls);
1307            firewalls sometimes block ident calls, which can lead to this
1308            problem.
1309
1310 </P>
1311 <P>
1312        (2) <TT>rbl_domains</TT> and <TT>rbl_hosts</TT>.
1313
1314 </P>
1315 <P>
1316        (3) <TT>host_lookup</TT> and any other options that require the remote host's
1317            name to be looked up from its IP address.
1318
1319 </P>
1320 <P>
1321        You can use the <B>-bh</B> option to get more information about what is
1322        happening at the start of a connection.
1323
1324 </P>
1325 <A NAME="SEC28" HREF="FAQ.html#TOC28">Q0027</A>: What does "failed to create child process to send failure message" mean?
1326        This is a busy mail server with <TT>smtp_accept_max</TT> set to 500, but this
1327        problem started to occur at about 300 incoming connections.
1328
1329
1330 <P>
1331 A0027: Some message delivery failed, and when Exim wanted to send a bounce
1332        message, it was unable to create a process in which to do so. Probably
1333        the limit on the maximum number of simultaneously active processes has
1334        been reached. Most OS have some means of increasing this limit, and in
1335        some operating systems there is also a limit per uid which can be
1336        varied.
1337
1338 </P>
1339 <A NAME="SEC29" HREF="FAQ.html#TOC29">Q0028</A>: What does "&#60;message filter&#62; transporting defer (-1): No transport set
1340        by director" in a log line mean?
1341
1342
1343 <P>
1344 A0028: Your system filter contains a "save" command, but you have not set
1345        <TT>message_filter_file_transport</TT>.
1346
1347 </P>
1348 <A NAME="SEC30" HREF="FAQ.html#TOC30">Q0029</A>: Why is Exim refusing to relay, saying "failed to find host name from IP
1349        address" when I have the sender's IP address in <TT>host_accept_relay</TT>? My
1350        configuration contains this:
1351
1352
1353 <PRE>
1354          host_accept_relay = "lsearch;/etc/mail/relaydomains:192.168.96.0/24"</PRE>
1355 <P>
1356 A0029: When checking <TT>host_accept_relay</TT>, the items are tested in left-to-right
1357        order. The first item in your list is a lookup on the incoming host's
1358        name, so Exim has to determine the name from the incoming IP address in
1359        order to perform the test. If it can't find the host name, it can't do
1360        the check, so it gives up. The solution is to put all explicit IP
1361        addresses first in the list. You would have discovered what was going
1362        on if you had run a test such as
1363
1364 </P>
1365 <PRE>
1366          exim -bh 192.168.96.131</PRE>
1367 <A NAME="SEC31" HREF="FAQ.html#TOC31">Q0030</A>: When I run "exim <B>-bd</B> <B>-q10m"</B> I get "PANIC LOG: exec of exim <B>-q</B> failed".
1368
1369
1370 <P>
1371 A0030: This probably means that Exim doesn't know its own path so it can't
1372        re-exec itself to do the first queue run. Check the output of
1373
1374 </P>
1375 <PRE>
1376          exim -bP exim_path</PRE>
1377 <A NAME="SEC32" HREF="FAQ.html#TOC32">Q0031</A>: Why do connections to my machine's SMTP port take a long time to respond
1378        with the banner, when connections to other ports respond instantly?
1379
1380
1381 <P>
1382 A0031: See 
1383         <A HREF="FAQ.html#SEC27">Q0026</A>.
1384
1385 </P>
1386 <A NAME="SEC33" HREF="FAQ.html#TOC33">Q0032</A>: I can't seem to get a pipe command to run when I include a <B>${if</B>
1387        expansion in it. This fails:
1388
1389
1390 <PRE>
1391          command = "perl -T /usr/local/rt/bin/rtmux.pl \
1392                       rt-mailgate helpdesk \
1393                       ${if eq {$local_part}{rt} {correspond}{action}}"</PRE>
1394 <P>
1395 A0032: You need some internal quoting in there. Exim expands each individual
1396        argument separately. Because you have (necessarily) got spaces in your
1397        <B>${if</B> item, you have to quote that argument. Try
1398
1399 </P>
1400 <PRE>
1401          command = "perl -T /usr/local/rt/bin/rtmux.pl \
1402                       rt-mailgate helpdesk \
1403                       \"${if eq {$local_part}{rt} {correspond}{action}}\""</PRE>
1404 <A NAME="SEC34" HREF="FAQ.html#TOC34">Q0033</A>: I'm trying to get Exim to connect an alias to a pipe, but it always
1405        gives error code 69, with the comment "(could mean service or program
1406        unavailable)".
1407
1408
1409 <P>
1410 A0033: If your alias entry looks like this:
1411
1412 </P>
1413 <PRE>
1414          alias:  |"/some/command some parameters"</PRE>
1415 <P>
1416        change it to look like this:
1417
1418 </P>
1419 <PRE>
1420          alias:  "|/some/command some parameters"</PRE>
1421 <A NAME="SEC35" HREF="FAQ.html#TOC35">Q0034</A>: I'm having a problem with an Exim RPM.
1422
1423
1424 <P>
1425 A0034: See 
1426         <A HREF="FAQ.html#SEC283">Q9606</A>.
1427
1428 </P>
1429 <A NAME="SEC36" HREF="FAQ.html#TOC36">Q0035</A>: What does the error "Spool file is locked" mean?
1430
1431
1432 <P>
1433 A0035: This is not an error[*]. All it means is that when an Exim delivery
1434        process (probably started by a queue runner process) looked at a message
1435        in order to start delivering it, it found that another Exim process was
1436        already busy delivering it. On a busy system this is quite a common
1437        occurrence. If you set <TT>log_level</TT> less than 5, these messages are omitted
1438        from the log.
1439
1440 </P>
1441 <P>
1442        [*] The only time when this message might indicate a problem is if it is
1443        repeated for the same message for a very long time - say more than a few
1444        hours. That would suggest that the process that is delivering the
1445        message has somehow got stuck.
1446
1447 </P>
1448 <BR><H2><A NAME="SEC37" HREF="FAQ.html#TOC37">1. BUILDING EXIM
1449
1450 </A></H2>
1451 <A NAME="SEC38" HREF="FAQ.html#TOC38">Q0101</A>: I get the error "conflicting types" when Exim is building the libident
1452        library.
1453
1454
1455 <P>
1456 A0101: The problem is that libident assumes "struct timeval" refers to
1457        <TT>DST_NONE</TT>, and so it tries to avoid using this structure when <TT>DST_NONE</TT>
1458        isn't defined. Unfortunately it doesn't make this change everywhere it
1459        should, and so it blows up. The problem has been seen on NetBSD and
1460        some versions of the Linux C library. An easy, albeit not particularly
1461        neat, fix is to add <B><TT>-DDST_NONE</TT></B> to <TT>LIBIDENTCFLAGS</TT> for systems that are
1462        afflicted like this - there's not a lot else you can do without
1463        modifying libident. The value of <TT>DST_NONE</TT> is never used, so defining it
1464        to be empty should be harmless.
1465
1466 </P>
1467 <A NAME="SEC39" HREF="FAQ.html#TOC39">Q0102</A>: When I ran <B>make</B> I got the error "undefined reference to <TT>dbopen</TT>".
1468
1469
1470 <P>
1471 A0102: Either:
1472
1473 </P>
1474 <P>
1475        (A) This means you (or the default configuration for your operating
1476            system) have configured Exim to use Berkeley DB version 1<B><EM>.xx</EM></B>
1477            and it has not been given access to the DB library (where <TT>dbopen</TT>
1478            should be found). You may need something like <TT>DBMLIB=-ldb</TT> in
1479            <B>Local/Makefile</B>. Berkeley DB is one of several alternative DBM
1480            libraries that Exim can make use of. For a discussion of DBM issues,
1481            see the file <B>doc/dbm.discuss.txt</B> in the Exim distribution.
1482
1483 </P>
1484 <P>
1485        (B) You are running on a version of Linux which has a problem in its
1486            libraries. This effect isn't fully understood. It has been seen with
1487            the libraries used in Caldera OpenLinux Base 1.1.
1488
1489 </P>
1490 <A NAME="SEC40" HREF="FAQ.html#TOC40">Q0103</A>: I can't get Exim to compile with Berkeley DB version 2.x.
1491
1492
1493 <P>
1494 A0103: Have you set <TT>USE_DB=yes</TT> in <B>Local/Makefile</B>? This causes Exim to use the
1495        native interface to the DBM library instead of the compatibility
1496        interface, which needs a header called <B>ndbm.h</B> that may not exist on your
1497        system.
1498
1499 </P>
1500 <A NAME="SEC41" HREF="FAQ.html#TOC41">Q0104</A>: I'm getting an "undefined symbol" error for <TT>hosts_ctl</TT> when I try to
1501        build Exim. (On some systems this error is "undefined reference to
1502        'hosts_ctl'".)
1503
1504
1505 <P>
1506 A0104: You should either remove the definition of USE_TCP_WRAPPERS or add
1507        <B>-lwrap</B> to your <TT>EXTRALIBS</TT> setting in <B>Local/Makefile</B>.
1508
1509 </P>
1510 <A NAME="SEC42" HREF="FAQ.html#TOC42">Q0105</A>: I'm about to upgrade to a new Exim release. Do I need to ensure the
1511        spool is empty, or take any other special action?
1512
1513
1514 <P>
1515 A0105: If you are changing to release 3.00 or later from a release prior to
1516        3.00, you will probably need to make changes to the runtime
1517        configuration file. See <B>README.UPDATING</B> for details. Otherwise, you
1518        do not need to take special action. New releases are made backwards
1519        compatible with old spool files and "hints" databases so that upgrading
1520        can be done on a running system. All that should be necessary is to
1521        install a new binary and then HUP the daemon if you are running one.
1522
1523 </P>
1524 <A NAME="SEC43" HREF="FAQ.html#TOC43">Q0106</A>: What does the error "<B>install-info</B>: command not found" mean?
1525
1526
1527 <P>
1528 A0106: You have set INFO_DIRECTORY in your <B>Local/Makefile</B>, and Exim is trying
1529        to install the Texinfo documentation, but cannot find the command called
1530        <B>install-info</B>. If you have a version of Texinfo prior to 3.9, you
1531        should upgrade. Otherwise, check your installation of Texinfo to see why
1532        the <B>install-info</B> command is not available.
1533
1534 </P>
1535 <A NAME="SEC44" HREF="FAQ.html#TOC44">Q0107</A>: Exim doesn't seem to be recognizing my operating system type correctly,
1536        and so is failing to build.
1537
1538
1539 <P>
1540 A0107: Run the command "scripts/os-type <B><B>-generic".</B></B> The output should be one of
1541        the known OS types, and should correspond to your operating system. You
1542        can see which OS are supported by obeying "ls OS/Makefile-*" and looking
1543        at the file name suffixes.
1544
1545 </P>
1546 <P>
1547        If there is a discrepancy, it means that the script is failing to
1548        interpret the output from the "uname" command correctly, or that the
1549        output is wrong. Meanwhile, you can build Exim by obeying
1550
1551 </P>
1552 <PRE>
1553          EXIM_OSTYPE=xxxx make</PRE>
1554 <P>
1555        instead of just <B>make</B>, provided you are running a Bourne-compatible
1556        shell, or otherwise by setting EXIM_OSTYPE correctly in your
1557        environment. It is probably best to start again from a clean
1558        distribution, to avoid any wreckage left over from the failed attempt.
1559
1560 </P>
1561 <A NAME="SEC45" HREF="FAQ.html#TOC45">Q0108</A>: I am getting an error "`exim' undeclared here" when I compile, in the
1562        <B>globals.c</B> module.
1563
1564
1565 <P>
1566 A0108: You have set EXIM_UID = exim in your <B>Local/Makefile</B>. Unfortunately,
1567        named uids are not permitted here; you must give a numerical uid.
1568        However, in the runtime configure file names are permitted.
1569
1570 </P>
1571 <A NAME="SEC46" HREF="FAQ.html#TOC46">Q0109</A>: Exim fails to build, complaining about the absence of the "killpg"
1572        function.
1573
1574
1575 <P>
1576 A0109: This function should be present in all modern flavours of Unix. If you
1577        are using an older version, you should be able to get round the problem
1578        by inserting
1579
1580 </P>
1581 <PRE>
1582          #define killpg(pgid,sig)   kill(-(pgid),sig)</PRE>
1583 <P>
1584        into the file called <B>OS/os.h<I>-xx</I>x,</B> where <I>xxx</I> identifies your operating
1585        system, and is the output of the command "scripts/os-type <B><B>-generic".</B></B>
1586
1587 </P>
1588 <A NAME="SEC47" HREF="FAQ.html#TOC47">Q0110</A>: I'm getting an unresolved symbol <TT>ldap_is_ldap_url</TT> when trying to build
1589        Exim.
1590
1591
1592 <P>
1593 A0110: You must have specified <TT>LOOKUP_LDAP=yes</TT> in the configuration. Have you
1594        remembered to set <B>-lldap</B> somewhere (e.g. in LOOKUP_LIBS)? You need that
1595        in order to get the LDAP scanned when linking.
1596
1597 </P>
1598 <BR><H2><A NAME="SEC48" HREF="FAQ.html#TOC48">2. MAILBOX LOCKING
1599
1600 </A></H2>
1601 <A NAME="SEC49" HREF="FAQ.html#TOC49">Q0201</A>: Why do I get the error "Permission denied: creating lock file hitching
1602        post" when Exim tries to do a local delivery?
1603
1604
1605 <P>
1606 A0201: Your configuration specifies that local mailboxes are all held in
1607        single directory, via configuration lines like these (taken from the
1608        default configuration):
1609
1610 </P>
1611 <PRE>
1612          local_delivery:
1613            driver = appendfile
1614            file = /var/mail/${local_part}</PRE>
1615 <P>
1616        and the permissions on the directory probably look like this:
1617
1618 </P>
1619 <PRE>
1620          drwxrwxr-x   3 root     mail         512 Jul  9 13:48 /var/mail/</PRE>
1621 <P>
1622        Using the default configuration, Exim runs as the local user when doing
1623        a local delivery, and it uses a lock file to prevent any other process
1624        from updating the mailbox while it is writing to it. With those
1625        permissions the delivery process, running as the user, is unable to
1626        create a lock file in the <B>/var/mail</B> directory. There are two solutions
1627        to this problem:
1628
1629 </P>
1630 <P>
1631        (A) Set the "write" and "sticky bit" permissions on the directory, so
1632            that it looks like this:
1633
1634 </P>
1635 <PRE>
1636              drwxrwxrwt   3 root     mail         512 Jul  9 13:48 /var/mail/</PRE>
1637 <P>
1638            The "w" allows any user to create new files in the directory, but
1639            the "t" bit means that only the creator of a file is able to remove
1640            it. This is the same setting as is normally used with the <B>/tmp</B>
1641            directory.
1642
1643 </P>
1644 <P>
1645        (B) Arrange to run the <TT>local_delivery</TT> transport under a specific group
1646            by changing the configuration to read
1647
1648 </P>
1649 <PRE>
1650              local_delivery:
1651                driver = appendfile
1652                file = /var/mail/${local_part}
1653                group = mail</PRE>
1654 <P>
1655            The delivery process still runs under the user's uid, but with the
1656            group set to "mail". The group permission on the directory allows
1657            the process to create and remove the lock file.
1658
1659 </P>
1660 <P>
1661            The choice between (A) and (B) is up to the administrator. If the
1662            second solution is used, users can empty their mailboxes by updating
1663            them, but cannot delete them.
1664
1665 </P>
1666 <P>
1667        If your problem involves mail to root, see also 
1668         <A HREF="FAQ.html#SEC122">Q0507</A>.
1669
1670 </P>
1671 <A NAME="SEC50" HREF="FAQ.html#TOC50">Q0202</A>: I am experiencing mailbox locking problems with Sun's <B>mailtool</B> used
1672        over a network.
1673
1674
1675 <P>
1676 A0202: See 
1677         <A HREF="FAQ.html#SEC289">A9705</A> in the Sun-specific section below.
1678
1679 </P>
1680 <BR><H2><A NAME="SEC51" HREF="FAQ.html#TOC51">3. ROUTING
1681
1682 </A></H2>
1683 <A NAME="SEC52" HREF="FAQ.html#TOC52">Q0301</A>: What does "lowest numbered MX record points to local host" mean?
1684
1685
1686 <P>
1687 A0301: It means exactly what it says. Exim has tried to route a domain that it
1688        thinks is not local, and when it looked it up in the DNS, the lowest
1689        numbered MX record pointed at the local host.
1690
1691 </P>
1692 <P>
1693        (A) If the domain is meant to be handled as a local domain, then there
1694            is a problem with the setting of the <TT>local_domains</TT> configuration
1695            option. If you have not set this, then only the name of the local
1696            host is treated as a local domain. If, for example, your host is
1697            called <B>myhost.mydomain.com</B> and you want it to handle mail for the
1698            domain <B>mydomain.com</B> as well as for its own name, you must set
1699
1700 </P>
1701 <PRE>
1702              local_domains = myhost.mydomain.com:mydomain.com</PRE>
1703 <P>
1704            or, if you want to be more general, you could use
1705
1706 </P>
1707 <PRE>
1708              local_domains = *.mydomain.com:mydomain.com</PRE>
1709 <P>
1710            If you have a large number of individual local domains, you should
1711            investigate storing them in a file and setting <TT>local_domains</TT> to do a
1712            lookup.
1713
1714 </P>
1715 <P>
1716            All the domains in <TT>local_domains</TT> are treated as synonymous by
1717            default. If you want to specify different handling for different
1718            domains, you can either use <TT>domains</TT> options, to restrict certain
1719            directors to certain domains, or use the <B>$domain</B> expansion variable
1720            in director options to vary the value according to the domain, for
1721            example, setting the name of an alias file to <B>/etc/aliases/$domain</B>.
1722
1723 </P>
1724 <P>
1725        (B) If the domain is one for which the local host is providing a
1726            forwarding service (called "mail hubbing"), possibly as part of a
1727            firewall, then you need to set up a router to tell Exim where to
1728            send messages addressed to this domain, since the DNS directs them
1729            to the local host. The routers section of your configuration file
1730            should look something like this:
1731
1732 </P>
1733 <PRE>
1734              hubbed_hosts:
1735                driver = domainlist
1736                transport = remote_smtp
1737                route_list = see discussion below</PRE>
1738 <PRE>
1739              other_hosts:
1740                driver = lookuphost
1741                transport = remote_smtp</PRE>
1742 <P>
1743            Note that the <B>domainlist</B> router must come first so that it can pick
1744            off a hubbed host before it gets to the <B>lookuphost</B> router. The
1745            contents of the <TT>route_list</TT> option depend on how many hosts you are
1746            hubbing for, and how their names are related to the domain name.
1747            Suppose the local host is a firewall, and all the domains in
1748            <B>*.foo.bar</B> have MX records pointing to it, and each domain
1749            corresponds to a host of the same name. Then the setting could be
1750
1751 </P>
1752 <PRE>
1753              route_list = "*.foo.bar $domain byname"</PRE>
1754 <P>
1755            If there isn't a convenient relationship between the domain names
1756            and the host names, then you either have to list each domain
1757            separately, or use a lookup expansion to look up the host from the
1758            domain, or put the routing information in a file and use the
1759            <TT>route_file</TT> option.
1760
1761 </P>
1762 <P>
1763        (C) If neither (A) nor (B) is the case, then the lowest numbered MX
1764            record for the domain should not be pointing to your host. You
1765            should arrange to get the DNS mended.
1766
1767 </P>
1768 <A NAME="SEC53" HREF="FAQ.html#TOC53">Q0302</A>: How do I configure Exim to send all non-local mail to a gateway host?
1769
1770
1771 <P>
1772 A0302: Replace the <B>lookuphost</B> router in the default configuration with the
1773        following:
1774
1775 </P>
1776 <PRE>
1777          send_to_gateway:
1778            driver = domainlist
1779            transport = remote_smtp
1780            route_list = "* gate.way.host byname"</PRE>
1781 <P>
1782        This uses gethostbyname() to find the gateway's IP address. You could
1783        alternatively have "bydns" to do a DNS lookup with MX handling, in which
1784        case <B>"gate.way.host"</B> is really being treated as a mail domain name
1785        rather than a host name. If there are several hosts you can send to,
1786        you can specify them as a colon-separated list. See also 
1787         <A HREF="FAQ.html#SEC76">Q0325</A> and 
1788         <A HREF="FAQ.html#SEC79">Q0402</A>.
1789
1790 </P>
1791 <A NAME="SEC54" HREF="FAQ.html#TOC54">Q0303</A>: How do I configure Exim to send all non-local mail to a central server
1792        if it cannot be immediately delivered by my host? I don't want to have
1793        queued mail waiting on my host.
1794
1795
1796 <P>
1797 A0303: Add to the <TT>remote_smtp</TT> transport the following:
1798
1799 </P>
1800 <PRE>
1801          fallback_hosts = central.server.name(s)</PRE>
1802 <P>
1803        If there are several names, they must be separated by colons.
1804
1805 </P>
1806 <A NAME="SEC55" HREF="FAQ.html#TOC55">Q0304</A>: How can I arrange for messages submitted by (for example) Majordomo to
1807        be routed specially?
1808
1809
1810 <P>
1811 A0304: See 
1812         <A HREF="FAQ.html#SEC81">A0404</A>.
1813
1814 </P>
1815 <A NAME="SEC56" HREF="FAQ.html#TOC56">Q0305</A>: How do I arrange for all incoming email for <B><B>*@some.domain</B></B> to go into one
1816        pop3 mail account? The customer doesn't want to add a list of specific
1817        local parts to the system.
1818
1819
1820 <P>
1821 A0305: Set up a special transport that writes to the mailbox like this:
1822
1823 </P>
1824 <PRE>
1825          special_transport:
1826            driver = appendfile
1827            file = /pop/mailbox
1828            envelope_to_add
1829            return_path_add
1830            delivery_date_add
1831            user = exim</PRE>
1832 <P>
1833        The file will be written as the user "exim". Then arrange to route all
1834        mail for that domain to that transport, with a router like this:
1835
1836 </P>
1837 <PRE>
1838          special_router:
1839            driver = domainlist
1840            transport = special_transport
1841            route_list = "some.domain"</PRE>
1842 <P>
1843        Alternatively, you could make <B>some.domain</B> a local domain, and use a
1844        <B>smartuser</B> director instead.
1845
1846 </P>
1847 <A NAME="SEC57" HREF="FAQ.html#TOC57">Q0306</A>: The <TT>route_list</TT> setting 
1848          <TT>^foo$:^bar$  $domain  byname</TT> in a <B>domainlist</B>
1849        router does not work.
1850
1851
1852 <P>
1853 A0306: The first thing in a <TT>route_list</TT> item is a single pattern, not a list of
1854        patterns. You need to write that as 
1855          <TT>^(foo|bar)$  $domain  byname</TT>.
1856        Alternatively, you could use several items and write
1857
1858 </P>
1859 <PRE>
1860          route_list = "foo $domain byname; bar $domain byname"</PRE>
1861 <P>
1862        Note the semicolon separator. This is because the second thing in each
1863        item <EM>can</EM> be a list - of hosts.
1864
1865 </P>
1866 <A NAME="SEC58" HREF="FAQ.html#TOC58">Q0307</A>: I'm getting "permission denied" when Exim attempts to check a
1867        <TT>require_files</TT> option.
1868
1869
1870 <P>
1871 A0307: See 
1872         <A HREF="FAQ.html#SEC87">A0410</A> below.
1873
1874 </P>
1875 <A NAME="SEC59" HREF="FAQ.html#TOC59">Q0308</A>: I have a domain for which some local parts must be delivered locally,
1876        but the remainder are to be treated like any other remote addresses.
1877
1878
1879 <P>
1880 A0308: The way to do this is not to include the domain in <TT>local_domains</TT>, so
1881        that addresses initially get passed to the routers. The first router
1882        should be definied like this:
1883
1884 </P>
1885 <PRE>
1886          special_local:
1887            driver = domainlist
1888            local_parts = whatever...
1889            domains = whatever...
1890            route_list = * localhost byname
1891            self = local</PRE>
1892 <P>
1893        That will pick off those addresses with matching local parts and
1894        domains, and hand them to the directors, because of the <TT>self = local</TT>
1895        setting. Any other addresses will fall through to the other routers and
1896        be handled as normal remote addresses.
1897
1898 </P>
1899 <A NAME="SEC60" HREF="FAQ.html#TOC60">Q0309</A>: For certain domains, I don't want Exim to use MX records. Instead, I
1900        want it just to look up the hosts' A records. I tried using a negative
1901        entry in <TT>mx_domains</TT> in the smtp router, but it didn't work.
1902
1903
1904 <P>
1905 A0309: The <TT>mx_domains</TT> option specifies domains for which there <EM>must</EM> be an MX
1906        record (an A record isn't good enough). Consequently, a negative item in
1907        it doesn't do what you want - any domain matching is is not required to
1908        have an MX record, but it doesn't stop Exim from using MX records for
1909        any that do have them. You can achieve what you want using either a
1910        <B>lookuphost</B> or a <B>domainlist</B> router:
1911
1912 </P>
1913 <P>
1914        (A) Using <B>lookuphost</B>:
1915
1916 </P>
1917 <PRE>
1918          special_domains:
1919            driver = lookuphost
1920            transport = remote_smtp
1921            domains = list:of:domains:you:want:to:do:this:for
1922            gethostbyname</PRE>
1923 <P>
1924        (B) Using <B>domainlist</B>:
1925
1926 </P>
1927 <PRE>
1928          special_domains:
1929            driver = domainlist
1930            transport = remote_smtp
1931            domains = list:of:domains:you:want:to:do:this:for
1932            route_list = * * byname</PRE>
1933 <P>
1934        If the list of domains is actually a lookup in a file, you can dispense
1935        with <TT>domains</TT> in the <B>domainlist</B> case, and put the lookup into the
1936        <TT>route_list</TT> option.
1937
1938 </P>
1939 <A NAME="SEC61" HREF="FAQ.html#TOC61">Q0310</A>: How can I configure Exim on a firewall machine so that if mail arrives
1940        addressed to a domain whose MX points to the firewall, it is forwarded
1941        to the internal mail server, without having to have a list of all the
1942        domains involved?
1943
1944
1945 <P>
1946 A0310: As your first router, have the standard <B>lookuphost</B> router from the
1947        default configuration, with the added options
1948
1949 </P>
1950 <PRE>
1951          no_more
1952          self = fail_soft</PRE>
1953 <P>
1954        This will handle all domains whose lowest numbered MX records do <EM>not</EM>
1955        point to your host. Because of the <TT>no_more</TT> setting, if it encounters
1956        an unknown domain, routing will fail. However, if it hits a domain whose
1957        lowest numbered MX points to your host, the "self" option comes into
1958        play, and overrides <TT>no_more</TT>. The <TT>fail_soft</TT> setting causes it to pass
1959        the address on to the next router. (The default causes it to generate an
1960        error.)
1961
1962 </P>
1963 <P>
1964        As your second (and last) router, set up a <B>domainlist</B> router that sends
1965        everything to your internal mail server. That is, use an option of the
1966        form
1967
1968 </P>
1969 <PRE>
1970          route_list = * internal.server byname</PRE>
1971 <A NAME="SEC62" HREF="FAQ.html#TOC62">Q0311</A>: How can I arrange that messages larger than some limit are handled by
1972        a special router?
1973
1974
1975 <P>
1976 A0311: If you are using Exim 2.10 or greater, you can use a <TT>condition</TT> option
1977        on the router of the form
1978
1979 </P>
1980 <PRE>
1981          condition = ${if &#62;{$message_size}{100K}{yes}{no}}</PRE>
1982 <P>
1983        Earlier versions of Exim do not have numerical comparison operators,
1984        though you can use tricks like
1985
1986 </P>
1987 <PRE>
1988          condition = ${if eq {${substr_5:$message_size}}{}{no}{yes}}</PRE>
1989 <A NAME="SEC63" HREF="FAQ.html#TOC63">Q0312</A>: If a DNS lookup returns no MX records why doesn't Exim just bin the
1990        message?
1991
1992
1993 <P>
1994 A0312: If a DNS lookup returns no MXs, Exim looks for an A record, in
1995        accordance with the rules that are defined in the RFCs. If you want to
1996        break the rules, you can set <TT>mx_domains</TT> in the <B>lookuphost</B> router, but
1997        you will cut yourself off from those sites (and there still seem to be
1998        plenty) who do not set up MX records.
1999
2000 </P>
2001 <A NAME="SEC64" HREF="FAQ.html#TOC64">Q0313</A>: When a DNS lookup for MX records fails to complete, why doesn't Exim
2002        send the messsage to the host defined by the A record?
2003
2004
2005 <P>
2006 A0313: The RFCs are quite clear on this. Only if it is known that there are no
2007        MX records is an MTA allowed to make use of the A record. When an MX
2008        lookup fails to complete, Exim does not know whether there are any MX
2009        records or not. There seem to be some nameservers (or some
2010        configurations of some nameservers) that give a "server fail" error when
2011        asked for a non-existent MX record. Exim uses standard resolver calls,
2012        which unfortunately do not distinguish between this case and a timeout,
2013        so all Exim can do is try again later.
2014
2015 </P>
2016 <A NAME="SEC65" HREF="FAQ.html#TOC65">Q0314</A>: Can you specify a list of domains to explicitly reject?
2017
2018
2019 <P>
2020 A0314: Use a router like this:
2021
2022 </P>
2023 <PRE>
2024          reject_domains:
2025            driver = domainlist
2026            self = fail_hard
2027            domains = list:of:domains:to:reject
2028            route_list = * localhost byname</PRE>
2029 <A NAME="SEC66" HREF="FAQ.html#TOC66">Q0315</A>: Is it possible to use a conditional expression for the host item in a
2030        <TT>route_list</TT> for the <B>domainlist</B> router? I tried the following, but it
2031        doesn't work:
2032
2033
2034 <PRE>
2035          route_list = "* ${if match{$header_from:}{.*\\.usa\\.net\\$} \
2036                        {&#60;smarthost1&#62;}{&#60;smarthost2&#62;} bydns_a"</PRE>
2037 <P>
2038 A0315: The problem is that the second item in the <TT>route_list</TT> contains white
2039        space, which means that it gets terminated prematurely. To avoid this,
2040        you must put the second item in quotes, and because the whole item is
2041        already in quotes, you have to escape them like this:
2042
2043 </P>
2044 <PRE>
2045          route_list = "* \"${if match{$header_from:}{.*\\.usa\\.net\\$} \
2046                        {&#60;smarthost1&#62;}{&#60;smarthost2&#62;}\" bydns_a"</PRE>
2047 <A NAME="SEC67" HREF="FAQ.html#TOC67">Q0316</A>: I send all external mail to a smart host, but this means that bad
2048        addresses also get passed to the smart host. Can I avoid this?
2049
2050
2051 <P>
2052 A0316: If you are receiving the mail via SMTP, then you can use verification to
2053        weed out the bad addresses. Set <TT>no_verify</TT> on the router which sends
2054        everything to your smart host, and insert a new router with <TT>verify_only</TT>
2055        that does general routing using DNS lookups (e.g. the default <B>lookuphost</B>
2056        router), or any other verification you want. Then set <TT>receiver_verify</TT>
2057        so that addresses are accepted only if they verify successfully.
2058
2059 </P>
2060 <A NAME="SEC68" HREF="FAQ.html#TOC68">Q0317</A>: I have a dial-up machine, and I use the <TT>queue_smtp</TT> option so that remote
2061        mail only goes out when I do a queue run. However, any email I send with
2062        an address <B><B>&#60;anything&#62;@aol.com</B></B> is returned within about 15 mins saying
2063        'retry time exceeded', and all addresses are affected.
2064
2065
2066 <P>
2067 A0317: See 
2068         <A HREF="FAQ.html#SEC219">Q1401</A>.
2069
2070 </P>
2071 <A NAME="SEC69" HREF="FAQ.html#TOC69">Q0318</A>: How can I route mail for user <B>X@local</B> to a smarthost if X doesn't exist
2072        on the local host?
2073
2074
2075 <P>
2076 A0318: See 
2077         <A HREF="FAQ.html#SEC105">A0428</A>.
2078
2079 </P>
2080 <A NAME="SEC70" HREF="FAQ.html#TOC70">Q0319</A>: How can I arrange to do my own qualification of non-fully-qualified
2081        domains, and then pass them on to the next router?
2082
2083
2084 <P>
2085 A0319: If you have some list of domains that you want to qualify, you can do
2086        this using a <B>domainlist</B> router. For example,
2087
2088 </P>
2089 <PRE>
2090          qualify:
2091            driver = domainlist
2092            route_list = "*.a.b  $domain.c.com"</PRE>
2093 <P>
2094        adds <B>".c.com"</B> to any domain that matches <B>"*.a.b".</B> In the absence of any
2095        options in the route item, the new domain is passed to the next router.
2096
2097 </P>
2098 <P>
2099        If you want to do this in conjunction with a <B>lookuphost</B> router, the
2100        <TT>widen_domains</TT> option of that router may be another way of achieving what
2101        you want.
2102
2103 </P>
2104 <A NAME="SEC71" HREF="FAQ.html#TOC71">Q0320</A>: Every system has a "nobody" account under which httpd etc run. I would
2105        like to know how to restrict mail which comes from that account to users
2106        on that host only.
2107
2108
2109 <P>
2110 A0320: Set up a router with <B><B>senders=nobody@your.domain</B></B> which routes all
2111        mail to a local transport that delivers it to <B>/dev/null</B> (or to a pipe
2112        that bounces with an error message, or whatever). That would catch all
2113        mail to non-local domains.
2114
2115 </P>
2116 <A NAME="SEC72" HREF="FAQ.html#TOC72">Q0321</A>: I have a really annoying intermittent problem where attempts to mail to
2117        valid sites are rejected with "unknown mail domain". This only happens a
2118        few times a day and there is no particular pattern to the sites it
2119        rejects.  If I try to lookup the same domain a few minutes later then it
2120        is OK.
2121
2122
2123 <P>
2124 A0321: (A) Have you linked Exim against the newest DNS resolver library that
2125        comes with Bind? If you are using SunOS4 that may be your problem, as
2126        the resolver that comes with that OS is known to be buggy and to give
2127        intermittent false negatives.
2128
2129 </P>
2130 <P>
2131        (B) Effects like this are sometimes seen if a domain's nameservers get
2132        out of step with each other.
2133
2134 </P>
2135 <A NAME="SEC73" HREF="FAQ.html#TOC73">Q0322</A>: I'd like route all mail with unresolved addresses to a relay machine.
2136
2137
2138 <P>
2139 A0322: Set <TT>pass_on_timeout</TT> on your <B>lookuphost</B> router, and add below it a
2140        <B>domainlist</B> router that routes everything to the relay.
2141
2142 </P>
2143 <A NAME="SEC74" HREF="FAQ.html#TOC74">Q0323</A>: I would like to forward all incoming email for a particular domain to
2144        another machine via SMTP. Whereabouts would I configure that?
2145
2146
2147 <P>
2148 A0323: First, do not list the domain in <TT>local_domains</TT>. Instead, list it in
2149        <TT>relay_domains</TT>. Then, if the domain's lowest numbered MX record points to
2150        your host, set up a <B>domainlist</B> router before your normal <B>lookuphost</B>
2151        router, in order to route the domain to the specific host.
2152
2153 </P>
2154 <A NAME="SEC75" HREF="FAQ.html#TOC75">Q0324</A>: Why does Exim say "all relevant MX records point to non-existent hosts"
2155        when MX records point to IP addresses?
2156
2157
2158 <P>
2159 A0324: MX records cannot point to IP addresses. They are defined to point to
2160        host names, so Exim always interprets them that way. (An IP address is a
2161        syntactically valid host name.) The DNS for the domain you are having
2162        problems with is misconfigured.
2163
2164 </P>
2165 <A NAME="SEC76" HREF="FAQ.html#TOC76">Q0325</A>: How can I arrange for mail on my local network to be delivered directly
2166        to the relevant hosts, but all other mail to be sent to my ISP's mail
2167        server? The local hosts are all DNS-registered and behave like normal
2168        Internet hosts.
2169
2170
2171 <P>
2172 A0325: Set up a first router to pick off all the domains for your local
2173        network. There are several ways you might do this. For example
2174
2175 </P>
2176 <PRE>
2177          local:
2178            driver = lookuphost
2179            transport = remote_smtp
2180            domains = lsearch;/etc/local_domains.list</PRE>
2181 <P>
2182        This does a perfectly conventional DNS routing operation, but only for
2183        your local domains. Follow this with a "smarthost" router:
2184
2185 </P>
2186 <PRE>
2187          internet:
2188            driver = domainlist
2189            transport = remote_smtp
2190            route_list = * mail.isp.net bydns_a</PRE>
2191 <P>
2192        This sends anything else to the smart host.
2193
2194 </P>
2195 <BR><H2><A NAME="SEC77" HREF="FAQ.html#TOC77">4. DIRECTING
2196
2197 </A></H2>
2198 <A NAME="SEC78" HREF="FAQ.html#TOC78">Q0401</A>: I need to have any mail for <B>virt.dom.ain</B> that <EM>doesn't</EM> match one of the
2199        aliases in <B><B>/usr/lib/aliases.virt</B></B> delivered to a particular address, for
2200        example, <B><B>postmaster@virt.dom.ain.</B></B>
2201
2202
2203 <P>
2204 A0401: Adding an asterisk to a search type causes Exim to look up "*" when the
2205        normal lookup fails. So if your director is something like this:
2206
2207 </P>
2208 <PRE>
2209          virtual:
2210            driver = aliasfile
2211            domains = virt.dom.ain
2212            file = /usr/lib/aliases.virt
2213            search_type = lsearch
2214            no_more</PRE>
2215 <P>
2216        you should change "lsearch" to "lsearch*", and put this in the alias
2217        file:
2218
2219 </P>
2220 <PRE>
2221          *: postmaster@virt.dom.ain</PRE>
2222 <P>
2223        This solution has the feature that if there are several unknown
2224        addresses in the same message, only one copy gets sent to the
2225        postmaster, because of Exim's normal de-duplication rules.
2226
2227 </P>
2228 <P>
2229        You can get separate deliveries for each unknown address only if you can
2230        direct them to a specific transport, by using a <B>smartuser</B> director like
2231        this:
2232
2233 </P>
2234 <PRE>
2235          virtual:
2236            driver = aliasfile
2237            domains = virt.dom.ain
2238            file = /usr/lib/aliases.virt
2239            search_type = lsearch</PRE>
2240 <PRE>
2241          default_virtual:
2242            driver = smartuser
2243            domains = virt.dom.ain
2244            transport = special_delivery
2245            new_address = postmaster@virt.dom.ain
2246            no_more</PRE>
2247 <P>
2248        If an address in the virtual domain is not matched by the normal alias
2249        lookup, then it gets picked up by the <B>smartuser</B> and passed to the
2250        transport with a new address. There is no checking for duplicates, so
2251        if there is more than one address that passes through this mechanism,
2252        multiple copies get delivered. In order to distinguish them, the
2253        <TT>envelope_to_add</TT> option can be set on the transport, to cause the
2254        insertion of an Envelope-To: header containing the original recipient
2255        address.
2256
2257 </P>
2258 <A NAME="SEC79" HREF="FAQ.html#TOC79">Q0402</A>: How do I configure Exim to send all messages to a central server?
2259
2260
2261 <P>
2262 A0402: This implies that you are not doing any local deliveries at all. Set
2263
2264 </P>
2265 <PRE>
2266          local_domains =</PRE>
2267 <P>
2268        in the configuration file. This specifies that there are no local
2269        domains (by default your host name is set up as a local domain). Then
2270        all addresses are non-local - 
2271         <A HREF="FAQ.html#SEC53">A0302</A> tells you how to deal with them.
2272
2273 </P>
2274 <A NAME="SEC80" HREF="FAQ.html#TOC80">Q0403</A>: How do I configure Exim to send messages for unknown local users to a
2275        central server?
2276
2277
2278 <P>
2279 A0403: At the end of the directors section of the configuration, insert the
2280        following director:
2281
2282 </P>
2283 <PRE>
2284          unknown:
2285            driver = smartuser
2286            transport = unknown_transport</PRE>
2287 <P>
2288        You should add <TT>no_verify</TT> to this if you are verifying addresses;
2289        without it, all local parts will verify as valid in the local domain.
2290        Then somewhere in the transports section of the configuration insert
2291
2292 </P>
2293 <PRE>
2294          unknown_transport:
2295            driver = smtp
2296            hosts = server.host.name</PRE>
2297 <P>
2298        A colon-separated list of hosts may be given. They are tried in order.
2299        By default, the IP address of any host is found by looking in the DNS
2300        and doing MX processing (so really it is a domain list rather than a
2301        host list). If you don't want MX processing, set the "gethostbyname"
2302        option:
2303
2304 </P>
2305 <PRE>
2306          unknown_transport:
2307            driver = smtp
2308            hosts = server.host.name
2309            gethostbyname</PRE>
2310 <P>
2311        This calls the gethostbyname() function to find IP addresses. Depending
2312        on your operating system and configuration, this usually consults
2313        <B>/etc/hosts</B> and possibly other sources of information, as well as, or
2314        instead of, the DNS.
2315
2316 </P>
2317 <P>
2318        If you want to change the recipient address when doing this, you can use
2319        the <TT>new_address</TT> option on the <B>smartuser</B> director. For example, if the
2320        address is <B><B>user@foo.bar.com</B></B> and the setting is
2321
2322 </P>
2323 <PRE>
2324            new_address = $local_part@bar.com</PRE>
2325 <P>
2326        The message is sent to the server with the envelope recipient changed to
2327        <B><B>user@bar.com.</B></B> However, this does not make any changes to the message's
2328        headers.
2329
2330 </P>
2331 <A NAME="SEC81" HREF="FAQ.html#TOC81">Q0404</A>: How can I arrange for messages submitted by (for example) Majordomo to
2332        be handled specially?
2333
2334
2335 <P>
2336 A0404: You can use the <TT>condition</TT> option on a director or router, with a
2337        setting such as
2338
2339 </P>
2340 <PRE>
2341          condition = "${if and {eq {$sender_host_address}{}} \
2342                      {eq {$sender_ident}{majordom}} {yes}{no}}"</PRE>
2343 <P>
2344        This first tests for a locally-submitted message, by ensuring there is
2345        no sending host address, and then it checks the identity of the user
2346        that ran the submitting process.
2347
2348 </P>
2349 <A NAME="SEC82" HREF="FAQ.html#TOC82">Q0405</A>: On a host that accepts mail for several domains, do I have to use fully
2350        qualified names in <B>/etc/aliases</B> or do I have to set up an alias file for
2351        each domain?
2352
2353
2354 <P>
2355 A0405: You can do it either way. If you use a single file, you must set
2356        <TT>include_domain</TT> on the <B>aliasfile</B> director. If you use a separate file
2357        for each domain you can use a single director with an option such as
2358
2359 </P>
2360 <PRE>
2361          file = /etc/aliases/$domain</PRE>
2362 <P>
2363        (as in C007), or you can have several different directors, each one with
2364
2365 </P>
2366 <PRE>
2367          domains = domain1:domain2:...</PRE>
2368 <P>
2369        so that each one processes certain domains only. That way you could have
2370        several domains sharing an alias file. All of this assumes that you want
2371        have different aliases for each domain. If all the domain names are in
2372        effect just synonyms, you don't need to do anything other than ensure
2373        they all match something in <TT>local_domains</TT>.
2374
2375 </P>
2376 <A NAME="SEC83" HREF="FAQ.html#TOC83">Q0406</A>: Some of my users are using the <B>.forward</B> to pipe to a shell command which
2377        appends to the user's INBOX. How can I forbid this?
2378
2379
2380 <P>
2381 A0406: If you allow your users to run shells in pipes, you cannot control which
2382        commands they run or which files they write to. However, you should point
2383        out to them that writing to an INBOX by arbitrary commands is not
2384        interlocked with the MTA and MUAs, and is liable to mess up the contents
2385        of the file.
2386
2387 </P>
2388 <P>
2389        If a user simply wants to choose a specific file for the delivery of
2390        messages, this can be done by putting a file name in a <B>.forward</B> file
2391        rather than using a pipe, or by using the "save" command in an Exim
2392        filter file.
2393
2394 </P>
2395 <P>
2396        You can set <TT>forbid_pipe</TT> on the <B>forwardfile</B> director, but that will
2397        prevent them from running any pipe commands at all. Alternatively, you
2398        can restrict which commands they may run in their pipes by setting the
2399        <TT>allow_commands</TT> and/or <TT>restrict_to_path</TT> options in the <TT>address_pipe</TT>
2400        transport.
2401
2402 </P>
2403 <A NAME="SEC84" HREF="FAQ.html#TOC84">Q0407</A>: How can I arrange for a default value when using a query-style lookup
2404        such as LDAP or NIS+ to handle aliases?
2405
2406
2407 <P>
2408 A0407: Using the queries option for the <B>aliasfile</B> driver should do what you
2409        want. You can supply a second query which gets obeyed when the first
2410        query fails. For example,
2411
2412 </P>
2413 <PRE>
2414        queries = "\
2415          ldap:://x.y.z/l=yvr?aliasaddress?sub?(&(mail=$local_part@$domain)):\
2416          ldap:://x.y.z/l=yvr?aliasaddress?sub?(&(mail=default@$domain))"</PRE>
2417 <A NAME="SEC85" HREF="FAQ.html#TOC85">Q0408</A>: If I don't fully qualify the addresses in a virtual domain's alias file
2418        then mail to aliases which also match the local domain get delivered to
2419        the local domain.
2420
2421
2422 <P>
2423        For example, if the alias file for <B>foobar.com</B> is
2424
2425 </P>
2426 <PRE>
2427          foo: joe@some.place.com
2428          postmaster: foo</PRE>
2429 <P>
2430        then mail sent to <B><B>postmaster@foobar.com</B></B> is not delivered to
2431        <B><B>joe@some.place.com</B></B> but instead goes to <B><B>foo@localdomain.com.</B></B>
2432
2433 </P>
2434 <P>
2435 A0408: Set the <TT>qualify_preserve_domain</TT> option on the <B>aliasfile</B> director.
2436
2437 </P>
2438 <A NAME="SEC86" HREF="FAQ.html#TOC86">Q0409</A>: We've got users who chmod their home to 750, and home is NFS-mounted
2439        without root privilege, so Exim cannot access <B>~user/.forward.</B>
2440
2441
2442 <P>
2443 A0409: Set the seteuid option on the <B>forwardfile</B> director so that Exim
2444        "becomes" the user before trying to read the file. However, if your
2445        operating system does not support the seteuid() function, you cannot do
2446        this. In that circumstance, if you cannot persuade your users to make
2447        their <B>.forward</B> files world readable, you can set the <TT>ignore_eacces</TT>
2448        option, which causes Exim to ignore unreadable files.
2449
2450 </P>
2451 <A NAME="SEC87" HREF="FAQ.html#TOC87">Q0410</A>: I'm getting "permission denied" when Exim tries to check a for the
2452        existence of a user's <B>.procmailrc</B> file using <TT>require_files</TT>.
2453
2454
2455 <P>
2456 A0410: Exim is running under its own uid (or root if there isn't an Exim uid)
2457        when it checks <TT>require_files</TT>. You can cause it to change to a specific
2458        uid by putting an item not containing any / characters at the start of
2459        the <TT>require_files</TT> list. In this case you probably want a director along
2460        these lines:
2461
2462 </P>
2463 <PRE>
2464          procmail:
2465            driver = localuser
2466            require_files = ${local_part}:${home}/.procmailrc
2467            transport = procmail_pipe</PRE>
2468 <A NAME="SEC88" HREF="FAQ.html#TOC88">Q0411</A>: How can I deliver mail into different directories for each virtual
2469        domain, doing user lookups not against <B>/etc/passwd</B> but against
2470        <B><B>/etc/passwd.domain</B>?</B>
2471
2472
2473 <P>
2474 A0411: See configuration sample C009.
2475
2476 </P>
2477 <A NAME="SEC89" HREF="FAQ.html#TOC89">Q0412</A>: I want mail for <EM>any</EM> local part at certain virtual domains to go
2478        to a single address for each domain.
2479
2480
2481 <P>
2482 A0412: One way to to this is
2483
2484 </P>
2485 <PRE>
2486          virtual:
2487            driver = smartuser
2488            domains = lsearch;/etc/virtual
2489            new_address = ${lookup{$domain}lsearch{/etc/virtual}{$value}fail}</PRE>
2490 <P>
2491        The <B>/etc/virtual</B> file contains a list of domains and the addresses to
2492        which their mail should be sent. For example:
2493
2494 </P>
2495 <PRE>
2496           domain1:  postmaster@some.where.else
2497           domain2:  joe@xyz.plc
2498           etc.</PRE>
2499 <P>
2500        If the number of domains is large, using a DBM or cdb file would be more
2501        efficient.
2502
2503 </P>
2504 <A NAME="SEC90" HREF="FAQ.html#TOC90">Q0413</A>: How can I make Exim look in the alias NIS map instead of <B>/etc/aliases</B>?
2505
2506
2507 <P>
2508 A0413: The default configuration does not use NIS (many hosts don't run it).
2509        You should change the <TT>system_aliases</TT> director to
2510
2511 </P>
2512 <PRE>
2513          system_aliases:
2514            driver = aliasfile
2515            file = mail.aliases
2516            search_type = nis</PRE>
2517 <P>
2518        If you want to use <B>/etc/aliases</B> as well as NIS, put this director (with
2519        a different name) before or after the default one, depending on which
2520        data source you want to take precedence.
2521
2522 </P>
2523 <A NAME="SEC91" HREF="FAQ.html#TOC91">Q0414</A>: What does the error message "error in forward file (filtering not
2524        enabled): missing or malformed local part ..." mean?
2525
2526
2527 <P>
2528 A0414: If you are trying to use an Exim filter, you have forgotten to enable
2529        the facility, which is disabled by default. In the <B>forwardfile</B> director
2530        (in the Exim configuration file) you need to set
2531
2532 </P>
2533 <PRE>
2534          filter = true</PRE>
2535 <P>
2536        to allow a <B>.forward</B> file to be used as an Exim filter. If you are not
2537        trying to use an Exim filter, then you have put a malformed address in
2538        the <B>.forward</B> file.
2539
2540 </P>
2541 <A NAME="SEC92" HREF="FAQ.html#TOC92">Q0415</A>: Exim isn't recognizing certain forms of local address.
2542
2543
2544 <P>
2545 A0415: (A) Try using the <B>-bt</B> option with debugging turned on, to see how Exim
2546        is handling the addresses. For example,
2547
2548 </P>
2549 <PRE>
2550          exim -d2 -bt z6abc</PRE>
2551 <P>
2552        will show you how it would handle the local part "z6abc". Increase the
2553        debug level to <B>-d9</B> for more information.
2554
2555 </P>
2556 <P>
2557        (B) If the local user names contain capital letters, that is probably
2558        the cause of your problem. Setting up such user names is a bad idea.
2559        By default, everything is lowercased before the final delivery for the
2560        sake of alias matching and user name matching, because people who type
2561        email addresses often get the case wrong. You can stop this by setting
2562
2563 </P>
2564 <PRE>
2565          locally_caseless = false</PRE>
2566 <P>
2567        but then incoming addresses are recognized only in the correct case.
2568        See also 
2569         <A HREF="FAQ.html#SEC101">Q0424</A> for a way round this.
2570
2571 </P>
2572 <A NAME="SEC93" HREF="FAQ.html#TOC93">Q0416</A>: I have a domain for which some local parts must be delivered locally,
2573        but the remainder are to be treated like any other remote addresses.
2574
2575
2576 <P>
2577 A0416: See 
2578         <A HREF="FAQ.html#SEC59">A0308</A>.
2579
2580 </P>
2581 <A NAME="SEC94" HREF="FAQ.html#TOC94">Q0417</A>: What I really need is the ability to obtain the result of a pipe
2582        command so that I can filter externally and redirect internally. Is
2583        this possible?
2584
2585
2586 <P>
2587 A0417: This is not possible. The result of a pipe command is not available to
2588        a filter, because it doesn't run any deliveries while filtering. It just
2589        sets up deliveries. They all happen later. If you want to run pipes
2590        and examine their results, you need to set up a single delivery to a
2591        delivery agent such as procmail which provides this kind of facility.
2592
2593 </P>
2594 <A NAME="SEC95" HREF="FAQ.html#TOC95">Q0418</A>: When I set a suffix on one of my directors, it doesn't get stripped when
2595        checking the <TT>local_parts</TT> option. Why is this?
2596
2597
2598 <P>
2599 A0418: The test on local parts and domains is done early on, and only if they
2600        match is supplementary processing such as prefix and suffix recognition
2601        done. There is a section of the manual called "Skipping directors" which
2602        gives details. If you want to ignore a prefix or suffix in the initial
2603        test of the local part, you can do so by replacing <TT>local_parts</TT> with a
2604        setting of the <TT>condition</TT> option. For example, suppose you wanted to
2605        look up the basic local part in a file, and run the director if it is
2606        found:
2607
2608 </P>
2609 <PRE>
2610          condition = "${if lookup{\
2611            ${if match{$local_part}{^(.*)-request}{$1}{$local_part}}\
2612            }lsearch{/some/file}{yes}}"</PRE>
2613 <P>
2614        The key that is looked up is the second line, which uses a regular
2615        expression to strip "-request" from the local part if it is present.
2616
2617 </P>
2618 <A NAME="SEC96" HREF="FAQ.html#TOC96">Q0419</A>: Why will Exim deliver a message locally to any username that is longer
2619        than 8 characters as long as the first 8 characters match one of the
2620        local usernames?
2621
2622
2623 <P>
2624 A0419: The problem is in your operating system. Exim just calls the getpwnam()
2625        function to test a local part for being a local login name. It does not
2626        presume to guess the maximum length of user name for the underlying
2627        operating system. Many operating systems correctly reject names that are
2628        longer than the maximum length; yours is apparently deficient in this
2629        regard. To cope with such systems, Exim has an option called
2630        <TT>max_user_name_length</TT> which you can set to the maximum allowed length.
2631
2632 </P>
2633 <A NAME="SEC97" HREF="FAQ.html#TOC97">Q0420</A>: Why am I seeing the error "bad mode (100664) for <B><B>/home/test/.forward</B></B>
2634        (userforward director)"? I've looked through the documentation but can't
2635        see anything to suggest that exim has to do anything other than read the
2636        <B>.forward</B> file.
2637
2638
2639 <P>
2640 A0420: For security, Exim checks for mode bits that shouldn't be set, by
2641        default 022. You can change this by setting the "modemask" option of the
2642        <B>forwardfile</B> director.
2643
2644 </P>
2645 <A NAME="SEC98" HREF="FAQ.html#TOC98">Q0421</A>: How can I arrange that messages larger than some limit are handled by
2646        a special director?
2647
2648
2649 <P>
2650 A0421: See 
2651         <A HREF="FAQ.html#SEC62">A0311</A>.
2652
2653 </P>
2654 <A NAME="SEC99" HREF="FAQ.html#TOC99">Q0422</A>: When a user's <B>.forward</B> file is syntactially invalid, Exim defers
2655        delivery of all messages to that user, which sometimes include the
2656        user's own test messages. Can it be told to ignore the <B>.forward</B> file
2657        and/or inform the user of the error?
2658
2659
2660 <P>
2661 A0422: Setting <TT>skip_syntax_errors</TT> on the <B>forwardfile</B> director causes syntax
2662        errors to be skipped. When dealing with users' <B>.forward</B> files it is best
2663        to combine this with a setting of <TT>syntax_errors_to</TT> in order to send
2664        a message about the error to the user. However, to avoid an infinite
2665        cascade of messages, you have to be able to send to an address that
2666        bypasses <B>.forward</B> file processing. This can be done by including a
2667        director like this one
2668
2669 </P>
2670 <PRE>
2671          real_localuser:
2672            driver = localuser
2673            transport = local_delivery
2674            prefix = real-</PRE>
2675 <P>
2676        <EM>before</EM> the <B>forwardfile</B> director. This will do an ordinary local
2677        delivery without <B>.forward</B> processing, if the local part is prefixed by
2678        "real-". You can then set something like the following options on the
2679        <B>forwardfile</B> director:
2680
2681 </P>
2682 <PRE>
2683          skip_syntax_errors
2684          syntax_errors_to = real-$local_part@$domain
2685          syntax_errors_text = "\
2686            This is an automatically generated message. An error has been \
2687            found\nin your .forward file. Details of the error are reported \
2688            below. While\nthis error persists, messages addressed to you will \
2689            get delivered into\nyour normal mailbox and you will receive a \
2690            copy of this message for\neach one."</PRE>
2691 <P>
2692        A final tidying setting to go with this is a rewriting rule that changes
2693        "real-username" into just "username" in the headers of the message:
2694
2695 </P>
2696 <PRE>
2697          ^real-([^@]+)@your\.dom\.ain$    $1@your.dom.ain   h</PRE>
2698 <P>
2699        This means that users won't ever see the "real-" prefix, unless they
2700        look at the Envelope-To header.
2701
2702 </P>
2703 <A NAME="SEC100" HREF="FAQ.html#TOC100">Q0423</A>: I have some users on my system with upper case letters in their login
2704        names, but these are not recognized.
2705
2706
2707 <P>
2708 A0423: See 
2709         <A HREF="FAQ.html#SEC101">A0424</A>.
2710
2711 </P>
2712 <A NAME="SEC101" HREF="FAQ.html#TOC101">Q0424</A>: I have unset <TT>locally_caseless</TT> because my users have upper case letters
2713        in their login names, but incoming mail now has to use the correct case.
2714        Can I relax this somehow?
2715
2716
2717 <P>
2718 A0424: If you really have to live with caseful user names but want incoming
2719        local parts to be caseless, then you have to maintain a file, indexed by
2720        the lower case forms, that gives the correct case for each login, like
2721        this:
2722
2723 </P>
2724 <PRE>
2725          admin:    Admin
2726          steven:   Steven
2727          mcdonald: McDonald
2728          lamanch:  LaManche
2729          ...</PRE>
2730 <P>
2731        and at the start of your directors, put one like this:
2732
2733 </P>
2734 <PRE>
2735          set_case_director:
2736            driver = smartuser
2737            new_address = "${lookup{${lc:$local_part}}lsearch{/the/file}\
2738                           {$value@$domain}fail}"</PRE>
2739 <P>
2740        For efficiency, you should also set the <TT>new_director</TT> option to cause
2741        processing of the changed address to begin at the next director. If you
2742        are otherwise using the default configuration, then the setting would be
2743
2744 </P>
2745 <PRE>
2746          new_director = system_aliases</PRE>
2747 <P>
2748        If there are lots of users, then a DBM or cdb file would be more
2749        efficient than lsearch. If you are handling several domains, then you
2750        will have to extend this configuration to cope appropriately.
2751
2752 </P>
2753 <A NAME="SEC102" HREF="FAQ.html#TOC102">Q0425</A>: I want to look up local users in an SQL database instead of looking in
2754        the passwd file.
2755
2756
2757 <P>
2758 A0425: (A) From release 3.03, Exim contains support for calling MySQL.
2759
2760 </P>
2761 <P>
2762        (B) If you can set up an LDAP interface to your SQL database, then this
2763        is relatively straightforward to do, since Exim contains LDAP support.
2764        Sample configuration C009 shows you how to lookup users in
2765        <B>/etc/passwd/whatever</B> instead of <B>/etc/passwd</B>. Modifying this to use LDAP
2766        instead of looking in a file would be easy.
2767
2768 </P>
2769 <P>
2770        (C) If you can access SQL from Perl, you could use Exim's embedded Perl
2771        facility, but this is expensive in terms of resources used.
2772
2773 </P>
2774 <P>
2775        You must consider what will happen if your database is down. All local
2776        mail delivery will be delayed until it comes up again. Whether this
2777        matters is of course something for you to decide. If the database is
2778        down a lot and it does matter, then consider some scheme of extracting
2779        a list of users from the database at regular intervals, and getting Exim
2780        to work off that. This is also likely to be more efficient.
2781
2782 </P>
2783 <A NAME="SEC103" HREF="FAQ.html#TOC103">Q0426</A>: Is it possible for Exim to use a SQL database like MySQL for its lists
2784        of virtual domains and explicit aliases?
2785
2786
2787 <P>
2788 A0426: See 
2789         <A HREF="FAQ.html#SEC102">A0425</A>.
2790
2791 </P>
2792 <A NAME="SEC104" HREF="FAQ.html#TOC104">Q0427</A>: Can I use my existing alias files and forward files as well as procmail
2793        and effectively drop in exim in place of Sendmail ?
2794
2795
2796 <P>
2797 A0427: Yes, as long as your alias/forward files don't assume that pipes are
2798        going to run under a shell. If they do, you either have to change them,
2799        or configure Exim to use a shell (which it doesn't by default).
2800
2801 </P>
2802 <A NAME="SEC105" HREF="FAQ.html#TOC105">Q0428</A>: How can I route mail for user <B>X@local</B> to a smarthost if X doesn't exist
2803        on the local host?
2804
2805
2806 <P>
2807 A0428: This is the same question as 
2808         <A HREF="FAQ.html#SEC79">Q0402</A>. The duplication is a bug in the FAQ.
2809
2810 </P>
2811 <A NAME="SEC106" HREF="FAQ.html#TOC106">Q0429</A>: What is quickest way to set up Exim so any message sent to a non-
2812        existing user would bounce back with a different message, based
2813        on the name of non-existing user?
2814
2815
2816 <P>
2817 A0429: See the example in the section of the manual entitled "System-wide
2818        automatic processing".
2819
2820 </P>
2821 <A NAME="SEC107" HREF="FAQ.html#TOC107">Q0430</A>: I am building some largish mailing lists with Majordomo, and was
2822        wondering if it worth leaving the actually list expansion to the
2823        <B>aliasfile</B> :include: mechanism or should I consider using the <B>forwardfile</B>
2824        transport? Is there any real difference in terms of facilities and/or
2825        performance, and are the expansions basically the same code anyway?
2826
2827
2828 <P>
2829 A0430: The code that pulls out individual addresses from a list is the same in
2830        both cases, so it's really just a matter of which is the most convenient
2831        for you.
2832
2833 </P>
2834 <A NAME="SEC108" HREF="FAQ.html#TOC108">Q0431</A>: What do I need to do to make Exim handle <B>/usr/ucb/vacation</B> processing
2835        automatically, so that people could just create a .<B>vacation.msg</B> file in
2836        their home directory and not have to edit their <B>.forward</B> file?
2837
2838
2839 <P>
2840 A0431: Add a new director like this, immediately before the normal localuser
2841        director:
2842
2843 </P>
2844 <PRE>
2845          vacation:
2846            driver = localuser
2847            require_files = .vacation.msg
2848            transport = vacation_transport
2849            unseen</PRE>
2850 <P>
2851        and a matching new transport like this:
2852
2853 </P>
2854 <PRE>
2855          vacation_transport:
2856            driver = pipe
2857            command = "/usr/ucb/vacation \"$local_part\""</PRE>
2858 <P>
2859        However, some versions of <B>/usr/ucb/vacation</B> do not work properly unless
2860        the DBM file(s) it uses are created in advance - it won't create them
2861        itself. You also need a way of removing them when the vacation is over.
2862
2863 </P>
2864 <P>
2865        Another possibility is to use a fixed filter file which is run whenever
2866        .<B>vacation.msg</B> exists, for example:
2867
2868 </P>
2869 <PRE>
2870          vacation:
2871            driver = forwardfile
2872            check_localuser
2873            require_files = $home/.vacation.msg
2874            file = /some/central/filter
2875            filter</PRE>
2876 <P>
2877        The filter file should use the "if personal" check before sending mail,
2878        to avoid generating automatic responses to mailing lists. If sending a
2879        message is all that it does, this doesn't count as a "significant"
2880        delivery, so the message goes on to be delivered as normal.
2881
2882 </P>
2883 <P>
2884        Yet another possibility is to make use of Exim's autoreply transport.
2885        See C033.
2886
2887 </P>
2888 <A NAME="SEC109" HREF="FAQ.html#TOC109">Q0432</A>: I want to use a default entry in my alias file, but it picks up the
2889        local parts that the aliases generate. For example, if the alias file
2890        is
2891
2892
2893 <PRE>
2894          luke.skywalker: luke
2895          ls: luke
2896          *: postmaster</PRE>
2897 <P>
2898        then messages addressed to <B>luke.skywalker</B> end up at postmaster.
2899
2900 </P>
2901 <P>
2902 A0432: (A) If you know for certain that no alias in your alias file ever
2903        generates another alias that is in the same file, then the most
2904        efficient solution is to put
2905
2906 </P>
2907 <PRE>
2908          new_director = name-of-following-director</PRE>
2909 <P>
2910        in your <B>aliasfile</B> director. This stops Exim from processing the
2911        generated names as aliases the second time.
2912
2913 </P>
2914 <P>
2915        (B) If you can't give that guarantee, then you have to put dummy entries
2916        in the alias file for all your local parts, for example:
2917
2918 </P>
2919 <PRE>
2920          luke: luke</PRE>
2921 <P>
2922        (C) Another possibility is to put the <B>aliasfile</B> director for these
2923        aliases <EM>after</EM> the localuser director, so that local parts get picked
2924        off first. You will need to have two <B>aliasfile</B> directors if there are
2925        some local parts (e.g. root) which you do want to handle as aliases
2926        rather than local users.
2927
2928 </P>
2929 <A NAME="SEC110" HREF="FAQ.html#TOC110">Q0433</A>: I have some obsolete domains which people have been warned not to use
2930        any more. How can I arrange to delete any mail that is sent to them?
2931
2932
2933 <P>
2934 A0433: If you are using release 3.10 or later, you can use a <B>smartuser</B> director
2935        like this:
2936
2937 </P>
2938 <PRE>
2939          obsolete:
2940          domains = lsearch;/etc/exim/obsolete.domains
2941          new_address = :blackhole:</PRE>
2942 <P>
2943        If you want to make any exceptions, for example, for mail to postmaster
2944        at those domains, you can add the line
2945
2946 </P>
2947 <PRE>
2948          local_parts = !postmaster</PRE>
2949 <P>
2950        If you are using an earlier release of Exim, you have to set up an alias
2951        file in order to use :blackhole:
2952
2953 </P>
2954 <PRE>
2955          obsolete:
2956          domains = lsearch;/etc/exim/obsolete.domains
2957          file = /blackhole/all
2958          search_type = lsearch*</PRE>
2959 <P>
2960        with the file containing
2961
2962 </P>
2963 <P>
2964          *:           :blackhole:
2965
2966 </P>
2967 <P>
2968        and possibly a postmaster alias if you want.
2969
2970 </P>
2971 <A NAME="SEC111" HREF="FAQ.html#TOC111">Q0434</A>: How can I arrange that mail addressed to <B><B>anything@something.mydomain.com</B></B>
2972        gets delivered to <B><B>something@mydomain.com</B>?</B>
2973
2974
2975 <P>
2976 A0434: Ensure that all the relevant domains are local, by setting
2977
2978 </P>
2979 <PRE>
2980          local_domains = mydomain.com : *.mydomain.com</PRE>
2981 <P>
2982        Then set up a <B>smartuser</B> director like this:
2983
2984 </P>
2985 <PRE>
2986          user_from_domain:
2987            driver = smartuser
2988            new_address = "${if match{$domain}{^(.+)\\\\.mydomain.com\\$}\
2989              {$1@mydomain.com}fail}"</PRE>
2990 <A NAME="SEC112" HREF="FAQ.html#TOC112">Q0435</A>: I can't get a regular expression to work in this <TT>local_parts</TT> option on
2991        one of my directors:
2992
2993
2994 <PRE>
2995          local_parts = ^0740\d{6}</PRE>
2996 <P>
2997 A0435: The <TT>local_parts</TT> option is expanded before use, so that you can, for
2998        example, make it dependent on the domain. Therefore, you need to write
2999
3000 </P>
3001 <PRE>
3002          local_parts = ^0740\\d{6}</PRE>
3003 <P>
3004        so as to preserve the backslash.
3005
3006 </P>
3007 <A NAME="SEC113" HREF="FAQ.html#TOC113">Q0436</A>: How can I arrange for all addresses in a group of domains <B>*.example.com</B>
3008        to share the same alias file? I have a number of such groups.
3009
3010
3011 <P>
3012 A0436: For a single group you could just hardwire the file name into a director
3013        that had
3014
3015 </P>
3016 <PRE>
3017          domains = *.example.com</PRE>
3018 <P>
3019        set, to restrict it to the relevant domains. For a number of such groups
3020        you can create a file containing the domains, like this:
3021
3022 </P>
3023 <PRE>
3024          *.example1.com    example1.com
3025          *.example2.com    example2.com
3026          ...</PRE>
3027 <P>
3028        Arrange that the domains are treated as local by setting
3029
3030 </P>
3031 <PRE>
3032          local_domains = "partial-lsearch;/that/file"</PRE>
3033 <P>
3034        Then create a director like this
3035
3036 </P>
3037 <PRE>
3038          domain_aliases:
3039            driver = aliasfile
3040            domains = partial-lsearch;/that/file
3041            file = /etc/aliases.d/$domain_data
3042            search_type = lsearch*</PRE>
3043 <P>
3044        The variable <B>$domain_data</B> contains the data that was looked up when the
3045        <TT>domains</TT> option was matched, i.e. <B>"example1.com",</B> <B>"example2.com",</B> etc.
3046        in this case.
3047
3048 </P>
3049 <A NAME="SEC114" HREF="FAQ.html#TOC114">Q0437</A>: When Exim tries to read <B><B>/usr/lib/majordomo/lists/lists.aliases</B></B> it is
3050        giving "Permission denied", but that file is world-readable!
3051
3052
3053 <P>
3054 A0437: Check the permissions on the superior directories.
3055
3056 </P>
3057 <BR><H2><A NAME="SEC115" HREF="FAQ.html#TOC115">5. DELIVERY
3058
3059 </A></H2>
3060 <A NAME="SEC116" HREF="FAQ.html#TOC116">Q0501</A>: What does the error "Neither the <I>xxx</I> director nor the <I>yyy</I> transport set
3061        a uid for local delivery of..." mean?
3062
3063
3064 <P>
3065 A0501: Whenever Exim does a local delivery, it runs a process under a specific
3066        user and group id (uid and gid). For deliveries into mailboxes, and to
3067        pipes and files set up by <B>.forward</B>ing, it normally picks up the uid/gid
3068        of the receiving user. However, if an address is directed to a pipe or a
3069        file by some other means, such an entry in the system alias file of the
3070        form
3071
3072 </P>
3073 <PRE>
3074          majordomo: |/local/mail/majordomo ...</PRE>
3075 <P>
3076        then Exim has to be told what uid/gid to use for the delivery. This can
3077        be done either on the director that handled the address, or on the
3078        transport that actually does the delivery. If a pipe is going to run a
3079        setuid program, then it doesn't matter what uid Exim starts it out with,
3080        and so the most straightforward thing is to put
3081
3082 </P>
3083 <PRE>
3084          user = exim</PRE>
3085 <P>
3086        on either the director or the transport. A setting on the transport
3087        overrides a setting on the director, so if the same transport is being
3088        used with several directors, you should set the user on it only if you
3089        want the same uid to be used in all cases.
3090
3091 </P>
3092 <P>
3093        In the default configuration, the transports used for file and pipe
3094        deliveries are the ones called <TT>address_file</TT> and <TT>address_pipe</TT>. You
3095        can specify different transports by setting, for example,
3096
3097 </P>
3098 <PRE>
3099          pipe_transport = special_pipe_transport</PRE>
3100 <P>
3101        on the <B>aliasfile</B> director. Then you can set up <TT>special_pipe_transport</TT>
3102
3103 </P>
3104 <PRE>
3105          special_pipe_transport:
3106            driver = pipe
3107            user = ????</PRE>
3108 <P>
3109        which will be used only for pipe deliveries from that one director.
3110        What you put for the ???? is up to you, and depends on the particular
3111        circumstances.
3112
3113 </P>
3114 <A NAME="SEC117" HREF="FAQ.html#TOC117">Q0502</A>: Exim won't deliver to a host with no MX record.
3115
3116
3117 <P>
3118 A0502: (A) Are you sure there really is no MX record? Sometimes a typo results
3119        in a malformed MX record in the zone file, in which case some nameservers
3120        give a SERVFAIL error rather than NXDOMAIN. Exim has to treat this as
3121        a temporary error, so it can't go on to look for an A record. You can
3122        check for this state using one of the DNS interrogation commands, such
3123        as "dig".
3124
3125 </P>
3126 <P>
3127        (B) Is there a wildcard MX record for <EM>your</EM> domain? Is the
3128        <TT>search_parents</TT> option on in your <B>lookuphost</B> router? (Prior to Exim
3129        version 1.80 this was the default; it was changed because of this
3130        problem.) If the answer to both these questions is "yes", then that is
3131        the cause of the problem. When the DNS resolver fails to find the MX
3132        record, it tries adding on your domain if <TT>search_parents</TT> is true, and
3133        thereby finds your wildcard MX record. For example:
3134
3135 </P>
3136 <P>
3137          .  There is a wildcard MX record for <B>*.a.b.c.</B>
3138
3139 </P>
3140 <P>
3141          .  There is a host called <B>x.y.z</B> that has an A record and no MX record.
3142
3143 </P>
3144 <P>
3145          .  Somebody on a machine <B>m.a.b.c</B> domain tries to mail to <B><B>user@x.y.z.</B></B>
3146
3147 </P>
3148 <P>
3149          .  Exim calls the DNS to look for an MX record for <B>x.y.z.</B>
3150
3151 </P>
3152 <P>
3153          .  The DNS doesn't find any MX record. Because <TT>search_parents</TT> is true,
3154             it then tries searching the current host's parent domain, so it
3155             looks for <B>x.y.z.a.b.c</B> and picks up the wildcard MX record.
3156
3157 </P>
3158 <P>
3159        Setting <TT>search_parents</TT> false makes this case work while retaining the
3160        wildcard MX record. However, anybody on the machine <B>m.a.b.c</B> who mails to
3161        <B><B>user@n.a</B></B> (expecting it to go to <B><B>user@n.a.b.c</B>)</B> now has a problem. The
3162        <TT>widen_domains</TT> option of the <B>lookuphost</B> router may be helpful in this
3163        circumstance.
3164
3165 </P>
3166 <A NAME="SEC118" HREF="FAQ.html#TOC118">Q0503</A>: How should Exim be configured when it is acting as a temporary storage
3167        system for a domain on a dial-up host?
3168
3169
3170 <P>
3171 A0503: See 
3172         <A HREF="FAQ.html#SEC220">Q1402</A>.
3173
3174 </P>
3175 <A NAME="SEC119" HREF="FAQ.html#TOC119">Q0504</A>: I would like to deliver mail addressed to a given domain normally, but
3176        also to generate a message to the envelope sender.
3177
3178
3179 <P>
3180 A0504: If the domain is a local one, you can do this with an "unseen" <B>smartuser</B>
3181        director and an autoreply transport, along the following lines:
3182
3183 </P>
3184 <PRE>
3185          # Transport
3186          warning_t:
3187            driver        = autoreply
3188            file          = /usr/local/mail/warning.txt
3189            file_expand
3190            from          = postmaster@your.domain
3191            to            = $sender_address
3192            user          = exim
3193            subject       = "Re: Your mail to ${local_part}@${domain}"</PRE>
3194 <PRE>
3195          # Director
3196          auto_warning_d:
3197            driver        = smartuser
3198            domains       = &#60;domains you want to do this for&#62;
3199            condition     = ${if eq{$sender_address}{}{no}{yes}}
3200            transport     = warning_t
3201            no_verify
3202            unseen</PRE>
3203 <P>
3204        Note the use of the <TT>condition</TT> option to avoid attempting to send a
3205        message when there is no sender (that is, when the incoming message is a
3206        delivery error report). You can of course extend this to include other
3207        conditions. If you want to log the sending of messages, you can add
3208
3209 </P>
3210 <PRE>
3211          log = /some/file</PRE>
3212 <P>
3213        to the transport and also make use of the "once" option if you want to
3214        send only one message to each sender.
3215
3216 </P>
3217 <A NAME="SEC120" HREF="FAQ.html#TOC120">Q0505</A>: Exim keeps crashing with segmentation errors (signal 11 or 139) during
3218        delivery. This seems to happen when it is about to contact a remote
3219        host or when a delivery is deferred.
3220
3221
3222 <P>
3223 A0505: This could be a problem with Exim's databases. Check that your DBM
3224        library is correctly installed. In particular, if you have installed a
3225        second DBM library onto a system that already had one, check that its
3226        version of <B>ndbm.h</B> is being seen first. For example, if the new version
3227        is in <B>/usr/local/include</B>, check that there isn't another version in
3228        <B>/usr/include</B>. If you are using Berkeley db, you can set <TT>USE_DB=yes</TT> in
3229        your <B>Local/Makefile</B> to avoid using <B>ndbm.h</B> altogether. This is
3230        particularly relevant for version 2 of Berkeley db, because no <B>ndbm.h</B>
3231        file is distributed with it.
3232
3233 </P>
3234 <A NAME="SEC121" HREF="FAQ.html#TOC121">Q0506</A>: Whenever Exim tries to do a local delivery, it gives a permission denied
3235        error for the <B>.forward</B> file, like this:
3236
3237
3238 <PRE>
3239          1998-08-10 16:55:32 0z5y2W-0000B8-00 == xxxx@yyy.zzz &#60;xxxx@yyy.zz&#62;
3240            D=userforward defer (-1): failed to open /home/xxxx/.forward
3241            (userforward director): Permission denied (euid=1234 egid=101)</PRE>
3242 <P>
3243 A0506: Have you remembered to make Exim setuid root?
3244
3245 </P>
3246 <A NAME="SEC122" HREF="FAQ.html#TOC122">Q0507</A>: I have installed Exim, but now I can't mail to root any more. Why is
3247        this?
3248
3249
3250 <P>
3251 A0507: Most people set up root as an alias for the manager of the machine. If
3252        you haven't done this, Exim will attempt to deliver to root as if it
3253        were a normal user. This isn't really a good idea because the delivery
3254        process would run as root. Exim has a trigger guard in the option
3255
3256 </P>
3257 <PRE>
3258          never_users = root</PRE>
3259 <P>
3260        in the default configuration file. This prevents it from running as root
3261        when doing any local deliveries. If you really want to run local
3262        deliveries as root, remove this line, but it would be better to create
3263        an alias for root instead.
3264
3265 </P>
3266 <A NAME="SEC123" HREF="FAQ.html#TOC123">Q0508</A>: How can I stop undeliverable bounce messages (e.g. to routeable, but
3267        undeliverable, spammer senders) from clogging up the queue for days?
3268
3269
3270 <P>
3271 A0508: Set <TT>ignore_errmsg_errors</TT> to drop them immediately, or set <TT>ignore_errmsg_</TT>
3272        <TT>errors_after</TT> to specify a (short) time to keep them for. I use 12h so
3273        that I notice them, but they go away relatively quickly.
3274
3275 </P>
3276 <A NAME="SEC124" HREF="FAQ.html#TOC124">Q0509</A>: How can mails that are being routed through directors other than
3277        localuser be delivered under the uid of the recipient?
3278
3279
3280 <P>
3281 A0509: 
3282         <A HREF="FAQ.html#SEC116">A0501</A> contains background information on this. If you are using, say, an
3283        alias file to direct messages to specific mailboxes, then you can use
3284        the "user" option on either the <B>aliasfile</B> director or the appendfile
3285        transport to set the uid. What you put in the setting depends on how
3286        the required uid is to be found. It could be looked up in a file or
3287        computed somehow from the local part, for example.
3288
3289 </P>
3290 <A NAME="SEC125" HREF="FAQ.html#TOC125">Q0510</A>: I want to use MMDF-style mailboxes. How can I get Exim to append the
3291        ctrl-A characters that separate indvidual emails?
3292
3293
3294 <P>
3295 A0510: Set the suffix option in the appendfile transport. In fact, for MMDF
3296        mailboxes you need a prefix as well as a suffix to get it working right,
3297        so your transport should contain these settings:
3298
3299 </P>
3300 <PRE>
3301          prefix = "\1\1\1\1\n"
3302          suffix = "\1\1\1\1\n"</PRE>
3303 <P>
3304        Also, you need to change the <TT>check_string</TT> and <TT>escape_string</TT> settings so
3305        that the escaping happens for lines in the message that happen to begin
3306        with the MMDF prefix or suffix string, rather than "From" (the default):
3307
3308 </P>
3309 <PRE>
3310          check_string  = "\1\1\1\1\n"
3311          escape_string = "\1\1\1\1 \n"</PRE>
3312 <P>
3313        Adding a space to the line is sufficient to prevent it being taken as a
3314        separator.
3315
3316 </P>
3317 <A NAME="SEC126" HREF="FAQ.html#TOC126">Q0511</A>: I have an ISDN connection and would like a way of running the queue
3318        automatically when it is up.
3319
3320
3321 <P>
3322 A0511: The following shell commands test for the interface being up and then
3323        run the queue:
3324
3325 </P>
3326 <PRE>
3327          ifconfig ppp0 | fgrep UP &#62;/dev/null
3328          if [ $? -eq 0 ] ; then exim -q ; fi</PRE>
3329 <P>
3330        You could put these commands into a script which runs them at regular
3331        intervals. You might want to use <B>-qq</B> instead of <B><B>-q.</B></B>
3332
3333 </P>
3334 <P>
3335        With Linux, the script <B>/etc/ppp/ip-up</B> is run after a ISDN connection
3336        or a more general PPP connection has been established. If you are using
3337        Linux, you could put the call to exim in that script.
3338
3339 </P>
3340 <A NAME="SEC127" HREF="FAQ.html#TOC127">Q0512</A>: If a user's mailbox is over quota, is there a way for me to set it up so
3341        that the mail bounces to the sender and is NOT stored in the mail queue?
3342
3343
3344 <P>
3345 A0512: In the retry section of the configuration, put
3346
3347 </P>
3348 <PRE>
3349          *@your.dom.ain        quota</PRE>
3350 <P>
3351        That is, provide no retry timings for over quota errors. They will then
3352        bounce immediately. Alternatively, you can set up retries for a short
3353        time only, or use something like this:
3354
3355 </P>
3356 <PRE>
3357          *@your.dom.ain        quota_7d
3358          *@your.dom.ain        quota       F,2h,15m; F,3d,1h</PRE>
3359 <P>
3360        which bounces immediately if the user's mailbox hasn't been read for 7
3361        days, but otherwise tries for up to 3 days after the first quota
3362        failure.
3363
3364 </P>
3365 <A NAME="SEC128" HREF="FAQ.html#TOC128">Q0513</A>: I'm using tmail to do local deliveries, but when I turned on the
3366        <TT>use_crlf</TT> option on the pipe transport (tmail prefers \r\n terminations)
3367        message bodies started to vanish.
3368
3369
3370 <P>
3371 A0513: You need to unset the prefix option (or change it so that its default
3372        \n terminator becomes \r\n). For example, the transport could be:
3373
3374 </P>
3375 <PRE>
3376          local_delivery_mbx:
3377            driver = pipe
3378            command = "/usr/local/bin/tmail ${local_part}"
3379            user = exim
3380            current_directory = /
3381            use_crlf
3382            prefix =</PRE>
3383 <P>
3384        The reason for this is as follows: tmail uses the line terminator on
3385        the first line it sees to determine whether lines are terminated by
3386        \r\n or \n. If the latter, it moans to stderr and changes subsequent
3387        \n terminators to \r\n. The default setting of the prefix option is
3388        "From ...\n", and this is unaffected by the <TT>use_crlf</TT> option. If you
3389        don't change this, tmail sees the first line terminated by \n and
3390        prepends \r to the \n terminator on all subsequent lines. However, if
3391        <TT>use_crlf</TT> is set, Exim makes all other lines \r\n terminated leading to
3392        doubled \r\r\n lines and corrupt mbx mailboxes.
3393
3394 </P>
3395 <A NAME="SEC129" HREF="FAQ.html#TOC129">Q0514</A>: What does the message "Unable to get root to set uid and gid
3396        for local delivery to <I>xxx</I>: uid=<I>yyy</I> euid=<I>zzz</I>" mean?
3397
3398
3399 <P>
3400 A0514: Have you remembered to make Exim setuid root? It needs root privilege if
3401        it is to do any local deliveries, because it does them "as the user".
3402
3403 </P>
3404 <A NAME="SEC130" HREF="FAQ.html#TOC130">Q0515</A>: I upgraded to 2.04 and now my Envelope-To: header for my virtual domains
3405        is gone. Any idea how to get it back?
3406
3407
3408 <P>
3409 A0515: Read paragraph 1 of the 1.92 information in <B>README.UPDATING.</B> Add
3410        <TT>envelope_to_add</TT> to your transports for your virtual domains. You may
3411        also want to set <TT>return_path_add</TT> and <TT>delivery_date_add</TT>.
3412
3413 </P>
3414 <A NAME="SEC131" HREF="FAQ.html#TOC131">Q0516</A>: The Exim log records the arrival of a message, and then "Completed",
3415        without logging any deliveries. What's going on?
3416
3417
3418 <P>
3419 A0516: This is unlikely in current versions of Exim, because more logging
3420        has been added. In versions before 2.053, one scenario is that the
3421        message was addressed to some user who has set up an Exim filter
3422        containing the command "seen finish", which discards a message without
3423        doing any deliveries. (In current versions of Exim this is logged as
3424        "discarded".) More information can be obtained by setting
3425
3426 </P>
3427 <PRE>
3428          log_received_recipients</PRE>
3429 <P>
3430        so that next time you can see to whom it is addressed. Another
3431        possibility, prior to version 2.053, was that the message was injected
3432        using the <B>-t</B> option, but all the addresses in the message were also on
3433        the command line. See 
3434         <A HREF="FAQ.html#SEC248">A5020</A> for more detail. Current versions of Exim
3435        generate a bounce message in this case.
3436
3437 </P>
3438 <A NAME="SEC132" HREF="FAQ.html#TOC132">Q0517</A>: When I activate "return receipt" for example in Netscape Mailbox
3439        sending options, then I get an error message from Exim... something
3440        like "not supported". Can I activate delivery confirmations?
3441
3442
3443 <P>
3444 A0517: Exim does not support any kind of delivery notification.
3445
3446 </P>
3447 <P>
3448        (A) You can configure it to recognize headers such as
3449        "Return-receipt-to:" if you wish.
3450
3451 </P>
3452 <P>
3453        (B) Some people want MSN (message status notification). Such services
3454        are implemented in MUAs, and don't impact on the MTA at all.
3455
3456 </P>
3457 <P>
3458        (C) I investigated the RFCs which describe the DSN (delivery status
3459        notification) system, and there is even a bit of code in there (excluded
3460        by #ifdef) for handling some of the data. However, I was unable to
3461        specify any sensible way of actually doing anything with the data. There
3462        were comments on the mailing list at the time; many people, including
3463        me, conclude that DSN is in practice unworkable. The killer problem is
3464        with forwarding and aliasing. Do you propagate the DSN data with the
3465        generated addresses? Do you send back a "reached end of the DSN world"
3466        or "expanded" message? Do you do this differently for different kinds of
3467        aliasing/forwarding? For a user who has a <B>.forward</B> file with a single
3468        address in, this might seem easy - just propagate the data. But what if
3469        there are several forwardings? If you propagate the DSN data, the sender
3470        may get back several DSN messages - and should the sender really know
3471        about the detail of the receiver's forwarding arrangements? There isn't
3472        really any way to distinguish between a <B>.forward</B> file that is forwarding
3473        and one that is a mini mailing list. And so on, and so on. There are so
3474        many questions that don't have obvious answers.
3475
3476 </P>
3477 <A NAME="SEC133" HREF="FAQ.html#TOC133">Q0518</A>: When I dial up to collect mail from my ISP, only the first 10 messages
3478        get delivered immediately; the remainder just sit on the queue until a
3479        queue runner process finds them.
3480
3481
3482 <P>
3483 A0518: Your ISP is delivering all the messages in a single SMTP session. Exim
3484        limits the number of immediate delivery processes it will create as a
3485        result of a single SMTP connection, in order to avoid creating a zillion
3486        processes on systems that can have many incoming connections. In your
3487        situation, you should probably set <TT>smtp_accept_queue_per_connection</TT> to
3488        some number larger than 10.
3489
3490 </P>
3491 <A NAME="SEC134" HREF="FAQ.html#TOC134">Q0519</A>: My ISP's mail server is rejecting bounce messages from Exim, complaining
3492        that they have no sender. The SMTP trace does indeed show that the
3493        sender address is "&#60;&#62;". Why is the Sender on the bounce message empty?
3494
3495
3496 <P>
3497 A0519: Because the RFCs say it must be. Your ISP is at fault. Send them this
3498        extract from RFC 1123 section 5.3.3 ("Reliable Mail Receipt"):
3499
3500 </P>
3501 <P>
3502          If there is a delivery failure after acceptance of a message,
3503          the receiver-SMTP MUST formulate and mail a notification
3504          message.  This notification MUST be sent using a null ("&#60;&#62;")
3505          reverse path in the envelope; see Section 3.6 of RFC-821.  The
3506          recipient of this notification SHOULD be the address from the
3507          envelope return path (or the Return-Path: line).  However, if
3508          this address is null ("&#60;&#62;"),  the receiver-SMTP MUST NOT send a
3509          notification.  If the address is an explicit source route, it
3510          SHOULD be stripped down to its final hop.
3511
3512 </P>
3513 <A NAME="SEC135" HREF="FAQ.html#TOC135">Q0520</A>: What does the message "retry time not reached [for any host]" on the log
3514        mean? Why won't Exim try to deliver the message?
3515
3516
3517 <P>
3518 A0520: That is not an error. It means exactly what it says. A previous attempt
3519        to deliver to that address failed with a temporary error, and Exim
3520        computed the earliest time at which to try again. This can apply to
3521        local as well as to remote deliveries. For remote deliveries, each host
3522        (if there are several) has its own retry time.
3523
3524 </P>
3525 <P>
3526        Some MTAs have a retrying schedule for each message. Exim does not work
3527        like this. Retry timing is normally host-based for remote domains and
3528        address-based for local domains. (There are some exceptions for certain
3529        kinds of remote failure - see "Errors in outgoing SMTP" in the manual.)
3530
3531 </P>
3532 <P>
3533        If a new message arrives for a failing address and the retry time has
3534        not yet arrived, Exim will log "retry time not reached" and leave the
3535        message on the queue, without attempting delivery. Similarly, if a queue
3536        runner notices the message before the time to retry has arrived, it
3537        writes the same log entry. When the retry time has past, Exim attempts
3538        delivery at the next queue run. If you want to know when that will be,
3539        run the exinext utility on the address, for example:
3540
3541 </P>
3542 <PRE>
3543          exinext user@some.domain</PRE>
3544 <P>
3545        You can suppress these messages on the log by setting <TT>log_level</TT> to a
3546        value that is less than 5. You can force a delivery attempt on a
3547        specific message (overriding the retry time) by means of the <B>-M</B> option:
3548
3549 </P>
3550 <PRE>
3551          exim -M 10hCET-0000Bf-00</PRE>
3552 <P>
3553        If you want to do this for the entire queue, use the <B>-qf</B> option. See
3554        also 
3555         <A HREF="FAQ.html#SEC148">Q0533</A>.
3556
3557 </P>
3558 <A NAME="SEC136" HREF="FAQ.html#TOC136">Q0521</A>: RFC 1985 specifies that the SMTP command "ETRN <B>host.domain"</B> causes all
3559        mail queued for that host, no matter what domain it's for, to be
3560        dequeued. Why doesn't Exim support this?
3561
3562
3563 <P>
3564 A0521: Exim does not keep queues of mail for specific destinations. It just
3565        keeps one pool of undelivered messages. What is more, once you start a
3566        delivery of a message, it tries to deliver to <EM>all</EM> the addresses in the
3567        message, not just the one you may be interested in. (Of course, this
3568        doesn't usually do any harm.)
3569
3570 </P>
3571 <P>
3572        The only way it could be done within Exim would be, for <EM>every</EM> message
3573        on the queue, to go through the motions of routing each undelivered
3574        address and see if that resulted in a delivery to the host of interest.
3575        This could be extremely expensive (e.g. 1,000 messages on the queue,
3576        only 1 for the given host).
3577
3578 </P>
3579 <P>
3580        The bottom line is that Exim just wasn't designed for this kind of
3581        operation, that is, holding messages for intermittently connected hosts.
3582        The queueing arrangements are designed for handling delivery problems
3583        that are not expected to be common.
3584
3585 </P>
3586 <P>
3587        A better way to do this is to implement the required queues separately.
3588        After all, keeping such mail on an "active" queue (where Exim will keep
3589        trying to deliver) is silly. If there is a lot of mail for these hosts,
3590        it also masks genuine delivery problems when you inspect the queue.
3591
3592 </P>
3593 <P>
3594        Large ISPs who provide this kind of functionality do not usually leave
3595        waiting mail on the MTA's queue. Instead, they get it delivered into
3596        per-host directories, one message per file, in one of the special
3597        formats (BSMTP, maildir, or mailstore) and when an ETRN arrives, it
3598        kicks off some completely different program that establishes an SMTP
3599        connection to the host and shovels the waiting mail down it. That seems
3600        to me to be a much neater way of doing this. It means you can easily add
3601        additional functionality such as archiving or throwing away uncollected
3602        mail. One program that has this functionality is "ssmtp", which can be
3603        found in <B><A HREF="ftp://metalab.unc.edu/pub/Linux/system/mail/mta/.">ftp://metalab.unc.edu/pub/Linux/system/mail/mta/.</A></B>
3604
3605 </P>
3606 <A NAME="SEC137" HREF="FAQ.html#TOC137">Q0522</A>: If email has been deferred to a member on a local mailing list
3607        (implemented through forward files), and one of our ETRN clients is on
3608        this mailing list, the <B>-R</B> won't "flush" the mailing list message for
3609        that client.
3610
3611
3612 <P>
3613 A0522: That is because <B>-R</B> matches only original recipient addresses, not those
3614        produced as a result of expansion, because these are not (by default)
3615        preserved from delivery to delivery. You can get round this by setting
3616        <TT>one_time</TT> on the <B>forwardfile</B> director, but you are not allowed to have
3617        expansions to pipes or files on directors that have <TT>one_time</TT> set.
3618        Therefore, you will have to have a separate director for mailing lists
3619        (with <TT>one_time</TT> set) to the one used for normal forward files that might
3620        specify pipe or file deliveries. However, the problem will then still be
3621        present for any user who sets up a <B>.forward</B> file to redirect to any of
3622        the ETRN domains. See the last 3 paragraphs of 
3623         <A HREF="FAQ.html#SEC136">A0521</A> for a discussion of
3624        an alternative approach.
3625
3626 </P>
3627 <A NAME="SEC138" HREF="FAQ.html#TOC138">Q0523</A>: Exim seems to be sending the same message twice, according to the log,
3628        although there is a difference in capitalization of the local part of
3629        the address.
3630
3631
3632 <P>
3633 A0523: That is correct. The RFCs are explicit in stating that capitalization
3634        matters for local parts. For remote domains, Exim is not entitled to
3635        assume case independence of local parts. I know, it is utterly silly,
3636        and it causes a lot of grief, but that's what the rules say. Here is a
3637        quote from the draft of the forthcoming revision to RFC 821:
3638
3639 </P>
3640 <P>
3641          ... a command verb, an argument value other than a mailbox
3642          local-part, and free form text MAY be encoded in upper case,
3643          lower case, or any mixture of upper and lower case with no impact
3644          on its meaning.  This is NOT true of a mailbox local-part. The
3645          local-part of a mailbox MUST BE treated as case sensitive.
3646          Therefore, SMTP implementations MUST take care to preserve the
3647          case of mailbox local-parts.  Mailbox domains are not case
3648          sensitive.  However, exploiting the case sensitivity of mailbox
3649          local-parts impedes interoperability and is discouraged.
3650
3651 </P>
3652 <A NAME="SEC139" HREF="FAQ.html#TOC139">Q0524</A>: How can I force the next retry time for a host to be now?
3653
3654
3655 <P>
3656 A0524: (A) You can force a particular message to be delivered with the <B>-M</B>
3657        command line option. If it succeeds, the retry data will get cleared. If
3658        the host is past the cutoff time, so that messages are bouncing
3659        immediately without trying a delivery, you can use <B>-odq</B> to put a message
3660        on the queue without a delivery attempt, and then use <B>-M</B> on it.
3661
3662 </P>
3663 <P>
3664        (B) You can change the retry time with the <TT>exim_fixdb</TT> utility, but its
3665        interface is very clumsy.
3666
3667 </P>
3668 <A NAME="SEC140" HREF="FAQ.html#TOC140">Q0525</A>: I set up "|/bin/grep Subject|/usr/bin/smbclient <B>-M</B> &#60;netbiosname&#62;" as an
3669        alias but it doesn't work.
3670
3671
3672 <P>
3673 A0525: That is a shell command line. Exim does not run pipe commands under a
3674        shell by default (for added security - and it saves a process). You
3675        need something like
3676
3677 </P>
3678 <PRE>
3679          "|/bin/sh -c '/bin/grep Subject|/usr/bin/smbclient -M &#60;netbiosname&#62;'"</PRE>
3680 <A NAME="SEC141" HREF="FAQ.html#TOC141">Q0526</A>: Why does the pipe transport add a line starting with "&#62;From" to
3681        messages?
3682
3683
3684 <P>
3685 A0526: Actually, it adds a line starting with "From", because that is the
3686        default of the "prefix" option (/usr/ucb/vacation needs it, and that is
3687        the most common use of piping). If you don't want it, change the setting
3688        of "prefix".
3689
3690 </P>
3691 <A NAME="SEC142" HREF="FAQ.html#TOC142">Q0527</A>: I have set <TT>fallback_hosts</TT> on my smtp transport, but after the error
3692        <B>"sem@chat.ru</B> cannot be resolved at this time" Exim isn't using them.
3693
3694
3695 <P>
3696 A0527: <TT>fallback_hosts</TT> only works if an attempt at delivery to the original
3697        host(s) fails. In this case, Exim couldn't even resolve the domain
3698        <B>chat.ru</B> to discover what the original hosts were, so it never got as far
3699        as the transport. However, see 
3700         <A HREF="FAQ.html#SEC73">Q0322</A> for a possible solution.
3701
3702 </P>
3703 <A NAME="SEC143" HREF="FAQ.html#TOC143">Q0528</A>: After the holidays my ISP has always hundreds of e-mails waiting for me.
3704        These are forced down Exim's throat in one go. Exim spawns a lot of
3705        kids, but is there some limit to the number of processes it creates?
3706
3707
3708 <P>
3709 A0528: Unless you have changed <TT>smtp_accept_queue_per_connection</TT> (introduced at
3710        release 2.03) it should only spawn that many processes per connection
3711        (default 10). Your ISP may be making many connections, of course. That
3712        is limited by <TT>smtp_accept_max</TT>.
3713
3714 </P>
3715 <A NAME="SEC144" HREF="FAQ.html#TOC144">Q0529</A>: When a message in the queue got to 12h old, Exim wrote 'retry timeout
3716        exceeded' and removed <EM>all</EM> messages in the queue to this host - even
3717        recent messages. How I can avoid this behaviour? I only want to remove
3718        messages that have exceeded the maximum retry time.
3719
3720
3721 <P>
3722 A0529: Exim's retrying is host-based rather than message-based. The philosophy
3723        is that if a host has been down for a very long time, there is no point
3724        in keeping messages hanging around. However, you might like to check
3725        out <TT>delay_after_cutoff</TT> in the smtp transport. It doesn't do what you
3726        want, but it might help.
3727
3728 </P>
3729 <A NAME="SEC145" HREF="FAQ.html#TOC145">Q0530</A>: Can Exim add a Content-Length: header to messages it delivers?
3730
3731
3732 <P>
3733 A0530: You could include something like
3734
3735 </P>
3736 <PRE>
3737          headers_remove = "content-length"
3738          headers_add = "Content-Length: $message_body_size"</PRE>
3739 <P>
3740        to the appendfile transport. However, the use of Content-Length: can
3741        cause several problems, and is not recommended unless you really know
3742        what you are doing. There is a discussion of the problems in
3743
3744 </P>
3745 <P>
3746          <B><A HREF="http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/content-length.html">http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/content-length.html</A></B>
3747
3748 </P>
3749 <A NAME="SEC146" HREF="FAQ.html#TOC146">Q0531</A>: Exim seems to be trying to deliver a message every 10 minutes, though
3750        the retry rules specify longer times after a while, because it is
3751        writing a log entry every time, like this:
3752
3753
3754 <PRE>
3755        1999-08-26 14:51:19 11IVsE-000MuP-00 == example@example.com T=smtp defer
3756        (-34): some host address lookups failed and retry time not reached for
3757        other hosts or connection limit reached</PRE>
3758 <P>
3759 A0531: It is <EM>looking</EM> at the message every 10 minutes, but it isn't actually
3760        trying to deliver. It's looking up <B>example.com</B> in the DNS and finding
3761        this information:
3762
3763 </P>
3764 <PRE>
3765          example.com.                MX 10 example-com.isp.example.com.
3766          example.com.                MX  0 mail.example.com.
3767          mail.example.com.           A  202.77.183.45
3768          A lookup for example-com.isp.example.com. yielded NXDOMAIN</PRE>
3769 <P>
3770        The last line means that there is no address (A) record in the DNS for
3771        <B>example-com.isp.example.com.</B> That accounts for "some host address
3772        lookups failed", but the retry time for <B>mail.example.com</B> hasn't been
3773        reached, which accounts for "retry time not reached for other hosts".
3774
3775 </P>
3776 <A NAME="SEC147" HREF="FAQ.html#TOC147">Q0532</A>: I am trying to set exim up to have a automatic failover if it sees that
3777        the system that it is sending all mail to is down.
3778
3779
3780 <P>
3781 A0532: Add to the <TT>remote_smtp</TT> transport the following:
3782
3783 </P>
3784 <PRE>
3785          fallback_hosts = failover.server.name(s)</PRE>
3786 <P>
3787        If there are several names, they must be separated by colons.
3788
3789 </P>
3790 <A NAME="SEC148" HREF="FAQ.html#TOC148">Q0533</A>: I can't get Exim to deliver over NFS. I get the error "fcntl() failed:
3791        No locks available", though the lock daemon is running on the NFS server
3792        and other hosts are able to access it.
3793
3794
3795 <P>
3796 A0533: Check that you have lockd running on the NFS <EM>client</EM>. This is not
3797        always running by default on some systems (Red Hat is believed to be one
3798        such system).
3799
3800 </P>
3801 <A NAME="SEC149" HREF="FAQ.html#TOC149">Q0534</A>: Why does Exim bounce messages without even attempting delivery, giving
3802        the error "retry time not reached for any host after a long failure
3803        period"?
3804
3805
3806 <P>
3807 A0534: This message means that all hosts to which the message could be sent
3808        have been failing for so long that the end of the retry period
3809        (typically 4 or 5 days) has been reached. In this situation, Exim still
3810        computes a next time to retry, but any messages that arrive in the
3811        meantime are bounced straight away. You can alter this behaviour by
3812        unsetting the <TT>delay_after_cutoff</TT> option on the smtp transport. Then Exim
3813        will try most messages for those hosts once before giving up.
3814
3815 </P>
3816 <A NAME="SEC150" HREF="FAQ.html#TOC150">Q0535</A>: My <B>.forward</B> file is "|/usr/bin/procmail <B>-f-"</B> and mail gets delivered,
3817        but there was a bounce to the sender, sending him the output of procmail.
3818        How can I prevent this?
3819
3820
3821 <P>
3822 A0535: Exim's default configuration is set up like this:
3823
3824 </P>
3825 <PRE>
3826          address_pipe:
3827            driver = pipe
3828            return_output</PRE>
3829 <P>
3830        The <TT>return_output</TT> option requests that <EM>any</EM> output that the pipe
3831        produces be returned to the sender. That is the safest default. If you
3832        don't want this, you can either remove the option altogether, or change
3833        it to <TT>return_fail_output</TT>, to return output only if the command fails.
3834        Note that this will affect all pipes that users run, not just your
3835        procmail one. It might be better to arrange for procmail not to produce
3836        any output when it succeeds.
3837
3838 </P>
3839 <BR><H2><A NAME="SEC151" HREF="FAQ.html#TOC151">6. UUCP
3840
3841 </A></H2>
3842 <A NAME="SEC152" HREF="FAQ.html#TOC152">Q0601</A>: The MX records for some UUCP domains point to my local host. How do I
3843        get it to pass the messages on to UUCP?
3844
3845
3846 <P>
3847 A0601: There are several possibilities. One straightforward way is to set up
3848        a <B>domainlist</B> router which matches the UUCP domains and routes to a
3849        suitable transport. Sample configuration C003 is such a configuration,
3850        while C004 shows another way to do it, by defining the domains as local
3851        and using a <B>smartuser</B> director.
3852
3853 </P>
3854 <P>
3855        If <EM>all</EM> the domains whose MX records point to the local host are either
3856        local domains or UUCP domains, you can do without the <B>domainlist</B> router
3857        altogether, by making use of the "self" option. This means that only the
3858        DNS has to be updated when a UUCP domain is added or removed.
3859
3860 </P>
3861 <P>
3862        For example, this router routes to remote hosts over SMTP using a DNS
3863        lookup with default options, and fails for unknown domains (because of
3864        the <TT>no_more</TT> setting), but if the MX for a domain points at the local
3865        host, Exim continues on to the next router (self = <TT>fail_soft</TT> overrides
3866        <TT>no_more)</TT>.
3867
3868 </P>
3869 <PRE>
3870          lookuphost:
3871            driver = lookuphost
3872            transport = smtp
3873            no_more
3874            self = fail_soft</PRE>
3875 <P>
3876        The next router can just send everything to a suitable UUCP transport:
3877
3878 </P>
3879 <PRE>
3880          uucp:
3881            driver = domainlist
3882            transport = uux_transport
3883            route_list = "* $domain"</PRE>
3884 <P>
3885        This assumes that the transport can determine the UUCP host name from
3886        the domain name.
3887
3888 </P>
3889 <A NAME="SEC153" HREF="FAQ.html#TOC153">Q0602</A>: How can I get Exim to handle "bang path" addresses?
3890
3891
3892 <P>
3893 A0602: In general, you can't (Exim is an Internet mailer and recognizes only
3894        RFC 822 addresses) but some restricted kinds of bang path can be dealt
3895        with by appropriate rewriting - but please note the warning below.
3896
3897 </P>
3898 <P>
3899        Exim treats a bang path address as an unqualified local part, and so
3900        will qualify it with your domain. A rule such as
3901
3902 </P>
3903 <PRE>
3904          ^([^!]+)!(.+)@your\.domain$   $2@$1</PRE>
3905 <P>
3906        turns <B><B>a!b@your.domain</B></B> into <B><B>b@a.</B></B> You can also use a repeating rule to
3907        turn multi-component paths into the "percent hack" notation with a rule
3908        such as
3909
3910 </P>
3911 <PRE>
3912          ^([^!]+)!([^@%]+)(.+)$   $2%$1$3   R</PRE>
3913 <P>
3914        which turns <B>a!b@c</B> into <B>b%a@c</B> and <B>a!b!c@d</B> first into <B>b!c%a@d</B> and then,
3915        because of the R flag, into <B><B>c%b%a@d.</B></B> The R flag causes repetition up to
3916        10 times.
3917
3918 </P>
3919 <P>
3920        See also sample configuration C002, which contains some more
3921        sophisticated rewriting rules.
3922
3923 </P>
3924 <P>
3925        WARNING: If you install a general rewriting rule like the above, you are
3926        opening yourself up to the possibility of unwanted relaying. A host that
3927        is not permitted to relay through your system could send a message with
3928        an SMTP command line such as
3929
3930 </P>
3931 <PRE>
3932          RCPT TO:&#60;victim-host!victim-user@your.domain&#62;</PRE>
3933 <P>
3934        and this would be accepted because it is addressed to your domain.
3935        However, the rewriting then converts the address, and the message does
3936        in fact get relayed. One way round this, if all your bang path messages
3937        are passed to Exim via SMTP, is to use the "S" rewriting flag. This
3938        applies a rewriting rule to incoming SMTP addresses as soon as they are
3939        received, before checking for qualification, relaying, etc. So a rule
3940        such as
3941
3942 </P>
3943 <PRE>
3944          ^([^!]+)!(.+)$  $2@$1  S</PRE>
3945 <P>
3946        rewrites simple two-component bang paths before the result is checked
3947        for relaying. However, this does not rewrite addresses in the headers of
3948        the message.
3949
3950 </P>
3951 <A NAME="SEC154" HREF="FAQ.html#TOC154">Q0603</A>: We see something strange on our system in regards to mail comming in via
3952        rmail from a UUCP link. The sender is being set to mailmaster instead of
3953        the real sender, and a Sender: header is being added to the message.
3954
3955
3956 <P>
3957 A0603: If mailmaster is the user that is running rmail, you need to include
3958        that user in the <TT>trusted_users</TT> configuration option. Only trusted users
3959        are permitted to specify senders when mail is passed to Exim via the
3960        command line.
3961
3962 </P>
3963 <BR><H2><A NAME="SEC155" HREF="FAQ.html#TOC155">7. PERFORMANCE
3964
3965 </A></H2>
3966 <A NAME="SEC156" HREF="FAQ.html#TOC156">Q0701</A>: I'm running a large mail server. Should I set <TT>split_spool_directory</TT> to
3967        improve performance?
3968
3969
3970 <P>
3971 A0701: There doesn't seem to be any significant performance hit using a flat
3972        queue on Solaris systems, so there is no need to do this for them. On
3973        the other hand, there is a known performance problem on Linux filing
3974        systems, where <TT>split_spool_directory</TT> can make a significant difference.
3975        ???? Other operating systems ????
3976
3977 </P>
3978 <A NAME="SEC157" HREF="FAQ.html#TOC157">Q0702</A>: How well does Exim scale?
3979
3980
3981 <P>
3982 A0702: Although the author did not specifically set out to write a high-
3983        performance MTA, Exim does seem to be fairly efficient. The biggest
3984        server at the University of Cambridge (a large Sun box) goes over
3985        100,000 deliveries per day on busy days (it has over 20,000 users).
3986        There was a report of a mailing list exploder that sometimes handles
3987        over 100,000 deliveries a day on a big Linux box, the record being
3988        177,000 deliveries (791MB in total). Up to 13,000 deliveries an hour
3989        have been reported.
3990
3991 </P>
3992 <P>
3993        These are quotes from some Exim users:
3994
3995 </P>
3996 <P>
3997        "... Canada's largest internet provider, uses Exim on all of our mail
3998        machines, and we're absolutely delighted with it. It brought life back
3999        into one of our machines plagued with backlogs and high load averages.
4000        Here's just an example of how much email our largest mail server
4001        (quad SS1000) is seeing ... "  [230,911 deliveries in a day: 4,475MB]
4002
4003 </P>
4004 <P>
4005        "... Exim has to ... do gethostbyname()s and RBL lookups on all of the
4006        incoming mail servers, and he runs from <B>inetd</B> (TCP Wrappers connected).
4007        All the same, it seems to me that he runs as fast as lightning on our
4008        SCO 5.0.4 box (1 Pentium 166) - far faster than MMDF which I (and many
4009        customers) had before."
4010
4011 </P>
4012 <P>
4013        "On a PII 400 with 128M of RAM running Linux 2.2.5, I have achieved
4014        36656 messages per hour (outgoing unique messages and recipients). For
4015        about a 5 minute period, I was able to achieve an average of 30 messages
4016        per second (that would be 108000 m/hour)! We are using: (options that
4017        make a difference):
4018
4019 </P>
4020 <PRE>
4021          queue_only
4022          split_spool_directory
4023          auto_thaw 60s
4024          max_queue_run 1
4025          remote_max_parallel 1</PRE>
4026 <P>
4027        We have a cron job hat runs every five minutes that spawns 5 exim <B>-q</B> if
4028        there are less that 120 exim processes currently running. We found
4029        that by "manually" controlling the concurrency of exim <B>-q</B> processes
4030        contending for the spool for <TT>remote_smtp</TT> delivery that we gained
4031        considerable performance <B>--</B> 10000 m/hour."
4032
4033 </P>
4034 <A NAME="SEC158" HREF="FAQ.html#TOC158">Q0703</A>: We have a large password file. Can Exim use alternative lookups during
4035        delivery to speed things up?
4036
4037
4038 <P>
4039 A0703: Yes. You don't have to use the password file at all. See sample
4040        configuration C009 for some suggestions. (It shows lsearch lookups, but
4041        these could equally be DBM or cdb or NIS or LDAP lookups.)
4042
4043 </P>
4044 <BR><H2><A NAME="SEC159" HREF="FAQ.html#TOC159">8. POLICY CONTROLS
4045
4046 </A></H2>
4047 <A NAME="SEC160" HREF="FAQ.html#TOC160">Q0801</A>: How do I block unwanted messages from outside my host?
4048
4049
4050 <P>
4051 A0801: There are several different options that can be used to block incoming
4052        SMTP messages according to different criteria. The following are the
4053        most commonly used:
4054
4055 </P>
4056 <P>
4057        (A) Set <TT>sender_verify</TT>; this causes rejection of any message whose
4058            envelope sender cannot be successfully routed. This is mainly a
4059            check on the existence of remote domains, though it the domain is a
4060            local one, the local part also gets checked. Unfortunately, error
4061            mesages do not have envelope sender addresses, so cannot be checked
4062            in this way. See the <TT>headers_sender_verify</TT> options for ways of
4063            checking header addresses.
4064
4065 </P>
4066 <P>
4067        (B) If you want to block all mail from specific hosts or IP networks,
4068            set <TT>host_reject_recipients</TT>. The <TT>_recipients</TT> form of the option is
4069            more likely to prevent the remote hosts from keeping on trying. For
4070            example:
4071
4072 </P>
4073 <PRE>
4074              host_reject_recipients = 209.12.111.0/24</PRE>
4075 <P>
4076            If you have many such blocks, they can be put in a file which is
4077            named in the option. If you have a mixture of IP addresses and names
4078            in your list, it is best to put the addresses first, because they
4079            can be checked without the need for a DNS lookup.
4080
4081 </P>
4082 <P>
4083        (C) If you want to block mail from specific envelope sender addresses,
4084            one convenient way is to organize a file of local parts indexed by
4085            domain names, for example
4086
4087 </P>
4088 <PRE>
4089              x.y.z     creditrepair:^betterlovelife[0-9]+$:...
4090              p.q.r     *</PRE>
4091 <P>
4092            This would block <B><B>creditrepair@x.y.z</B>,</B> any local part starting with
4093            <B>betterlovelife</B> and ending with digits in the <B>x.y.z</B> domain, and
4094            all addresses in the <B>p.q.r</B> domain. You refer to the file in the Exim
4095            configuration as follows:
4096
4097 </P>
4098 <PRE>
4099              sender_reject_recipients = @@lsearch*;/name/of/the/file</PRE>
4100 <P>
4101            If the file is big, you can convert it into a DBM or cdb file and
4102            use a faster lookup method. The asterisk on the end of the search
4103            type causes a lookup for "*" if the domain is not found; that is, it
4104            permits a default list of local parts that are blocked at any
4105            domain that is not specifically listed. If you use this, you
4106            probably also want to end each local part list with "&#62;*" (except
4107            those that consist of "*"). This causes Exim to check the default
4108            list of local parts if none of the specific ones for a domain are
4109            matched. So, the file above could become
4110
4111 </P>
4112 <PRE>
4113              *         yourfriend:a.friend:...
4114              x.y.z     creditrepair:^betterlovelife[0-9]+$:&#62;*
4115              p.q.r     *</PRE>
4116 <P>
4117            If you are using an lsearch file, putting the * entry first saves a
4118            bit of processing.
4119
4120 </P>
4121 <P>
4122        (D) If you want to allow mail to postmaster through the blocks, you can
4123            set
4124
4125 </P>
4126 <PRE>
4127              recipients_reject_except = postmaster@your.domain</PRE>
4128 <P>
4129            This overrides any of the policy controls that cause rejection by
4130            recipient.
4131
4132 </P>
4133 <A NAME="SEC161" HREF="FAQ.html#TOC161">Q0802</A>: I don't want to block spam entirely; how can I inspect each message
4134        before deciding whether to deliver it or not?
4135
4136
4137 <P>
4138 A0802: This can be done by using a system filter. See the sample configuration
4139        F003.
4140
4141 </P>
4142 <A NAME="SEC162" HREF="FAQ.html#TOC162">Q0803</A>: How can I test that my spam blocks are working?
4143
4144
4145 <P>
4146 A0803: The <B>-bh</B> option allows you to run a testing SMTP session as if from a
4147        given IP address. For example,
4148
4149 </P>
4150 <PRE>
4151          exim -bh 192.203.178.39</PRE>
4152 <P>
4153        In addition to the normal SMTP replies, it outputs commentary about
4154        which tests have succeeded or failed.
4155
4156 </P>
4157 <A NAME="SEC163" HREF="FAQ.html#TOC163">Q0804</A>: How can I test that Exim is correctly configured to use the Realtime
4158        Blocking List (RBL)?
4159
4160
4161 <P>
4162 A0804: The <B>-bh</B> option allows you to run a testing SMTP session as if from a
4163        given address. You need to know a blocked IP address with which to test.
4164        Such a testing address is kindly provided by Russell Nelson:
4165
4166 </P>
4167 <PRE>
4168          linux.crynwr.com [192.203.178.39]</PRE>
4169 <P>
4170        You can also send mail to <B><B>nelson@linux.crynwr.com</B></B> from the server
4171        whose RBL block you are testing. The robot that receives that email
4172        will attempt to send a piece of test email in reply. If your RBL block
4173        didn't work, you get a message to that effect. Regardless of whether the
4174        RBL block succeeds or not it emails you the results of the SMTP
4175        conversation from a host that is not on the RBL, so you can see how your
4176        server looks from the view of someone on the RBL.
4177
4178 </P>
4179 <A NAME="SEC164" HREF="FAQ.html#TOC164">Q0805</A>: How can I use <B>tcpwrappers</B> in conjunction with Exim?
4180
4181
4182 <P>
4183 A0805: Exim's own control facilities can do all that <B>tcpwrappers</B> can do.
4184        However, if you are already using <B>tcpwrappers</B> for other things it might
4185        be convenient to include Exim controls in the same place.
4186
4187 </P>
4188 <P>
4189        First of all, ensure that Exim is built to call the <B>tcpwrappers</B> library,
4190        by including <TT>USE_TCPWRAPPERS=yes</TT> in <B>Local/Makefile</B>. You also need to
4191        ensure that the header file <B>tcpd.h</B> is available at compile time, and the
4192        <B>libwrap.a</B> library is available at link time, typically by including it in
4193        <TT>EXTRALIBS</TT>. You may need to copy these two files from the <B>tcpwrappers</B>
4194        build directory to, for example, <B>/usr/local/include</B> and <B>/usr/local/lib</B>,
4195        respectively. Then you could reference them by
4196
4197 </P>
4198 <PRE>
4199          CFLAGS=-I/usr/local/include
4200          EXTRALIBS=-L/usr/local/lib -lwrap</PRE>
4201 <P>
4202        in <B>Local/Makefile</B>. There are two ways to make use of the functionality,
4203        depending on how you have <B>tcpwrappers</B> set up. If you have it set up to
4204        use only one file, you ought to have something like:
4205
4206 </P>
4207 <PRE>
4208          /etc/hosts.allow:</PRE>
4209 <PRE>
4210              exim : &#60;client_list&#62;  : &#60;allow_or_deny&#62;</PRE>
4211 <P>
4212          For example:
4213
4214 </P>
4215 <PRE>
4216              exim : LOCAL  192.168.0.  .friendly.domain  special.host : ALLOW
4217              exim : ALL                                               : DENY</PRE>
4218 <P>
4219        This allows connections from local hosts (chiefly `localhost'), from
4220        the subnet 192.168.0.0/24, from all hosts in <B>*.friendly.domain,</B> and
4221        from a specific host called <B>special.host.</B> All other connections are
4222        denied. If you have <B>tcpwrappers</B> set up to use two files, use the
4223        following:
4224
4225 </P>
4226 <PRE>
4227          /etc/hosts.allow:</PRE>
4228 <PRE>
4229              exim    : &#60;client_list&#62;</PRE>
4230 <PRE>
4231          /etc/hosts.deny:</PRE>
4232 <PRE>
4233              exim    : &#60;client_list&#62;</PRE>
4234 <P>
4235        Read the <TT>hosts_access(5)</TT> man page for more ways of specifying clients,
4236        including ports, <B>etc.,</B> and on logging connections.
4237
4238 </P>
4239 <A NAME="SEC165" HREF="FAQ.html#TOC165">Q0806</A>: How can I get POP-auth-before-relay support in Exim?
4240
4241
4242 <P>
4243 A0806: See <B><A HREF="http://cc.ysu.edu/~doug/exim-pop.tar.Z">http://cc.ysu.edu/~doug/exim-pop.tar.Z</A></B> which has some scripts for
4244        this, courtesy of Doug S <B><B>&#60;doug@cc.ysu.edu</B>&#62;.</B>
4245
4246 </P>
4247 <A NAME="SEC166" HREF="FAQ.html#TOC166">Q0807</A>: I have one or two cases where my machine correctly rejects messages, but
4248        the remote machine is quite persistent, and keeps trying over and over.
4249
4250
4251 <P>
4252 A0807: It is an unfortunate fact that a number of SMTP clients, in violation of
4253        the SMTP RFC, do not treat a permanent error code that is given after
4254        the  MAIL FROM command or the DATA portion of the transaction as a
4255        permanent error. Consequently they keep resending the message. Failing
4256        checks on a message's headers (the <TT>headers_</TT>... options) necessarily
4257        result in an error code after the data has been received.
4258
4259 </P>
4260 <A NAME="SEC167" HREF="FAQ.html#TOC167">Q0808</A>: I am seeing the error "no valid sender in message headers: return path
4261        is &#60;&#62;" in the reject log. Isn't &#60;&#62; a valid return path for error
4262        messages?
4263
4264
4265 <P>
4266 A0808: It is indeed valid. The complaint here is about the contents of the
4267        message's headers, not the return path. This message has been reworded
4268        in later versions of Exim. You must have set the <TT>headers_sender_verify</TT>
4269        option. Check the From:, Reply-to: and Sender: headers that were logged
4270        with the error. You can use Exim's <B>-bv</B> option to find out why
4271        verification of those addresses failed.
4272
4273 </P>
4274 <A NAME="SEC168" HREF="FAQ.html#TOC168">Q0809</A>: Let's say that we want to run a mail server that does not care if you
4275        have proper reverse DNS. If you include <TT>host_reject</TT> lines in your
4276        config file, Exim will always reject connections from such hosts. How
4277        can this be avoided?
4278
4279
4280 <P>
4281 A0809: This is true only if you have wild-carded host names in  <TT>host_reject</TT>.
4282        For complete host names, Exim uses a DNS forward lookup to obtain an IP
4283        address to compare. If you are using wild cards of any sort, put
4284        <TT>+allow_unknown</TT> as an item in your host list, for example:
4285
4286 </P>
4287 <PRE>
4288          host_reject = +allow_unknown : *.def.zz : *.stu.yy</PRE>
4289 <P>
4290        This will allow any host without reverse DNS to bypass the checks. Note
4291        that it means that the owner of <B>abc.def.zz</B> (for example) can trivially
4292        get round your block simply by deleting the PTR record for <B>abc.def.zz.</B>
4293        If you use +warn_unknown instead of <TT>+allow_unknown</TT>, the action is the
4294        same, but every time the exception is invoked, it is logged.
4295
4296 </P>
4297 <A NAME="SEC169" HREF="FAQ.html#TOC169">Q0810</A>: Is there a way to prevent lookups in the RBL for local hosts?
4298
4299
4300 <P>
4301 A0810: Check out the <TT>rbl_hosts</TT> option.
4302
4303 </P>
4304 <A NAME="SEC170" HREF="FAQ.html#TOC170">Q0811</A>: How can I set up the <TT>sender_reject</TT> option in my config file so I can
4305        reject mail by matching regular expressions?
4306
4307
4308 <P>
4309 A0811: You must either put the regular expressions directly in the option
4310        setting, or in a file that is referenced by a plain file name, or use
4311        an @@ type of search. If the regular expressions match the domain as
4312        well as the local part, then the first two approaches are the only
4313        possible ones. For example:
4314
4315 </P>
4316 <PRE>
4317          sender_reject_recipients = ^.*\.spam\.com$ : ^.*@[0-9]+\.com$</PRE>
4318 <P>
4319        or
4320
4321 </P>
4322 <PRE>
4323          sender_reject_recipients = /some/file</PRE>
4324 <P>
4325        Each line of the file is treated as if it were an entry in the list, and
4326        must begin with ^ if it is a regular expression. No keys are involved
4327        because this is not a lookup,
4328
4329 </P>
4330 <P>
4331        If you are using version 2.10 or later, the first of those regular
4332        expressions can be rewritten to execute much more efficiently by
4333        using lookbehinds and once-only subpatterns:
4334
4335 </P>
4336 <PRE>
4337          sender_reject_recipients = ^(?&#62;.*$)(?&#60;=\.spam\.com)</PRE>
4338 <P>
4339        See the manual section entitled "Address lists" for a description of the
4340        @@ type of split domain/local part lookup. See also 
4341         <A HREF="FAQ.html#SEC160">Q0801</A>.
4342
4343 </P>
4344 <A NAME="SEC171" HREF="FAQ.html#TOC171">Q0812</A>: Normally <TT>sender_reject_recipients</TT> works fine, but addresses that have
4345        some uppercase letters in them seem to come through.
4346
4347
4348 <P>
4349 A0812: This should no longer be the case from release 3.00 onwards. Although
4350        host and domain names are case-insensitive, the RFCs about mail specify
4351        that local parts are case sensitive. When earlier versions of Exim
4352        looked up a sender address in <TT>sender_reject_recipients</TT>, they did so
4353        using the caseful form, in order to be compliant with the mail RFCs.
4354        (In principle, <B>user@domain</B> and <B>USER@domain</B> might be different
4355        people. Silly, I know, but that's the rule. It has caused a lot of
4356        grief.) However, RFC 2305 (Anti-Spam Recommendations for SMTP MTAs)
4357        recommends that address checking in blocking lists should be done
4358        caselessly, so Exim now does this by default.
4359
4360 </P>
4361 <A NAME="SEC172" HREF="FAQ.html#TOC172">Q0813</A>: I want to accept some sender addresses, even though they do not verify.
4362        There doesn't seem to be an option for verification exceptions, so how
4363        can I do this?
4364
4365
4366 <P>
4367 A0813: Set up a special director or router to ensure that those addresses do
4368        verify, using <TT>verify_only</TT> and <TT>verify_sender</TT> so that it is not used
4369        during delivery or recipient verification. For example, here is a router
4370        which verifies the address <B><B>root@somedomain.com</B>:</B>
4371
4372 </P>
4373 <PRE>
4374          verify_exceptions:
4375            driver = domainlist
4376            verify_only
4377            verify_sender
4378            domains = some.domain.com
4379            local_parts = root
4380            route_list = *</PRE>
4381 <A NAME="SEC173" HREF="FAQ.html#TOC173">Q0814</A>: We are being plagued by forged mail coming from a number of different
4382        hosts and sender addresses. The guy however leaves a fingerprint. The
4383        first received line always contains 'Received: from baby'. What is the
4384        best suggested way for eliminiating him from our systems?
4385
4386
4387 <P>
4388 A0814: You cannot, unfortunately, prevent the message from getting into your
4389        system, because the message has to be read before you can inspect the
4390        Received: header. The best you can do is to install a system filter
4391        which junks any message containing such a header. Thus the sender still
4392        wastes bandwidth and your resources in transporting the message to you,
4393        but you just throw it away. A simple system filter that does this is
4394
4395 </P>
4396 <PRE>
4397          # Exim filter
4398          if $h_Received: contains "from baby" then seen finish endif</PRE>
4399 <A NAME="SEC174" HREF="FAQ.html#TOC174">Q0815</A>: I have set <TT>host_accept_relay</TT>, but my host still refuses to relay from
4400        matching hosts.
4401
4402
4403 <P>
4404 A0815: (A) Did you remember to HUP or restart the Exim daemon after changing
4405            the configuration? You can get information as to what options Exim
4406            is checking by using the <B>-bh</B> option to test how it would handle mail
4407            from a specific host.
4408
4409 </P>
4410 <P>
4411        (B) Have you used any wild-card host names in <TT>host_accept_relay</TT>? <B>E.g:</B>
4412
4413 </P>
4414 <PRE>
4415              host_accept_relay = *.aaa.bbb</PRE>
4416 <P>
4417            If so, the problem may be that the relevant hosts do not have
4418            reverse DNS entries for their IP addresses. In order to match a wild
4419            card name, Exim has to look up the calling host's name from its IP
4420            address, and if it cannot do so, it takes a hard line by default.
4421            Exim processes lists from left to right, and so will attempt a
4422            reverse DNS lookup at the first wild-carded entry it reaches. If you
4423            have IP addresses in your list, it is best to put them first for
4424            this reason. Suppose you had
4425
4426 </P>
4427 <PRE>
4428              host_accept_relay = *.x.y : 10.9.8.7</PRE>
4429 <P>
4430            Then when the host 10.9.8.7 connects, a reverse lookup will still
4431            be done, because the first check is against <B>*.x.y.</B> If the lookup
4432            fails, relaying is rejected. However, if the list were in the
4433            opposite order, the IP check would succeed, and no DNS lookup would
4434            be done. See also 
4435         <A HREF="FAQ.html#SEC168">Q0809</A>.
4436
4437 </P>
4438 <A NAME="SEC175" HREF="FAQ.html#TOC175">Q0816</A>: How can I run customized verification checks on incoming addresses?
4439
4440
4441 <P>
4442 A0816: If you can implement your checks in Perl, then you can use Exim's
4443        facility for running an embedded Perl interpreter. For example, if you
4444        want to run special checks on local addresses, you could install this as
4445        your first director:
4446
4447 </P>
4448 <PRE>
4449          private_verify:
4450            driver = smartuser
4451            condition = ${perl{verify}{$local_part}{$domain}}
4452            verify_only</PRE>
4453 <P>
4454        If you want this to be the only means of verification, you can set
4455        <TT>no_verify</TT> on all the other directors. Otherwise, if this director fails
4456        to verify, the address gets passed on to those that follow.
4457
4458 </P>
4459 <P>
4460        The <TT>verify_sender</TT> and <TT>verify_recipient</TT> options can be used to restrict
4461        the director to sender or recipient verification only, and if necessary
4462        you could have two different directors, one for senders and one for
4463        recipients.
4464
4465 </P>
4466 <P>
4467        If the result of the expansion of <TT>condition</TT> is not "no", "false" or
4468        "0", then address verification succeeds, because the director itself
4469        matches any address. The expansion of <TT>condition</TT> causes the Perl
4470        subroutine called "verify" to be run, with two arguments, the local part
4471        and the domain. The subroutine must be provided in Perl code that is
4472        referenced by the <TT>perl_startup</TT> option. See the chapter on embedded Perl
4473        for details.
4474
4475 </P>
4476 <P>
4477        Remote addresses can be handled in a similar way by using a <B>domainlist</B>
4478        router that matches all domains. See also 
4479         <A HREF="FAQ.html#SEC172">Q0813</A>.
4480
4481 </P>
4482 <P>
4483        Starting up a Perl interpreter is not cheap. On a busy system you should
4484        first make sure that there isn't some way of using Exim's own facilities
4485        for doing what you want before going down this road.
4486
4487 </P>
4488 <A NAME="SEC176" HREF="FAQ.html#TOC176">Q0817</A>: Does Exim apply RBL checks to error messages, those with an envelope
4489        sender of "&#60;&#62;" ?
4490
4491
4492 <P>
4493 A0817: Yes, it does, because the RBL check happens immediately on connection,
4494        before any commands are passed, and so therefore before it even knows
4495        that the envelope sender is "&#60;&#62;".
4496
4497 </P>
4498 <A NAME="SEC177" HREF="FAQ.html#TOC177">Q0818</A>: I want to be able to set up a list, similar to <TT>sender_reject_recipients</TT>,
4499        but with a user-defined message. I believe I have to use a director for
4500        this.
4501
4502
4503 <P>
4504 A0818: You can do this using the <TT>prohibition_message</TT> mechanism (see the section
4505        entitled "Customizing prohibition messages" in the manual). This avoids
4506        having to use a director, and therefore doesn't require you to let the
4507        message into your host at all. Use something like this:
4508
4509 </P>
4510 <PRE>
4511          prohibition_message = "\
4512            ${if eq {$prohibition_reason}{sender_reject_recipients}\
4513            {${lookup{$sender_address}lsearch{/some/file}{$value}}}{}}"</PRE>
4514 <P>
4515        This example looks up a message that is specific to the sender, but you
4516        can of course tailor the message any way you like. Vertical bar is
4517        treated as a line separator in prohibition texts.
4518
4519 </P>
4520 <A NAME="SEC178" HREF="FAQ.html#TOC178">Q0819</A>: I want to reject certain sender-recipient combinations, with a specific
4521        message for each such combination.
4522
4523
4524 <P>
4525 A0819: That needs a special director, using the "senders" option to predicate
4526        it on the sender, and a file of recipients to fail for each sender.
4527        Something like this:
4528
4529 </P>
4530 <PRE>
4531          forced_fail:
4532            driver = aliasfile
4533            senders = sender@domain.com : *@otherdomain.com
4534            file = /blocked/${lc:$sender_address}
4535            search_type = lsearch</PRE>
4536 <P>
4537        with the files containing lines like
4538
4539 </P>
4540 <PRE>
4541          recipient:  :fail:  message</PRE>
4542 <P>
4543        If you are handling multiple local domains, you may want to set
4544        <TT>include_domain</TT> so you can specify fully qualified addresses in the
4545        files. If the files get big, an indexed search type such as DBM or cdb
4546        should be used.
4547
4548 </P>
4549 <P>
4550        If you want to block an entire domain from a specific sender, you could
4551        use this director:
4552
4553 </P>
4554 <PRE>
4555          domain_block:
4556            driver = aliasfile
4557            senders = dislikedsender@wherever
4558            file = /fail/all
4559            search_type = lsearch*</PRE>
4560 <P>
4561        with the file containing
4562
4563 </P>
4564 <PRE>
4565          *:   :fail:   message</PRE>
4566 <P>
4567        The message text supplied after :fail: is restricted to a single line.
4568        If you want to send several paragraphs of message, instead of using
4569        :fail: you could use the <B>aliasfile</B> to pipe the message off so some
4570        script which generates a long message and then gives a non-zero return
4571        code so that the message gets returned to the sender.
4572
4573 </P>
4574 <P>
4575        In all of these cases you are in trouble if the sender address is bad,
4576        because the bounce message you generate will get stuck.
4577
4578 </P>
4579 <A NAME="SEC179" HREF="FAQ.html#TOC179">Q0820</A>: Will Exim allow me to create a file of regexs and match incoming
4580        external email to the list - and if a match is found file the offending
4581        message into a special location? Also is it possible to make exim only
4582        filter parts of an incoming email - e.g. ignore large MIME attachments
4583        for example and only process text/plain?
4584
4585
4586 <P>
4587 A0820: You can do some of this in a system filter. For example:
4588
4589 </P>
4590 <PRE>
4591          if $message_body matches &#60;...some complicated regex...&#62; or
4592             $message_body matches &#60;...some other regex...&#62; or
4593             $header_from: matches &#60;...regex...&#62; or
4594             etc.
4595          then
4596            save /some/special/file
4597          endif</PRE>
4598 <P>
4599        or instead of "save" you could have "deliver" (to some address) or
4600        "pipe" (to some script).
4601
4602 </P>
4603 <P>
4604        There isn't any mechanism for ignoring attachments, but <B>$message_body</B>
4605        only looks at the first n bytes of the body, where n defaults to 500 but
4606        can be changed.
4607
4608 </P>
4609 <P>
4610        A more expensive alternative would be to run a Perl subroutine using the
4611        embedded Perl mechanism. If you passed over the message id, the Perl
4612        code could read the message files on the spool and implement any
4613        algorithm it liked for deciding what should be done.
4614
4615 </P>
4616 <A NAME="SEC180" HREF="FAQ.html#TOC180">Q0821</A>: I've hacked sendmail to make an ioctl call at the time of the SMTP RCPT
4617        command, to check if a user has exceeded their email quota. If they have
4618        I issue a temporary failure and a message - can I do this with Exim?
4619
4620
4621 <P>
4622 A0821: This could be done by arranging for a quota check to happen during the
4623        verification of the address after RCPT, but without hacking Exim you
4624        would have to use the embedded Perl facility to get it to run a Perl
4625        script to do the test.
4626
4627 </P>
4628 <P>
4629        If the reason you want to do this is to avoid having messages for over-
4630        quota users sitting on your spool for many days, there is an
4631        alternative. In Exim you can set up special retry rules for quota
4632        excession (what we use is "if mailbox not read for 7 days, bounce
4633        immediately, otherwise try every hour for one day, then bounce").
4634
4635 </P>
4636 <A NAME="SEC181" HREF="FAQ.html#TOC181">Q0822</A>: I'm looking for a rule to reject special unknown recipients.
4637
4638
4639 <P>
4640 A0822: If the messages in question are coming in via SMTP, you can turn on
4641        <TT>receiver_verify</TT> (if you haven't already) and arrange for these addresses
4642        not to verify. For example, if they are not in your local domains, you
4643        could use a router like this:
4644
4645 </P>
4646 <PRE>
4647          verify_check_specials:
4648            driver = domainlist
4649            condition = "\
4650              ${if eq {$local_part@$domain}{account@host.domain}{yes}{no}}"
4651            verify_only
4652            fail_verify
4653            route_list = *</PRE>
4654 <P>
4655        where of course you can extend the <TT>condition</TT> setting to use regular
4656        expressions, file lookups, Perl calls, or anything else that is
4657        available. The failure of the verification causes an error return to the
4658        SMTP RCPT command, so the messages never get into your system. For
4659        addresses in your local domains you could use a <B>smartuser</B> director in a
4660        similar fashion, but you could also use an alias file with :fail:
4661        entries.
4662
4663 </P>
4664 <P>
4665        If you are receiving such messages from the local host, then they are
4666        already in the system, and have to be failed locally as part of the
4667        delivery process. The :fail: mechanism is the simplest for local
4668        addresses. For remote addresses, one possibility would be to use a
4669        router with a <TT>condition</TT> setting to send such messages to an autoreply
4670        transport that sends back an error message to the sender. See also
4671        
4672         <A HREF="FAQ.html#SEC185">Q0826</A>.
4673
4674 </P>
4675 <A NAME="SEC182" HREF="FAQ.html#TOC182">Q0823</A>: I'd like to pass all messages through a virus-scanning system before
4676        delivery. Can Exim do this?
4677
4678
4679 <P>
4680 A0823: One way of achieving this is to deliver all messages via a pipe to a
4681        checking program that resubmits them for delivery in some private way
4682        that can be checked (e.g. on a specific SMTP port, or IP address). One
4683        possibility is to use the "received protocol" field that can be set
4684        for locally submitted mail via the <B>-oMr</B> command line option. This
4685        director sends all messages that are not from the local host and whose
4686        received protocol is not "scanned-ok" to the <TT>virus_scan</TT> transport:
4687
4688 </P>
4689 <PRE>
4690          vircheck:
4691            driver = smartuser
4692            transport = virus_scan
4693            condition = "${if or {{eq {$received_protocol}{scanned-ok}} \
4694                                  {eq {$sender_host_address}{127.0.0.1}}}\
4695                                  {0}{1}}"</PRE>
4696 <P>
4697        A similar router could be used if you want to scan messages for remote
4698        addresses. One problem is that this approach scans the message for each
4699        recipient, not just once per message.
4700
4701 </P>
4702 <P>
4703        The <TT>virus_scan</TT> transport should be set up to pipe the message to a
4704        suitable checking program or script which runs as a trusted user. This
4705        can then re-submit the message to Exim, using <B>-oMr</B> to set the received
4706        protocol to "scanned-ok", and the <B>-f</B> option to set the correct envelope
4707        sender address.
4708
4709 </P>
4710 <A NAME="SEC183" HREF="FAQ.html#TOC183">Q0824</A>: How can I accomplish this: a message sent from any host must either be
4711        sending to a domain in a list (a dbm file) or the sender's address
4712        domain must be in the list.
4713
4714
4715 <P>
4716 A0824: First of all, set
4717
4718 </P>
4719 <PRE>
4720          relay_domains = dbm;/the/dbm/file</PRE>
4721 <P>
4722        This allows relaying from any host, provided that the recipient address
4723        matches one of the domains in the list. Then set
4724
4725 </P>
4726 <PRE>
4727          host_accept_relay = *
4728          sender_address_relay = dbm;/the/dbm/file</PRE>
4729 <P>
4730        This allows relaying from any host (because of the *) to any arbitrary
4731        domain, provided that the sender's address matches a domain in the list.
4732
4733 </P>
4734 <P>
4735        WARNING: This setting makes it possible for your host to be used as an
4736        open relay by those unscrupulous enough to forge sender addresses. Your
4737        host may end up on one of the open relay blocking lists as a result.
4738
4739 </P>
4740 <A NAME="SEC184" HREF="FAQ.html#TOC184">Q0825</A>: I've set <TT>relay_domains</TT> and <TT>sender_address_relay</TT>, but if <B>user@mydomain</B>
4741        tries sending to an arbitrary domain, Exim rejects it.
4742
4743
4744 <P>
4745 A0825: The safest way to control relaying arbitrary domains is by host, not
4746        by sender address. If you are able to specify the hosts which your users
4747        use, then set <TT>host_accept_relay</TT> to match them. You can then remove the
4748        setting of <TT>sender_address_relay</TT>, unless you also want to limit relaying
4749        to specific senders.
4750
4751 </P>
4752 <P>
4753        If you want to permit relaying from specific senders on arbitrary hosts,
4754        you can set <TT>relay_match_host_or_sender</TT>. This requires that only one of
4755        the host or sender address be recognized, instead of both of them.
4756
4757 </P>
4758 <P>
4759        WARNING: This setting makes it possible for your host to be used as an
4760        open relay by those unscrupulous enough to forge sender addresses. Your
4761        host may end up on one of the open relay blocking lists as a result.
4762
4763 </P>
4764 <A NAME="SEC185" HREF="FAQ.html#TOC185">Q0826</A>: I set <TT>sender_reject_recipients</TT>, but Exim is not rejecting those
4765        recipients.
4766
4767
4768 <P>
4769 A0826: You have misunderstood the option. A setting like that rejects <EM>all</EM> the
4770        recipients of an incoming message with that <EM>sender</EM>. To reject a
4771        specific recipient in your own domain you can set up an alias like this:
4772
4773 </P>
4774 <PRE>
4775          reject-me:  :fail: mail for reject-me is not acceptable</PRE>
4776 <P>
4777        If you want to reject a recipient that is not in a local domain, one
4778        approach is to set up a router to send the address to your directors,
4779        and then use an alias file to generate a :fail: message as above.
4780        Alternatively, you can use the verification mechanism: see 
4781         <A HREF="FAQ.html#SEC181">Q0822</A>.
4782
4783 </P>
4784 <A NAME="SEC186" HREF="FAQ.html#TOC186">Q0827</A>: I can't find an option to deny "RCPT TO:" addresses.
4785
4786
4787 <P>
4788 A0827: Denying RCPT TO addresses is the job of verifying. You can set up
4789        directors and routers that are run only when verifying and not when
4790        delivering. This gives you a great deal of flexibility. See 
4791         <A HREF="FAQ.html#SEC181">Q0822</A>.
4792
4793 </P>
4794 <A NAME="SEC187" HREF="FAQ.html#TOC187">Q0828</A>: My problem is that Exim replaces <B>$local_part</B> with an empty string in the
4795        system filtering. What's wrong or what did I miss?
4796
4797
4798 <P>
4799 A0828: A message may have many recipients. The system filter is run just once
4800        at the start of a delivery attempt. Consequently, it does not make sense
4801        to set <B><B>$local_part.</B></B> Which recipient should it be set to? However, you
4802        can access all the recipients from a system filter via the variable
4803        called <B><B>$recipients.</B></B>
4804
4805 </P>
4806 <A NAME="SEC188" HREF="FAQ.html#TOC188">Q0829</A>: Using <B>$recipients</B> in a system filter gives me another problem: how can
4807        I do a string lookup if <B>$recipients</B> is a list of addresses?
4808
4809
4810 <P>
4811 A0829: Check out section 25 of the filter document ("Testing a list of
4812        addresses"). If that doesn't help, you may have to resort to calling an
4813        embedded Perl interpreter - but that is expensive.
4814
4815 </P>
4816 <A NAME="SEC189" HREF="FAQ.html#TOC189">Q0830</A>: Is there a way to configure Exim to reject mail to a certain local host?
4817
4818
4819 <P>
4820 A0830: No, only to certain domains. Use a configuration like this:
4821
4822 </P>
4823 <PRE>
4824          receiver_verify
4825          local_domains = rejected.domain : &#60;other local domains&#62;</PRE>
4826 <P>
4827        with the first director as
4828
4829 </P>
4830 <PRE>
4831          reject_domains:
4832            driver = smartuser
4833            domains = rejected.domain
4834            verify_only
4835            fail_verify</PRE>
4836 <A NAME="SEC190" HREF="FAQ.html#TOC190">Q0831</A>: Exim sometimes rejects messages with bad senders after the DATA and
4837        sometimes after the MAIL command. What is the difference?
4838
4839
4840 <P>
4841 A0831: The first time Exim encounters a particular bad sender, it rejects the
4842        message after the data has been received, so that it can log the
4843        headers. If the same sender re-appears within 24 hours, Exim assumes
4844        that the remote host has (in violation of RFC 821) not interpreted the
4845        previous 550 error code correctly, so this time it rejects the MAIL
4846        command. Some hosts don't even managed to handle that, so if the same
4847        sender turns up for a third time within 24 hours, Exim accepts MAIL, but
4848        rejects every RCPT command instead.
4849
4850 </P>
4851 <A NAME="SEC191" HREF="FAQ.html#TOC191">Q0832</A>: How can I get Exim to remove attachments from messages?
4852
4853
4854 <P>
4855 A0832: (A) The cleanest way is to check for the existence of a "Content-type"
4856            header line, and route messages containing it down a pipe to some
4857            other program that strips the attachments and re-submits the message
4858            to Exim. Alternatively, a transport filter can be used to do the
4859            job, as described in C028.
4860
4861 </P>
4862 <P>
4863        (B) A somewhat more hairy way is to use embedded Perl from a system
4864            filter to truncate the message's data file directly, and then use
4865            the "headers remote" filter command to get rid of the associated
4866            headers.
4867
4868 </P>
4869 <A NAME="SEC192" HREF="FAQ.html#TOC192">Q0833</A>: I ran a relay test against my host and it failed with an address
4870        containing a %, though I don't have <TT>percent_hack_domains</TT> set. Is Exim
4871        broken? This is what the tester said:
4872
4873
4874 <PRE>
4875          Relay test 6
4876          &#62;&#62;&#62; RSET
4877          &#60;&#60;&#60; 250 Reset OK
4878          &#62;&#62;&#62; MAIL FROM:&#60;spamtest@example.com&#62;
4879          &#60;&#60;&#60; 250 &#60;spamtest@example.com&#62; is syntactically correct
4880          &#62;&#62;&#62; RCPT TO:&#60;relaytest%mail-abuse.org@example.com&#62;
4881          &#60;&#60;&#60; 250 &#60;relaytest%mail-abuse.org@example.com&#62; is syntactically correct
4882          Relay test result
4883          Uh oh, host appeared to accept a message for relay.
4884          The host may reject this message internally, however</PRE>
4885 <P>
4886 A0833: This does not prove that your host is open for relaying. Notice the
4887        wording of the last two sentences: "appeared to accept" and "may reject
4888        internally". Assuming that your Exim configuration is correct, Exim will
4889        discover that the local part <B>"relaytest%mail-abuse.org"</B> is not valid on
4890        your host, and it will bounce the message.
4891
4892 </P>
4893 <P>
4894        Why doesn't it reject the RCPT TO command? Answer: because you have not
4895        set <TT>receiver_verify</TT> in your configuration file, or you have excluded
4896        these particular sender or recipient domains from receiver verification.
4897
4898 </P>
4899 <BR><H2><A NAME="SEC193" HREF="FAQ.html#TOC193">9. MAJORDOMO
4900
4901 </A></H2>
4902 <A NAME="SEC194" HREF="FAQ.html#TOC194">Q0901</A>: How do I set up Majordomo to work with Exim?
4903
4904
4905 <P>
4906 A0901: Users have found several ways of setting up Exim for use with Majordomo.
4907        There's a web page at
4908
4909 </P>
4910 <PRE>
4911          <A HREF="http://www.netmaster.ca/exim/majordomo.html">http://www.netmaster.ca/exim/majordomo.html</A></PRE>
4912 <P>
4913        which shows one way to do it, and discusses some of the issues. The
4914        sample configuration C018 is another approach which automates a lot of
4915        the functions based on whether the files or directories exist. Only
4916        three aliases per list are needed.
4917
4918 </P>
4919 <P>
4920        Somewhere in the Majordomo docs or FAQ it mentions using batchmail or
4921        other additional programs to improve the performance of large lists.
4922        They are not needed with Exim, and their use can actually make things
4923        worse. However, it's a good idea to set <TT>remote_max_parallel</TT> to a value
4924        greater than 1 in the Exim configuration.
4925
4926 </P>
4927 <A NAME="SEC195" HREF="FAQ.html#TOC195">Q0902</A>: I have set <B>$mailer</B> in <B>majordomo.cf,</B> but it still isn't setting the
4928        sender correctly in the messages it sends.
4929
4930
4931 <P>
4932 A0902: Make sure you have got the quoting correct in the <B>$mailer</B> setting. For
4933        example,
4934
4935 </P>
4936 <P>
4937        <B>$mailer</B> = "$sendmail_command <B>-oi</B> <B>-oee</B> <B><B>-f$sender\@lists.mydomain.de</B>";</B>
4938
4939 </P>
4940 <P>
4941        is not correct. It needs three backslashes, not one, and the $ at the
4942        start of <B>$sender</B> has to be escaped with a backslash.
4943
4944 </P>
4945 <A NAME="SEC196" HREF="FAQ.html#TOC196">Q0903</A>: I'm trying to set up majordomo, but I'm getting a "wrong mode" error
4946        when I try to send it mail. The panic log entry reads:
4947
4948
4949 <P>
4950        1999-01-05 11:23:34 0zxZGY-0000vB-00 <TT>majordomo_aliases</TT> director:
4951        <B><B>/var/lib/majordomo/lists/lists.aliases</B></B> (lsearch lookup): wrong mode
4952
4953 </P>
4954 <P>
4955 A0903: Check the mode of <B><B>/var/lib/majordomo/lists/lists.aliases</B></B> and compare it
4956        with the setting of the modemask option in the <TT>majordomo_aliases</TT>
4957        director. This option specifies bits which must not be set for the alias
4958        file, and it defaults to 022.
4959
4960 </P>
4961 <A NAME="SEC197" HREF="FAQ.html#TOC197">Q0904</A>: I'm getting return code 9 from <B><B>/home/majordomo/majordomo-1.94.4/wrapper</B></B>
4962        when it is passed a message from Exim.
4963
4964
4965 <P>
4966 A0904: A problem like this turned out to be the Perl version that came with
4967        RedHat 5.2. Rebuilding Perl 5.005x solved it.
4968
4969 </P>
4970 <BR><H2><A NAME="SEC198" HREF="FAQ.html#TOC198">10. REWRITING ADDRESSES
4971
4972 </A></H2>
4973 <A NAME="SEC199" HREF="FAQ.html#TOC199">Q1001</A>: How can I get Exim to strip the hostname from the sender's address?
4974
4975
4976 <P>
4977 A1001: If you set up a rewriting rule in the following form:
4978
4979 </P>
4980 <PRE>
4981           *@*.your.domain  $1@your.domain</PRE>
4982 <P>
4983        then Exim will rewrite all addresses in the envelope and the headers,
4984        removing anything between "@" and <B>"your.domain".</B> This applies to all
4985        messages that Exim processes. If you want to rewrite sender addresses
4986        only, the the rule should be
4987
4988 </P>
4989 <PRE>
4990           *@*.your.domain  $1@your.domain  Ffrs</PRE>
4991 <P>
4992        This applies the rule only to the envelope "From" address and to the
4993        From:, Reply-to:, and Sender: headers.
4994
4995 </P>
4996 <A NAME="SEC200" HREF="FAQ.html#TOC200">Q1002</A>: I have Exim configured to remove the hostname portion of the domain on
4997        outgoing mail, and yet the hostname is present when the mail gets
4998        delivered.
4999
5000
5001 <P>
5002 A1002: Check the DNS record for your domain. If the MX record points to a CNAME
5003        record instead of to an A record, MTAs are liable to rewrite addresses,
5004        changing your domain name to its "canonical" form, as obtained from the
5005        CNAME record.
5006
5007 </P>
5008 <A NAME="SEC201" HREF="FAQ.html#TOC201">Q1003</A>: I want to rewrite local addresses in mail that goes to the outside
5009        world, but not for messages that remain within the local intranet.
5010
5011
5012 <P>
5013 A1003: Exim wasn't really designed to handle this kind of split world. Because
5014        it keeps only one copy of a message, and does all the rewriting at the
5015        time of reception, a standard configuration cannot handle this kind of
5016        rewriting in a message that has both internal and external recipients.
5017
5018 </P>
5019 <P>
5020        However, what can be done is to split off a copy of the message to be
5021        sent to all external recipients, and do the rewriting on that. This can
5022        be achieved by running two differently-configured versions of Exim,
5023        either on a single host, or on two different hosts. If you have a
5024        gateway or firewall machine, that is the natural place to run the
5025        rewriting version.
5026
5027 </P>
5028 <P>
5029        On a single machine, the following is one way of handling this:
5030
5031 </P>
5032 <P>
5033        (1) Set up the normal configuration (in the configuration file whose
5034            name is screwed into the binary) such that it does local deliveries
5035            as required, but forwards a copy of the message for non-local
5036            recipients to a different incarnation of Exim via a private SMTP
5037            port. For example, use this transport and router:
5038
5039 </P>
5040 <PRE>
5041              # Transport to send SMTP using port 26
5042              internal_smtp:
5043                driver = smtp
5044                service = 26</PRE>
5045 <PRE>
5046              # Router to send everything the internal_smtp transport
5047              pass_remotes:
5048                driver = domainlist
5049                transport = internal_smtp
5050                route_list = * localhost byname
5051                self = send</PRE>
5052 <P>
5053            This should be the only router. Because of the <TT>self = send</TT>
5054            setting, Exim will transport the messages, even though it knows it
5055            is going to the local host.
5056
5057 </P>
5058 <P>
5059        (2) Set up a different configuration file for the rewriting version of
5060            Exim. This need do no local deliveries, so it needs no local
5061            domains or directors, and as it accepts mail only from the local
5062            host, there is no need for any spam-blocking or other policy
5063            controls. However, it does need to have its own spool area. The main
5064            part of the configuration could be like this:
5065
5066 </P>
5067 <PRE>
5068              local_domains =
5069              local_interfaces = 127.0.0.1
5070              host_reject = !127.0.0.1
5071              spool_directory = /var/spool/exim-external
5072              end</PRE>
5073 <P>
5074            Note the use of a negated item for <TT>host_reject</TT>, causing rejection of
5075            SMTP calls from all but the local host.
5076
5077 </P>
5078 <P>
5079            The directors section can be completely empty (apart from the line
5080            saying "end"), while the routers section should be as in a normal
5081            configuration, as it is going to control external delivery.
5082
5083 </P>
5084 <P>
5085            The rule(s) for rewriting your internal addresses into external ones
5086            should be in this configuration. This is one example of what might
5087            be done:
5088
5089 </P>
5090 <PRE>
5091            *@*.your.domain  "\
5092               ${lookup{$1}cdb{/etc/$2/mail.handles.cdb}{$value}fail}"</PRE>
5093 <P>
5094            which looks up each local part in a per-host file to obtain the
5095            externally-visible address, including (in this example) the domain.
5096
5097 </P>
5098 <P>
5099        (3) You have to arrange for a daemon to be listening on port 26, and to
5100            be using the alternate configuration file. It is necessary to do
5101            this as root so that Exim retains its privilege after reading a
5102            non-standard configuration. A command such as
5103
5104 </P>
5105 <PRE>
5106              exim -C /etc/exim-configure2 -bd -oX 26</PRE>
5107 <P>
5108            could be used in a suitable system start-up file. Alternatively you
5109            could set up <B>inetd</B> to run Exim with the <B>-C</B> option for incoming
5110            connections on port 26.
5111
5112 </P>
5113 <P>
5114        The net result of all of this is that when a message has one or more
5115        external recipients, a copy of it is sent via port 26 to the second
5116        version of Exim, which rewrites any internal addresses and does the
5117        external deliveries. The cost of this is that the message has to be
5118        copied and spooled twice, and you have two different Exim queues to
5119        manage. Note that if the "external" Exim has to send a delivery failure
5120        message, it will use the rewritten sender address.
5121
5122 </P>
5123 <A NAME="SEC202" HREF="FAQ.html#TOC202">Q1004</A>: I'm using this rewriting rule to change login names into "friendly"
5124        names, but if mail comes in for an upper case login name, it doesn't
5125        get rewritten.
5126
5127
5128 <PRE>
5129          *@my.domain     ${lookup{$1}dbm{/usr/lib/exim/longforms}\
5130                          {$value}fail}@my.domain bcfrtFT</PRE>
5131 <P>
5132        The longforms database has entries of the form:
5133
5134 </P>
5135 <PRE>
5136          ano23: A.N.Other</PRE>
5137 <P>
5138 A1004: Replace <B>$1</B> in your rule by <B>${lc:$1}</B> to force the local part to lower
5139        case before it is used as a lookup key.
5140
5141 </P>
5142 <A NAME="SEC203" HREF="FAQ.html#TOC203">Q1005</A>: Is it possible to completely fail a message if the rewrite rules fail?
5143
5144
5145 <P>
5146 A1005: It depends on what you mean by "fail a message" and what addresses you
5147        are rewriting. If you are rewriting recipient addresses for your local
5148        domain, you can do:
5149
5150 </P>
5151 <PRE>
5152          *@dom.ain  ${lookup{$1}dbm{/wher/ever}{$value}{failaddr}}  Ehq</PRE>
5153 <P>
5154        and in your alias file put something like
5155
5156 </P>
5157 <PRE>
5158          failaddr:   :fail: Rewriting failed.</PRE>
5159 <P>
5160        This fails a single recipient - others are processed independently.
5161
5162 </P>
5163 <A NAME="SEC204" HREF="FAQ.html#TOC204">Q1006</A>: I'm using <B>$domain</B> as the key for a lookup in a rewriting rule, but its
5164        contents are not being lowercased. Aren't domains supposed to be handled
5165        caselessly?
5166
5167
5168 <P>
5169 A1006: The value of <B>$domain</B> is the actual domain that appears in the address.
5170        It could of course be lower cased, but I know that would cause some
5171        unhappiness, because some people have mixed-case domain names which look
5172        silly if the case is changed. Thus, one wants to preserve the case in
5173        rewrites such as
5174
5175 </P>
5176 <PRE>
5177          *@*.TheRap.com   &#60;something&#62;@$domain</PRE>
5178 <P>
5179        (not the best example) because "therap" doesn't look like two words. I
5180        know it seems trivial, but it is important to some people - especially
5181        if by some unfortunate accident the lowercased word is something
5182        indecent.
5183
5184 </P>
5185 <P>
5186        You can trivally force lower casing by means of the <B>${lc:</B> operator.
5187        Instead of "$domain" write "${lc:$domain}".
5188
5189 </P>
5190 <A NAME="SEC205" HREF="FAQ.html#TOC205">Q1007</A>: I want to rewrite local sender addresses depending on the domain of the
5191        recipient.
5192
5193
5194 <P>
5195 A1007: In general, this is not possible, because a message may have more than
5196        one recipient and Exim keeps just a single copy of each message. You can
5197        do an incomplete job by using a regular expression match in a rewrite
5198        rule to test, for example, the contents of the To: header. This would
5199        work except in cases of multiple recipients. See also 
5200         <A HREF="FAQ.html#SEC201">Q1003</A>.
5201
5202 </P>
5203 <BR><H2><A NAME="SEC206" HREF="FAQ.html#TOC206">11. HEADERS
5204
5205 </A></H2>
5206 <A NAME="SEC207" HREF="FAQ.html#TOC207">Q1101</A>: I would like add some custom headers to selected outgoing mail based on
5207        a specific domain and the subject line.
5208
5209
5210 <P>
5211 A1101: To the <TT>remote_smtp</TT> transport, add something like
5212
5213 </P>
5214 <PRE>
5215          headers_add = "${if and{\
5216                        {eq{$domain}{spec.dom}}\
5217                        {matches{$h_subject:}{whatever}}}\
5218                        {Content-Type: text/html; charset=\"us-ascii\"} fail }"</PRE>
5219 <P>
5220        This example shows a Content-Type header, but you can have anything you
5221        like, and multiple headers can be inserted by using \n to separate them.
5222
5223 </P>
5224 <A NAME="SEC208" HREF="FAQ.html#TOC208">Q1102</A>: Is it possible to have Exim add a header to only certain <TT>local_parts</TT> of
5225        outgoing mail?
5226
5227
5228 <P>
5229 A1102: Only if you arrange for each such local part to receive its own private
5230        copy of the mail. See <TT>max_rcpt</TT> in the SMTP transport. Then you could use
5231        conditions in an expansion string to add or not add a header.
5232
5233 </P>
5234 <A NAME="SEC209" HREF="FAQ.html#TOC209">Q1103</A>: How can I remove some part of the Received: header?
5235
5236
5237 <P>
5238 A1103: Set <TT>received_header_text</TT>.
5239
5240 </P>
5241 <A NAME="SEC210" HREF="FAQ.html#TOC210">Q1104</A>: How I can insert the PGP header line using exim filters?
5242
5243
5244 <P>
5245 A1104: You can't insert headers in a user filter. A system filter can do so,
5246        but the inserted lines then are included for all recipients.
5247
5248 </P>
5249 <BR><H2><A NAME="SEC211" HREF="FAQ.html#TOC211">12. FETCHMAIL
5250
5251 </A></H2>
5252 <A NAME="SEC212" HREF="FAQ.html#TOC212">Q1201</A>: When I run fetchmail, I get the error "SMTP listener doesn't like
5253        recipient address <B><I>xxx</I>@localhost</B>".
5254
5255
5256 <P>
5257 A1201: Put "localhost" in a list of local domains, that is, add it to the
5258        <TT>local_domains</TT> option in your Exim configuration file.
5259
5260 </P>
5261 <A NAME="SEC213" HREF="FAQ.html#TOC213">Q1202</A>: Fetchmail is passing on bounce messages to Exim with the sender address
5262        set to <B><B>&#60;@some.domain</B>&#62;</B> which causes Exim to complain, because there is no
5263        local part.
5264
5265
5266 <P>
5267 A1202: This was a fetchmail problem which has been fixed. Ideally, you should
5268        upgrade to the current fetchmail release. If you cannot do this, there
5269        is some Exim magic that might help. The 'S' rewriting flag allows
5270        rewriting of envelope addresses to be done as soon as they are received
5271        in the SMTP protocol, before any kind of checking or other processing is
5272        done. This is specifically provided for installations that have to cope
5273        with mangled addresses coming in over SMTP.
5274
5275 </P>
5276 <A NAME="SEC214" HREF="FAQ.html#TOC214">Q1203</A>: I'm currently using Exim with fetchmail and I'd like to use the RBL on
5277        Exim, but will it work? Do I need to configure fetchmail any particular
5278        way? As far as Exim knows, all mail is coming from 127.0.01. Will it
5279        check the source address against RBL? Or will it check the From: header?
5280
5281
5282 <P>
5283 A1203: It will check 127.0.0.1 (not very useful). The point of the RBL is to
5284        keep messages from black-listed hosts out of your machine. If you are
5285        using fetchmail, you have got the messages into your machine before you
5286        approach Exim. That kind of defeats the purpose of the RBL. The right
5287        way to do this would be for the host from which you fetchmail to do the
5288        RBL checking and insert some kind of warning header for you to test, as
5289        Exim does if you run RBL checks in warning mode.
5290
5291 </P>
5292 <BR><H2><A NAME="SEC215" HREF="FAQ.html#TOC215">13. PERL
5293
5294 </A></H2>
5295 <A NAME="SEC216" HREF="FAQ.html#TOC216">Q1301</A>: Exim built with Perl support exits with the error message <B>"./exim:</B> can't
5296        load library <B>'libperl.so'".</B>
5297
5298
5299 <P>
5300 A1301: If you are using BSDI, see 
5301         <A HREF="FAQ.html#SEC273">Q9401</A>.
5302
5303 </P>
5304 <A NAME="SEC217" HREF="FAQ.html#TOC217">Q1302</A>: Exim built with Perl support exits with several error messages of the
5305        form "undefined reference to `PL_stack_sp'".
5306
5307
5308 <P>
5309 A1302: This has been seen on FreeBSD systems that had two different versions of
5310        Perl installed, the older with an <B>a.out</B> library and the newer with an
5311        ELF library. Ensure that the older package is removed.
5312
5313 </P>
5314 <BR><H2><A NAME="SEC218" HREF="FAQ.html#TOC218">14. DIAL-UP
5315
5316 </A></H2>
5317 <A NAME="SEC219" HREF="FAQ.html#TOC219">Q1401</A>: How can I arrange for mail to other hosts on my local network to be
5318        delivered when I'm not connected to the Internet?
5319
5320
5321 <P>
5322 A1401: Use the <TT>queue_remote_domains</TT> option to control which domains are held
5323        on the queue for later delivery. For example,
5324
5325 </P>
5326 <PRE>
5327          queue_remote_domains = ! *.localnet</PRE>
5328 <P>
5329        allows delivery to domains ending in .localnet, while queueing all the
5330        others.
5331
5332 </P>
5333 <A NAME="SEC220" HREF="FAQ.html#TOC220">Q1402</A>: I have a dial-up machine, and I use the <TT>queue_smtp_domains</TT> option so
5334        that remote mail only goes out when I do a queue run. However, any email
5335        I send with an address <B><B>&#60;anything&#62;@aol.com</B></B> is returned within about 15
5336        minutes saying 'retry time exceeded', and all addresses are affected.
5337
5338
5339 <P>
5340 A1402: (A) You should be using <TT>queue_remote_domains</TT> rather than <TT>queue_smtp_</TT>
5341        domains. With the latter, Exim is trying to route the addresses, which
5342        involves a DNS lookup. This is presumably timing out, causing a retry
5343        time to be set for the domain, and somehow a valid lookup never happened
5344        before the maximum retry time (default of 4 days) passed. Hence the
5345        bounce. The fact that it is <B>aol.com</B> is not relevant. You should probably
5346        also be using <B>-qq</B> to do your queue run rather than <B><B>-q.</B></B>
5347
5348 </P>
5349 <P>
5350        (B) An alternative approach if you are sending all your outgoing mail to
5351        the same smart host is to use a single router like this:
5352
5353 </P>
5354 <PRE>
5355          route_append:
5356          driver = domainlist
5357          transport = remote_smtp
5358          route_list = "* smarthost.isp.net byname"</PRE>
5359 <P>
5360        and put the address of the smart host in <B>/etc/hosts</B>, so that it can be
5361        found without the need of a DNS lookup. Then you can use <TT>queue_smtp_</TT>
5362        domains so that Exim does the routing for every message, but doesn't try
5363        to deliver it. See also 
5364         <A HREF="FAQ.html#SEC221">Q1403</A>.
5365
5366 </P>
5367 <A NAME="SEC221" HREF="FAQ.html#TOC221">Q1403</A>: How should Exim be configured when it is acting as a temporary storage
5368        system for a domain on a dial-up host?
5369
5370
5371 <P>
5372 A1403: Exim isn't really designed for this, but... The lowest-numbered MX
5373        record for the domain should be pointing to your host. You should set a
5374        large retry time for that domain, so that Exim doesn't keep trying to
5375        deliver when the host is offline. When the host comes online, the
5376        waiting messages have to be kicked somehow. This can be done by calling
5377        Exim with the <B>-R</B> option, or via the SMTP ETRN command. This works
5378        provided the number of messages is low. If you are handling lots of
5379        mail, keeping messages waiting for their host to connect and those that
5380        are having delivery problems to remote hosts all in the same queue
5381        doesn't work so well. It is better in this case to get Exim to deliver
5382        the mail for the dial-in hosts into some local files which then get
5383        transmitted by other software when the host connects. See the manual
5384        chapter entitled "Intermittently connected hosts" and also 
5385         <A HREF="FAQ.html#SEC242">Q5014</A> and
5386        
5387         <A HREF="FAQ.html#SEC136">Q0521</A>.
5388
5389 </P>
5390 <A NAME="SEC222" HREF="FAQ.html#TOC222">Q1404</A>: I have <TT>queue_remote_domains</TT> or <TT>queue_smtp_domains</TT> set, and use <B>-qf</B> to
5391        force delivery of waiting mail when I dial in. How can I arrange for any
5392        new messages that arrive while I'm connected to be delivered immediately?
5393
5394
5395 <P>
5396 A1404: (A) Instead of <TT>queue_remote_domains</TT> or <TT>queue_smtp_domains</TT>, use the
5397        <TT>queue_only_file</TT> option. This causes messages to be queued only if a
5398        particular file exists. The word "remote" or "smtp" before the file name
5399        controls which type of queueing is used. For example:
5400
5401 </P>
5402 <PRE>
5403          queue_only_file = remote/etc/present/when/not/connected</PRE>
5404 <P>
5405        Then, in the scripts which are run when you connect and disconnect,
5406        arrange to remove the file after connection, and create it just before
5407        disconnection.
5408
5409 </P>
5410 <P>
5411        (B) An alternative is to set <TT>hold_domains</TT> to point to a file lookup and
5412        switch that file appropriately.
5413
5414 </P>
5415 <BR><H2><A NAME="SEC223" HREF="FAQ.html#TOC223">15. MODIFYING MESSAGE BODIES
5416
5417 </A></H2>
5418 <A NAME="SEC224" HREF="FAQ.html#TOC224">Q1501</A>: How can I add a disclaimer or an advertisement to a message?
5419
5420
5421 <P>
5422 A1501: There are a number of technical and potential legal problems that arise
5423        in connection with message modification. Some of them are listed below.
5424        If, despite these considerations, you still want to modify messages, you
5425        can do so using Exim, but not directly in Exim itself. It is not the job
5426        of an MTA to modify messages, something that requires understanding of
5427        their content and format.
5428
5429 </P>
5430 <P>
5431        Exim provides a hook in the form of a "transport filter" that lets you
5432        pass any outgoing message through a program or script of your choice. It
5433        is the job of this script to make any changes to the message that you
5434        require. By this means, you have full control over what changes are
5435        made, and Exim does not need to know anything about message bodies.
5436        However, using a transport filter requires additional resources, and may
5437        slow down mail delivery.
5438
5439 </P>
5440 <P>
5441        You can use Exim's directors and routers to arrange for those messages
5442        that you want to modify to be delivered via a transport filter. For
5443        example, suppose you want to do this for messages from addresses in
5444        your domain that are being delivered to a remote host. Place the
5445        following router before the standard <B>lookuphost</B> router:
5446
5447 </P>
5448 <PRE>
5449          filter_remote:
5450            driver = lookuphost
5451            transport = remote_smtp_filter
5452            condition = ${if eq {$sender_address_domain}{your.domain}{yes}{no}}</PRE>
5453 <P>
5454        This routes the relevant addresses to a transport called
5455        <TT>remote_smtp_filter</TT>. Other addresses fall through to the normal router,
5456        and are routed to the standard <TT>remote_smtp</TT> transport. Another way to do
5457        this would be to use a single router, with an expanded string for the
5458        transport setting. The new transport is defined thus:
5459
5460 </P>
5461 <PRE>
5462          remote_smtp_filter:
5463            driver = smtp
5464            transport_filter = /your/filter/command</PRE>
5465 <P>
5466        The entire message is passed to your filter command on its standard
5467        input. It must write the modified version to the standard output, taking
5468        care not to break the RFC 822 syntax. The command is run as the Exim
5469        user, if one is defined; otherwise it is run as root.
5470
5471 </P>
5472 <P>
5473        There are a number of potential problems in doing this kind of
5474        modification in an MTA. Many people believe that to attempt is it wrong,
5475        because:
5476
5477 </P>
5478 <P>
5479        1. It breaks digital signatures, which are becoming legally binding
5480           in some countries (already in the UK, likely to be 1 October 2000 in
5481           the USA).
5482
5483 </P>
5484 <P>
5485        2. It is likely to break MIME encoding, that is, it is likely to wreck
5486           attachments, unless great care is taken.
5487
5488 </P>
5489 <P>
5490        3. It is illegal under German and Dutch law to change the body of
5491           a mail message in transit. It might potentially be illegal in
5492           the UK under European law. This consideration applies to ISPs and
5493           other "common carriers". It would presumably not apply in a corporate
5494           environment where modification was done only to messages originating
5495           from the employees, before they left the company's network. It might
5496           also not apply if the senders have explicitly given their consent
5497           (e.g. agreed to have advertisements added to their incoming mail).
5498
5499 </P>
5500 <P>
5501        4. Since the delivered message body was produced by the MTA (not the
5502           originator, because it was modified), the MTA operator could
5503           potentially be sued for any content. This again applies to "common
5504           carrier" MTAs. It's interesting that adding a disclaimer of liability
5505           could be making you liable for the message, but this case seems
5506           more likely to involve adding advertisements than disclaimers. After
5507           all, no postal service in the world opens all the mail it carries to
5508           add disclaimers.
5509
5510 </P>
5511 <P>
5512        5. Some mail clients (old versions of MS outlook) crash if the message
5513           body of an incoming MIME message has been tampered with.
5514
5515 </P>
5516 <P>
5517        An alternative approach to the disclaimer problem would be to insist
5518        that all relevant messages have the disclaimer appended by the MUA. The
5519        MTA should refuse to accept any that do not. Again, however, the MTA
5520        must understand the format of messages in order to do this. Simply
5521        checking for appropriate wording at the end of the body is not good
5522        enough. It would probably be necessary to run a Perl script from within
5523        an Exim system filter in order to adopt this approach.
5524
5525 </P>
5526 <A NAME="SEC225" HREF="FAQ.html#TOC225">Q1502</A>: How can I remove attachments from messages?
5527
5528
5529 <P>
5530 A1502: The answer to this is essentially the same as for 
5531         <A HREF="FAQ.html#SEC224">Q1501</A>.
5532
5533 </P>
5534 <BR><H2><A NAME="SEC226" HREF="FAQ.html#TOC226">20. MILLENNIUM
5535
5536 </A></H2>
5537 <A NAME="SEC227" HREF="FAQ.html#TOC227">Q2000</A>: Are there any Y2K issues with Exim?
5538
5539
5540 <P>
5541 A2000: The author of Exim believes that it is Y2K-compliant, as long as the
5542        underlying operating system and C library are. Exim does not parse dates
5543        or times at all. Internally, it makes some use of binary timestamps in
5544        Unix format (number of seconds since 1-Jan-1970) and uses C library
5545        services to convert these to printing forms (e.g. for logging). The
5546        printing forms all use 4-digit years. Some people have tried various
5547        tests. No problems have been reported, but details of what tests have
5548        been done are not available.
5549
5550 </P>
5551 <BR><H2><A NAME="SEC228" HREF="FAQ.html#TOC228">50. MISCELLANEOUS
5552
5553 </A></H2>
5554 <A NAME="SEC229" HREF="FAQ.html#TOC229">Q5001</A>: What does the error "Unable to get interface configuration: 22 Invalid
5555        argument" mean?
5556
5557
5558 <P>
5559 A5001: This is an error that occurs when Exim is trying to find out the all the
5560        IP addresses on all of the local host's interfaces. If you have lots of
5561        virtual interfaces, this can occur if there are more than around 250 of
5562        them. The solution is to set the option <TT>local_interfaces</TT> to list just
5563        those IP addresses that you want to use for making and receiving SMTP
5564        connections.
5565
5566 </P>
5567 <A NAME="SEC230" HREF="FAQ.html#TOC230">Q5002</A>: How can I arrange to allow a limited set of users to perform a limited
5568        set of Exim administration functions? I don't want to put them all in
5569        the exim group.
5570
5571
5572 <P>
5573 A5002: See <B><A HREF="http://www.chiark.greenend.org.uk/~ian/userv/.">http://www.chiark.greenend.org.uk/~ian/userv/.</A></B> Using userv you can
5574        arrange (for example) for certain users to be able to invoke mailq or
5575        runq or other preset commands as exim (or any other user, as configured)
5576        with only userv configuration. If you want to check the particular Exim
5577        options available you can easily do it with shell or Perl scripts and
5578        userv configuration, and provided you know how to do argument
5579        `unparsing' properly in shell or Perl it will be secure.
5580
5581 </P>
5582 <A NAME="SEC231" HREF="FAQ.html#TOC231">Q5003</A>: How can I test for a message's size being greater or less than a given
5583        value in an expansion string?
5584
5585
5586 <P>
5587 A5003: This isn't straightforward in versions of Exim prior to 2.10, because
5588        there were no arithmetic operators in expansion strings. In version
5589        2.10 or later you can write, straightforwardly,
5590
5591 </P>
5592 <PRE>
5593          ${if &#62; {$message_size}{10K} {yes} {no}}</PRE>
5594 <P>
5595        In earlier versions, low cunning can be used to achieve certain
5596        kinds of test. For example, to test if the message size is less than
5597        or equal to 1000000:
5598
5599 </P>
5600 <PRE>
5601        ${if eq{${expand:\$\{substr_-1000000_$message_size:x\}}} {} {yes} {no}}</PRE>
5602 <A NAME="SEC232" HREF="FAQ.html#TOC232">Q5004</A>: I want to "tail" the Exim log, but I have a number of other logs I also
5603        want to "tail", and the number of tailing windows is getting to be a
5604        nuisance.
5605
5606
5607 <P>
5608 A5004: Look for a program called 'xtail' (despite its name, it's not an
5609        X-windows application). It allows you to do multiple tails, even of
5610        entire directories.
5611
5612 </P>
5613 <A NAME="SEC233" HREF="FAQ.html#TOC233">Q5005</A>: I would like to have Exim log information written to syslog.
5614
5615
5616 <P>
5617 A5005: Support for this is available from version 3.10 onwards.
5618
5619 </P>
5620 <A NAME="SEC234" HREF="FAQ.html#TOC234">Q5006</A>: What does the error "Failed to create spool file" mean?
5621
5622
5623 <P>
5624 A5006: Exim has been unable to create a file in its spool area in which to
5625        store an incoming message. This is most likely to be either a
5626        permissions problem in the file hierarchy, or a problem with the uid
5627        under which Exim is running, though it could be something more drastic
5628        such as your disc being full. Check that you have defined the spool
5629        directory correctly by running
5630
5631 </P>
5632 <PRE>
5633          exim -bP spool_directory</PRE>
5634 <P>
5635        and examining the output. Check the mode of this directory. It should
5636        look like this, assuming you are running Exim as user `exim':
5637
5638 </P>
5639 <PRE>
5640          drwxr-x---   6 exim  exim      512 Jul 16 12:29 /var/spool/exim</PRE>
5641 <P>
5642        If there are any subdirectories already in existence, they should have
5643        the same permissions, owner, and group. Check also that you haven't got
5644        incorrect permissions on superior directories (for example, <B>/var/spool</B>).
5645        Check that you have set up the exim binary to be setuid root. It should
5646        look like this:
5647
5648 </P>
5649 <PRE>
5650          -rwsr-xr-x   1 root     xxx       502780 Jul 16 14:16 exim</PRE>
5651 <P>
5652        Note that it is not just the owner that must be root, but also the third
5653        permission must be "s" rather than "x".
5654
5655 </P>
5656 <A NAME="SEC235" HREF="FAQ.html#TOC235">Q5007</A>: Exim keeps crashing with segmentation errors (signal 11 or 139).
5657
5658
5659 <P>
5660 A5007: This might be a problem with the db library. See 
5661         <A HREF="FAQ.html#SEC120">Q0505</A>.
5662
5663 </P>
5664 <A NAME="SEC236" HREF="FAQ.html#TOC236">Q5008</A>: Exim's databases keep getting corrupted.
5665
5666
5667 <P>
5668 A5008: See 
5669         <A HREF="FAQ.html#SEC120">Q0505</A>.
5670
5671 </P>
5672 <A NAME="SEC237" HREF="FAQ.html#TOC237">Q5009</A>: I've been using an autoreply director to try and mimic a bounce message,
5673        but I can't get it to have an envelope from of &#60;&#62;.
5674
5675
5676 <P>
5677 A5009: You haven't, by any chance, put "exim" in the list of <TT>never_users</TT>, have
5678        you?
5679
5680 </P>
5681 <A NAME="SEC238" HREF="FAQ.html#TOC238">Q5010</A>: I see entries in the log that mention two different IP addresses for the
5682        same connection. Why is this? For example:
5683
5684
5685 <PRE>
5686          H=tip-mp8-ncs-13.stanford.edu ([36.173.0.189]) [36.173.0.156]</PRE>
5687 <P>
5688 A5010: The actual IP address from which the call came is the final one.
5689        Whenever there's something in parentheses in a host name, it is what the
5690        host quoted as the domain part of an SMTP HELO or EHLO command. So in
5691        this case, the client, despite being 36.173.0.156, issued the command
5692
5693 </P>
5694 <PRE>
5695          HELO [36.173.0.189]</PRE>
5696 <P>
5697        when it sent your server the message. This is, of course, very
5698        misleading.
5699
5700 </P>
5701 <A NAME="SEC239" HREF="FAQ.html#TOC239">Q5011</A>: How can I persuade Exim to accept ETRN commands without the leading
5702        # character?
5703
5704
5705 <P>
5706 A5011: Set the option
5707
5708 </P>
5709 <PRE>
5710          smtp_etrn_command = /usr/lib/sendmail -R $domain</PRE>
5711 <P>
5712        This causes Exim to run that command, with <B>$domain</B> replaced by the
5713        argument of ETRN. The default action of Exim is to require the # sign
5714        in order to be RFC-compliant, and to run the equivalent of
5715
5716 </P>
5717 <PRE>
5718          smtp_etrn_command = /usr/lib/sendmail -R ${substr_1:$domain}</PRE>
5719 <P>
5720        which uses the argument without the leading # as the value for the <B>-R</B>
5721        option. You aren't restricted to running Exim with the <B>-R</B> option, of
5722        course. You can specify any command you like, with any number of
5723        arguments. In particular, you can pass over the IP address of the caller
5724        via <B><B>$sender_host_address.</B></B> However, if you make use of expansion strings
5725        in the arguments, each one must be entirely contained in a single
5726        argument. For example, if you want to remove the first character of the
5727        ETRN argument when it is @ or #, you could use
5728
5729 </P>
5730 <PRE>
5731          smtp_etrn_command = "/usr/lib/sendmail -R \
5732            \"${if match {$domain}{^[@#]}{${substr_1:$domain}}{$domain}}\""</PRE>
5733 <P>
5734        The internal quotes are necessary because of the white space inside the
5735        expansion string.
5736
5737 </P>
5738 <P>
5739        If you use <TT>smtp_etrn_command</TT> to run something other than Exim with the
5740        <B>-R</B> option, you must disable <TT>smtp_etrn_serialize</TT>, because otherwise the
5741        serialization lock (which is set by default) never gets removed.
5742
5743 </P>
5744 <A NAME="SEC240" HREF="FAQ.html#TOC240">Q5012</A>: I've recently noticed that emails I send with a Bcc: line are being
5745        delivered to their final destination with the Bcc: line still present.
5746
5747
5748 <P>
5749 A5012: Exim removes Bcc lines only if you call it with the <B>-t</B> option (i.e.
5750        when it is acting partly as an MUA). It does not remove Bcc lines that
5751        are present in incoming SMTP mail or command-line mail that does not
5752        use <B><B>-t.</B></B> Indeed, it should not remove them. From RFC 822:
5753
5754 </P>
5755 <P>
5756          5.3.  BCC / RESENT-BCC
5757
5758 </P>
5759 <P>
5760          This field contains the identity of additional recipients of the
5761          message. The contents of this field are not included in copies of the
5762          message sent to the primary and secondary recipients. Some systems may
5763          choose to include the text of the "Bcc" field only in the author(s)'s
5764          copy, while others may also include it in the text sent to all those
5765          indicated in the "Bcc" list.
5766
5767 </P>
5768 <P>
5769        Only the initiating software (i.e. the MUA) can tell what to do with
5770        Bcc; any MTA software has to leave it alone.
5771
5772 </P>
5773 <A NAME="SEC241" HREF="FAQ.html#TOC241">Q5013</A>: I used gv <B>v3.5.8</B> (ghostview) to try printing <B>spec.ps.</B> After every
5774        printed page, the printer ejects a blank sheet. Is this something to do
5775        with using "letter" rather than A4 paper?
5776
5777
5778 <P>
5779 A5013: This seems to be an effect of using ghostview. Although the PostScript
5780        is generated for A4 pages, the size of the page images is such that they
5781        should fit on a letter page (they are shorter than would normally be
5782        used on A4 paper). If the PostScript file is sent directly to a
5783        PostScript printer, there is no problem. An alternative is to get hold
5784        of the "psutils" toolset, which is available from
5785
5786 </P>
5787 <PRE>
5788          <A HREF="ftp://ftp.dcs.ed.ac.uk/pub/psutils/psutils.tar.gz">ftp://ftp.dcs.ed.ac.uk/pub/psutils/psutils.tar.gz</A></PRE>
5789 <P>
5790        It contains utilities for extracting pages (which can be useful for
5791        double-sided printing) and for resizing pages. If you resize from A4 to
5792        letter the text shrinks a bit, but should then be printable via
5793        ghostview.
5794
5795 </P>
5796 <A NAME="SEC242" HREF="FAQ.html#TOC242">Q5014</A>: I would like to have a separate queue per domain for hosts which dial
5797        in to collect their mail.
5798
5799
5800 <P>
5801 A5014: Exim isn't really designed for this kind of operation. The only way to
5802        do this would be to cause it to send those messages to a differently
5803        configured version of Exim with its own spool area. This could be done
5804        via a pipe or SMTP to a private port. The main Exim, listening on port
5805        25, would then be configured to run an appropriate command to prod one
5806        of the others when it received ETRN, by means of the <TT>etrn_command</TT> option.
5807
5808 </P>
5809 <P>
5810        You could probably manage this with a single Exim binary and a number of
5811        different configuration files, passed to the special versions using the
5812        <B>-C</B> option. For this application they could all run as exim, since no
5813        root privilege would be needed.
5814
5815 </P>
5816 <P>
5817        An alternative approach would be to get Exim to deliver mail for such
5818        hosts in batch SMTP format into some directory, and have the ETRN run
5819        something to pass such messages to the dialled-in host. See also 
5820         <A HREF="FAQ.html#SEC118">Q0503</A>
5821        and 
5822         <A HREF="FAQ.html#SEC136">Q0521</A>.
5823
5824 </P>
5825 <A NAME="SEC243" HREF="FAQ.html#TOC243">Q5015</A>: A short time after I start Exim I see a &#60;defunct&#62; process. What is
5826        causing this?
5827
5828
5829 <P>
5830 A5015: Your system must be lightly loaded as far as mail is concerned. The
5831        daemon sets off a queue runner process when it is started, but it only
5832        tidies up completed child processes when it wakes up for some other
5833        reason. When there's nothing much going on, you occasionally see
5834        &#60;defunct&#62; processes like this waiting to be dealt with. This is
5835        perfectly normal.
5836
5837 </P>
5838 <A NAME="SEC244" HREF="FAQ.html#TOC244">Q5016</A>: On a reboot, or a restart of the mail system, I see the message "Mailer
5839        daemons: exim abandoned: unknown, malformed, or incomplete option
5840        <B>-bz</B> sendmail". What does this mean?
5841
5842
5843 <P>
5844 A5016: <B>-bz</B> is a Sendmail option requesting it to create a "configuration freeze
5845        file". Exim has no such concept and so does not support the option. You
5846        probably have a line like
5847
5848 </P>
5849 <PRE>
5850          /usr/lib/sendmail -bz</PRE>
5851 <P>
5852        in some start-up script (e.g. <B><B>/etc/init.d/mail</B>)</B> immedately before
5853
5854 </P>
5855 <PRE>
5856          /usr/lib/sendmail -bd -q15m</PRE>
5857 <P>
5858        The first of these lines should be commented out.
5859
5860 </P>
5861 <A NAME="SEC245" HREF="FAQ.html#TOC245">Q5017</A>: I would like to restrict e-mail usage for some users to the local
5862        machine, ideally on a group basis.
5863
5864
5865 <P>
5866 A5017: See 
5867         <A HREF="FAQ.html#SEC296">A9802</A>
5868
5869 </P>
5870 <A NAME="SEC246" HREF="FAQ.html#TOC246">Q5018</A>: Whenever exim restarts it takes up to 3-5 minutes to start responding on
5871        the SMTP port. Why is this?
5872
5873
5874 <P>
5875 A5018: Something else is hanging onto port 25 and not releasing it. One place
5876        to look is <B><B>/etc/inetd.conf</B></B> in case for any reason an SMTP stream is
5877        configured there.
5878
5879 </P>
5880 <A NAME="SEC247" HREF="FAQ.html#TOC247">Q5019</A>: Why aren't there any man pages for Exim? I don't always carry my printed
5881        documentation.
5882
5883
5884 <P>
5885 A5019: As well as plain ASCII text, the Exim documentation is provided in two
5886        online forms - texinfo and HTML - which have a certain amount of built-
5887        in indexing for ease of finding your way around. There are no man pages
5888        because the author of Exim hasn't the time (or desire :-) to maintain
5889        yet another documentation format. Besides, it is hard to know how to
5890        split the Exim manual up.
5891
5892 </P>
5893 <P>
5894        There is a contributed man page for a previous version of Exim in
5895
5896 </P>
5897 <P>
5898        <B><A HREF="ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/Contrib/doc/exim.8">ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/Contrib/doc/exim.8</A></B>
5899
5900 </P>
5901 <P>
5902        This was written by a previous maintainer of the Debian GNU/Linux Exim
5903        package. You can view a nicely formated version at:
5904
5905 </P>
5906 <P>
5907        <B><A HREF="http://dwww.jimpick.com/cgi-bin/dwww?type=man&location=/usr/man/man8/exim.8.gz">http://dwww.jimpick.com/cgi-bin/dwww?type=man&location=/usr/man/man8/exim.8.gz</A></B>
5908
5909 </P>
5910 <P>
5911        This contains some introductory text and the command line options only.
5912
5913 </P>
5914 <A NAME="SEC248" HREF="FAQ.html#TOC248">Q5020</A>: When I send a message using the <B>-t</B> command line option, Exim sends only
5915        to the addresses within the message, not to those on the command line.
5916
5917
5918 <P>
5919 A5020: By default Exim operates according to the Sendmail documentation, and
5920        interprets addresses on the command line as addresses <EM>not</EM> to send to.
5921        You can set
5922
5923 </P>
5924 <PRE>
5925          extract_addresses_remove_arguments = false</PRE>
5926 <P>
5927        to change this behaviour. There is some confusion in the Sendmail
5928        community about the interpretation of recipient addresses on the command
5929        line if the <B>-t</B> option is used.
5930
5931 </P>
5932 <P>
5933        Here is an except from one version of the sendmail documentation
5934
5935 </P>
5936 <P>
5937          <B>-t</B>  Read message for recipients. To:, Cc:, and Bcc: lines will
5938              be scanned for recipient addresses. The Bcc: line will be
5939              deleted before transmission. Any addresses in the argument
5940              list will be suppressed, that is, they will not receive
5941              copies even if listed in the message header.
5942
5943 </P>
5944 <P>
5945        Earlier versions of the sendmail documentation are ambiguous (unlike the
5946        snippet above).  Apparently the code and documentation streams resolved
5947        the ambiguity differently.
5948
5949 </P>
5950 <A NAME="SEC249" HREF="FAQ.html#TOC249">Q5021</A>: If I set up, for example, 
5951           <TT>local_domains = *customer.com</TT>, then it matches
5952        <B>"customer.com"</B> and <B>"abc.customer.com"</B> as required, but it also matches
5953        <B>"noncustomer.com",</B> which is wrong. How can I get round this?
5954
5955
5956 <P>
5957 A5021: (A) You have to specify two entries in the list:
5958
5959 </P>
5960 <PRE>
5961          local_domains = customer.com : *.customer.com</PRE>
5962 <P>
5963        because * in a domain list matches any characters, including "." and
5964        including a null sequence.
5965
5966 </P>
5967 <P>
5968        (B) Alternatively, you could use a regular expression:
5969
5970 </P>
5971 <PRE>
5972           local_domains = ^(.+\.|)customer\.com$</PRE>
5973 <P>
5974        but that probably will not be as efficient.
5975
5976 </P>
5977 <P>
5978        (C) If you have lots of local domains, you could put them into a file to
5979        be searched (using lsearch, dbm, cdb, or whatever) and use a partial
5980        search such as
5981
5982 </P>
5983 <PRE>
5984          local_domains = partial-dbm;/list/of/domains</PRE>
5985 <P>
5986        If the file contains the key <B>*.customer.com</B> then the desired effect is
5987        achieved, because partial lookups do operate on a component basis. See
5988        the section entitled "Partial matching in domain lists". It is a bit
5989        confusing that "*" is used in this context, because its meaning is not
5990        the same as when it appears directly in a domain list.
5991
5992 </P>
5993 <A NAME="SEC250" HREF="FAQ.html#TOC250">Q5022</A>: I want to match all local domains of the form <B>*.oyoy.org</B> but want a few
5994        exceptions. For instance I don't want <B>foo.oyoy.org</B> or <B>bar.oyoy.org</B> to be
5995        treated as local. What is the best way to do this?
5996
5997
5998 <P>
5999 A5022: (A) From release 3.00 onwards, you can put negative items in the
6000        <TT>local_domains</TT> setting, like this:
6001
6002 </P>
6003 <PRE>
6004          local_domains = !foo.oyoy.org : !bar.oyoy.org : *.oyoy.org</PRE>
6005 <P>
6006        If there are many exceptions, you can use a lookup instead of listing
6007        them all inline.
6008
6009 </P>
6010 <P>
6011        (B) Otherwise, you can use a regular expression:
6012
6013 </P>
6014 <PRE>
6015          local_domains = ^.*(?&#60;!^foo|^bar)\.oyoy\.org$</PRE>
6016 <P>
6017        An alternative formulation that is more efficient in execution (because
6018        it doesn't backtrack for .* in cases that don't match) is
6019
6020 </P>
6021 <PRE>
6022          local_domains = ^(?&#62;.*$)(?&#60;=\.oyoy\.org)(?&#60;!^(foo|bar)\.oyoy\.org)</PRE>
6023 <P>
6024        If you are using an earlier version of Exim in which the regular
6025        expression library does not have lookbehind support (versions prior to
6026        2.051, but after 1.735):
6027
6028 </P>
6029 <PRE>
6030          local_domains = ^(?!(foo|bar)\.oyoy\.org$).+\.oyoy\.org$</PRE>
6031 <P>
6032        If you are using a version of Exim that is earlier than 1.735, consider
6033        upgrading!
6034
6035 </P>
6036 <A NAME="SEC251" HREF="FAQ.html#TOC251">Q5023</A>: I can't seem to find a pre-built version of Exim anywhere. The machine
6037        is a Sparc 5 running Solaris 2.6.
6038
6039
6040 <P>
6041 A5023: The problem is that there are a number of build-time options, requiring
6042        the answer to questions like:
6043
6044 </P>
6045 <P>
6046        . Which DBM library do you have? (On Solaris probably ndbm, but no easy
6047          default on some other systems.)
6048
6049 </P>
6050 <P>
6051        . Which uid/gid do you want to use for Exim?
6052
6053 </P>
6054 <P>
6055        . Where do you want the configuration file to be? (<EM>Many</EM> different
6056          answers, even on the same OS, depending on local policy.)
6057
6058 </P>
6059 <P>
6060        . Ditto for the binaries.
6061
6062 </P>
6063 <P>
6064        . Which optional bits of Exim do you want to include?
6065
6066 </P>
6067 <P>
6068        ... and so on. One could impose a set of values, but I suspect they
6069        would probably please nobody.
6070
6071 </P>
6072 <A NAME="SEC252" HREF="FAQ.html#TOC252">Q5024</A>: Is there a Windows NT version of Exim available?
6073
6074
6075 <P>
6076 A5024: A long time ago somebody took a copy of the Exim source with the aim of
6077        trying to port it to NT. However, I never heard anything more.
6078
6079 </P>
6080 <A NAME="SEC253" HREF="FAQ.html#TOC253">Q5025</A>: Does Exim support Delivery Status Notificaion (DSN), Message Status
6081        Notification (MSN), or any other form of delivery acknowledgement?
6082
6083
6084 <P>
6085 A5025: See 
6086         <A HREF="FAQ.html#SEC132">A0517</A>.
6087
6088 </P>
6089 <A NAME="SEC254" HREF="FAQ.html#TOC254">Q5026</A>: What does "Exim" stand for?
6090
6091
6092 <P>
6093 A5026: Originally, it was "EXperimental Internet Mailer", which was the best I
6094        could come up with when I was starting out. At that point it <EM>was</EM>
6095        experimental - I wanted to see if the ideas I had for extending Smail's
6096        approach actually worked. Then somebody discovered about it and wanted
6097        to start using it, and told other people about it...
6098
6099 </P>
6100 <A NAME="SEC255" HREF="FAQ.html#TOC255">Q5027</A>: What does the log message "no immediate delivery: more than 10 messages
6101        received in one connection" mean?
6102
6103
6104 <P>
6105 A5027: See 
6106         <A HREF="FAQ.html#SEC133">A0518</A>.
6107
6108 </P>
6109 <A NAME="SEC256" HREF="FAQ.html#TOC256">Q5028</A>: Although I haven't set <TT>check_spool_space</TT>, Exim is still checking the
6110        amount of space on the spool for incoming SMTP messages that use the
6111        SIZE option. Can I suppress this?
6112
6113
6114 <P>
6115 A5028: The RFC for the SIZE option says
6116
6117 </P>
6118 <P>
6119          If the server currently lacks sufficient resources to accept a
6120          message of the indicated size, but may be able to accept the
6121          message at a later time, it responds with code "452
6122          insufficient system storage".
6123
6124 </P>
6125 <P>
6126        and that is what Exim is trying to implement. This is entirely
6127        independent from <TT>check_spool_space</TT>, which says "don't accept any mail
6128        if there is less than so much space in the spool partition", though the
6129        code is optimised to do both checks at the same time if required.
6130        However, you can suppress the SIZE check if you want to, by unsetting
6131        <TT>smtp_check_spool_space</TT>.
6132
6133 </P>
6134 <A NAME="SEC257" HREF="FAQ.html#TOC257">Q5029</A>: I just noticed log entries that start off "&#60;= &#60;&#62;". Am I correct in
6135        assuming that the "&#60;&#62;" indicates that the envelope did not contain any
6136        "From" data?
6137
6138
6139 <P>
6140 A5029: Yes. This indicates a delivery failure report (aka "bounce message").
6141        Here is what RFC 1123 has to say about this:
6142
6143 </P>
6144 <P>
6145          "If there is a delivery failure after acceptance of a message,
6146          the receiver-SMTP MUST formulate and mail a notification
6147          message.  This notification MUST be sent using a null ("&#60;&#62;")
6148          reverse path in the envelope; see Section 3.6 of RFC-821.  The
6149          recipient of this notification SHOULD be the address from the
6150          envelope return path (or the Return-Path: line).  However, if
6151          this address is null ("&#60;&#62;"),  the receiver-SMTP MUST NOT send a
6152          notification.  If the address is an explicit source route, it
6153          SHOULD be stripped down to its final hop."
6154
6155 </P>
6156 <P>
6157        The reason for using empty sender addresses is to identify bounce
6158        messages so that they themselves do not cause further bounces. However,
6159        this has made life harder for those that want to check incoming mail for
6160        valid senders. It is a pity that some other mechanism (e.g. a keyword
6161        on the MAIL command) was not used instead, but it is far too late to
6162        change now.
6163
6164 </P>
6165 <P>
6166        Empty senders are also used for other kinds of report which should not
6167        themselves cause the generation of bounce messages. For example, Exim
6168        uses them when sending out warnings about delivery delays.
6169
6170 </P>
6171 <A NAME="SEC258" HREF="FAQ.html#TOC258">Q5030</A>: I've received a message which does not have my address in the To:
6172        line. It is a spam message with the same address in both the From: and
6173        the To: headers. How can this happen, and why doesn't Exim reject it?
6174
6175
6176 <P>
6177 A5030: There is an important distinction between the "envelope" from and to and
6178        the "header" from and to. The former are sometimes called the "sender"
6179        and "recipient". An email message needs an "envelope" for the same
6180        reason that paper mail does - the envelope tells the delivery mechanism
6181        what to do with *this copy* of the message, whereas the To: header lists
6182        all the recipients, including those who have been sent different copies
6183        of the message because their mailbox is on some other host.
6184
6185 </P>
6186 <P>
6187        An MTA such as Exim normally works entirely with the "envelope"
6188        addresses, not with those in the header lines. However, you can specify
6189        that it should do some checking of header addresses by setting a
6190        number of options whose names begin with <TT>headers_</TT>.
6191
6192 </P>
6193 <P>
6194        Don't try to block mail where envelope from and the header from differ.
6195        There are common legitimate cases where this happens, for example,
6196        messages forwarded from mailing lists and delivery failure reports.
6197
6198 </P>
6199 <A NAME="SEC259" HREF="FAQ.html#TOC259">Q5031</A>: Can (or will) Exim ever handle a message delivery purely in memory,
6200        that is, it is handled without it ever hitting the disc?
6201
6202
6203 <P>
6204 A5031: It doesn't, and never will. Accepting and delivering a message are two
6205        entirely separate, independent processes, which communicate only by
6206        writing/reading the message on the disc.
6207
6208 </P>
6209 <A NAME="SEC260" HREF="FAQ.html#TOC260">Q5032</A>: If I am using dbm files for data that Exim reads, can I rebuild them
6210        on the fly, or do I need to restart Exim every time I make a change?
6211
6212
6213 <P>
6214 A5032: Exim re-reads the file every time it consults it, so if you are using a
6215        cdb or a DBM library that uses just a single file (i.e. NOT ndbm) then
6216        you can just build the new file with a temporary file name, and use "mv"
6217        to rename it into the correct place on the fly. If there are two files
6218        to rename, there is a window of time during which the DBM database is
6219        inconsistent. On lightly loaded systems this may not matter.
6220
6221 </P>
6222 <A NAME="SEC261" HREF="FAQ.html#TOC261">Q5033</A>: What are the main differences between using an Exim filter and using
6223        procmail?
6224
6225
6226 <P>
6227 A5033: Exim filters and procmail provide different facilities. Exim filters run
6228        at directing time, before <EM>any</EM> deliveries are done. A filter is like a
6229        <B>".forward</B> file with conditions". One of the benefits is de-duplication.
6230        Another is that if you forward, you are forwarding the original message.
6231
6232 </P>
6233 <P>
6234        However, this does mean that pipes etc. are not run at filtering time,
6235        nor can you change the headers, because the message may have other
6236        recipients and Exim keeps only a single set of headers.
6237
6238 </P>
6239 <P>
6240        Procmail runs at delivery time. This is for one recipient only, and so
6241        it can change headers, run pipes and check the results, etc. However, if
6242        it wants to forward, it has to create a new message containing a copy
6243        of the original message.
6244
6245 </P>
6246 <P>
6247        It's your choice as to which of these you use. You can of course use
6248        both.
6249
6250 </P>
6251 <A NAME="SEC262" HREF="FAQ.html#TOC262">Q5034</A>: I need an option that is the opposite of <B>-bpa,</B> that is, a listing of
6252        those addresses generated from a top-level address that have not yet
6253        been delivered.
6254
6255
6256 <P>
6257 A5034: Exim does not keep this information. It saves only the top-level
6258        addresses and the list of addresses that are finished with. At each
6259        delivery attempt, generated addresses are recomputed from scratch. This
6260        makes it possible to correct errors in <B>.forward</B> and alias files that are
6261        causing delivery delays. However, there is an option you can set on an
6262        <B>aliasfile</B> or <B>forwardfile</B> director that changes things. It is called
6263        <TT>one_time</TT>, and if it is set, the list of generated addresses gets added
6264        to the top-level list at the first delivery attempt, and is never
6265        regenerated. Because top-level address lists must be real email
6266        addresses, this option cannot be used if any of the generated addresses
6267        are pipes, files, or autoreplies.
6268
6269 </P>
6270 <A NAME="SEC263" HREF="FAQ.html#TOC263">Q5035</A>: I am getting complaints from a customer who uses my EXIM server for
6271        relaying that they are being blocked with a "Too many connections"
6272        error.
6273
6274
6275 <P>
6276 A5035: See <TT>smtp_accept_max</TT> and related options such as <TT>smtp_accept_reserve</TT>.
6277
6278 </P>
6279 <A NAME="SEC264" HREF="FAQ.html#TOC264">Q5036</A>: When I try "exim <B>-bf"</B> to test a system filter, I received the following
6280        error message: "Filter error: unavailable filtering command "fail" near
6281        line 8 of filter file".
6282
6283
6284 <P>
6285 A5036: Use the <B>-bF</B> option to test system filters. This gives you access to the
6286        freeze and fail actions.
6287
6288 </P>
6289 <A NAME="SEC265" HREF="FAQ.html#TOC265">Q5037</A>: How can I make Exim receive incoming mail, queue it, but NOT attempt to
6290        deliver it? I want to be in this state while moving some mailboxes.
6291
6292
6293 <P>
6294 A5037: (1) Set <TT>queue_only</TT> in the Exim configuration. (2) Kill off your daemon,
6295        and restart it <EM>without</EM> the <B>-q</B> option (i.e. with just the <B>-bd</B> option),
6296        so that it does not spawn any queue runners. This stops all deliveries,
6297        remote as well as local. To stop just local deliveries, assuming that
6298        none of your routers are configured to send messages directly to a local
6299        transport, make this your first director:
6300
6301 </P>
6302 <PRE>
6303          defer_all:
6304            driver = smartuser
6305            new_address = :defer:</PRE>
6306 <P>
6307        When you are ready to go again, remove that director and do a <B>-qf</B> run to
6308        override the retry times. This solution works from release 3.10 onwards.
6309        In earlier releases an <B>aliasfile</B> director must be used because :defer:
6310        was not available for use in <B>smartuser</B>.
6311
6312 </P>
6313 <A NAME="SEC266" HREF="FAQ.html#TOC266">Q5038</A>: What does the rejection message "reject all recipients: 3 times bad
6314        sender" mean?
6315
6316
6317 <P>
6318 A5038: See the section of the manual entitled "Sender verification". Exim has
6319        failed to verify a sender from the same host 3 times within a period of
6320        24 hours.
6321
6322 </P>
6323 <A NAME="SEC267" HREF="FAQ.html#TOC267">Q5039</A>: The menu in Eximon isn't working. It displays, but I can't select
6324        anything from it.
6325
6326
6327 <P>
6328 A5039: On some X implementations, if the numlock key is pressed (so that the
6329        numeric keypad is working) then the menu didn't work properly in
6330        versions of Eximon before Exim release 3.10. The problem is an
6331        infelicity in the particular implementation of X. A workaround was
6332        introduced at release 3.10, so this problem should no longer be
6333        encountered.
6334
6335 </P>
6336 <A NAME="SEC268" HREF="FAQ.html#TOC268">Q5040</A>: What does "ridiculously long message header" in an error report mean?
6337
6338
6339 <P>
6340 A5040: There has to be some limit to the length of a message's header lines,
6341        because otherwise a malefactor could open an SMTP channel to your host,
6342        start a message, and then just send characters continuously until your
6343        machine ran out of memory. (Exim stores all the header lines in main
6344        memory). For this reason a limit is imposed on the total amount of
6345        memory that can be used for header lines. The default is 1MB, but this
6346        can be changed by setting HEADER_MAXSIZE in <B>Local/Makefile</B>. Exceeding
6347        the limit provokes the "ridiculous" error message.
6348
6349 </P>
6350 <P>
6351        Prior to release 3.022 Exim used two separate limits, one on the length
6352        of an individual header line and one on the total number of header
6353        lines. A header line longer than 8192 used to provoke the error "Header
6354        line is ridiculously overlong". In subsequent releases there is no limit
6355        on individual header lines; only the total matters.
6356
6357 </P>
6358 <A NAME="SEC269" HREF="FAQ.html#TOC269">Q5041</A>: What does Exim use for POP as a default?  Do I have to install anything
6359        else?
6360
6361
6362 <P>
6363 A5041: Yes. Exim provides MTA functionality. That is, it delivers mail. POP is
6364        one of several ways of reading previously-delivered mail. Exim does not
6365        provide that functionality.
6366
6367 </P>
6368 <BR><H2><A NAME="SEC270" HREF="FAQ.html#TOC270">93. HP-UX
6369
6370 </A></H2>
6371 <A NAME="SEC271" HREF="FAQ.html#TOC271">Q9301</A>: I'm trying to compile on an HP machine and I don't have gcc there. So I
6372        put <TT>CC=cc</TT> in the <B>Local/Makefile</B>, but I got this error:
6373
6374
6375 <PRE>
6376        (Bundled) cc: "buildconfig.c", line 54: error 1705: Function prototypes
6377          are an ANSI feature.</PRE>
6378 <P>
6379 A9301: The bundled compiler is not an ANSI C compiler. You either have to get a
6380        copy of gcc from the HPUX Software Porting Archives or buy the ANSI cc
6381        from HP. The advice given by one user of HP systems on the Exim
6382        mailing list was as follows:
6383
6384 </P>
6385 <P>
6386          "Personally, I wouldn't use anything but the ANSI C compiler. gcc
6387          works for compilation, but it doesn't know squat about PA-RISC chips
6388          past the 1.0 rev. Since then, HP has come out with PA-RISC 1.1, 2.0,
6389          and 2.1, each with better features. gcc will compile for them, but it
6390          doesn't produce anywhere near the optimization that HP's compiler
6391          does.
6392
6393 </P>
6394 <P>
6395          I took the gcc road when we moved from FreeBSD to HP-UX because I was
6396          familiar with it. After 6 months, I had to go and re-port everything
6397          over when we realized that gcc wasn't going to do it for us long-term.
6398          If I could give advice to any new HP-UX admin: don't use gcc if you
6399          can afford the ANSI C compiler.  Based on the cost of even the lowest
6400          HP workstation, that usually isn't a problem."
6401
6402 </P>
6403 <BR><H2><A NAME="SEC272" HREF="FAQ.html#TOC272">94. BSDI
6404
6405 </A></H2>
6406 <A NAME="SEC273" HREF="FAQ.html#TOC273">Q9401</A>: On BSDI 4.0, Exim built with Perl support exits with the error message
6407        <B>"./exim:</B> can't load library <B>'libperl.so'".</B>
6408
6409
6410 <P>
6411 A9401: You probably compiled perl5 yourself, without looking into
6412
6413 </P>
6414 <PRE>
6415          /usr/src/contrib/perl5/perl5.004_02/hints/bsdos.sh</PRE>
6416 <P>
6417        first. The problem is that the command
6418
6419 </P>
6420 <PRE>
6421          perl5 -MExtUtils::Embed -e ldopts</PRE>
6422 <P>
6423        doesn't give you sufficient flags to link something with libperl.
6424        Since 5.004_02 the <B>hints/bsdos.sh</B> file has changed to adapt to the
6425        changes between BSDI 3.1 and 4.0, but it is still not entirely right.
6426
6427 </P>
6428 <P>
6429        The solution is, when you compile perl, change the "ccdlflags"
6430        variable in <B>config.sh</B> to:
6431
6432 </P>
6433 <PRE>
6434          -rdynamic -Wl,-rpath,/usr/local/lib/perl5/5.00502/i386-bsdos/CORE</PRE>
6435 <P>
6436        (or something similar). Alternatively, you can run ./Configure and
6437        answering the question "Any special flags to pass to cc to use dynamic
6438        loading?" with the above line. It is not known what <B>-rdynamic</B> means
6439        (it's not apparently documented in any man page), but that's what BSDI
6440        guys did to compile perl5 which comes with BSDI 4.0 distribution.
6441
6442 </P>
6443 <BR><H2><A NAME="SEC274" HREF="FAQ.html#TOC274">95. IRIX
6444
6445 </A></H2>
6446 <A NAME="SEC275" HREF="FAQ.html#TOC275">Q9501</A>: I'm running IRIX 6.2 with a number of alias IP addresses set up, but
6447        Exim doesn't seem to recognize them as local addresses.
6448
6449
6450 <P>
6451 A9501: This problem was fixed in Exim release 2.03. If you are running an
6452        earlier version you should use the <TT>local_interfaces</TT> option to specify
6453        all your IP addresses explicitly.
6454
6455 </P>
6456 <A NAME="SEC276" HREF="FAQ.html#TOC276">Q9502</A>: The IP addresses for incoming calls are all being given as
6457        255.255.255.255.
6458
6459
6460 <P>
6461 A9502: If you used the gcc compiler 2.8.x there is a known bug with the
6462        "gethost" function under Irix. SGI recommends using either their cc
6463        compiler in Irix 6.5, or a lesser version of the gnu compiler (2.6.x).
6464
6465 </P>
6466 <P>
6467        Alternatively, there is an Inst-able port of exim for Irix at
6468        <B><A HREF="http://freeware.sgi.com">http://freeware.sgi.com</A>,</B> but it is not likely to be the latest release.
6469
6470 </P>
6471 <BR><H2><A NAME="SEC277" HREF="FAQ.html#TOC277">96. LINUX
6472
6473 </A></H2>
6474 <A NAME="SEC278" HREF="FAQ.html#TOC278">Q9601</A>: Exim is mysteriously crashing, usually when forking to send a delivery
6475        error message.
6476
6477
6478 <P>
6479 A9601: This has been seen in cases where Exim has been incorrectly built with
6480        a muddled combination of an <B>ndbm.h</B> include file and a non-matching
6481        DBM library.
6482
6483 </P>
6484 <P>
6485        Faults like this have also been seen on systems with faulty motherboards.
6486        You could try to compile the Linux kernel 10 times - if the compile
6487        process stops with signal 11, your hardware is to blame.
6488
6489 </P>
6490 <A NAME="SEC279" HREF="FAQ.html#TOC279">Q9602</A>: Exim has created a directory called <B>build-Linux-libc5-i386</B> but is
6491        trying to reference <B>build-Linux-libc5-i386-linux</B> while building.
6492
6493
6494 <P>
6495 A9602: You have several shells installed, which are setting conflicting values
6496        in the HOSTTYPE environment variable that is used to construct the name
6497        of the build directory. One way round this is to run this command:
6498
6499 </P>
6500 <PRE>
6501          ln -s build-Linux-libc5-i386-linux build-Linux-libc5-i386</PRE>
6502 <P>
6503        This problem should no longer be encountered in release 3.10 or later.
6504        Exim has been changed to get the host type from the "uname" command
6505        preferentially.
6506
6507 </P>
6508 <A NAME="SEC280" HREF="FAQ.html#TOC280">Q9603</A>: I want to use logrotate which is standard with <B>RH5.2</B> Linux to rotate
6509        my mail logs. Anyone worked out the logrotate config file that will
6510        do this?
6511
6512
6513 <P>
6514 A9603: Here's one suggestion:
6515
6516 </P>
6517 <PRE>
6518          /var/log/exim/main.log {
6519              create 644 exim exim
6520              rotate 4
6521              compress
6522              delaycompress
6523          }</PRE>
6524 <P>
6525        The sleep is added to allow things to close the log file prior to
6526        compression. You also need similar entries for the panic log and the
6527        reject log, of course.
6528
6529 </P>
6530 <A NAME="SEC281" HREF="FAQ.html#TOC281">Q9604</A>: I'm seeing the message "<B>inetd</B>[334]: imap/tcp server failing (looping),
6531        service terminated" on a RedHat 5.2 system, causing imap connections to
6532        be refused. The imapd in use is Washington Uni vers 12.250. Could this
6533        be anything to do with Exim?
6534
6535
6536 <P>
6537 A9604: No, it's nothing to do with Exim, but here's the answer anyway: there
6538        is a maximum connection rate for <B>inetd</B>. If connections come in faster
6539        than that, it thinks a caller is looping. The default setting on RedHat
6540        5.2 is 40 calls in any one minute before <B>inetd</B> thinks there's a problem
6541        and suspends further calls for 10 mins. This default setting is very
6542        conservative. You should probably increase it by a factor of 10 or 20.
6543        For example:
6544
6545 </P>
6546 <PRE>
6547          imap stream tcp nowait.400 root /usr/sbin/tcpd /usr/local/etc/imapd</PRE>
6548 <P>
6549        The rate setting is the number following "nowait". This syntax seems to
6550        be specific to the Linux version of <B>inetd</B>. Other operating systems
6551        provide similar functionality, but in different ways.
6552
6553 </P>
6554 <A NAME="SEC282" HREF="FAQ.html#TOC282">Q9605</A>: I get the "too many open files" error especially when a lot of messages
6555        land for majordomo at the same time.
6556
6557
6558 <P>
6559 A9605: The problem appears to be the number of open files the system can
6560        handle. This is changable by using the proc filesystem. To your
6561        <B><B>/etc/rc.d/rc.local</B></B> file append something like the following:
6562
6563 </P>
6564 <PRE>
6565          # Now System is up, Modify kernel parameters for max open etc.</PRE>
6566 <PRE>
6567          if [ -f /proc/sys/kernel/file-max ]; then
6568                  echo 16384 &#62;&#62; /proc/sys/kernel/file-max
6569          fi
6570          if [ -f /proc/sys/kernel/inode-max ]; then
6571                  echo 24576 &#62;&#62; /proc/sys/kernel/inode-max
6572          fi
6573          if [ -f /proc/sys/kernel/file-nr ]; then
6574                  echo 2160 &#62;&#62; /proc/sys/kernel/file-nr
6575          fi</PRE>
6576 <P>
6577        By echoing the value you want for file-max to the file file-max <B>etc.,</B>
6578        you actually change the kernel parameters.
6579
6580 </P>
6581 <A NAME="SEC283" HREF="FAQ.html#TOC283">Q9606</A>: I'm having a problem with an Exim RPM.
6582
6583
6584 <P>
6585 A9606: Normally the thing to do if you have a problem with an RPM package is
6586        to contact the person who built the package first, not the person who
6587        made the software that's in the package.  You can usually find out who
6588        made a package using the following command:
6589
6590 </P>
6591 <PRE>
6592          rpm --query --package --queryformat '%{PACKAGER}\n' &#60;rpm-package-file&#62;</PRE>
6593 <P>
6594        where &#60;rpm-package-file&#62; is the actual file, e.g. <B>`exim-3.03-2.i386.rpm'.</B>
6595        Or, if the package is installed on your system:
6596
6597 </P>
6598 <PRE>
6599          rpm --query --queryformat '%{PACKAGER}\n' &#60;package-name&#62;</PRE>
6600 <P>
6601        where &#60;package-name&#62; is the name component of the package, e.g. `exim'.
6602        If the packager is unable or unwilling to help, only then should you
6603        contact the actual author or associated mailing list of the software.
6604
6605 </P>
6606 <P>
6607        If you discover through the querying process that you can't tell who
6608        the person (or company or group) is who built the package, or that they
6609        no longer exist at the given address, then you should reconsider
6610        whether you want a package from an unknown source on your system.
6611
6612 </P>
6613 <P>
6614        If you discover through the querying process that you yourself are the
6615        person who built the package, then you should either (a) contact the
6616        author or associated mailing list, or (b) reconsider whether you ought
6617        to be building and distributing RPM packages of software you don't
6618        understand.
6619
6620 </P>
6621 <P>
6622        Similar rules of thumb govern other binary package formats, including
6623        debs, tarballs, and POSIX packages.
6624
6625 </P>
6626 <BR><H2><A NAME="SEC284" HREF="FAQ.html#TOC284">97. SUN SYSTEMS
6627
6628 </A></H2>
6629 <A NAME="SEC285" HREF="FAQ.html#TOC285">Q9701</A>: Exim builds fine with gcc on SunOS 4 but crashes inside <B>sscanf()</B>.
6630
6631
6632 <P>
6633 A9701: Make sure you are liking with the GNU <B>ld</B> linker and not the system
6634        version of <B>ld</B>.
6635
6636 </P>
6637 <A NAME="SEC286" HREF="FAQ.html#TOC286">Q9702</A>: How can I get rid of spurious ^M characters in messages sent from
6638        CDE <B>dtmail</B>?
6639
6640
6641 <P>
6642 A9702: CDE <B>dtmail</B> passes messages to Exim via the command line interface with
6643        lines terminated by CRLF, instead of the Unix convention of just LF. As
6644        Exim is an 8-bit clean program it treats the CR as just another data
6645        character. Exim has a command line option called <B>-dropcr</B> which causes
6646        it to ignore <EM>all</EM> CR characters in an incoming non-SMTP message. You
6647        should configure <B>dtmail</B> to add this option to the command it uses to
6648        call Exim (using the path <B>/usr/lib/sendmail</B>). However, it has been
6649        reported that it isn't possible to change this call from <B>dtmail</B> by any
6650        official means. An alternative approach is to replace <B>/usr/lib/sendmail</B>
6651        by a filtering script which removes the spurious CRs from the input
6652        before passing it to Exim.
6653
6654 </P>
6655 <A NAME="SEC287" HREF="FAQ.html#TOC287">Q9703</A>: On SunOS 4 Exim crashes when looking up domains in the DNS that have
6656        more than 10 A records.
6657
6658
6659 <P>
6660 A9703: There are Sun library patches to fix this. It is not Exim's problem.
6661        For 4.13_U1 the patch is 101558<I>-xx</I>; for 4.1.3 the patch is 100891<I>-xx</I>.
6662        From the README: 1054748 ftp, ping dump core when connecting to a host
6663        with multiple DNS A records.
6664
6665 </P>
6666 <P>
6667        An alternative is to build another resolver library - such as the ones
6668        that are part of the bind distribution - and explicitly link against
6669        those.
6670
6671 </P>
6672 <A NAME="SEC288" HREF="FAQ.html#TOC288">Q9704</A>: The menu in Eximon isn't working on my Sun system.
6673
6674
6675 <P>
6676 A9704: With OpenWindows, if the numlock key is pressed (so that the numeric
6677        pad is working) then some menus don't work. This appears to be true for
6678        the console and (some) remote X-window servers. A workaround for this
6679        problem was introduced in the 3.10 Exim release, so it should no longer
6680        be encountered.
6681
6682 </P>
6683 <A NAME="SEC289" HREF="FAQ.html#TOC289">Q9705</A>: I am experiencing mailbox locking problems with Sun's <B>mailtool</B> used
6684        over a network.
6685
6686
6687 <P>
6688 A9705: Under the "Expert" settings of mailtool is a option to turn on "Use
6689        network aware mail file locking". By default <B>dtmail</B> has this set, but
6690        mailtool doesn't. You should set it. The help info on <B>dtmail</B> has this
6691        to say about it:
6692
6693 </P>
6694 <P>
6695        "Mailer tries to prevent two different instances of itself from opening
6696        the same mail file at the same time through a technique that detects
6697        this access when both instances of Mailer and the file are all on the
6698        same machine. A network-aware mail file locking protocol is available
6699        that uses ToolTalk to coordinate instances of Mailer running from more
6700        than one machine, or mail files accessed over the network. Mailer can
6701        only change this option when first opening a mail file."
6702
6703 </P>
6704 <P>
6705        If you are using the SunOS4 version of <B>mailtool</B>, this apparently
6706        doesn't work. The only thing which does seem to work it getting the user
6707        to hit the "done" button to make it release the lock.
6708
6709 </P>
6710 <A NAME="SEC290" HREF="FAQ.html#TOC290">Q9706</A>: Exim has been crashing on my Solaris x86 system, apparently while
6711        running DBM functions.
6712
6713
6714 <P>
6715 A9706: The use of ndbm with gcc has caused problems on x86 Solaris systems.
6716        Try changing one or the other; using either db 1.85 with gcc, or Sun's
6717        WS compiler with ndbm, has fixed this in the past.
6718
6719 </P>
6720 <A NAME="SEC291" HREF="FAQ.html#TOC291">Q9707</A>: The exiwhat utility isn't working for me on a Solaris 2 system.
6721
6722
6723 <P>
6724 A9707: Have you got <B>/usr/ucb</B> on your path? If so, it is probably picking up the
6725        wrong version of the <B>ps</B> command. The exiwhat script is built on
6726        Solaris to expect the normal Solaris version of <B>ps</B>.
6727
6728 </P>
6729 <A NAME="SEC292" HREF="FAQ.html#TOC292">Q9708</A>: How do I stop Sun's <B>dtcm</B> from hanging?
6730
6731
6732 <P>
6733 A9708: From qmail's FAQ: "There is a novice programming error in <B>dtcm</B>, known as
6734        ``failure to close the output side of the pipe in the <B>child.''</B> Sun has,
6735        at the time of this writing, not yet provided a patch."
6736
6737 </P>
6738 <A NAME="SEC293" HREF="FAQ.html#TOC293">Q9709</A>: I want Exim to use only the resolver (i.e. ignore <B>/etc/hosts</B>), but don't
6739        want to alter the <B>nsswitch.conf</B> file in Solaris 2.
6740
6741
6742 <P>
6743 A9709: You need to rebuild Exim after fiddling with <B>OS/os.h-SunOS5:</B>
6744
6745 </P>
6746 <PRE>
6747        #define gethostbyaddr res_gethostbyaddr
6748        #define gethostbyname res_gethostbyname
6749        #define endhostent res_endhostent
6750        #define endnetent res_endnetent
6751        #define gethostent res_gethostent
6752        #define getnetbyaddr res_getnetbyaddr
6753        #define getnetbyname res_getnetbyname
6754        #define getnetent res_getnetent
6755        #define sethostent res_sethostent
6756        #define setnetent res_setnetent</PRE>
6757 <P>
6758        Exim uses gethostbyname and gethostbyaddr only, but may use others in
6759        the future. Note that <B>-lnsl</B> is still needed in the Makefile as it
6760        contains code used by the NIS lookup and also the <TT>inet_addr</TT> function
6761        that Exim uses.
6762
6763 </P>
6764 <BR><H2><A NAME="SEC294" HREF="FAQ.html#TOC294">98. COOKBOOK
6765
6766 </A></H2>
6767 <A NAME="SEC295" HREF="FAQ.html#TOC295">Q9801</A>: How do I configure Exim as part of TPC <B>(<A HREF="http://www.tpc.int">http://www.tpc.int</A>)?</B>
6768
6769
6770 <P>
6771 A9801: (1) add <B>partial-lsearch;/etc/mail/tpc.domains</B> to <TT>local_domains</TT>;
6772            <B><B>/etc/mail/tpc.domains</B></B> is a text file with lines in this format:
6773
6774 </P>
6775 <PRE>
6776              9.3.5.1.0.8.1.tpc.int.</PRE>
6777 <P>
6778            This sample line indicates that we accept faxes destined for
6779            1(801)539-*.
6780
6781 </P>
6782 <P>
6783        (2) Set up the following transport:
6784
6785 </P>
6786 <PRE>
6787              tpc:
6788                driver = pipe
6789                command = "/usr/local/tpc/tpcmailer.pl ${local_part}@${domain} \
6790                   ${sender_address}"
6791                pipe_as_creator</PRE>
6792 <P>
6793            <B><B>/usr/local/tpc/tpcmailer.pl</B></B> is the mail processing script that can
6794            be obtained from the TPC distribution.
6795
6796 </P>
6797 <P>
6798        (3) Set up the following director:
6799
6800 </P>
6801 <PRE>
6802              tpc_director:
6803                driver = smartuser
6804                transport = tpc
6805                domains = "partial-lsearch;/etc/mail/tpc.domains"</PRE>
6806 <P>
6807        Of course, there are other things to do as well before your system is
6808        a functioning TPC server.
6809
6810 </P>
6811 <A NAME="SEC296" HREF="FAQ.html#TOC296">Q9802</A>: How do I configure Exim so that it sends mail to the outside world only
6812        from a restricted list of our local users?
6813
6814
6815 <P>
6816 A9802: There are several possible ways that this can be done.
6817
6818 </P>
6819 <P>
6820        (A) You can restrict the senders directly by putting a setting such as
6821            this one on all the drivers that route to the outside (usually this
6822            is just the final <B>lookuphost</B> router):
6823
6824 </P>
6825 <PRE>
6826              senders = ":^[^@]+@(?!${rxquote:your.domain}\\$):\
6827                        lsearch;/permitted/senders"</PRE>
6828 <P>
6829            The first item in this list is empty, to match the empty sender.
6830            This is necessary because bounce messages have null senders. The
6831            second item is a regular expression that matches any address whose
6832            domain is <EM>not</EM> your domain. This caters for cases when mail from
6833            an external user has arrived for a local user who has forwarding
6834            set up to some outside address.
6835
6836 </P>
6837 <P>
6838            If the first two items do not match (that is, the address is in your
6839            domain) the sender is looked up in a file of permitted senders; each
6840            item in the file must be a complete address, including the domain.
6841            If the sender is unacceptable, an "unrouteable mail domain" error
6842            will occur because the router won't run, and there are no more to
6843            try.
6844
6845 </P>
6846 <P>
6847        (B) If your local users are in many domains, it may be easier to use a
6848            <TT>condition</TT> option to test the domain and local part independently,
6849            along these lines:
6850
6851 </P>
6852 <PRE>
6853              condition = "\
6854                ${lookup{${domain:$sender_address}}lsearch{/domain/list}\
6855                {\
6856                  ${lookup{${local_part:$sender_address}}lsearch\
6857                  {/permitted/senders}{yes}{no}}\
6858                }\
6859                {yes}}"</PRE>
6860 <P>
6861            Obviously other means of testing the domain and local part could be
6862            substituted, for example, by having separate files of valid local
6863            parts for each local domain.
6864
6865 </P>
6866 <P>
6867        (C) If your local users are logged in to your host, you could use a
6868            special group for those that are permitted to mail to the world.
6869            Assuming your groups are defined in <B>/etc/group</B> you could arrange to
6870            look up the group in that file and then check that the sender was in
6871            the group,using something along these lines:
6872
6873 </P>
6874 <PRE>
6875              condition = "\
6876                ${lookup{groupname}lsearch{/etc/group}\
6877                {${if match {$value}\
6878                {[:,]${rxquote:${local_part:$sender_address}}(,|\\\$)}\
6879                {yes}{no}}}{no}}"</PRE>
6880 <P>
6881            This is checking the local part of the sender; a alternative might
6882            be to check <B><B>$sender_ident.</B></B> However, you should really also check
6883            that <B>$sender_host_address</B> is either unset or set to 127.0.0.1 or
6884            your IP address, so you check only locally-originated mail.
6885
6886 </P>
6887 <P>
6888            A block like this does not prevent a logged in user from sending
6889            mail by telnetting to another host's SMTP port, or indeed from
6890            installing a private version of Exim to do the job for her.
6891
6892 </P>
6893 <P>
6894        (D) On a gateway server that has no local users and so receives all the
6895            mail via SMTP from client hosts, you could use a rewriting rule to
6896            rewrite sender addresses in your local domain from a table of legal
6897            local parts, replacing any illegal addresses with an address such as
6898            <B><B>unknown@your.domain</B>.</B> If this is combined with <TT>sender_verify=true</TT>
6899            it causes messages from users that are not in the table to be
6900            refused, assuming that the gateway is capable of verifying the local
6901            part of <B><B>user@your.domain</B>.</B>
6902
6903 </P>
6904 <A NAME="SEC297" HREF="FAQ.html#TOC297">Q9803</A>: How do I configure Exim to run with SmartList?
6905
6906
6907 <P>
6908 A9803: This is what was done for Exim's own mailing list, using SmartList/
6909        procmail 3.11pre7. It runs as its own user - trying to manage mailing
6910        lists under your own ID can be hard work. Smartlist is installed into
6911        <B>/var/spool/slist</B>, and there is an slist user defined. Each list appears
6912        as a directory under <B>/var/spool/slist</B> (as per usual for Smarlist).
6913        Exim is configured like this:
6914
6915 </P>
6916 <PRE>
6917          # slist added to list of trusted users so it can
6918          # manipulate sender addresses</PRE>
6919 <PRE>
6920          trusted_users = exim:slist</PRE>
6921 <PRE>
6922          # in transports, a list transport is defined:</PRE>
6923 <PRE>
6924          list_transport:
6925            driver = pipe
6926            command = "/var/spool/slist/.bin/flist \
6927                      ${local_part}${local_part_suffix}"
6928            current_directory = /var/spool/slist
6929            home_directory = /var/spool/slist
6930            user = slist
6931            group = slist</PRE>
6932 <PRE>
6933          # in directors a list director is defined:</PRE>
6934 <PRE>
6935          list_director:
6936            driver = smartuser
6937            suffix = -request
6938            suffix_optional
6939            local_parts = !.bin:!.etc
6940            require_files = /var/spool/slist/${local_part}/rc.init
6941            transport = list_transport</PRE>
6942 <P>
6943        and thats it - no aliases, no special handling of out lists etc.
6944        What you do need is to ensure that choplist is used for distribution
6945        (that is, do not uncomment the <TT>alt_sendmail</TT> entry which is blank).
6946
6947 </P>
6948 <P>
6949        A couple of other things are forced - for example since the list runs in
6950        its own domain the domain value is forced to <B>exim.org.</B>
6951
6952 </P>
6953 <P>
6954        Then everything else is basic SmartList configuration - and that's
6955        moderately well documented. A confirmation stage on signup was added -
6956        now when you subscribe you are sent a confirmation which you must
6957        return before the system subscribes you (this prevents people
6958        subscribing their "friends" and makes sure that the addresses really do
6959        work). The confirm package is available at:
6960
6961 </P>
6962 <PRE>
6963           <A HREF="ftp://ftp.fatfree.com/confirm-1.1.tar.gz">ftp://ftp.fatfree.com/confirm-1.1.tar.gz</A></PRE>
6964 <P>
6965        and was written by Michelle Dick.
6966
6967 </P>
6968 <A NAME="SEC298" HREF="FAQ.html#TOC298">Q9804</A>: How do I configure Exim to minic PP's "tripnote" facility?
6969
6970
6971 <P>
6972 A9804: See C005.
6973
6974 </P>
6975 <A NAME="SEC299" HREF="FAQ.html#TOC299">Q9805</A>: How do I configure Exim to handle local parts with extensions?
6976
6977
6978 <P>
6979 A9805: See C010.
6980
6981 </P>
6982 <A NAME="SEC300" HREF="FAQ.html#TOC300">Q9806</A>: How do I configure Exim so that only a restricted list of users can
6983        receive mail from external domains?
6984
6985
6986 <P>
6987 A9806: See C013.
6988
6989 </P>
6990 <A NAME="SEC301" HREF="FAQ.html#TOC301">Q9807</A>: I have <B><B>someuser@mydomain.com</B></B> that I only want certain users to be able
6991        to mail to. How do I accomplish this?
6992
6993
6994 <P>
6995 A9807: This is a transport:
6996
6997 </P>
6998 <PRE>
6999          bounce:
7000            driver  = autoreply
7001            from    = postmaster@mydomain.com
7002            to      = $sender_address
7003            user    = exim
7004            subject = "Re: Your mail to ${local_part}"
7005            text    = "You are not allowed to mail to ${local_part}."</PRE>
7006 <P>
7007        This is a director that should come before all the others:
7008
7009 </P>
7010 <PRE>
7011          special_user:
7012            driver = smartuser
7013            local_parts = someuser
7014            transport = bounce
7015            senders = !: !lsearch;/list/of/permitted/senders</PRE>
7016 <P>
7017        Note that leading "!:" in senders. It allows the null sender &#60;&#62; to be
7018        valid (i.e. not to match this director). This is necessary, since bounce
7019        messages have null senders. All other permitted senders must be in the
7020        file as complete addresses, including a domain.
7021
7022 </P>
7023 <A NAME="SEC302" HREF="FAQ.html#TOC302">Q9808</A>: A site for which I provide secondary MX is down for some time. Is there
7024        a way to run the queue for that destination separately from the main
7025        queue?
7026
7027
7028 <P>
7029 A9808: No, because Exim does not have the concept of "the queue for that
7030        destination". It simply has a single pool of messages awaiting delivery
7031        (and some of them may have several destinations). The best approach to
7032        this is to arrange for all messages for the site to be saved somewhere
7033        other than the main spool, either on a separate dedicated MTA, or in
7034        BSMTP files. There is an example of the latter approach in C014.
7035
7036 </P>
7037 <A NAME="SEC303" HREF="FAQ.html#TOC303">Q9809</A>: How do I implement VERP (Variable Envelope Return Paths) in Exim?
7038
7039
7040 <P>
7041 A9809: See C017.
7042
7043 </P>
7044 <A NAME="SEC304" HREF="FAQ.html#TOC304">Q9810</A>: I'd like to make a copy of all outgoing messages to a local mailbox. Is
7045        there a solution for this using an Exim filter?
7046
7047
7048 <P>
7049 A9810: The following filter makes a copy of every message, except for delivery
7050        failure reports:
7051
7052 </P>
7053 <PRE>
7054          # Exim filter</PRE>
7055 <PRE>
7056          # Ignore error messages
7057          if error_message then finish endif</PRE>
7058 <PRE>
7059          # Copy if this is the first delivery attempt
7060          if first_delivery then
7061            unseen deliver copy@your.domain errors_to postmaster@your.domain
7062          endif</PRE>
7063 <P>
7064        The keyword "unseen" stops this being a "significant delivery", so that
7065        the message goes on to be delivered as normal. The <TT>errors_to</TT> setting
7066        changes the envelope sender on the copy so that if there is a problem
7067        delivering it, the bounce message is sent to postmaster.
7068
7069 </P>
7070 <P>
7071        You can add to the condition setting to select specific messages.
7072        To make a copy of outgoing messages only requires a definition
7073        of "outgoing". Because a message may have many recipients, simply
7074        testing for your own domain in both the From: and the To: headers is not
7075        enough. You can craft your own conditions, but here is one suggestion:
7076
7077 </P>
7078 <PRE>
7079          if $h_from: contains your.domain and
7080              foranyaddress $h_to:,$h_cc:
7081                ($thisaddress does not contain your.domain)
7082          then
7083            unseen deliver copy@your.domain errors_to postmaster@your.domain
7084          endif</PRE>
7085 <P>
7086        This takes copies of messages whose From: header contains <B>your.domain</B>
7087        and whose To: and Cc: headers contain at least one address that does not
7088        contain <B>your.domain.</B> See also 
7089         <A HREF="FAQ.html#SEC311">Q9817</A>.
7090
7091 </P>
7092 <A NAME="SEC305" HREF="FAQ.html#TOC305">Q9811</A>: I want to make a copy of outgoing messages to a specific file for each
7093        user in a specific directory, using a "save" command in a system filter.
7094        How can I arrange for Exim to write to these files under the correct
7095        UID/GID?
7096
7097
7098 <P>
7099 A9811: You need to set up a special transport and tell Exim to use it for
7100        file deliveries from the system filter. Add the following setting to
7101        your configuration:
7102
7103 </P>
7104 <PRE>
7105          message_filter_file_transport = copy_transport</PRE>
7106 <P>
7107        Then define <TT>copy_transport</TT> like this
7108
7109 </P>
7110 <PRE>
7111          copy_transport:
7112            driver = appendfile
7113            delivery_date_add
7114            envelope_to_add
7115            user = ${local_part:$sender_address}</PRE>
7116 <P>
7117        This assumes that you want to run the delivery under the uid associated
7118        with the local part of the sender address. Alternatively, you could just
7119        use <TT>user=exim</TT> and do all the writing under the same UID/GID.
7120
7121 </P>
7122 <A NAME="SEC306" HREF="FAQ.html#TOC306">Q9812</A>: How can I keep an archive of all mail for some specific local email
7123        addresses?
7124
7125
7126 <P>
7127 A9812: You could use a system filter, along the lines of
7128
7129 </P>
7130 <PRE>
7131          if
7132            first_delivery and &#60;tests for appropriate addresses&#62;
7133          then
7134            unseen save
7135              /mail/archive/${substr_0_10:$tod_log}
7136          endif</PRE>
7137 <P>
7138        That would create a new file for each day. However, in order to use
7139        this, you will need to set <TT>message_filter_file_transport</TT> to point to an
7140        appropriate transport which includes a setting of "user" to specify
7141        which uid to run the saving under, as is described in 
7142         <A HREF="FAQ.html#SEC305">Q9811</A>.
7143
7144 </P>
7145 <A NAME="SEC307" HREF="FAQ.html#TOC307">Q9813</A>: How can I configure Exim to provide a vacation message when there are
7146        no local users on my mail hub?
7147
7148
7149 <P>
7150 A9813: See C019.
7151
7152 </P>
7153 <A NAME="SEC308" HREF="FAQ.html#TOC308">Q9814</A>: We want to be able to temporarily lock out a user by disabling the
7154        password and moving the home directory to another place. How can we
7155        arrange to reject mail for users in this state?
7156
7157
7158 <P>
7159 A9814: Change the home directory pointer in the passwd file to something
7160        distinctive. For example, we use <B>/home/CANCELLED</B> for cancelled users.
7161        Then you can pick up such users with this director, which is placed
7162        immediately after <TT>system_aliases</TT>:
7163
7164 </P>
7165 <PRE>
7166          cancelled_users:
7167            driver = localuser
7168            transport = cancelleduser_pipe
7169            fail_verify
7170            match_directory = /home/CANCELLED</PRE>
7171 <P>
7172        This sends messages for cancelled users to the following special
7173        transport:
7174
7175 </P>
7176 <PRE>
7177          cancelleduser_pipe:
7178            driver = pipe
7179            command = "/opt/exim/util/cancelleduser.sh"
7180            ignore_status
7181            return_output
7182            user = nobody</PRE>
7183 <P>
7184        The script simply generates a message saying that the user is cancelled
7185        on its standard output. This gets returned to the original message
7186        sender in an error report.
7187
7188 </P>
7189 <P>
7190        If you don't want to change the home directory in the passwd file,
7191        an alternative is to check for the non-existence of the home directory
7192        with
7193
7194 </P>
7195 <PRE>
7196          require_files = +!$home</PRE>
7197 <P>
7198        instead of setting <TT>match_directory</TT>.
7199
7200 </P>
7201 <A NAME="SEC309" HREF="FAQ.html#TOC309">Q9815</A>: I need an alias, say "fakeaddress" that should receive a message,
7202        strip all reply-to: headers present, substitute another one pointing to
7203        "otheraddress" and forward a message to "realaddress".
7204
7205
7206 <P>
7207 A9815: Add this director:
7208
7209 </P>
7210 <PRE>
7211          fakeaddress_director:
7212            driver = smartuser
7213            domain = (if necessary to restrict the domain)
7214            local_parts = fakeaddress
7215            headers_remove = reply-to
7216            headers_add = reply-to: otheraddress
7217            new_address = realaddress</PRE>
7218 <P>
7219        If there are several of these aliases then you could list them in a file
7220        along with the corresponding other addresses, and use lookups instead of
7221        the fixed values shown above.
7222
7223 </P>
7224 <A NAME="SEC310" HREF="FAQ.html#TOC310">Q9816</A>: How can I set up Exim to work with Listar?
7225
7226
7227 <P>
7228 A9816: See <B><A HREF="http://www.cs.huji.ac.il/~vadik/listar-exim/.">http://www.cs.huji.ac.il/~vadik/listar-exim/.</A></B>
7229
7230 </P>
7231 <A NAME="SEC311" HREF="FAQ.html#TOC311">Q9817</A>: I need to take copies of all incoming and outgoing mail for certain
7232        users. For each user there may be a different monitoring address.
7233
7234
7235 <P>
7236 A9817: You can adapt the filter solution given in 
7237         <A HREF="FAQ.html#SEC304">Q9810</A> by adding a test for
7238        the relevant local parts. Create a file containing lines like this:
7239
7240 </P>
7241 <PRE>
7242          user1@domain1:   monitor1@monitor.domain1
7243          user2@domain2:   monitor2@monitor.domain2</PRE>
7244 <P>
7245        and then use the following command in a system filter:
7246
7247 </P>
7248 <PRE>
7249          if ${lookup{$sender_address}lsearch{/some/file}{$value}{}} is not ""
7250          then
7251            unseen deliver ${lookup{$sender_address}lsearch{/some/file}{$value}}
7252              errors_address = postmaster@your.domain
7253          else
7254            if foranyaddress $recipients
7255              (${lookup{$thisaddress}lsearch{/some/file}{$value}{}} is not "")
7256            then
7257              unseen deliver ${lookup{$thisaddress}lsearch{/some/file}{$value}}
7258                errors_address = postmaster@your.domain
7259            endif
7260          endif</PRE>
7261 <P>
7262        It is messy to have to repeat the lookups, but it won't be inefficient,
7263        because Exim caches the results of successful lookups.
7264
7265 </P>
7266 <A NAME="SEC312" HREF="FAQ.html#TOC312">Q9818</A>: How can I add a disclaimer to the end of every message?
7267
7268
7269 <P>
7270 A9818: This isn't as easy as it appears. You cannot just add text to the bottom
7271        of messages because of the possibility of MIME attachments. In any case,
7272        it is not the job of an MTA to mess with the contents of messages. You
7273        can perhaps do things with Exim's transport filters if you really have
7274        to, but if the messages originate locally, it would be better to do
7275        what you want in the MUA (e.g. force all your local users to have it in
7276        their .sig files).
7277
7278 </P>
7279 <A NAME="SEC313" HREF="FAQ.html#TOC313">Q9819</A>: I would like to append a simple advertisement text to all outgoing
7280        and local mails.
7281
7282
7283 <P>
7284 A9819: See 
7285         <A HREF="FAQ.html#SEC312">Q9818</A>.
7286
7287 </P>
7288 <A NAME="SEC314" HREF="FAQ.html#TOC314">Q9820</A>: How can I configure Exim so that all mails adressed to
7289        <B><B>something@username.domain.net</B></B> get delivered to <B>/var/spool/mail/username</B>?
7290
7291
7292 <P>
7293 A9820: There are several possibilities, depending on exactly how you are set
7294        up. Here is one approach: First, arrange that all the domains you are
7295        interested in are local domains, for example, by listing them in a file:
7296
7297 </P>
7298 <PRE>
7299          local_domains = /list/of/domains</PRE>
7300 <P>
7301        If there are lots of them, a DBM or cdb file should be used for a faster
7302        lookup. Assuming that "username" is set up as a user on your system, and
7303        you have a configuration that can handle <B><B>username@domain.net</B></B> in the
7304        normal way, all you have to do is to arrange to convert the recipient
7305        address by means of a <B>smartuser</B> director like this:
7306
7307 </P>
7308 <PRE>
7309          user_in_domain:
7310            driver = smartuser
7311            domains = /list/of/domains
7312            new_address = ${if match{$domain}{^([^.]+)\\.domain\\.net\$}{$1}fail}@domain.net</PRE>
7313 <P>
7314        This should be the first director.
7315
7316 </P>
7317 <A NAME="SEC315" HREF="FAQ.html#TOC315">Q9821</A>: How do I get exim not to add a Sender: header to locally originated
7318        mail?
7319
7320
7321 <P>
7322 A9821: It only adds it if the From: header doesn't correspond to the user
7323        sending the message. You can't remove it in general (but this may be
7324        possible in a future release). However:
7325
7326 </P>
7327 <P>
7328        (1) You can get it removed later, by putting
7329
7330 </P>
7331 <PRE>
7332          headers_remove = Sender</PRE>
7333 <P>
7334        on all your transports. This doesn't test for locally originated mail,
7335        but you could use a more complicated expansion string to make that test.
7336        For example
7337
7338 </P>
7339 <PRE>
7340          headers_remove = ${if eq{$sender_host_address}{}{Sender}}</PRE>
7341 <P>
7342        which removes it only if there is no sending host address.
7343
7344 </P>
7345 <P>
7346        (2) If your <EM>real</EM> question "how do I submit mail from UUCP
7347        without it adding Sender:?" Then see 
7348         <A HREF="FAQ.html#SEC154">Q0603</A>.
7349
7350 </P>
7351 <A NAME="SEC316" HREF="FAQ.html#TOC316">Q9822</A>: How can I get Exim to work with mailman?
7352
7353
7354 <P>
7355 A9822: The Exim mailing list uses the configuration that is given in the "how
7356        to" information at <B><A HREF="http://www.exim.org/howto/mailman.html">http://www.exim.org/howto/mailman.html.</A></B>
7357
7358 </P>
7359 <A NAME="SEC317" HREF="FAQ.html#TOC317">Q9823</A>: Is there any way to have messages sent to a specific local address
7360        delayed by - say - 24 hours?
7361
7362
7363 <P>
7364 A9823: Using Exim 3.10 or later, the answer is "yes". Set up a <B>smartuser</B>
7365        director like this:
7366
7367 </P>
7368 <PRE>
7369          delay:
7370            driver = smartuser
7371            domains = the.domain
7372            local_parts = thelocalpart
7373            condition = ${if &#60; ${$message_age}{86400}{yes}{no}}
7374            new_address = :defer: message not old enough</PRE>
7375 <P>
7376        Of course, this will also have the effect of setting a retry time for
7377        the address. You may want to set a special retry rule for it.
7378
7379 </P>
7380 <BR><H2><A NAME="SEC318" HREF="FAQ.html#TOC318">99. LIST OF SAMPLE CONFIGURATIONS
7381
7382 </A></H2>
7383 <P>
7384 Each sample configuration is held in a separate file in the <B>config.samples</B>
7385 directory. Those with names of the form Cnnn are Exim configurations; those
7386 with names of the form Fnnn are filter file fragments.
7387
7388 </P>
7389 <P>
7390 C001:  "This config will support delivery across multiple systems using NIS to
7391        look up delivery addresses from the <B>mail.aliases</B> database."
7392
7393 </P>
7394 <P>
7395 C002:  "Although exim not intended for use in UUCP environment (it doesn't
7396        know anything about bang!path addresses), I'm successfully using it for
7397        delivering mail to UUCP clients."
7398
7399 </P>
7400 <P>
7401 C003:  "I've read down through 
7402         <A HREF="FAQ.html#SEC152">Q0601</A> and your request for UUCP examples. Here's
7403        how I'm doing it." (This example uses routers.)
7404
7405 </P>
7406 <P>
7407 C004:  "Here's a BSMTP over UUCP [configuration] - the transport is Taylor/GNU
7408        UUCP - which takes the long option types." (This example uses
7409        directors.)
7410
7411 </P>
7412 <P>
7413 C005:  "I am using a virus scanner program that is invoked by a pipe, scans the
7414        mail and re-invokes Exim to do the delivery. The pipe is invoking a perl
7415        script that tries to unpack and MIME, zip and other archives and then
7416        applies the McAfee scanner on the results."
7417
7418 </P>
7419 <P>
7420 C006:  "This is how I have configured a PP-inspired vacationnote, there is
7421        (was?) such a feature in PP. The user makes a file "tripnote" in his/her
7422        home directory, the message is passed to the sender once with a short
7423        leading text."
7424
7425 </P>
7426 <P>
7427 C007:  "If I host a domain <B>foo.dom</B> on my machine as a virtual domain I expect
7428        it to be completely virtual and separate from other mail domains that
7429        end up on my machine."
7430
7431 </P>
7432 <P>
7433 C008:  "And of course it is possible to do a very interesting solution to
7434        this [virtual domains] using LDAP."
7435
7436 </P>
7437 <P>
7438 C009:  "These are suggested parts of a configuration for looking up users in
7439        <B><B>/etc/passwd.domain</B></B> rather than in <B>/etc/passwd</B> ..."
7440
7441 </P>
7442 <P>
7443 C010:  "One of our customers is looking for us to support addresses of the form
7444        <B><B>username+extension@domain.com</B>,</B> primarily for use with procmail."
7445
7446 </P>
7447 <P>
7448 C011:  "Thanks to Philip and others I now have my ISP style config built and
7449        therefore am posting the final configuration fragments to the list in
7450        case anyone else wants to do a similar thing."
7451
7452 </P>
7453 <P>
7454 C012:  "I've written a small chapter how-to configure Exim for use with UUCP
7455        (mostly condensed from the exim-user mailing list plus some
7456        experimenting) and would be glad if it could be included in the Exim
7457        documentation."
7458
7459 </P>
7460 <P>
7461 C013:  "I've take some tips from the FAQ about permitting only certain users
7462        to send to external mail and came up with my own for the receiving
7463        part."
7464
7465 </P>
7466 <P>
7467 C014:  "If I have a situation where a site I MX for has a known outage I stash
7468        all their mail into a directory in BSMTP format."
7469
7470 </P>
7471 <P>
7472 C015:  "This approach to virtual domains has helped me a great deal, and is so
7473        easy to maintain (add and modify as appropriate)."
7474
7475 </P>
7476 <P>
7477 C016:  "Herewith my configuration." (A complete configuration, including simple
7478        virtual domains, along the lines of C015).
7479
7480 </P>
7481 <P>
7482 C017:  "I have gotten the new VERP feature of Exim 2.054 working in test, along
7483        with some supporting programs to handle bounces that do come back."
7484
7485 </P>
7486 <P>
7487 C018:  "This Majordomo configuration removes a lot of the aliases, and
7488        automates a lot of the other functions based on whether the files or
7489        directories exist."
7490
7491 </P>
7492 <P>
7493 C019:  "The following configuration file entries can be used to provide a
7494        'vacation'-style function for a mailhub which has no local users."
7495
7496 </P>
7497 <P>
7498 C020:  "I was asked for a copy of the programs we were using to mail
7499        everybody."
7500
7501 </P>
7502 <P>
7503 C021:  "Here is some sample code that might be useful for handling
7504        X-Failed-Recipients headers generated by Exim, with mailing lists."
7505
7506 </P>
7507 <P>
7508 C022:  "This is the Exim configuration file of a machine which delivers mail to
7509        several local domains where the mail is delivered locally, several hairy
7510        domains, handled as described below, and a half-virtual domain, which is
7511        first processed by its special alias file, then processed as other local
7512        domains (including the processing by the global alias file)."
7513
7514 </P>
7515 <P>
7516 C023:  A Perl script and instructions for hooking it into Exim in order to
7517        handle disposition-notification-to and return-receipt-to by using a
7518        shadow transport to send copies of delivered messages to the script.
7519
7520 </P>
7521 <P>
7522 C024:  "In case anybody wants to use a MySql database to store aliases this is
7523        how I managed to get my site working."
7524
7525 </P>
7526 <P>
7527 C025:  "As promised here is the way I got Exim to delver to Cyrus mailboxes if
7528        the user exists in the MySql database."
7529
7530 </P>
7531 <P>
7532 C026:  "The following configuration and program will allow messages going to
7533        AOL only, to be filtered thru a Perl script. This Perl script will
7534        convert any URL's to the HTML syntax. In addition, the transport will
7535        use VERP to send a unique envelope sender with each message."
7536
7537 </P>
7538 <P>
7539 C027:  "This is an FYI to demonstrate how to have exim work with SSL using the
7540        stunnel wrapper and its underlying OpenSSL libraries and toolkit."
7541
7542 </P>
7543 <P>
7544 C028:  "This Python script reads from stdin and writes to stdout. It strips all
7545        the MIME attachments from a mail message that are one of the mime types
7546        listed on the command line. Exim can use it in its configuration file,
7547        for example, as follows:"
7548
7549 </P>
7550 <P>
7551 C029:  "The standard way to connect one's MTA to a list manager seems to be to
7552        add a set of aliases for <EM>every</EM> list one creates. Once upon a time, I
7553        crufted a set of configs from Smail to work with majordomo, to
7554        automaticaly recognize the standard patterns, for all lists in
7555        existence...I have setup a set of transports and directors for Exim,
7556        which will do the same thing for mailman."
7557
7558 </P>
7559 <P>
7560 C030:  "I am currently configuring an exim for a site that will to mail
7561        hosting for several domains. I want the domain holders to have control
7562        over 'their' alias files, being able to create their own aliases.
7563        However, I don't want them to have postmaster, abuse and other role
7564        accounts under their control."
7565
7566 </P>
7567 <P>
7568 C031:  "These are config file snippets for handling certain remote addresses as
7569        local, and making only real external addresses visible to users."
7570
7571 </P>
7572 <P>
7573 C032:  "This is the Exim Nervous Mailbox Quota Suite.  It does not impose
7574        hard quotas on users' mailboxes, but it makes a user nervous by
7575        putting all his mail in a secondary mailbox, inaccessible to the
7576        user, when he is over his quota.  When the user clears his
7577        mailbox (i.<B>e.,</B> deletes mail to make his mailbox below the quota
7578        again), mail from his secondary mailbox is transferred back to
7579        his primary mailbox, in FIFO order."
7580
7581 </P>
7582 <P>
7583 C033:  "Here's our current automatic vacation recipe".
7584
7585 </P>
7586 <P>
7587 C034:  "This is a HOW-TO for setting up Exim to support SMTP authentication
7588        under different environments, including regular password files, PAM
7589        and NIS."
7590
7591 </P>
7592 <P>
7593 C035:  "These configurations enable exim and hylafax <B>(www.hylafax.org)</B>  work
7594        together, I mean sending fax by email <B><B>(user@123456.fax</B>)."</B>
7595
7596 </P>
7597 <P>
7598 F001:  "I thought that the rest of the list may be interested in reviewing our
7599        filter as a starting point for their own system message filter."
7600
7601 </P>
7602 <P>
7603 F002:  "... program which refused mail from unknown addresses until they mailed
7604        me promising not to spam me ... since I'd already thought through how
7605        to do it in Exim, and knew it'd be slightly easier than falling out of
7606        bed, I went ahead and did it."
7607
7608 </P>
7609 <P>
7610 F003:  "Here's four checks installed in our system wide filter that knock out
7611        a lot of otherwise hard to detect rubbish."
7612
7613 </P>
7614 <P>
7615 F004:  "This is an Exim filter snippet to change locally-generated Message-Id:
7616        and Resent-Message-Id: headers to world-unique values."
7617
7618 </P>
7619 <HR>
7620
7621 </BODY>
7622 </HTML>