diff --git a/README.md b/README.md index 5694262..ba411ac 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ The following configuration options are mandatory in each quarantine section: * **whitelist_type** One of the whitelist types described below. * **smtp_host** - SMTP host to inject original e-mails. This is needed if not all recipients of an e-mail are whitelisted + SMTP host used to release original e-mails from the quarantine. * **smtp_port** SMTP port @@ -97,6 +97,10 @@ The following configuration options are optional in each quarantine section: Content of a named subgroup, 'subgroup_name' will be replaced by its name. The following configuration options are mandatory for this notification type: + * **notification_email_smtp_host** + SMTP host used to send notification e-mails. + * **notification_email_smtp_port** + SMTP port. * **notification_email_envelope_from** Notification e-mail envelope from-address. * **notification_email_from** diff --git a/docs/pyquarantine.conf.example b/docs/pyquarantine.conf.example index 679fac7..30ad6df 100644 --- a/docs/pyquarantine.conf.example +++ b/docs/pyquarantine.conf.example @@ -88,6 +88,18 @@ reject_reason = Message rejected # notification_type = email +# Option: notification_email_smtp_host +# Notes: Set the SMTP host. It will be used to send notification e-mails. +# Values: [ HOSTNAME | IP_ADDRESS ] +# +notification_email_smtp_host = 127.0.0.1 + +# Option: notification_email_smtp_port +# Notes: Set the SMTP port. +# Values: [ PORT ] +# +notification_email_smtp_port = 25 + # Option: notification_email_envelope_from # Notes: Set the envelope-from address used when sending notification emails. # This option is needed by notification type 'email'. diff --git a/pyquarantine/notifications.py b/pyquarantine/notifications.py index 8f5cc15..ebe2b44 100644 --- a/pyquarantine/notifications.py +++ b/pyquarantine/notifications.py @@ -115,8 +115,8 @@ class EMailNotification(BaseNotification): # check if mandatory options are present in config for option in [ - "smtp_host", - "smtp_port", + "notification_email_smtp_host", + "notification_email_smtp_port", "notification_email_envelope_from", "notification_email_from", "notification_email_subject", @@ -142,8 +142,8 @@ class EMailNotification(BaseNotification): if option not in config.keys(): config[option] = defaults[option] - self.smtp_host = self.config["smtp_host"] - self.smtp_port = self.config["smtp_port"] + self.smtp_host = self.config["notification_email_smtp_host"] + self.smtp_port = self.config["notification_email_smtp_port"] self.mailfrom = self.config["notification_email_envelope_from"] self.from_header = self.config["notification_email_from"] self.subject = self.config["notification_email_subject"]