Re: [exim] help creating a rule for virtual accounts

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Phil Pennock
Dátum:  
Címzett: Dan Liles
CC: exim-users
Tárgy: Re: [exim] help creating a rule for virtual accounts
On 2017-05-30 at 18:55 -0500, Dan Liles via Exim-users wrote:
> Yes it's a file separated by : just like the other ones.


So <https://wiki2.dovecot.org/AuthDatabase/PasswdFile> ?

${lookup {$local_part@$domain}lsearch{/etc/dovecot/passwd} {yes}{no}}

https://www.exim.org/exim-html-current/doc/html/spec_html/ch-file_and_database_lookups.html

See also ${extract{<number>}{<separators>}{<string1>}{<string2>}{<string3>}}
to get fields from the results, once you've confirmed the key is either
present or not. Lookup results are cached so doing the same search
repeatedly is usually light-weight.

So this might be the password crypt field:
${extract{2}{:}{${lookup {$local_part@$domain}lsearch{/etc/dovecot/passwd}}}}
which might be usable as the second parameter to the
crypteq{Supplied}{Needed} expansion condition for use in an SMTP
Authenticator.

For stuff like wildcard entries of auxiliary data to be a default for
anyone in the domain, look at "lsearch*@" instead of "lsearch" and
"partial2-lsearch*@" etc. See the docs for more details.

-Phil