On Sun, Jan 05, 2003 at 10:07:43AM +0000, Brian Candler wrote:
> function 'pre' is used to check a userid exists without checking its
> password, see auth_prefunc in authlib(7). It splits its input on spaces:
>
> PRE module service userid
>
> Look for strcmp, you'll see that setting the module to '.' means try all
> modules in turn, the same as is done for authentication. So:
>
> # exim -be '${readsocket{/path/to/socket}{PRE . exim $local_part@$domain}}
Incidentally, you need to be a bit careful here to distinguish between
temporary failures (e.g. unable to contact LDAP server) and permanent
failures (user definitely does not exist). These should translate to
'defer'and 'bounce' respectively if you are trying to deliver a message to
this person.
As far as I can tell from the source, authdaemond should send back 'FAIL\n'
for permanent failures and an empty string for temporary failures. This
should let you test explicitly for these conditions.
# Lookup data for this address. exim will defer if authdaemond does not
# respond; also force a deferral if it came back with an empty string
authdaemond_lookup:
driver = redirect
address_data = ${readsocket{/path/to/socket}{PRE . exim $local_part@$domain}}
data = ${if eq{$address_data}{}{:defer:authdaemond temporary lookup failure}{}}
allow_defer
maildir_router:
driver = redirect
directory_transport = maildir_transport
data = ${extract{MAILDIR}{$address_data}{$value/}fail}
# A more sophisticated expression would also handle:
# empty MAILDIR ==> $HOME/Maildir/
# MAILDIR does not start with / ==> $HOME/$MAILDIR/
Regards,
Brian.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users