Move all mails from all accounts to spam folder if some header is found
I need to move all e-mail with some header to spam forder of account. Example:
user a@domain.com -> have some header -> move to spam folder of a@domain.com
user b@domain.com -> have some header -> move to spam folder of b@domain.com
Is possible to do that in anyway or use global filter of e-mails /etc/vfilter/domain.com and mode email from user account?
Because one of domain has this code in /etc/vfilter this content:
if
$header_subject: contains "{vpara}"
then
deliver "\"domain+spam\""
endif
The problem of that is all mail that subject contains {vpara} is moved to spam folder of default account, not the account that received that e-mail.
Is possible to use some variable to move the e-mail to the account that received that e-mail?
Or do that with any other way?
Thanks.
-
Hello, Yes, you can setup filters for individual email accounts using the "Email Filters" option in cPanel: Email Filters - Documentation - cPanel Documentation The following document explains how to setup a filter, including information about the "Deliver To Folder" action: How to Configure Mail Filters - cPanel Knowledge Base - cPanel Documentation Thank you. 0 -
I need to do globally, not per e-mail account. If possible with all e-mail in any e-mail account of the domain or better, any e-mail account in the server. 0 -
I need to do globally, not per e-mail account. If possible with all e-mail in any e-mail account of the domain or better, any e-mail account in the server.
Hello, There's no simple filter rule available for what you are seeking. Generally, this is setup by adding a custom SpamAssassin rule that detects messages as SPAM based on the content you specific. SpamAssassin documents how to write custom rules at: WritingRules - Spamassassin Wiki However, you may need to consult with a system administrator if you need help writing custom rules: System Administration Services | cPanel Forums Thank you.0
Please sign in to leave a comment.
Comments
3 comments