Score:0

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

cn flag

We have an [email protected] 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 [email protected], which is used by some analytical software. For this, a file named "Virtual" has been created in the Postfix folder with the following contents:

[email protected]   [email protected],[email protected],[email protected],[email protected]

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" "[email protected]" {
  fileinto "Orders";
  stop;
}

But the problem is that the analytics software that uses the [email protected] 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 [email protected] 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" "[email protected]",
        not header :is "Delivered-To" "[email protected]")
{
  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.