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

LTOTH

Member
Dec 20, 2015
23
1
53
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,880
2,260
463
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
23
1
53
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,880
2,260
463
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.
 

PeteS

Well-Known Member
Jun 8, 2017
389
88
78
Oregon
cPanel Access Level
Root Administrator
@PeteS - there is! Here's a screenshot from WHM >> Create a New Account showing this option under the "Settings" area:


View attachment 73965
I'm not talking about that. I'm talking about a _default_ settings for these optional settings, so it can be defaulted to UNchecked. If memory serves me, there is a setting for whether Enable Apache SpamAssassin is checked, right? I'm looking to customize these settings-it's too easy to forget to check them.

-Pete
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,139
2,404
363
cPanel Access Level
Root Administrator
Ah, thanks for that clarification. There is a global option to enabled SpamAssassin, but I don't have a global one for spam box at account creation time. I do see this is enabled on my system by default, and a second server I checked.
 

PeteS

Well-Known Member
Jun 8, 2017
389
88
78
Oregon
cPanel Access Level
Root Administrator
Ah, thanks for that clarification. There is a global option to enabled SpamAssassin, but I don't have a global one for spam box at account creation time. I do see this is enabled on my system by default, and a second server I checked.
Apparently there is not a config for either of them for account creation defaults (just a force Spamassassin for all after the fact setting).

Seems to me that being able to control the account creation default settings would be something we should have.

Thanks.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,139
2,404
363
cPanel Access Level
Root Administrator
Interesting - I checked it again just now on my side and I can see it here:


I also had some colleagues check and they all confirmed it was showing up normally. Maybe there was a slight delay and you need to clear cache and check again?
 

PeteS

Well-Known Member
Jun 8, 2017
389
88
78
Oregon
cPanel Access Level
Root Administrator
I logged out, bad.
Logged back in, bad.
Cleared cookies/cache, bad.
Opened a private browser window, bad.
Opened different browser, one not even used for cPanel, bad.

Time is wrong, "Need Review" still shows, can't upvote. (If i log out and try to upvote, I can click and it sends me to log in, but then still can't.)

In my profile it shows as "On Moderation." (Note that time is correct in the profile listing.)

IDK what else to try...

1633561545478.png1633561677053.png1633561677053.png