cpanel accounts not receiving email

Quintanilha-RJ

Active Member
Apr 9, 2022
32
3
8
Rio de Janeiro
cPanel Access Level
Root Administrator
Good afternoon, I have a problem on my server that after an automatic migration attempt stopped receiving email, but I managed to find out that it has a target.


the following command solved my problem: whmapi1 unset_manual_mx_redirects domain='exemple.com'

but I need to apply this command to all domains on my server, can anyone tell me how I can apply this command to all domains on my server


thank you all in advance for the support
 

techAMIGO

Well-Known Member
Nov 6, 2019
68
48
18
Kerala, india
cPanel Access Level
Root Administrator
Hi,
since the manual mx data is stored in the file /etc/manualmx, I think removing entries from the file will fix it, or if you need to remove all you can simply null the file
with command
Code:
 > /etc/manualmx
But ofcourse take a backup of the file always before doing.

Or if you need to run command for all domains , following will work

Code:
for i in $(cat /etc/userdomains | cut -d : -f1 | grep -v "nobody"); do
  echo doing $i; 
  whmapi1 unset_manual_mx_redirects domain="$i" ;
done;
 
  • Like
Reactions: cPRex