禁用让我们加密 certbot 每日更新电子邮件

Joh*_*ohn 5 lets-encrypt certbot

在 cronjob 上运行时,是否可以告诉 certbot 不要每天给我发电子邮件?

我的定时任务是:

0 0 * * * sudo /usr/bin/certbot renew --post-hook "sudo service nginx reload"
Run Code Online (Sandbox Code Playgroud)

我收到电子邮件:

Cert not yet due for renewal
Run Code Online (Sandbox Code Playgroud)

我只想在证书需要续订、续订失败或已续订时收到电子邮件。

我不需要每天收到通知,没有什么可以更新。

ott*_*ter 5

根据Certbot 用户指南,如果您只想收到续订失败的通知,那么您可以将选项添加--quiet到命令中:

certbot renew --quiet --post-hook "sudo service nginx reload"
Run Code Online (Sandbox Code Playgroud)

如果您只想抑制这一特定消息,那么您可以修改命令以用于grep丢弃该消息,例如:

certbot renew --post-hook "sudo service nginx reload" | grep -v "not yet due for renewal"
Run Code Online (Sandbox Code Playgroud)