cPanel 中的 Cron 作业将在 21 天后删除电子邮件

发布于 2024-09-10 23:23:54 字数 322 浏览 1 评论 0原文

我在 21 天后删除电子邮件的 cron 作业中遇到一些问题。我已经阅读了很多示例,并尝试了该命令的许多不同变体,但我无法让它工作:

find /home/cont/mail///cur -name "*" - mtime +21 -exec rm {} \;

目前,它正在运行,我从文件夹中没有任何文件的每个邮箱中收到一条消息: “rm:无法删除`/home/cont/mail/example.com/admin/cur':是一个目录”

然后我检查其中确实包含文件的目录,并且没有删除任何内容。我确信我错过了一些简单的东西......

谢谢。

I'm having some issues with a cron job to delete emails after 21 days. I've read through many examples and have tried many different variations of this command but I can't get it to work:

find /home/cont/mail///cur -name "*" -mtime +21 -exec rm {} \;

Currently this runs and I get a message back from every mail box that doesn't have any files in the folder:
"rm: cannot remove `/home/cont/mail/example.com/admin/cur': Is a directory"

I then check the directories that do have files in them and nothing is deleted. I'm sure I'm missing something simple...

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

北斗星光 2024-09-17 23:23:54

我很高兴没有人回答这个问题,这让我看起来更愚蠢。它正在工作,返回的消息只是因为没有电子邮件,但我现在看到电子邮件已从其他用户的文件夹中删除。

I'm glad no one answered this and made me look even more stupid. It is working, the messages back are just because there are no emails but I am seeing the emails deleted from other user's folders now.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文