[Dovecot] appending domain based on port
eric.hester at gmail.com
Mon Feb 4 00:25:27 EET 2008
I got this working using %l for the ip, but I'd really rather do
multiple ports so I don't have to have 4 ips on 16 different machines.
I was trying to use the new 1.1 %a variable as the local port in my
query but it seems to always return 0 in 1.1beta14, does this variable
not work yet?
On Jan 31, 2008 10:42 AM, Timo Sirainen <tss at iki.fi> wrote:
> On Thu, 2008-01-31 at 10:32 -0500, Eric Hester wrote:
> > 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.
> Exactly. The "checks for @ in username" part could be done easily by
> checking if '%d' = ''.
> > Im worried that might add significant load to the sql server though.
> > This is a fairly large install. (300,000+ boxes).
> If there are only a few ports, you could use a CASE instead of a table
> join. But I'd think both of them could be done quickly by the SQL
> server. It's still a pretty simple query.
More information about the dovecot