[Dovecot] Where are flags stored?
Hello,
I don't now wheather this is IMAP or actually dovecot-specific, but I hope you people here knows about this at least: Where are flags like seen/unseen or e.g. message-priority stored?
My goal is to mark spam or other filtered by procmail as "seen", so that dovecot doesn't notify MUAs about new mail in IDLE mode.
Are there any mail-headers, so I can set these with procmail to accomplish that?
Thanks for help,
A
On Tue, 2005-01-04 at 21:06 +0100, Adam Pordzik wrote:
I don't now wheather this is IMAP or actually dovecot-specific, but I hope you people here knows about this at least: Where are flags like seen/unseen or e.g. message-priority stored?
This is mail store specific. With maildir the seen flag is stored in maildir file name (http://cr.yp.to/proto/maildir.html), with mbox it's stored in R flag in Status-header.
I don't know what you mean by message priority. That's most likely a client-specific variable which is never even sent to IMAP server.
My goal is to mark spam or other filtered by procmail as "seen", so that dovecot doesn't notify MUAs about new mail in IDLE mode.
It doesn't matter if message is seen or not, Dovecot still notifies client.
Hello Timo,
This is mail store specific. With maildir the seen flag is stored in maildir file name (http://cr.yp.to/proto/maildir.html), with mbox it's stored in R flag in Status-header.
Like "Status: RO" in Header? Hmm. I tried setting all Messages in my INBOX as read, but grepping for this "grep '^Status:' /vat/mail/adam" only returned "Status: RO".
I don't know what you mean by message priority. That's most likely a client-specific variable which is never even sent to IMAP server.
Of course it it, also on wire: I meant the "SPAM-Priority-Flags" ;-). Formerly, at least, I often could identify Spam just by checking for this flags, beeing either "high", or "low" for spam but never used for normal mail. :-)
How this flags are called "officially"?
My goal is to mark spam or other filtered by procmail as "seen", so that dovecot doesn't notify MUAs about new mail in IDLE mode.
It doesn't matter if message is seen or not, Dovecot still notifies client.
And (how) can I prevent dovecot from doing so?
A
--
Adam Pordzik schrieb:
Hello Timo,
This is mail store specific. With maildir the seen flag is stored in maildir file name (http://cr.yp.to/proto/maildir.html), with mbox it's stored in R flag in Status-header.
Like "Status: RO" in Header? Hmm. I tried setting all Messages in my INBOX as read, but grepping for this "grep '^Status:' /vat/mail/adam" only returned "Status: RO".
Oh! After sending this mesages, and thus closing the connection between the Client and Dovecot, it tells me: "Status: O". Apperently dovecot buffers this until connection ends (or closing this mbox)
My goal is to mark spam or other filtered by procmail as "seen", so that dovecot doesn't notify MUAs about new mail in IDLE mode.
It doesn't matter if message is seen or not, Dovecot still notifies client.
And (how) can I prevent dovecot from doing so?
On Mon, 10 Jan 2005 01:59:06 +0100 Adam Pordzik ap@d-dt.de wrote:
My goal is to mark spam or other filtered by procmail as "seen", so that > dovecot doesn't notify MUAs about new mail in IDLE mode.
It doesn't matter if message is seen or not, Dovecot still notifies client.
And (how) can I prevent dovecot from doing so?
As I understand it, Dovecot HAS to notify the client (else it would be violating the RFCs). If you don't want the client to tell you about it, you have two choices. Firstly, you could implement (depending on your MUA) a client rule to mark the messages as read. Secondly, you could stop procmail putting them in the IMAP store (delete them, put them somewhere else, whatever).
Keith
--
Small business computer support: http://www.tiger-computing.co.uk
Linux consultancy: http://www.TheLinuxConsultancy.co.uk
On Mon, 2005-01-10 at 01:59 +0100, Adam Pordzik wrote:
I don't know what you mean by message priority. That's most likely a client-specific variable which is never even sent to IMAP server.
Of course it it, also on wire: I meant the "SPAM-Priority-Flags" ;-). Formerly, at least, I often could identify Spam just by checking for this flags, beeing either "high", or "low" for spam but never used for normal mail. :-)
How this flags are called "officially"?
IMAP protocol supports a few different flags which clients can set. Anything else is just message headers which Dovecot doesn't treat in any special way.
My goal is to mark spam or other filtered by procmail as "seen", so that dovecot doesn't notify MUAs about new mail in IDLE mode.
It doesn't matter if message is seen or not, Dovecot still notifies client.
And (how) can I prevent dovecot from doing so?
You'd have to add code to src/imap/cmd-idle.c which checks if the new mails have seen flags already set, and if not get back to idling. I don't see such feature ever getting into official Dovecot releases though.
participants (4)
-
Adam Pordzik
-
Adam Pordzik
-
Keith Edmunds
-
Timo Sirainen