summaryrefslogtreecommitdiffstats
path: root/procmail
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-05-05 23:16:50 -0500
committerJesse Luehrs <doy@tozt.net>2009-05-05 23:17:29 -0500
commit08a22ec4418afebb0b41e438e4c738a3f373a02b (patch)
treea3b6614a348bec538e544c77387bd3e48fd36cf9 /procmail
parentcd3f52778ed7f4d4478c8f2cc1837eeac7ce0c52 (diff)
downloadconf-08a22ec4418afebb0b41e438e4c738a3f373a02b.tar.gz
conf-08a22ec4418afebb0b41e438e4c738a3f373a02b.zip
add my procmail configuration
Diffstat (limited to 'procmail')
-rw-r--r--procmail/mark_as_read18
1 files changed, 18 insertions, 0 deletions
diff --git a/procmail/mark_as_read b/procmail/mark_as_read
new file mode 100644
index 0000000..388fcf7
--- /dev/null
+++ b/procmail/mark_as_read
@@ -0,0 +1,18 @@
+: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
+}