The Exim FAQ

Contents   Previous   Next

96. LINUX

Q9601:  Exim is mysteriously crashing, usually when forking to send a delivery error message.

A9601:  This has been seen in cases where Exim has been incorrectly built with a muddled combination of an ndbm.h include file and a non-matching DBM library.

Faults like this have also been seen on systems with faulty motherboards. You could try to compile the Linux kernel 10 times - if the compile process stops with signal 11, your hardware is to blame.

Q9602:  I want to use logrotate which is standard with RH5.2 Linux to rotate my mail logs. Anyone worked out the logrotate config file that will do this?

A9602:  Here's one suggestion:

   /var/log/exim/main.log {
       create 644 exim exim
       rotate 4
       compress
       delaycompress
   }

The sleep is added to allow things to close the log file prior to compression. You also need similar entries for the panic log and the reject log, of course.

Q9603:  I'm seeing the message inetd[334]: imap/tcp server failing (looping), service terminated on a RedHat 5.2 system, causing imap connections to be refused. The imapd in use is Washington Univers 12.250. Could this be anything to do with Exim?

A9603:  No, it's nothing to do with Exim, but here's the answer anyway: there is a maximum connection rate for inetd. If connections come in faster than that, it thinks a caller is looping. The default setting on RedHat 5.2 is 40 calls in any one minute before inetd thinks there's a problem and suspends further calls for 10 mins. This default setting is very conservative. You should probably increase it by a factor of 10 or 20. For example:

   imap stream tcp nowait.400 root /usr/sbin/tcpd /usr/local/etc/imapd

The rate setting is the number following “nowait”. This syntax seems to be specific to the Linux version of inetd. Other operating systems provide similar functionality, but in different ways.

Q9604:  I get the too many open files error especially when a lot of messages land for Majordomo at the same time.

A9604:  The problem appears to be the number of open files the system can handle. This is changable by using the proc filesystem. To your /etc/rc.d/rc.local file append something like the following:

   # Now System is up, Modify kernel parameters for max open etc.
   if [ -f /proc/sys/kernel/file-max ]; then
		 echo 16384 >> /proc/sys/kernel/file-max
   fi
   if [ -f /proc/sys/kernel/inode-max ]; then
		 echo 24576 >> /proc/sys/kernel/inode-max
   fi
   if [ -f /proc/sys/kernel/file-nr ]; then
		 echo 2160 >> /proc/sys/kernel/file-nr
   fi

By echoing the value you want for file-max to the file file-max etc., you actually change the kernel parameters.

Q9605:  I installed debian 2.2 linux on a small 325mb 486 laptop. When I try to test the Mail program, I get the following error: Failed to open configuration file /etc/exim.conf.

A9605:  The Debian installation should have given you /usr/sbin/eximconfig, which asks you some questions and then sets up the configuration file in /etc/exim.conf. Try running that (you'll probably need root) and see how it goes. In any case you get a thoroughly commented conf file at the end, which will give you a sample from which to work if you need further modification.

The Exim docs in the Debian package are in /usr/doc/exim where the full reference manual is spec.txt.gz.

Q9606:  I'm having trouble configuring Exim 4 on a Debian system. How does /etc/exim4/conf.d work?

A9606:  The Debian Exim 4 package uses a quite uncommon, but elegant, method of configuration where the “real” Exim configuration file is assembled from a tree of snippets by a script invoked just before the daemon is started (see Q9608).

This fits very well into the Debian system of configuration file management and is a great ease for the automatic configuration with Debconf. However, it is very different from the normal way Exim 4 is configured. Non-Debian users on the Exim mailing list will probably have difficulty in trying to answer specific questions about it. You may have to find a Debian expert.

Q9607:  I'm having difficulties trying to make Exim 4 with Redhat 9 and Berkeley DB 4.

A9607:  Have you remembered to install the db4-devel package?

Q9608:  I'm running Exim 3 under Debian, and want to upgrade to Exim 4. How difficult is it?

A9608:  A user who did this, using the Debian Exim 4 package, reported as follows:

(1)  The exim4 package installs easily, and the exim (3.38) package uninstalls at the same time.

(2)  Exim runs from inetd. Exim4 runs from /etc/init.d. Much nicer!

(3)  The exim conffile lives in /etc/exim/exim.conf. The exim4 conffile lives in /var/lib/exim4/config.autogenerated. It is, as the name suggests, autogenerated.

(4)  A new directory is created called /etc/exim4. This contains the conffiles to generate the above config. You make changes here.

(5)  Once you have made changes to the files in /etc/exim4 you run the script update-exim4.conf which generates a replacement config.autogenerated.

[Added comment by the Debian maintainer, slightly edited: You also need to tell the Exim daemon to reread the changed configuration. You can do this using SIGHUP by hand. Alternatively, instead of running update-exim4.conf you can use

   invoke-rc.d exim4 reload

which does the rebuild and also tells Exim to reread the changed configuration.]

(6)  In my experience, you need to carefully check the generated configs. eg, it did not generate a system filter file reference in the config.autogenerated. I didn't bother too much, since this is a home setup.

(7)  All of this may be in the docs. I've read some of them, obviously, but didn't come across an actual upgrade guide.

[The Debian maintainer says: /usr/share/doc/exim4-base/README.Debian.gz and update-exim4.conf(8) should answer most of the questions.]

(8)  I've still got some minor things to tweak to get back to where I was before with Exim 3. But overall, it's no drama.

Q9609:  Why do some servers refuse SMTP connections from my Linux box, but accept connections from hosts running other operating systems?

A9609:  If you are sure this isn't a policy issue (that is, your box isn't administratively blocked for some reason), this may be because your Linux box has ECN (Explicit Congestion Notification) enabled in its TCP/IP stack. There are many broken firewalls that refuse connections from ECN-enabled hosts. You can check the state of your box by running

   cat /proc/sys/net/ipv4/tcp_ecn

If the value is "1", you have ECN enabled. You can turn it off by running this command:

   echo "0" > /proc/sys/net/ipv4/tcp_ecn


Contents   Previous   Next