1 message in net.sourceforge.lists.courier-maildrop[maildropl] Maildrop flagging message...
FromSent OnAttachments
Milan ObuchJul 4, 2007 3:35 pm.c
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[maildropl] Maildrop flagging message when deliveringActions...
From:Milan Obuch (cour@dino.sk)
Date:Jul 4, 2007 3:35:20 pm
List:net.sourceforge.lists.courier-maildrop
Attachments:

Hi,

I wanted for some time to mark message as important automatically when delivering. After some time I tried to patch maildrop to do it for me. After some work I created attached patch. It is simple, works as intended, but it could be considered an ugly hack. If better method should be used, I would like to know. Usage is simple - in maildrop recipe set MFLAGS=F and be done with it. Actually, per man maildir, flags may be composed from DFRS (for Draft, Flagged, Replied-to, Seen), setting MFLAGS=FS will set both flags. There is one small problem - sqwebmail does not display D nor F flag in any way. Regards, Milan

-- This address is used only for mailing list response. Do not send any personal messages to it, use milan in address instead.

--- maildrop/maildir.C.orig Thu Jan 15 04:12:13 2004 +++ maildrop/maildir.C Wed Jul 4 23:27:20 2007 @@ -137,7 +137,6 @@ tmpname=createInfo.tmpname; newname=createInfo.newname; tmpname += '\0'; - newname += '\0'; maildir_tmpcreate_free(&createInfo);

file.fd(f); @@ -181,6 +180,22 @@ { if (is_open) { + Buffer b; + + b="MFLAGS"; + + const char *f=GetVarStr(b); + + if (f && strlen(f) > 0) + { + newname += ':'; + newname += '2'; + newname += ','; + newname += f; + } + + newname += '\0'; + Buffer keywords;

keywords="KEYWORDS";