Delete many, like many forwarders

Oct 7, 2022
19
0
1
Uddevalla
cPanel Access Level
Root Administrator
I have many (many) forwarders.

I host +100 domains that each has +100 emails and over the years, we have added forwarders to many external systems.

I understand that I cant remove forwarders (bulk) in cPanel, but there has to be a workaround.

Let's say I want to delete all forwarders to [email protected], or [email protected], how can I do that?
 
Last edited by a moderator:

SimpleSonic

Well-Known Member
Mar 24, 2023
186
82
103
USA
cPanel Access Level
Root Administrator
Twitter
The forwarders are saved in:

Code:
/etc/valiases/domainname
Where "domainname" is the domain name of the account the forwarders are created.
 
  • Like
Reactions: cPRex

SimpleSonic

Well-Known Member
Mar 24, 2023
186
82
103
USA
cPanel Access Level
Root Administrator
Twitter
Hi
you can empty the file /etc/valiases/domainname

That will delete all forwarders for the specific domain.
That file also can contain the default address information, so completely clearing or deleting that file may lose that info, such as:

Code:
:fail: No Such User Here
So you may want to take care when removing any info from the file unless you want to go back and reconfigure the default address for those email accounts.