Amending filter.cache & filter.yaml

Timecon432

Registered
Jul 10, 2020
1
0
0
Uk
cPanel Access Level
Reseller Owner
I need to change the email address That emails are redirected to on global Email filters. I have over 200 different filters. Is it safe for me to bulk alter in the actual filter.cache and filter.yaml? This will save me a lot of time than if I have to do it manually through cpanel If so is there an order I should do it? Thanks
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,304
363
Houston
If you're changing the email address on a global filter you wouldn't modify /home/$user/etc/domain.tld/emailuser/filter.cache/yaml at all. You'd want to modify /etc/vfilters/domain.tld

If you don't have any subdomains it needs to be changed on you could most likely run something as simple as the following sed command from the /etc/vfilters/ directory

Code:
cd /etc/vfilters/
Code:
sed 's/oldemailaddres/newemailaddress/g' *.*