Aaron Stone wrote:
A failed delivery response from the LMTP or SMTP processes doesn't necessarily
mean that nothing was inserted or updated in the database. Only a hard
database error / inconsistency should generate a rollback; for all other
cases, I would suggest simply commit it, even if nothing much was done.

Just a simple pair of functions, db_begin() and db_commit() should suffice.
Call one near the top of any database calls and the other after the end. For
example, in LMTP, the calls would be at the top and bottom of the DATA case of
the main switch statement in lmtp.c

We'll also have to make sure that we call commit or rollback when returning with an error code.

Ilja

Reply via email to