简体   繁体   English

在“成功” cron作业删除电子邮件后无法更新电子邮件配额

[英]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; 我通过cpanel管理一堆电子邮件帐户,以进行工作,有时我被问及为什么电子邮件不起作用; 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. 我无权访问用户计算机,因此无法将其Outlook配置为每隔一段时间删除一次电子邮件。

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. 阅读后,我决定使用每月一次的Cron作业,并删除超过60天的电子邮件。 The cron job does what I need it to but for some reason the quotas don't update. Cron工作可以满足我的需求,但由于某些原因,配额不会更新。 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. 如果用户的3GB配额已用完,而cron作业释放了2GB,该配额仍表示已用完。

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? 另外,它不会向我发送执行了cron作业的常见电子邮件,是该“代码”中的内容吗?如果cron作业成功运行,服务器是否不发送确认电子邮件?

I tried to set up a different job to fix the quotas: /scripts/fixquotas but it doesn't work. 我尝试设置其他工作来修复配额: /scripts/fixquotas但是它不起作用。 This one sends me an email with an error: /usr/local/cpanel/bin/jailshell: /scripts/fixquotas: No such file or directory 这一封给我发了一封错误的电子邮件: /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? 我是否以root用户身份运行/ scripts / fixquotas? That jailshell error is related to having enabled ssh access for specific user accounts. 该监狱错误与为特定用户帐户启用ssh访问有关。 Did you try to run the same script via WHM interface instead of a ssh console? 您是否尝试通过WHM界面而不是ssh控制台运行相同的脚本?

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 最后,一个快速的解决方法是使用/ scripts / upcp --force运行强制的cpanel / whm更新,然后尝试重新运行/ scripts / fixquotas

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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