Mailing List Archive

misc patch
Hi all,

I've included Jesse Norell's misc patch (from sourceforge.net) into
DBMail 1.x CVS

for those of you who are to lazy to point your webbrowser to sf.net,
I've
included Jesse's comments that come with the patch below.

Parts of this patch will be included in DBMail 2.0 . Some changes to
this
stuff will be the use of enum instead of #define for the "Status"
values.

Jesse, thanks for this work

cheers,
Ilja

P.S. Jesse's comments:
<quote>
misc updates/fixes
This patch moves the create_unique_id() function to
misc.c
and makes every place that saves a unique_id use it
(which was
previously done inconsistently in various places). It
also changes
all the use of the status field in messages table to be
through the
following #defines:

#define STATUS_NEW 0
#define STATUS_SEEN 1
#define STATUS_DELETE 2
#define STATUS_PURGE 3
#define STATUS_UNUSED 4
#define STATUS_INSERT 5
#define STATUS_ERROR 6

There are a couple other misc. changes also, namely
changes
the APOP "timestamp" in the pop3 greeting to not
include the
system time and pid (though srand() is still seeded
with those,
but better than giving them away in the clear), put
getopt()
support in pop3d (and added -h help flag), and changed
a few
places to remove messageblks before removing the
message row,
so people adding constraints don't get errors (ie. if
they don't
use ON DELETE CASCADE and remove the messages entry first).

Should apply clean to cvs code around 6/17/03 (probably
a little earlier) to current, 7/18/03. We've been
using it w/o
incident for almost a month now.
</quote>

--
IC&S
Koningsweg 4
3582 GE UTRECHT

PGP-key:
http://www.ic-s.nl/keys/ilja.txt
Re: misc patch [ In reply to ]
On Fri, Oct 24, 2003 at 11:27:59AM +0200, Ilja Booij wrote:
> It also changes all the use of the status field in messages table to
> be through the following #defines:
>
[...]
> #define STATUS_DELETE 2
> #define STATUS_PURGE 3

These are a bit confusing because rather than giving a status they
describe what action is likely to be taken next on the message.
It also doesn't correspond to the dbmail-maintenance documentation, in
which status 3 is described as the DELETE status.
-p purge messages have the DELETE status set

-d set DELETE status for deleted messages

The fact that imap has the concept of expunging messages adds further
confusion.

I suggest changing 2 to DELETED or perhaps EXPUNGED. Status 3 should
also be changed from a verb to an adjective. I can't think of a single
word description, but something along the lines of PENDING_PURGE makes
sense. Personally, I don't see much value to status 3 and would
recommend deleting records in status 2 based on an timestamp field
in the messages table.

xn