Update to not send mails in case nothing changes
Future TODO: Send update if expiry is close (< 30 days)
This commit is contained in:
parent
3cad10d133
commit
782f3202e3
1 changed files with 10 additions and 11 deletions
|
@ -44,17 +44,16 @@ def main():
|
||||||
elif "unexpected error occurred" in line:
|
elif "unexpected error occurred" in line:
|
||||||
state = State.error
|
state = State.error
|
||||||
|
|
||||||
text = "\n".join(text)
|
if state is not State.no_action:
|
||||||
subject = SUBJECT.format(str(state))
|
text = "\n".join(text)
|
||||||
message = drymail.Message(
|
subject = SUBJECT.format(str(state))
|
||||||
sender=("Certbot renewal bot", "notify@dennogumi.org"),
|
message = drymail.Message(
|
||||||
receivers=["root"],
|
sender=("Certbot renewal bot", "notify@dennogumi.org"),
|
||||||
subject=subject,
|
receivers=["root"],
|
||||||
headers=HEADER,
|
subject=subject,
|
||||||
text=text
|
headers=HEADER,
|
||||||
)
|
text=text
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
client = drymail.SMTPMailer(
|
client = drymail.SMTPMailer(
|
||||||
host='localhost')
|
host='localhost')
|
||||||
|
|
Loading…
Add table
Reference in a new issue