1

I use a maildrop script to sort my mails directly on the mail server into folders and I would like it to mark certain unnecessary mails as read.

Unfortunately maildrop does not seem to have a command for that.

Right now I use this line to rename the newest mail of the qmail Maildir folder to a 2,s read status:

 `ls -t "$MAILDIR/.0 Spamfilter.catchall/new" | head -1 | xargs -I {} mv "$MAILDIR/.0 Spamfilter.catchall/new/{}" "$MAILDIR/.0 Spamfilter.catchall/cur/{}:2,S"`

However, this sometimes fails and the mail remains unread. I guess there is a race condition, when another mails arrives, before the mv has been executed.

BeniBela
  • 1,393

1 Answers1

0

This before the to does the thing:

  FLAGS="S"

However, the tricky part is to install >=2.8.4 on shared hosting without root rights. I did it like this: Download "courier-unicode-2.0.tar.bz2" and "maildrop-2.9.2.tar.bz2" from courier-mta.org:

cd courier-unicode-2.0/
./configure  --prefix=/home/user/
make
make install

cd ../maildrop-2.9.2
export CPPFLAGS=-I/home/user/include
export LDFLAGS=-L/home/user/lib/
./configure  --prefix=/home/user
make
make install

and then changed the .qmail files to |/home/user/bin/maildrop

BeniBela
  • 1,393