I use sql for my passwd db. So are you saying use some kind of conditional in my select that checks for @ in the username and if not found appends the domain based on the %l variable (using something like a join to a table that has port to domain mappings). Interesting. Im worried that might add significant load to the sql server though. This is a fairly large install. (300,000+ boxes).
On Thu, Jan 31, 2008 at 9:43 AM, Timo Sirainen <tss@iki.fi> wrote:
On Mon, 2008-01-28 at 12:11 -0500, Eric Hester wrote:
I am looking for a way to append a domain to unqualified user names based on the port that the client connected to. Like this:
port 9110 - @test.com port 9111 - @other.com port 9112 - @third.com
it looks like auth-default-realm does this, but you can only specify it once for the whole process.
I know I could do this by running a separate copy of dovecot attached to each port in question, but I would like to do it all in one process if possible.
What passdb do you use? This would be possible with SQL and checkpassword passdbs at least. You can get the local port from %l variable.
Other questions I have, if I use the auth-default-realm:
- does it happen before auth lookup I assume?
Yes.
- do I have to define the domain i use here as an auth-realm in addition to default?
No.