by Aromal Rajagopal | Nov 24, 2009 | Quick fixes, Technical |
The following script can be used to restore multiple accounts from the backups. It is assumed that all the backup files are already present in the /home directory in the tar.gz format. #!/bin/bash ####################### for i in `ls | grep tar.gz | cut -d- -f2 | cut...
by Aromal Rajagopal | Oct 19, 2009 | Quick fixes, Technical |
Issue : How can I run a ‘pkgacct’ for all the accounts on the server in one go? Solution: Here’s a simple script to package all the accounts on your server : #!/bin/bash IFS=”$” /bin/ls — /var/cpanel/users | /bin/grep -v...
by Aromal Rajagopal | Jul 15, 2009 | Articles and tutorials, Technical |
Following are the cPanel scripts and their functions. adddns – Adds a DNS zone. addfpmail – Add frontpage mail extensions to all domains without them. addfpmail2 -Add frontpage mail extensions to all domains without them. addnetmaskips – Add the...
by Aromal Rajagopal | Jun 16, 2009 | Quick fixes, Technical |
Issue : Emails older than a year need to be deleted automatically. Solution : You can use ‘find’ against the standard mail folders : find -P /home/*/mail/*/*/cur -mtime ‘+365’ find -P /home/*/mail/*/*/new -mtime ‘+365’ Note : 365 is...
by Aromal Rajagopal | May 24, 2009 | Quick fixes, Technical |
Here is a small but handy script which will clear the queued emails from the server. exim -bpc exim -bpru | grep frozen | awk {‘print $3’}|xargs exim -Mrm exim -bpru | grep “<>” | awk {‘print $3’}|xargs exim -Mrm exim -bpru |...