View Single Post
Old 22 Jan 2023, 02:39 AM   #2
BritTim
The "e" in e-mail
 
Join Date: May 2003
Location: mostly in Thailand
Posts: 3,095
For combining tests, you need to master anyof and allof. For example
Code:
if anyof (
    address :is ["X-Mail-from"] ["email1@domain.com","email2@domain.com"],
    address :domain :is ["X-Mail-from"] ["domain1.com","domain2.com"]
    )
{
  discard;
  stop;
}
Hope I have that syntax correct. It has been a while since I wrote sieve scripts.

I suggest you initially have scripts you intend to use to discard messages instead fileinto "todiscard" or something. Especially with complex scripts, things do go wrong, and are easier both to diagnose and recover from if messages still exist!
BritTim is offline   Reply With Quote