Browse Source

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

pull/33/head
fkrone 7 years ago
parent
commit
9cfbd24bdc
  1. 2
      cron_templates/registrationSuccess.md
  2. 4
      gpg-mailgate-web/cron.py
  3. 3
      gpg-mailgate.conf.sample

2
cron_templates/registrationSuccess.md

@ -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.

4
gpg-mailgate-web/cron.py

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

3
gpg-mailgate.conf.sample

@ -76,6 +76,9 @@ verbose = yes
# unless you alter the default Postfix configuration, you won't have to modify this # unless you alter the default Postfix configuration, you won't have to modify this
host = 127.0.0.1 host = 127.0.0.1
port = 10028 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] [database]
# uncomment the settings below if you want # uncomment the settings below if you want

Loading…
Cancel
Save