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

Góra strony
Delete this message
Reply to this message
Autor: Dan Liles
Data:  
Dla: 'Phil Pennock'
CC: exim-users
Temat: Re: [exim] help creating a rule for virtual accounts
Hey Phil,

Thank you that worked perfectly.

I appreciate your help.

Dan

-----Original Message-----
From: Phil Pennock [mailto:pdp@exim.org]
Sent: Tuesday, May 30, 2017 9:05 PM
To: Dan Liles <danliles72@???>
Cc: exim-users@???
Subject: 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_databa
se_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


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus