On May 31, 2004, at 09:17, Andrzej Filip wrote:
> http://anfi.homeunix.net/exim/rtvcyrus.html
Good work! This is a NSIAQ (not so infrequently asked question).
> Could you authoritatively confirm that Exim can't do callouts over unix
> sockets ? ("lmtp" transport with "socket" option")
This is correct. Exim callouts happen only over "remote" transports,
including "smtp" with the protocol set to "lmtp", but not over local
transports, including "lmtp" with "socket".
> Feel free to send comments and references to "previous art".
Well, an alternate way to verify recipients against Cyrus, which uses
the standard mechanism of delivering over UNIX domain sockets (and so
does _not_ require a TCP socket) is to invoke the supplied "mbpath"
utility in an Exim router:
cyrus_lmtp_router:
debug_print = "R: cyrus_lmtp for $local_part@$domain"
driver = accept
domains = +local_domains
local_parts = ! root
require_files = /usr/sbin/mbpath
condition = ${run {/usr/sbin/mbpath -q -s
user.${lc:$local_part}}{1}{0}}
transport = cyrus_lmtp_transport
....
cyrus_lmtp_transport:
driver = lmtp
socket = /var/run/cyrus/socket/lmtp
transport_filter = /usr/bin/tr -d \\000
batch_max = 20
user = cyrus
Note #1: Make sure that the Exim user can successfully run the "mbpath"
utility. On my system, I do that by adding it to the "mail" group
("adduser Debian-exim mail").
Note #2: The "${lc:$local_part}" syntax above translates $local_part to
lowercase before checking for its mailbox path. If you have Cyrus
users that are not all lowercase, you need to change this.
Note #3: The "transport_filter" strips off NULL characters in the
message, before delivering it to Cyrus. Cyrus rejects such messages,
and you would otherwise end up freezing them in your mail queue.