Global email filter to put all emails containing "[spam]" in the user's junk folder?

LTOTH

Member
Dec 20, 2015
22
1
1
US
cPanel Access Level
Reseller Owner
Is there a way to create a global rule so it routes it to the user's Junk folder so I don't have to create separate rule for each and every account?

We are using SpamExperts to filter our junk mail. It flags the subject of the email that it detects as Junk with the prefix "[spam]". I created a global Email Filter that moves these emails to the Junk folder but it's moving all of the user's mail to the server's Junk folder not the individual user's Junk folder.

Thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
Hello @LTOTH,

Are you able to adjust your SpamExperts configuration so that it applies “***SPAM***” to the message subject instead of "[spam]"? If so, cPanel & WHM version 80 includes a new feature to enable SpamBox by default on new cPanel account creation. You can read about it on the link below:

Enable SpamBox by default on new cPanel account creation

In particular, note the following quote:
  • When you upgrade to cPanel & WHM version 80, the system creates spam folders for all existing email accounts that do not have them. This action ensures that users do not need to log into IMAP to create and subscribe to the spam folder.
Version 80 is currently only available as a development version on the EDGE release tier.

Thank you.
 

LTOTH

Member
Dec 20, 2015
22
1
1
US
cPanel Access Level
Reseller Owner
Thanks for your reply. I am open to the suggestion but I would really like the global email filter to have some sort of wildcard (e.g., *user-account+/.Junk) so it routes the mail based on the tags and to the locations that I define.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
Thanks for your reply. I am open to the suggestion but I would really like the global email filter to have some sort of wildcard (e.g., *user-account+/.Junk) so it routes the mail based on the tags and to the locations that I define.
I encourage you to submit a feature request if you'd like to see something like this added to the cPanel UI.

cPanel & WHM version 80 (currently published as a development version in the EDGE release tier) offers another potential solution if SpamExperts allows you to append "+Junk" to the recipient address of filtered messages. If SpamExperts supports that, you could make use of the new plus addressing functionality quoted below from the Version 80 Release Notes and Version 80 Email Accounts documents:

Plus addressing mailbox creation
cPanel users can disable automatic mailbox creation for plus addressing in the Email Accounts interface (cPanel >> Home >> Email >> Email Accounts). The server still delivers plus address messages to the proper mailbox. The Automatically Create Folders setting only affects mailbox creation.
In the Automatically Create Folders for Plus Addressing section, select one of the following options:

Automatically Create Folders —
When you receive an email that uses plus addressing, the system will create a new folder.
Do Not Automatically Create Folders —
When you receive an email that uses plus addressing, the system will not create a new folder.

Note:
• The server moves a message that uses plus addressing to a designated folder if the folder exists. For example, the system would place a message to [email protected] in the plusaddress folder.

• If the folder does not exist and you select Do Not Automatically Create Folders, the server will deliver the message to the INBOX folder.
Thank you.