User Tools

Site Tools



Exim is extremely easy to configure for dialup use. It also happens to be the default MTA on Debian GNU/Linux. Debian has a script called eximconfig which will help you interactively configure exim.

These settings below will configure Exim on a dialup line to deliver mail immediately to the local domain (say, queue all outbound mail when offline and hand it off to a smarthost for delivery. However, unqualified senders (say “user”) will be qualified as “”

For exim 3.x

In the Main Configuration Settings section

primary_hostname =
qualify_domain =
qualify_recipient =
local_domains =
host_accept_relay = localhost 
queue_remote_domains = ! localhost

In the Routers section [right at the top, before other routers]

	route_list="* your.isps.smtp.server byname"

For exim 4.x

primary_hostname =
domainlist local_domains = lsearch:/usr/local/etc/exim/local_domains
hostlist relay_from_hosts =
queue_domains = ! *.localnet

In the Routers section [right at the top, before other routers]

driver = manualroute
domains = !+local_domains
transport = remote_smtp
route_list = * your.isps.smtp.server

This will force outgoing mail through your.isps.smtp.server when connected

To process the queued messages and deliver them to your smarthost, put this line in your /etc/ppp/ip-up.local file -

/usr/exim/bin/exim -qff &

There you go …

Section 14 of the Exim FAQ ( ) will give you a few more nifty ideas on configuring exim for use over a dialup.

More and more ISPs require you to use SMTP AUTH to authenticate yourself before sending mail through their servers. So, you can set up exim as an AUTH client so that it authenticates itself to the smarthost before relaying through it.

For this, you need exim compiled with cyrus sasl and openssl libraries - most distro packaged exims are compiled with these anyway. If you want to compile exim by hand, just uncomment the necessary lines in Local/Makefile and go on with make, make install

Make sure your cyrus sasl is compiled with PLAIN and LOGIN support, if your ISP only offers AUTH PLAIN and LOGIN instead of other methods such as AUTH CRAM-MD5. If you are using an RPM (or other package) you might have to install a couple of additional packages which are plain / login plugins for sasl - for example, on redhat it would be cyrus-sasl-plain-[version].rpm and cyrus-sasl-login-[version].rpm. You can find out what authentication and other options (say TLS) your ISP offers by telneting to port 25 of their smtp server and issuing an EHLO command:

For example -

srs@quirk:~$ telnet 25 220 ESMTP NO UCE ehlo Hello [] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN 250-STARTTLS 250 HELP

Once you have seen that your ISP offers AUTH - stick the following into your exim configure file (configure, exim.conf or whatever you call it) -

In your remote_smtp transport:


driver = smtp
hosts_require_auth =
hosts_try_auth =

At the bottom of your configure file, in the authenticators section:


 driver = plaintext
 public_name = LOGIN
 client_send = ": username : password"

See the exim FAQ for examples using AUTH PLAIN or AUTH CRAM-MD5

handbook/handbook/exims.txt · Last modified: 2010/04/15 21:18 (external edit)