Move spam detected mails to users "Spam" subdirectory

1

My mailserver setup is based on Das Postfix Buch ( from an good german IT consultant agency ) and the ISPmail Tutorials. In short I use virtuals ( maildir ) with MySQL config backend and amavisd-new ( v2.7 ) on Debian Squeeze. Mails are stored in the following directory pattern: /var/vmail/%d/%u. For now spam detected emails will be stored within /var/vmail/quarantaine.

I like to store spam detected emails within the correct mailbox directory ( /var/vmail/%d/%u/.Spam ). But how to do this? Amavisd-new does not support variables in *-destiny...

burnersk

Posted 2012-04-23T13:26:09.100

Reputation: 347

Answers

2

let Amavisd-new/spamassassin insert the headers ("X-Spam-Flag") into the spam-mails.

Then use the Sieve filter in dovecot to move the marked mails into your spam folder (you can find an example in the dovecot wiki)

rmweiss

Posted 2012-04-23T13:26:09.100

Reputation: 624

The link above was for dovecot v1. Here the updated link for dovecot v2: Pigeonhole Sieve examples

– masegaloeh – 2015-02-23T13:28:18.233

Thank you, rmweiss. Sadly that there are no other options... – burnersk – 2012-04-27T10:50:02.160