# procmail mark mail as read

## d3vlin

I have quite some procmail recipes set to handle and sort my mail; still I haven't been able to figure out how to mark an e-mail message as read by procmail. The idea is to mark mesages that spamassassin filtered as spam (which works all fine) as read as well so I don't get notified all the time. I hope this is possible.

Thanks in advance!

----------

## M104

Are you using an mbox format file or a maildir?  It would be easy to direct the spam into ~/.maildir/cur and new (good) mail into ~/.maildir/new if you have a maildir.

----------

## d3vlin

I use the Maildir format; actually the recipes are like this (relevant parts):

```

MAILDIR=$HOME/Maildir

:0fw: spamassassin.lock

* < 512000

| spamassassin

:0

* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

$MAILDIR/.PossibleSpam/

:0

* ^X-Spam-Status: Yes

$MAILDIR/.Spam/

```

which is like kind of default I guess. So you suggest changing it to:

```

:0

* ^X-Spam-Status: Yes

$MAILDIR/.Spam/cur

```

in order to automaticly mark the spam as read?

----------

## clockwise

this is exactly the functionality i'm looking for in the "not being notified by nwe spam" department. however, the above suggestion will not work - procmail will simply treat ".spam/cur/" as another maildir and create "cur", "new" and  "tmp" directories inside.

as far as i can tell, all my mail is put in the "cur" sub-directory and messages are marked as read by having an "S" appended to the filename. i'm hoping either procmail or spamassassin has a setting to "mark as read"... has anyone found it?

----------

## d3vlin

I found something that might bring some light in this case...

http://www.xray.mpe.mpg.de/mailing-lists/procmail/2000-10/msg00262.html

----------

## bumpus

The difference between the /new and /cur parts of the maildir should be that your mail client should give a newmail alert (Outlook and OE play a sound and put an icon in the taskbar) when there are messages in /new and show the folder as containing new unread messages when unread messages are placed into /cur, but don't do the notification. Thunderbird seems to play a sound every time it opens a folder that contains messages that it hasn't seen yet, even if they have already been marked as read by another client.

----------

