Hi,
Before we start and so that there is no confusion, this query is about
mail delivered to MailDir format mail boxes and _not_ procmail's MAILDIR
variable. I thought it best I say that up front in case it wasn't
obvious from my ramblings below. ;-)
I recently switched from mbox to maildir format for storage of messages
for the various FreeBSD mailing lists I subscribe to. All was fine
except for the flagging of important - that is important to me -
messages. I had forgotten all about the mechanism this used since it
just "worked": procmail examines the Subject: field and if it matches
certain patterns formail is run to add a X-Status: header. When reading
the flagged mail, Mutt sees the X-Status: header and changes the colour
used for the message in the index. At least that is how it works for
mbox mail boxes. For maildir, Mutt doesn't look for the X-Status:
header, but instead examines the filename of the message to see if it
ends in :2,F (or :2,FS). If the character F is present then the message
is considered to be "flagged".
I spent last evening getting to the bottom of this by re-reading the
manual pages for procmail, looking at the source code for Mutt and
searching the web for information about Maildir format mail boxes and
"flagging".
( http://cr.yp.to/proto/maildir.html seems a useful link for those that
are interested.)
It appears that procmail just doesn't have a sensible - see below for a
not sensible method - way to flag maildir messages, which from my point
of view is unfortunate.
This evening I had a look at the procmail source code and I _think_ I
could hack such a facility into it. Should I? I did come up with a
test recipe to do what I want, but I think it is somewhat evil to say
the least:
:0 c
* ^From:(_dot_)*njm(_at_)njm
* ^Subject:.(Re: |)testing
testing/
:0 a
* ^From:(_dot_)*njm(_at_)njm
{
:0 W
| mv $LASTFOLDER ${LASTFOLDER}:2,F
:0
/dev/null
}
Is there a better way to do this? Should I just hack procmail to do
what I want? (Would anyone else be interested in such a facility?) Is
it a MUA "bug" rather than a MDA "bug" (I tend to think not)? Am I just
suffering from too little beer?
Thanks in advance.
Cheers,
Nick.
--
"We're predicting third stage shutdown at 11 minutes 42 seconds."
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail