Mass Change Default (Catch All) Addresses
- Written by Vanessa Vasile
- Published in Howto, Mail, Misc, Security
- 4 Comments
- Permalink
I wrote this nice one-liner for a user in the cPanel forums asking how to change all their current default addresses to :fail: –
http://thecpaneladmin.com/files/changedefaultaddr.sh.txt
Before you do anything like this, you should back up /etc/valiases. Keep in mind also that you can change the default address for new accounts in WHM > Tweak Settings.
Ref: http://forums.cpanel.net/f5/force-default-mail-address-all-accounts-158722.html
4 Comments
Pingback: Mass Change Catchall - cPanel Forums
Thank you for your great article, however I am looking for something that can bulk change the default/catch all email address to an single actual eMail address. Like if unrouted mail for 1.com, 2.com, 3.com, and 4.com all go to [email protected] If you have any advice for this or a tutorial it would be very much appreciated. Thank you.
You should be able to easily edit the script to do this.
sed “s/^\*:.*/[email protected]/g” -i /etc/valiases/*
Hi,
I’ve got several subdomains created for a main domain like this:
sb1.company.com
sb2.company.com
sb3.company.com
I also have emails created for each subdomain:
[email protected]
[email protected]
[email protected]
I’d like to set each email as a default address for each subdomain without manually going through the process in cPanel one by one. Is there a script or easy way to achieve that?
Thanks!