mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
certificate: be more resilient when mail cant be sent to root for some reason ..
This commit is contained in:
parent
94e3c7b756
commit
d7ee1c23f3
1 changed files with 9 additions and 5 deletions
|
@ -455,11 +455,15 @@ investigate :
|
|||
-- Certificate Manager
|
||||
"""
|
||||
|
||||
try:
|
||||
import smtplib
|
||||
|
||||
smtp = smtplib.SMTP("localhost")
|
||||
smtp.sendmail(from_, [to_], message.encode("utf-8"))
|
||||
smtp.quit()
|
||||
except Exception as e:
|
||||
# Dont miserably crash the whole auto renew cert when one renewal fails ...
|
||||
# cf boring cases like https://github.com/YunoHost/issues/issues/2102
|
||||
logger.exception(f"Failed to send mail about cert renewal failure ... : {e}")
|
||||
|
||||
|
||||
def _check_acme_challenge_configuration(domain):
|
||||
|
|
Loading…
Add table
Reference in a new issue