All mails from cron script are now passed through the GPG-Mailgate so they are encrypted if possible.

pull/33/head
fkrone 8 years ago
parent 24cfe01d95
commit 9cfbd24bdc

@ -1 +1 @@
Your PGP key has been imported successfully. Don't be worried if this mail is not encrypted. The following mails will be encrypted.
Your PGP key has been imported successfully.

@ -48,8 +48,8 @@ def send_msg( mailsubject, messagefile, recipients = None ):
msg.attach(MIMEText(mailbody, 'plain'))
msg.attach(MIMEText(markdown.markdown(mailbody), 'html'))
if 'relay' in cfg and 'host' in cfg['relay'] and 'port' in cfg['relay']:
relay = (cfg['relay']['host'], int(cfg['relay']['port']))
if 'relay' in cfg and 'host' in cfg['relay'] and 'enc_port' in cfg['relay']:
relay = (cfg['relay']['host'], int(cfg['relay']['enc_port']))
smtp = smtplib.SMTP(relay[0], relay[1])
smtp.sendmail( cfg['cron']['notification_email'], recipients, msg.as_string() )
else:

@ -76,6 +76,9 @@ verbose = yes
# unless you alter the default Postfix configuration, you won't have to modify this
host = 127.0.0.1
port = 10028
# This is the default port of postfix. It is used to send some
# mails through the GPG-Mailgate so they are encrypted
enc_port = 25
[database]
# uncomment the settings below if you want

Loading…
Cancel
Save