Autor: Peter Galbavy Data: Dla: Richard Cunningham, exim-users Temat: Re: [Exim] Relay for Domain anywhere, using SMTP Authentication only?
Richard Cunningham wrote: > I'm stuck with Exim 3.35....
Me too (3.36)
> Excuse my ignorance, but I can't make heads or tales of the
> documentation on this. I simply want to be able to use my domain
> anywhere using SMTP authentication without the host being checked. Is
> there a simple way to do this? I guess I'm spoiled by the Windows
> mailservers I've used.
Here is what I use for supporting most clients I can:
plain_password:
driver = plaintext
public_name = PLAIN
server_condition = ${if crypteq{$3}{${lookup pgsql{select password from
users
where (username || '@' || domain = '$2') or (username = '$2' and domain =
'default.com') }{$value}fail}} {1}}
server_set_id = $2
Obviously, replace the SQL with whatever looks up encrypted passwords for
you, and 'default.com' for the fallback domain if the user does not login
with a domain. You can also add logic to support domain logins on Macs with
OE - which truncates '@domain' so I allow '%domain' in another config.