Email filter "Save to folder" not working in Usermin / Virtualmin

Hi, I've set up an email filter in Usermin with the following rules/actions:-

Rule: 'Based on header' => 'To' => 'starts with' => 'alias@mydomain.com' Action: 'Save to folder' => 'Someone' Option: 'Continue with other filter rules, even after applying this action' = OFF

  • The folder 'Someone' is created and has emails in it.
  • 'Show Matching Emails In Folder' displays matching emails as expected.
  • 'Apply To Email In Folder' moves the matching emails to the correct ('Someone') folder as expected.

However, when a new email arrives into the Inbox, the email is not moved to the intended folder.

Note that 'alias@mydomain.com' is actually an alias email address in my case. Not sure if that should make any difference?

Any ideas why it's not working? Is this a bug?

Status: 
Active

Comments

For the "To" field condition, change "starts with" to "contains"

Hi, thanks, but already tried that. Also changed the 'header' to 'X-Original-To' which seems to bring up more results when I press 'Show Matching Emails In Folder', but still nothing is moved to the target folder automatically when a matching email is received.

Do any filtering rules work, like forwarding email to other addresses?

I think I have found the cause - I just noticed an option in Virtualmin > Email Settings > Spam & Virus Scanning for "Allow mailbox users to create mail filters?". I enabled this, and in Usermin (Mail/mailbox view) a new option in the side navigation appeared for "Email Filters". The filter I had set up before was there, and now the filtering seems to work.

Previously I set this filter up under Usermin > Filter & Forward Mail, and so I would still expect it to work. Seems like the feature is duplicated in Usermin, and if one is prevented from working, then both should be?