Exim can be configured to deliver mail to Archiveopteryx via LMTP. You'll need to define an smtp transport, and route mail to it using a suitable director (e.g. smartuser), as explained below.
By default, our smtp server accepts LMTP connections on 127.0.0.1, port 2026. If you've changed the values of lmtp-address or lmtp-port in archiveopteryx.conf, set hosts and port to the new values in the transport definition below.
First, add this to the "transports" section of exim.conf:
# Delivers mail via LMTP to Archiveopteryx at 127.0.0.1:2026. archiveopteryx: driver = smtp protocol = lmtp hosts = 127.0.0.1 port = 2026 allow_localhost = true hosts_avoid_tls = 127.0.0.1
If you're delivering to a different host, you don't need to set "allow_localhost", and you may not want to set "hosts_avoid_tls" (using TLS with localhost gives us no benefit, so we can avoid the expensive negotiation).
Next, you'll need to route mail to this transport using a suitably configured director or router in exim.conf. The example below creates one named archiveopteryx that directs all mail addressed to example.com via the transport we defined above.
# Route *@example.com mail to the archiveopteryx transport. archiveopteryx: driver = smartuser domains = example.com transport = archiveopteryx
(Unfortunately, the smartuser driver has been removed from Exim 4.x, and its functionality incorporated into the accept/redirect drivers. We'll update these instructions once we understand how to configure the equivalent behaviour in recent versions.)
The following example is taken from a user's Exim 3.3x installation where the objective was to try out Archiveopteryx for a few users on a new server, but to leave mail delivery otherwise unchanged.
In this example, Exim is running on mail.example.org (192.0.2.1), and Archiveopteryx is on aox.example.org (192.0.2.2). Mail is delivered into local spool files on mail.example.org, but we want to forward an extra copy to aox.example.org.
First, we configure Archiveopteryx to accept LMTP connections from mail.example.org by adding the following to archiveopteryx.conf:
lmtp-address = 192.0.2.2 lmtp-port = 2026
Then, on mail.example.org, we define a new transport named archiveopteryx in exim.conf:
# Delivers mail via LMTP to 192.0.2.2:2026. archiveopteryx: driver = smtp protocol = lmtp hosts = 192.0.2.2 port = 2026
Next, to continue normal delivery to local users, but add a copy to be delivered to aox.example.org, we added entries like the following to /etc/aliases:
foo: foo, foo@aox.example.org
Finally, we added "aox.example.org" to "local_domains" in exim.conf,
and added a new director named
# Directs mail to *@aox.example.org to the archiveopteryx transport, # after rewriting the address to *@example.org tarkovsky: driver = smartuser domains = aox.example.org new_address = ${quote:$local_part}@example.org transport = archiveopteryx
Note that we remove the extra "aox." from the address before we deliver the message, so Archiveopteryx users continue to use their normal addresses (e.g. aox add user foo pwd foo@example.org for the alias above).
Please let info@aox.org know if you have other Exim configuration tips to share.
In case you have any questions, write to info@aox.org.
Last modified: 2010-05-03
Location: aox.org/exim