summaryrefslogtreecommitdiffstats
path: root/procmail/mark_as_read
blob: bd853f8ede9b2235a8ebe4753119efc1e956cbdf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
:0
{
    :0c:
    $folder

    :0
    * LASTFOLDER ?? /\/[^/]+$
    { tail=$MATCH }

    file_read_base="${folder}cur/${tail}"
    file_new=$LASTFOLDER
    # pretty hackish, but what can you do
    file_cur="${file_read_base}*"
    file_read="${file_read_base}:2,S"
    TRAP="mv $file_new $file_read 2>/dev/null || mv $file_cur $file_read 2>/dev/null"

    HOST
}

# vim:ft=procmail: