Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is it possible to write a Sieve rule like

if envelope :detail "to" "$x" {
  fileinto "inbox.$x";

but for all possible $x? I.e. if the user created a folder I want mail addressed to user+foo@domain to land there automatically. The spec doesn't seem to support this.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Turns out that's what the variables extension is for.

require "variables";
if envelope :detail :matches "to" "*" {
  fileinto "inbox.${1}";
share|improve this answer

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.