Skip to main content

Changes to .contactemail files not updating within WHM

Comments

2 comments

  • gregc
    For anyone with the same issue, here's the solution... Contrary to a lot of information out there you don't actually update the /home/USER/.contactemail files directly, instead you update the files in /var/cpanel/users. Each file has a line like CONTACTEMAIL=email@example.com, which is what you need to edit. Within the /var/cpanel/users folder I ran the below search and replace in order to update all files. sed -i -- 's/CONTACTEMAIL=oldaddress@example.com/CONTACTEMAIL=newaddress@example.com/g' * After updating the individual files in /var/cpanel/users you then need to run /usr/local/cpanel/scripts/updateuserdomains, which will update all of the .contactemail files with the email addresses in the /var/cpanel/users files.
    0
  • cPanelMichael
    Hello, I'm happy to see you were able to address the issue. You can also update the contact address for the cPanel account using WHM API 1 with a command such as:
    whmapi1 modifyacct user=username contactemail=user@domain
    Thank you.
    0

Please sign in to leave a comment.