maildrop和配额超标

超过配额时,我实施了警告maildrop。 除了一个细节,这工作正常。

缺点是,发送邮件通知是唯一的时间发送…我的意思是,例如,如果邮箱超过80%,如我已经configuration,发送超过电子邮件通知,那里没事。

问题是,如果超过了邮箱,即使在24小时后,也不会重新发送警报。

我注意到,当一个邮箱超过限制时,会在超出/home/vmail/domain/mailbox/quotawarn的邮箱文件夹中创build名为quotawarn的文件。 如果我删除该文件,立即发送通知。 所以这似乎出现在那里的话题。

我注意到在文档中,并理解,应该在这里说的function,这意味着警告限制超过24小时后重新发送,但这是行不通的。

任何想法 ? 谢谢

从山寨Varshavchik 交叉发布的问题在快递maildrop邮件列表中的解决scheme

现有quotawarn文件的时间戳被用来确定自上次警告消息以来的24小时过去了。

检查quotawarn文件的时间戳。

此外,为了使警告起作用,当然,所有的邮件都必须使用maildropdeliverquota来交付。 如果你还有别的东西在传递邮件,那么它会忽略quotawarn ; 那不用说了。


换句话说,这里是伪代码来检查这种情况

 if there is incoming email if postfix deliver it via maildrop or deliverquota if quota threshold > 0 if size of maildir > quota threshold if there is quotawarn file if modified time of quotawarn + 86400 < now write blank string to quotawarn file put warning email into user mailbox