How to delete all e-mails from a specific address using sieve-language?

167 views Asked by At

Filters / sieve filters. Make a filter to check recipient = your custom domain, choose action delete. Run on existing mails. Delete trash by using „Delete all“.

I tried doing that using the discard; from my knowledge but this did not work:

require "extlists";

if address :is "from" "[email protected]"

{
 discard; 
}
2

There are 2 answers

1
hypermails On

how about this ?

require ["fileinto","discard"];
if address :is "from" "[email protected]" {
  discard;
  stop;
}
0
risuch On

If you have multiple sieve filters running in sequence make sure that the filter which may discard a message runs first. It seems if some action was applied on the mail (like applying a label) the discard command does not take effect afterwards.