Tor Slettnes wrote:
>
> 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".
But it can be changed relatively easily (I hope).
When I took a look at verify.c lmtp transport with socket callouts failed
because:
1) the "hosts" list was empty - exim uses only "hosts" to find were to direct
the callout.
2) I could not find any code in verify.c to make unix socket connections
>> 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.
I think that callouts are "less costly" than executing an external program.
I designed my solution specially for supporting cyrus virtual domains so it is
not best fit for "local transport" replacement.
BTW Is there any chance to make exim provide a few simple "built in" filters ?
[e.g. to strip some chars (\0) ]
URL(s):
http://asg.web.cmu.edu/cyrus/download/imapd/install-virtdomains.html
--
Andrzej [en:Andrew] Adam Filip anfi@??? anfi@???
http://anfi.homeunix.net/ http://slashdot.org/~anfi