简体   繁体   中英

Trouble getting email quotas to update after “successful” cron job to delete emails

I manage a bunch of email accounts through cpanel, for work, and every once in a while i'm asked why the email isn't working; sending or receiving. Every time this happens is due to quotas being maxed out. I don't have access to the users computers so i cannot configure their Outlooks to delete emails every once in awhile.

After reading around I decided to use a cron job that runs every 1st of the month and deletes emails that are older than 60 days. The cron job does what I need it to but for some reason the quotas don't update. In the general overview of the server I can see that after it runs, some space is freed up. But the email quotas themselves do not change. If a user has a 3GB quota maxed out and the cron job frees up 2GB, the quota still says it's maxed out.

This is the job:

find /home/SERVER_LOGIN_USERNAME/mail/DOMAIN_NAME/MAIL_ACCOUNT_NAME/cur -type f -mtime +30 -exec rm {} \;

Is there anything in there that is keeping the quotas from updating? Also, it does not send me the usual email that a cron job was performed, is it something in that "code" or does the server not send confirmation emails if the cron job ran successfuly?

I tried to set up a different job to fix the quotas: /scripts/fixquotas but it doesn't work. This one sends me an email with an error: /usr/local/cpanel/bin/jailshell: /scripts/fixquotas: No such file or directory

Can anyone help me please?

Thank you.

Do you run /scripts/fixquotas as root user I suppose? That jailshell error is related to having enabled ssh access for specific user accounts. Did you try to run the same script via WHM interface instead of a ssh console?

In the end a quick fix is to run a forced cpanel/whm update using /scripts/upcp --force and then try to rerun /scripts/fixquotas

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM