Am 02.11.2014 um 16:23 schrieb Jorge Bastos: > Paul, > > > > I confirm this. > > Using the dbmail-util binary from 2.3.7 from my previous version, > against the DB of 3.1.17 (which has no relevant schema changes) it run’s > fine and deletes messages. > > > > Let me know what I can do to help on this. >
I was just testing this here because i was curious (3.2.0 here): you can use strace to see what SQL statements are issued: strace -s 100 -a 160 -e trace=sendto dbmail-util -v -y -dp will give you something like this: .... Deleting messages with DELETE status... sendto(3, "Q\0\0\0%SET statement_timeout TO 300000;\0", 38, MSG_NOSIGNAL, NULL, 0) = 38 sendto(3, "Q\0\0\0\27BEGIN TRANSACTION;\0", 24, MSG_NOSIGNAL, NULL, 0) = 24 sendto(3, "Q\0\0\0/DELETE FROM dbmail_messages WHERE status=3\0", 48, MSG_NOSIGNAL, NULL, 0) = 48 sendto(3, "Q\0\0\0\30COMMIT TRANSACTION;\0", 25, MSG_NOSIGNAL, NULL, 0) = 25 sendto(3, "Q\0\0\0#SET statement_timeout TO 3000;\0", 36, MSG_NOSIGNAL, NULL, 0) = 36 Ok. Messages deleted. Setting DELETE status for deleted messages... sendto(3, "Q\0\0\0%SET statement_timeout TO 300000;\0", 38, MSG_NOSIGNAL, NULL, 0) = 38 sendto(3, "Q\0\0\0\27BEGIN TRANSACTION;\0", 24, MSG_NOSIGNAL, NULL, 0) = 24 sendto(3, "Q\0\0\0;UPDATE dbmail_messages SET status = 3 WHERE status = 2\0", 60, MSG_NOSIGNAL, NULL, 0) = 60 sendto(3, "Q\0\0\0\30COMMIT TRANSACTION;\0", 25, MSG_NOSIGNAL, NULL, 0) = 25 sendto(3, "Q\0\0\0#SET statement_timeout TO 3000;\0", 36, MSG_NOSIGNAL, NULL, 0) = 36 Ok. Messages set for deletion. Re-calculating used quota for all users... sendto(3, "Q\0\0\0%SET statement_timeout TO 300000;\0", 38, MSG_NOSIGNAL, NULL, 0) = 38 sendto(3, "Q\0\0\1\316SELECT usr.user_idnr, SUM(pm.messagesize), usr.curmail_size FROM dbmail_users usr LEFT JOIN dbm"..., 463, MSG_NOSIGNAL, NULL, 0) = 463 sendto(3, "Q\0\0\0#SET statement_timeout TO 3000;\0", 36, MSG_NOSIGNAL, NULL, 0) = 36 Ok. Used quota updated for all users. .... so what i did was check the status field in dbmail_messages before deleting, -) after deleting (in thunderbird) => status 2 -) then after running dbmail-util to mark the deleted messages => status 2->3 -) after dbmail-util pruning => messages are gone so it seems to work here. anyway with that strace command you can debug the SQL commands easier than setting some logging in the DB (which of course would be for more than one executable then). Hope this helps. Regards _______________________________________________ DBmail mailing list DBmail@dbmail.org http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail