How to filter emails using content and subject?

In my application (C #), I need to filter emails based on their contents. If the email is double, you must send it to the specified email address, if it is a regular email address, I must send it to another email address.

I looked through the emails that came in and compiled a list of common words that appear in the subject line for double signatures (10-20 words). For each letter I sent, I checked if any of these words contained any of the words, and if they, where more than 2-3, depending on the length of the object, I decided that it was a failure. The problem was that this basic version did not work.

I read about spam filters (basically, what I want to do is similar.), And after searching for some examples on the Internet, I found some based on Bayesian networks. The problem with this solution is that I needed to feed a lot of training materials, which I don’t have yet.

How can I filter these letters based on the content + subject or just subject, without requiring a lot of training material?

EDIT: I want to perform filtering at the email server level.

+3
source share
2 answers

I think you should use MailSystem.NET , which will simplify the analysis of letters.

MailSystem - .NET. , . MailSystem SMTP, POP3, IMAP4, NNTP, MIME, S/MIME, OpenPGP, DNS, vCard, vCalendar, - (, RBL, DomainKeys), Queuing, Mail Merge WhoIs

, , . .

+2

, . Gmail , .

0

Source: https://habr.com/ru/post/1774242/


All Articles