Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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...

share|improve this question
up vote 2 down vote accepted

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)

share|improve this answer
Thank you, rmweiss. Sadly that there are no other options... – burnersk Apr 27 '12 at 10:50
The link above was for dovecot v1. Here the updated link for dovecot v2: Pigeonhole Sieve examples – masegaloeh Feb 23 '15 at 13:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.