cPanel, dovecot. How to recalculate maildirsize
Find and remove existent maildirsize files:
find . -name maildirsize -exec rm -fv {} \;
Rebuild the files:
/scripts/generate_maildirsize --verbose --onlyrecalculate --confirm USERNAME… Read the rest
Notes
Find and remove existent maildirsize files:
find . -name maildirsize -exec rm -fv {} \;
Rebuild the files:
/scripts/generate_maildirsize --verbose --onlyrecalculate --confirm USERNAME… Read the rest
Make sure hostname is good:
/usr/local/cpanel/scripts/check_valid_server_hostname
Did you run /scripts/upcp –force? If not do it.
/scripts/upcp --force
If you run it already, run it again as I got this fixed after the second run.
If still not working:
cd /var/cpanel/.application-locks
rm -fv UpdateHostname\:USERNAME
/usr/local/cpanel/bin/update_horde_config --user=USERNAME
where USERNAME is cPanel username.… Read the rest
This appears when you run simple cd command via cPanel –> Terminal, for example:
cd public_html cat: /dev/fd/63: No such file or directory
The fix is pretty simple, just suppress output of cd command
Update .bashrc with the following alias:
alias cd='cd &>/dev/null' source .bashrc… Read the rest
Run repair script
/scripts/autorepair spamd_dbm_fix
And restart mail server
/etc/init.d/exim restart… Read the rest
Run:
/usr/local/cpanel/3rdparty/bin/spamassassin --version
Output:
SpamAssassin version 3.4.1 running on Perl version 5.26.0
Check bandwidth for a user:
whmapi1 showbw searchtype=user search=USERNAME year 2018 month 8
Change account's master domain:
whmapi1 modifyacct user=USERNAME domain=NEWDOMAINNAME
Change username:
whmapi1 modifyacct user=USERNAME newuser=NEWUSERNAME
Change package:
whmapi1 changepackage user=USERNAME pkg=NEWPKG
Show account's info:
whmapi1 accountsummary user USERNAME
Enable shell access:
whmapi1 modifyacct user=USERNAME HASSHELL=1
read -p "Username: " u; whmapi1 modifyacct user=$u HASSHELL=1
Update hostname:
whmapi1 sethostname hostname=HOSTNAME
Generate self signed SSL certificate:
whmapi1 generatessl domains=example.com… Read the rest
How to calculate IMAP dovecot bandwidth:
less /var/log/maillog |grep Aug |grep DOMAIN.COM |grep -Po 'out\=.+?,' |cut -d '=' -f2 |tr -d ,|awk '{s+=$1} END {print "total: ", s, " bytes transferred over IMAP"}'
total: 83107245783 bytes transferred over IMAP
echo "83107245783/1024/1024" |bc 79257M ~80G
How to calculate POP3 dovecot bandwidth:
less /var/log/maillog |grep DOMAIN.COM… Read the rest
Enable DAV daemon over WHM –> Service Manager
Remove if needed from disable features WHM –> Feature Manager
Allowing ports 2077, 2078, 2079, and 2080 in your firewall
If CSF update csf.conf TCP_IN with the ports range 2077:2080:
/etc/csf/csf.conf
TCP_IN = "20,21,22,25,26,80,110,143,443,465,587,993,995,2082,2083,2086,2087,2095,2096,2077:2080"
Restart csf
csf -r
cPanel's documentation:
https://documentation.cpanel.net/display/CKB/How+to+Set+Up+Calendars+and+Contacts… Read the rest