Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DBMail: users

Some questions and suggestions

 

 

DBMail users RSS feed   Index | Next | Previous | View Threaded


atis.l at mail

Jul 5, 2002, 9:39 PM

Post #1 of 2 (74 views)
Permalink
Some questions and suggestions

Hello

At first:
i digged the source and found the following in <dbmysql.c>:

u64_t db_insert_message (u64_t useridnr, const char *deliver_to_mailbox,
const char *uniqueid)
{
...

time(&td); /* get time */
tm = *localtime(&td); /* get components */
strftime(timestr, sizeof(timestr), "%G-%m-%d %H:%M:%S", &tm);

snprintf (query, DEF_QUERYSIZE,"INSERT INTO messages(mailbox_idnr,messagesize,unique_id,"
"internal_date,recent_flag,status)"
" VALUES (%llu, 0, \"%s\", \"%s\", 1, '005')",
deliver_to_mailbox ? db_get_mailboxid(useridnr, deliver_to_mailbox) :
db_get_mailboxid (useridnr, "INBOX"),
uniqueid ? uniqueid : "", timestr);
...
}

wouldn't be easier/better to use the NOW() function in MySQL.

And second:
It wold be great to have some description for fields in database. It would
allow many developers [like me] to write custom applications.

I imagine that there could be some file like 'database_layout.txt' in
distribution, there are description of tables and fields, with simple
examples. When someone changes database structure [adds some fields], he
write a patch for description too.

I could write document like this if you help me with some things.

Right now i'm guessing the meaning of fields in table [messages] ;-)

| message_idnr | The unique message ID, must be the same for each two records in [messageblks]
| mailbox_idnr | The ID of the IMAP folder, where message are.
| messagesize | message size in bytes, i guess
| seen_flag | 1 if message is seen, 0 if not.
| answered_flag | 1 if answered, 0 if not
| deleted_flag | 1 if deleted, 0 if not
| flagged_flag | no ideas?
| recent_flag | ?
| draft_flag | message is draft
| unique_id | as i saw in code, this cold be "", but what is it?
| internal_date | date and time of receiving.
| status | no ideas?
| rfcsize | some size, but what's the difference between this and [messagesize]?

Could anyone send me this info please?


ml at sd2i

Jul 6, 2002, 1:35 AM

Post #2 of 2 (76 views)
Permalink
Re: Some questions and suggestions [In reply to]

---- Original Message ----
From: <atis.l [at] mail>
To: <dbmail [at] dbmail>
Sent: Saturday, July 06, 2002 6:39 AM
Subject: [Dbmail] Some questions and suggestions

>
> wouldn't be easier/better to use the NOW() function in MySQL.
>

The NOW() function use the MySQL server's time, wich can be on another
physical box. It would affect the pop-before-smtp if we don't keep the same
time for the MTA (ie postfix) and the MySQL inserted data.
So sure your suggestion is nicer "in the cource", but i think we *must* keep
the current sulotion.

--
David SCHNEPF
Logiciels pour Internet & Hébergement
Cabinet SD2i : www.sd2i.fr

DBMail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.