Dear Maintainer,
I attempted to implement all queries that my postfix install
asks the database as stored procedures in MySQL. Unfortunately,
I often get the common "Commands out of sync" error that I believe
comes from Postfix's mysql driver when query results are not
handled appropriately.
The code for the stored procedure is as follows:
SELECT `va`.`dst_email`
FROM `virtual_aliases` AS `va`
WHERE `va`.`src_email` = src_email
And the query is set in mysql-virtual_alias_maps.cf as this:
[...]
query = CALL `get_alias('%s')`
I thoroughly tested the routine, it does not seem to be the
source of the problem.
The log looks like this afterwards:
Aug 3 13:48:08 merlin postfix/smtpd[10872]: warning: mysql query failed: Commands out of sync; you can't run this command now
I was able to implement some routines as functions; but some
need to return result-sets. Then stored procedures need to be
used and problems arise.
Otherwise the package is really great and does its job
perfectly. Thanks for maintenance and development efforts!