diff --git a/management/email_administrator.py b/management/email_administrator.py index fadae75..5701392 100755 --- a/management/email_administrator.py +++ b/management/email_administrator.py @@ -7,7 +7,6 @@ import sys import html import smtplib -from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText @@ -46,9 +45,8 @@ msg['Subject'] = "[%s] %s" % (env['PRIMARY_HOSTNAME'], subject) content_html = "
{}
".format(html.escape(content)) -msg.attach(MIMEText(content, 'plain')) +msg.attach(MIMEText(create_signature(content.encode()).decode(), 'plain')) msg.attach(MIMEText(content_html, 'html')) -msg.attach(MIMEApplication(create_signature(content.encode()), Name="signed.asc")) # In Python 3.6: #msg.set_content(content) diff --git a/setup/pgp.sh b/setup/pgp.sh index 53e68e0..92a0084 100755 --- a/setup/pgp.sh +++ b/setup/pgp.sh @@ -20,7 +20,7 @@ function gpg_keygen { Key-Type: RSA Key-Length: 4096 Key-Usage: sign,encrypt,auth - Name-Real: Power Mail-in-a-Box Management Daemon + Name-Real: System Management Daemon Name-Email: noreply-daemon@${PRIMARY_HOSTNAME} Expire-Date: 180d %commit