How to filter multirecipient emails

  • Answered
I set up user account filtering on my email to detect emails sent to me plus others i.e. multi-recipients in the To field. I used "match regex" with the expression ^.{60,}$. This should have checked the entire string in the To field and if it was at least 60 characters long there would be a match. But when I send email POP3 email to that account with multi-recipients, the filter does not work. It only works if I filter for fewer characters than the length of my own email address. This means that the filter only applies to the email address of the receiving account regardless of how many other email addresses are in the To field.

Please can someone tell me how to filter for multi-recipient emails in cPanel? Thanks.
Hello, It's important to point out that if you are using the User Level Filtering in cPanel, you will only be able to filter mail for the user you select to filter mail for. If you instead use the Account Level Filtering option in cPanel, that should allow for you to take an action on a message regardless of the recipient in the To: header. For instance you could setup one that simply states if the To contains to do something with it. Then any message going to a account would have that filter applied on them globally instead of down at the individual email user level. - Jacob
Hello, Thank you for your question. On a shared server, there is not a way to accomplish this, since it is an uncommon way to filter your email for spam, and it can create other problems. For example: If a customer sends an email to you, and another person (such as a co-worker), it will be blocked. Instead I recommend using Spam Assassin, or Boxtrapper, which is available in cPanel. If you have SpamAssassin enabled and are still receiving spam, I recommend reading this guide, which explains some of the reasons why SpamAssassin might be letting through what you consider spam into your email Inbox, and what you can do to try to reduce the amount of spam you have to manually review. On VPS and Dedicated severs this can be done by editing the Exim rules, but it is not supported by us. If you have any further questions, feel free to post them below. Thank you, -John-Paul