I am curious as to exactly what part of the documentation led you to
such a conclusion.
The short answer is: no. This cannot be done in maildrop.
The part that led me to that conclusion was this portion from the
maildropfilter manpage (under the Other Special Variables heading
[http://www.courier-mta.org/maildrop/maildropfilter.html]):
"The KEYWORDS variable is used only when delivering a message to a
maildir, and implements the optional IMAP keyword extension as
implemented in the Courier-IMAP. It may be optionally initialized to
contain a comma-separate list of keywords. The to, or the cc command,
delivers the message to the maildir normally, but also associated the
list of keywords in KEYWORDS with the newly delivered message."
And nothing will ever appear in courierimapkeywords directory for
anything relating to \Seen or \Deleted status flags.
Not trying to argue with you, because I'm sure you know a great deal
more about this than I do, but nevertheless it does work on my server.
If I create an user with email, and send a message to them, the message
shows up, and there is nothing in the keywords folder. At this point
they have a .mailfilter file which only says 'to "Maildir/"'.
I then change it to:
#***********
if ((/^Subject:([:space:])*.*test.*$/:h))
{
KEYWORDS="\Seen"
}
to 'Maildir/'
#***************
Sending a message with 'test' in the subject now results in a message named
'1137770494.M964865P8797V0000000000001602I00A40047_0.rabid,S\=721:2,' in
the new directory of the maildir, and a file called
'1137770494.M964865P8797V0000000000001602I00A40047_0.rabid,S\=721' in
the courierimapkeywords folder. Contents of the keywords file are '\Seen'.
Of course, the message file was not renamed to have a 'S' after the :2,
indicating that it was seen, but a script should easily be able to take
care of that. Perhaps I am misunderstanding your email.