Hello Martin, Am 2008-05-02 11:18:09, schrieb martin f krafft: > Package: procmail > Version: 3.22-16 > Severity: wishlist > File: /usr/bin/procmail > Tags: upstream > > It would be great if I could set some variable which would cause > procmail to deliver messages to Maildirs without marking them new. > Ideally, one could control which of the three states, new, old, and > seen, is used. > > new delivered to new, no S flag > old delivered to cur, no S flag > seen delivered to cur, S flag set
If you want to archive this behaviour only for ONE recipe, do it with:
----8<------------------------------------------------------------------
:0
* ^From:[EMAIL PROTECTED]
{
TRAP='READ=`echo "${LASTFOLDER}" |sed 's|/new/|/cur/|'` ; mv --force
"${LASTFOLDER}" "${READ}:2,S"'
:0
.Debian_Developers.Martin/
}
----8<------------------------------------------------------------------
TRAP need not to be executaböle since the contents is always executed.
If "procmail" have saved the message to ".Debian_Developers.Martin/" the
variable LASTFOLDER becomes something like
.Debian_Developers.Martin/new/1234567890.123_123.debian
^^^^^
after the message was saved but you want it marked as read and so I use
TRAP which is executed AFTER the message was saved and ALL environement
varables are availlable to the comman executed in TRAP. So I use "sed"
to change LASTFOLDER to
.Debian_Developers.Martin/cur/1234567890.123_123.debian
^^^^^
and then after this, I move it to the "cur" subdirectory and attach a
":2,S" to mark the message as read.
If you have more question, feel free to ask me per PM...
Note: I think on Monday, my E-Mail will change to
<[EMAIL PROTECTED]> since my NEW Domain is up...
Thanks, Greetings and nice Day
Michelle Konzack
Systemadministrator
24V Electronic Engineer
Tamay Dogan Network
Debian GNU/Linux Consultant
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
+49/177/9351947 50, rue de Soultz MSN LinuxMichi
+33/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)
signature.pgp
Description: Digital signature

