Score:0

Dovecot: How can I prevent sieve filter from being applied to some mail users?

cn flag

We have an emarket@example.com mailbox that receives orders from customers. Postfix redirects such emails to the email addresses of our sales managers, as well as to the special address parser@example.com, which is used by some analytical software. For this, a file named "Virtual" has been created in the Postfix folder with the following contents:

emarket@example.com   manager1@example.com,manager2@example.com,manager3@example.com,parser@example.com

In addition, Dovecot places all such emails in the Orders folder of each sales manager. For this, a Sieve filter rule has been created:

require ["fileinto", "envelope"];
if envelope: is "to" "emarket@example.com" {
  fileinto "Orders";
  stop;
}

But the problem is that the analytics software that uses the parser@example.com mailbox is subscribed only to the default Inbox folder. And it doesn't know how to work with the Orders folder. So I need to somehow prevent the filter from being applied to the parser@example.com mailbox. How can I do this using Dovecot or Sieve?

Score:1
cn flag

In my case, the problem was solved using the "Delivered-To" header:

require ["fileinto", "envelope"];

if allof (envelope :is "to" "emarket@example.com",
        not header :is "Delivered-To" "parser@example.com")
{
  fileinto "Orders";
  stop;
}
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.