Q:

How to set filter for folder on Email server by C#

I'm writing an email client, and I need to implement creating folders and setting the filter for a folder.
I have a problem with the second task: how can I do this programmatically using C#?
I've tried several IMAP libraries (s22, ae.net.mail, mailkit etc.), but they can only create folders; there is no way to configure filters.
Maybe I've missed something. I will be glad for any advice.

A:

The IMAP protocol doesn't specify a way to configure mail filters, so the way to do this will be highly dependent on the mail server.
Some servers support the Sieve filtering language and the associated ManageSieve protocol.

