View Single Post
Old 15 Dec 2018, 07:56 PM   #8
BritTim
The "e" in e-mail
 
Join Date: May 2003
Location: mostly in Thailand
Posts: 3,095
Quote:
Originally Posted by ferrety View Post
Thanks Tim appreciated would you be willing to give me the sieve script for it?
Usually, the best way of figuring out the sieve code for something that can be done using a Rule is to
  • Create the Rule
  • Go to Edit custom sieve code (see bottom right of the page)
  • Find the sieve code associated with the Rule you just created.
  • Copy the code.
  • Cancel to exit from Custom Sieve and delete the Rule you created temporarily.
Doing this for your problem, you get
Code:
if 
  allof(
  address :is ["To","Cc","Resent-To","X-Delivered-To"] "MyAlias@MyDomain.com",
  header :matches "X-Mailer" "MailChimp Mailer*"
  )
{
  discard;
  stop;
}
BritTim is offline   Reply With Quote