[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bugfix for "deferral: Internal_qmail-lspawn_bug" related to qmail-users feature

I've discovered a bug in the qmail-sql patch which breaks delivery of
mail via the qmail-users facility. The bug doesn't affect people who use
an SQL database exclusively to control delivery.


  I made some changes to /var/qmail/users/assign, ran qmail-newu and
thereafter I got messages like this in my qmail-send log:

   delivery 8: deferral: Internal_qmail-lspawn_bug./


The qmail-sql patch changes the syntax of the qmail-local command. The
new syntax is:

   qmail-local [ -nN ] user homedir local dash ext domain sender
aliasempty quotasize dotqmail

This means that qmail-lspawn needs to supply two extra arguments. I
believe that the netqmail-1.05-sql-0.26pre4 version of the patch
prepares the arguments properly when a recipient address doesn't match
anything in users/cdb and ends up running qmail-getpw to grab the info
it needs. However it doesn't prepare the arguments properly when the
address matches in users/cdb.


Edit qmail-lspawn.c, and find these lines in the nughde_get function:

   if (flagwild)
   if (!stralloc_cats(&nughde,local + i - 1)) _exit(QLX_NOMEM);
   if (!stralloc_0(&nughde)) _exit(QLX_NOMEM);

Add these two lines directly after the previous one:

   if (!stralloc_0(&nughde)) _exit(QLX_NOMEM);
   if (!stralloc_0(&nughde)) _exit(QLX_NOMEM);

After recompiling, qmail-users will be functional again.

By the way Michael, thanks heaps for your work on this patch. It's very

Rohan Carly
Systems Officer
Dental Health Services