# This is an example /etc/pyquarantine/pyquarantine.conf file.
# Copy it into place before use.
#
# Comments: use '#' for comment lines and ';' (following a space) for inline comments.
#
#           If an option is not present in a quarantine section, it will be read from
#           the global section.
#


[global]

# Option: quarantines
# Notes:  Set active quarantines (comma-separated).
#         Each active quarantine must have a section with the same name below.
#         The quarantine name 'global' is forbidden and will be ignored.
#         Quarantine names must be unique.
# Values: [ ACTIVE ]
#
quarantines = spam

# Option: quarantine_action_precedence
# Notes:  Set if the action of the first or the last matching quarantine should
#         be used if multiple recipients match multiple quarantines. If an original
#         email is delivered to at least one recipient due to whitelisting, the
#         email will always be accepted.
# Values: [ first | last ]
#
preferred_quarantine_action = last


[spam]
# Option: host_whitelist
# Notes:  Set a list of host and network addresses to be ignored by this quarantine.
#         All the common host/network notations are supported, including IPv6.
# Value:  [ HOST ]
#
host_whitelist = 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16

# Option: regex
# Notes:  Set the case insensitive regular expression to match against email headers.
#         If the regex matches any of the email headers, the email
#         will be processed by this quarantine.
# Values: [ REGEX ]
#
regex = ^X-Spam-Flag: YES

# Option: smtp_host
# Notes:  Set the SMTP host. It will be used to (re-)inject emails.
# Values: [ HOSTNAME | IP_ADDRESS ]
#
smtp_host = 127.0.0.1

# Option: smtp_port
# Notes:  Set the SMTP port.
# Values: [ PORT ]
#
smtp_port = 25

# Option: storage_type
# Notes:  Set the storage type.
# Values: [ file | none ]
#
storage_type = file

# Option: storage_directory
# Notes:  Set the directory to store quarantined emails.
#         This option is needed by quarantine type 'file'.
# Values: [ DIRECTORY ]
#
storage_directory = /var/lib/pyquarantine/spam

# Option: action
# Notes:  Set the milter action to perform if email is processed by this quarantine.
# Values: [ accept | discard | reject ]
#
action = discard

# Option: reject_reason
# Notes:  Optionally set the reason to return if action is set to reject.
# Values: [ REASON ]
#
reject_reason = Message rejected

# Option: notification
# Notes:  Set the notification type.
# Values: [ email | none ]
#
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'.
# Values: [ ENVELOPE_FROM_ADDRESS ]
#
notification_email_envelope_from = notification@domain.tld

# Option: notification_email_from
# Notes:  Set the from header used when sending notification emails.
#         This option is needed by notification type 'email'.
# Values: [ FROM_HEADER ]
#
notification_email_from = Notification <notification@domain.tld>

# Option: notification_email_usbject
# Notes:  Set the subject used when sending notification emails.
#         This option is needed by notification type 'email'.
# Values: [ SUBJECT ]
#
notification_email_subject = Spam Quarantine Notification

# Option: notification_email_template
# Notes:  Set the template used when sending notification emails.
#         A relative path to this config file can be used.
#         This option is needed by notification type 'email'.
# Values: [ TEMPLATE_PATH ]
#
notification_email_template = templates/notification.template

# Option: notification_email_strip_images
# Notes:  Optionally enable this option to strip img tags from emails.
# Values: [ TRUE | ON | YES | FALSE | OFF | NO ]
#
notification_email_strip_images = False

# Option: notification_email_replacement_img
# Notes:  Optionally set the path to a replacement image for img tags within emails.
#         A relative path to this config file can be used.
# Values: [ IMAGE_PATH ]
#
notification_email_replacement_img = templates/removed.png

# Option: notification_email_embedded_imgs
# Notes:  Set a list of paths to images to embed in e-mails (comma-separated).
#         Relative paths to this config file can be used.
#         This option is needed by notification type 'email'.
# Values: [ IMAGE_PATH ]
#
notification_email_embedded_imgs = templates/logo.png

# Option: notification_email_parser_lib
# Notes:  Optionally set the parser library used to parse
#         the text part of emails.
# Values: [ lxml | html.parser ]
#
notification_email_parser_lib = lxml

# Option: whitelist_type
# Notes:  Set the whitelist type.
# Values: [ db | none ]
#
whitelist_type = db

# Option: whitelist_db_connection
# Notes:  Set the connection string to connect to the database.
#         The configured user must have read/write access to
#         the whitelist_db_table configured below.
#         This option is needed by whitelist type 'db'.
# Values: [ DB_CONNECTION_STRING | none ]
#
whitelist_db_connection = mysql://user:password@localhost/database

# Option: whitelist_db_table
# Notes:  Set the database table name.
#         This option is needed by whitelist type 'db'.
# Values: [ DATABASE_TABLE]
#
whitelist_db_table = whitelist
