Skip to content

Instantly share code, notes, and snippets.

@iammart
Last active May 26, 2017 09:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iammart/a5b86be9ec40673d7b812797cbf20203 to your computer and use it in GitHub Desktop.
Save iammart/a5b86be9ec40673d7b812797cbf20203 to your computer and use it in GitHub Desktop.
cPanel Mail
#
# Delete email older than %%
#
$ find /home/%ACCOUNT%/mail/%MAILBOX%/new -type f -mtime +30 -delete
$ find /home/%ACCOUNT%/mail/%MAILBOX%/cur -type f -mtime +30 -delete
#
# Fix quotas
# https://forums.cpanel.net/threads/how-to-reset-mail-quota.105325/#post-691898
#
$ /scripts/generate_maildirsize --confirm --verbose %ACCOUNT%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment