0

Is it possible to block a sender as spam using imap (by the wonderful MailKit api), in any way?

Currently I'm just moving these spam mails in a specific folder, but this doesn't prevent emails from the same sender to sent another mail.

I know it is possible in the mail client, to "flag as spam", but I'm not sure what's happening "behind the wall".

grmihel
  • 784
  • 3
  • 15
  • 40

1 Answers1

1

The IMAP protocol does not support such an action. What most mail clients do is implement their own client-side IMAP message filtering.

jstedfast
  • 35,744
  • 5
  • 97
  • 110
  • So if you want to implement a spam filtering, then you have to add and maintain a blocker addresslist on you own, I guess? – grmihel Nov 19 '15 at 15:22
  • correct, you'll need to implement custom logic for tracking blocked addresses and logic to move those messages (if/when found) to another folder or marking them as spam or whatever your client wants to do with them. – jstedfast Nov 19 '15 at 17:06