0

I have postfix + dovecot install that uses
virtual_mailbox_maps

I want to do sieve for specific users. where I should put the sieve file, since there are no user directories?

In dovecot configuration I have this:

plugin {
    sieve_extensions                    = +editheader
    sieve_editheader_max_header_size    = 1k

    # Protected special headers
    sieve_editheader_forbid_add         = X-Verified
    sieve_editheader_forbid_delete      = X-Verified X-Seen

    sieve_redirect_envelope_from        = recipient

    sieve                               = /etc/dovecot/sieve/default.sieve
}

However, i do not want to use default.sieve, I want additional sieve file for specific users.

Nick
  • 826
  • 2
  • 15
  • 42

1 Answers1

0

After checking several websites, I did change my configuration like this and it works OK.

Not sure if this is best way, but seems clear enought.

plugin {
    sieve_extensions                    = +editheader
    sieve_editheader_max_header_size    = 1k

    # Protected special headers
    sieve_editheader_forbid_add         = X-Verified
    sieve_editheader_forbid_delete      = X-Verified X-Seen

    sieve_redirect_envelope_from        = recipient

    sieve_before                        = /etc/dovecot/sieve/default.sieve
    sieve                               = /etc/dovecot/sieve_users/%d.%n.sieve
}

I know the dot "." in the %d.%n.sieve may backfire (SQL injection - like), but those files are created by me, so is OK.

Nick
  • 826
  • 2
  • 15
  • 42