[Dovecot] proxy_maybe regex
David Halik
dhalik at jla.rutgers.edu
Tue Feb 2 00:39:55 EET 2010
On 02/01/2010 03:34 PM, Timo Sirainen wrote:
> On 1.2.2010, at 22.33, Timo Sirainen wrote:
>
>
>> You can use SQLite. You don't even need an actual database. Something like (completely out of my head, no idea how to do it in reality):
>>
>> password_query = select \
>> (if '%u' regexp '^[a-d]' then '192.168.xxx.1' else \
>> if '%u' regexp '^[e-k]' then '192.168.xxx.2' else \
>> ..) as proxy_maybe
>>
>
Thanks for the suggestions. The reason we were looking at perdition is
to avoid as MySQL as a single point a failure. The whole reason we run
the way we do is that there is no single point of failure, except of
course the NetApp NFS server, but if that goes down we have a million
other worse problems.
Anyway, I don't think we are going to be able to use perdition after
all. I got it going on a test bed only to find out it doesn't support
multiple failover servers. So, if user1=serverA, and serverA is down,
user1 is out of luck.... user1=serverA,serverB,serverC would be awesome,
but I don't think it's supported.
Back to dovecot, actually sqlite might work, because then I don't need a
database backend, just a local sqlite regex. The question then being,
how would dovecot handle multiple servers? For example:
(if '%u' regexp '^[a-d]' then '192.168.xxx.1 || 192.168.xxx.2 || 192.168.xxx.3' else \
if '%u' regexp '^[e-k]' then '192.168.xxx.2 || 192.168.xxx.3 || 192.168.xxx.1' else \
..) as proxy_maybe
There are ways of doing this in mysql, with heartbeats etc (which we've
discussed before), but then I'm back to mysql again. Maybe mysql just
has to be the way to go in this case.
Brad, any more investigation into this?
> and I might try to find some
> time to proof this out over the next few weeks. I liked his idea of
> storing the user's current server in the database and proxying to that,
> with fallback to a local connection if they're new or their current
> server is unavailable.
We're pretty much in the exact same spot. I'm getting pressured into
doing something one way or the other since user's mail is still
resyncing when they hit the "stale NFS" message.
--
================================
David Halik
System Administrator
OIT-CSS Rutgers University
dhalik at jla.rutgers.edu
================================
More information about the dovecot
mailing list