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!