Exim

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 linuxbox.example.com), queue all outbound mail when offline and hand it off to a smarthost for delivery. However, unqualified senders (say “user”) will be qualified as “user@example.com”

For exim 3.x

In the Main Configuration Settings section

primary_hostname = example.com
qualify_domain = example.com
qualify_recipient = example.com
local_domains = linuxbox.example.com
host_accept_relay = localhost 
queue_remote_domains = ! localhost

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

route_append:
		driver=domainlist
	transport=remote_smtp
	route_list="* your.isps.smtp.server byname"

For exim 4.x

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

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

 send_to_gateway:
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 ( http://www.exim.org/FAQ.html#TOC218 ) 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 frodo.hserus.net 25 220 frodo.hserus.net ESMTP NO UCE ehlo quirk.hserus.net 250-frodo.hserus.net Hello quirk.hserus.net [61.11.81.143] 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:

remote_smtp:

driver = smtp
hosts_require_auth = authsmtp.example.com
hosts_try_auth = authsmtp.example.com

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

login:

 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: 2014/11/21 12:10 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: GNU Free Documentation License 1.3
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki