[Dovecot] Dovecot SQL user_query

Noel Butler noel.butler at ausics.net
Tue May 4 02:43:28 EEST 2010


On Mon, 2010-05-03 at 16:00 -0700, Alex wrote:

> Hello folkz,
> Is it possible to setup in dovecot-sql.conf  file to run user_query
> twice if its first run didn't yield any values.
> And likewise don't proceed with the second run if the first user_query
> execution produced the result.
> I have to query two tables which specify there email messages shall be
> delivered via Dovecot deliver LDA
> depending on the incoming email addresses.
> 


Not using normal dovecot methods, but you could in theory do it with
MySQL manipulation, but that's adding more complexity and can lead to
problems.  This might help
http://dev.mysql.com/doc/refman/5.1/en/if-statement.html  if you must go
down this terrible rocky bumpy country road (yep, I know some managers
just are too scared of change, but most are open to discussion).


> Please don't question me about this setup. I inherited this mess from
> the previous Network Admin.


Alex, maintaining a broken system, is not optimum, why not just fix it
so it's all in one?
Most employers want reliability and stability, if they are the obstacle,
explain to them the nightmare it is now and how easy it is to uniform
everything, if you do it right, they'll likely remember that when it
comes to future contract/salary/wage negotiations.

Cheers



More information about the dovecot mailing list