Hi Aaron

You haven't mentioned about the answered_flag, which gets set to value
'1'. Is it not useful in this context?

I tried checking this flag for the replies to the mails that were moved
from one users inbox to another users Inbox. But it seems the
answered_flag is not set for the 'moved' messages. Is it a bug?

Aaron Stone wrote:
On Wed, 2007-04-18 at 12:46 +0530, Nataraj S Narayan wrote:

Hi

I am using dbmail 2.2.4. for my organisation. We have a setup in which one id receives all mails and one of the staff checks mail and moves to the Inbox of different users.

What we need is a method to mark such a mail as to be answered within a particular date. Later,we need to generate a list of mails and users who havent answered within the specified date.

Can i add the 'to_be_answered' and 'to_be_answered_by' fields to 'dbmail_messages' table?


Sure, it won't break anything, but they won't suddenly be exposed
through the IMAP protocol unless you write a protocol extension or add
support for arbitrary IMAP flags. (Arbitrary flags are possible in the
IMAP spec, but we've chosen to only support a small set of widely used
flags -- the IMAP spec allows us to tell user agents which flags are
valid in DBMail.)

Also, flags cannot hold arbitrary data, so the date could not be flag.

You could add these things to the table and hack up your user agent to
access the table directly to set the values, but that's not really a
good solution, IMHO.


But how do I specify the flag and date from the client used by the global user?


You're probably better off making a custom header, like
X-MyCompany-AnswerBy: <somedate>

Also, I need the mails marked to be highlighted in the respective user's Inbox.


This is going to be a user agent specific thing. The \Flagged imap flag
may give the right effect, just test it out and see.


Any generalised solution is there for this? Or do I need to modify clients like Squirrelmail for this purpose?


You will definitely need to do some work on the client side. As much as
possible, you should make your work portable and compliant to email
standards so that your data will be easier to manage and manipulate.

My suggestion is to write some code that...

Insert an X-MyCompany-AnswerBy header into each message when it gets
moved, and sets the \Flagged IMAP flag.

On the way out, make sure that your user agent adds the standard
References and/or In-Reply-To headers to the outgoing message, and that
the message is always stored to some mailbox.

You should then be able to write your data mining application entirely
as an IMAP client -- open up two connections, one where you receive a
list of messages and their X-MyCompany-AnswerBy and Message-ID headers,
and the other where you search for References: <previous Message-ID> or
In-Reply-To, then retrieve the Date headers to compare them.


X-MyCompany-AnswerBy Header- Is it to be written exclusively from Client
side? Can't we modify dbmail for this , so that it will irrespective of
the client used? I am confident in modifying Squirrelmail code only, not
 the other clients. My school uses MSoutlook and Thunderbird mostly.

Also, when using Evolution IMAP,I find  the 'Sent' folder doesnt show
the sent mails in Evolution.

So, can this part be made inside dbmail itself?


Find the reply:
C: A06 SEARCH HEADER in-reply-to "<[EMAIL PROTECTED]>"
S: * SEARCH 5838
S: A06 OK SEARCH completed

Get the date of the reply:
C: A07 FETCH 5838 (INTERNALDATE BODY[HEADER.FIELDS
   (X-MyCompany-AnswerBy)])
S: * 5838 FETCH (INTERNALDATE "16-Apr-2007 21:39:23 +0000"
   BODY[HEADER.FIELDS (X-MyCompany-AnswerBy)] {78}
S: X-MyCompany-AnswerBy: 17-Apr-2007 20:00:00 +0000
S:
S: )
S: A07 OK FETCH completed

DJB has a discussion of these headers (first Google hit for the terms
"message-id references") here:  http://cr.yp.to/immhf/thread.html

An all-email/IMAP solution may work for you. I am sure that you would be
able to come up with an all-SQL solution, too. A mixed solution might be
the best balance, where you do only email/IMAP stuff on the client side,
because it's already designed for that, and your date analytics on the
backend is written however you're most comfortable.


I am able to access 'dbmail_messages' and update the 'Answered_By' date
field in Squirrel mail client. The database access part is ok. And I may
be able to tell the 'global user' to use squirrelmail only. But other
users, I cant enforce squirrelmail.


Hope my suggestions are useful for getting you started on your project!

Aaron

I am not a techie, but i will keep trying.

regards

Nataraj



_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

Reply via email to