How to forward all email accounts from one domain to another?

ebizindia

Well-Known Member
Oct 13, 2005
100
4
168
Kolkata, India
cPanel Access Level
Root Administrator
Hi

I need to forward all email accounts like *@domain1.com to *@domain2.com.

One way, this can be done is with the domain forwarder but that does not work when the email accounts exist.

Now, I can set email forwarders for each account but there are almost 200 accounts. Is there a way we can list the email accounts in a text file (one on a line)?
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,739
301
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
The forwarders are stored in /etc/valiases/domain.com which is a text file as you want. You can insert them in there with the proper format and it will work fine and show up in cPanel.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,297
1,251
313
Houston