ProtonMail / WebClients

Monorepo hosting the proton web clients
GNU General Public License v3.0
4.47k stars 566 forks source link

Email filter does not catch emails with matching conditions #182

Closed ghost closed 3 years ago

ghost commented 4 years ago

Describe the bug

I created a custom filter with the condition that if the sender contains "TechCrunch" the action is Move to folder named "Newsletters."

When I receive an email "From: TechCrunch 'newsletter@techcrunch.com' via 33Mail <sender@mailer1.33mail.com>" the email lands in my Inbox.

--

I am taking newsletter@techcrunch.com as an example but it seems that for all emails I get via 33mail.com none of the content before via 33Mail <sender@mailer1.33mail.com> is filtered by the From condition.

--

I reproduced with an email coming from firstname surname; if the sender contains "firstname surname" Move to [name of folder]. Then when I receive an email "From: firstname surname <firstnamesurname@outlook.fr>" the email lands in my Inbox.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://mail.protonmail.com/filters
  2. Click ADD FILTER
  3. Select conditions if the sender contains
  4. Input the part of From that is before the email address of the sender
  5. Select Move to, select a folder (or create one), and click SAVE
  6. Receive email matching the filter condition

Expected behavior Emails that match the filter conditions "if the sender contains" should skip Inbox and land in the designated folder.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

~Smartphone (please complete the following information):~

Additional context Add any other context about the problem here.

Erikvv commented 2 years ago

I have this issue. It looks like you can filter on sender e-mail address but not on sender name.

Erikvv commented 2 years ago

This Sieve filter is a workaround:

require ["include", "environment", "variables", "relational", "comparator-i;ascii-numeric", "spamtest", "fileinto", "imap4flags"];

if header :contains "from" "some guy I dont like"
{
    fileinto "trash";
}