Hi,

I'm really struggling with the following inbound filtering:

Let's say:• My email address is "my.em...@example.com"
• I've setup a filtered address "filtered.em...@example.com"
• I've setup a sending/reply address "send.em...@example.com"

I am sending a message to a small group of people where detailed tracking is 
required (yes, I know there are better automated ways outside of Dovecot to do 
this... but let's leave that topic for another day shall we !)

My desired action is as follows :
• Message "From" shows "send.em...@example.com"
• Message "To" is set as "filtered.em...@example.com"
• General recipients in Bcc

When I send a test to an *external* address, it works as expected, i.e. :
• External address receives mail in its inbox
• Copy of mail gets put in relevant IMAP folder for "filtered.em...@example.com"

When I send a test to my own address, it does not work, the following happens 
instead:
• Copy of mail gets put in relevant IMAP folder for 
"filtered.em...@example.com" (this is good and as expected)
• The BCC "my.em...@example.com" never gets deposited in my inbox (this is not 
good)

My dovecot sieve (as applied to "my.em...@example.com")  is as follows (I have 
tried both with and without the "stop" as you can see from the comment:

anyof (address :is :all "to" ["send.em...@example.com"],
  header :contains ["Cc", "Delivered-To"] ["send.em...@example.com"]) {
        fileinto :create "XYZmail-replies";
        # Ignore stop for this rule only
        # stop;
}
elsif anyof (address :is :all "to" ["filtered.em...@example.com"],
  header :contains ["Cc", "Delivered-To"] ["filtered.em...@example.com"]) {
        fileinto :create "XYZmail-sent";
        # Ignore stop for this rule only
        # stop;
}

Reply via email to