Commit 5d2af2b2 authored by ale's avatar ale
Browse files

Merge branch 'slow-transport' into 'master'

Add a slow (low-concurrency) outbound transport

See merge request !74
parents 8d74fd79 f1fc6301
......@@ -3,6 +3,7 @@
{% include "main.cf.base.j2" %}
ldap = proxy:ldap:/etc/postfix/ldap/
pcre = pcre:${config_directory}/
mynetworks = 127.0.0.0/8 [::1]/128 {% for o in net_overlays %}{{ o.network }} {% endfor %}
......@@ -46,7 +47,7 @@ relay_recipient_maps = ${ldap}all-recipients ${indexed}transport ${indexed}mailm
relay_destination_recipient_limit = 1
# Send each message to its target backend.
transport_maps = ${ldap}all-recipients ${indexed}transport ${indexed}mailman_transport
transport_maps = ${pcre}transport.pcre ${ldap}all-recipients ${indexed}transport ${indexed}mailman_transport
# resolve aliases
virtual_alias_maps = ${indexed}virtual ${ldap}aliases
......@@ -54,6 +55,9 @@ virtual_alias_maps = ${indexed}virtual ${ldap}aliases
# Concurrency tuning for "relay" and "smtp" transport.
relay_destination_concurrency_limit = 20
default_destination_concurrency_limit = 20
smtp-lowpri_destination_recipient_limit = 1
smtp-lowpri_destination_concurrency_limit = 2
smtp-lowpri_destination_rate_delay = 2s
# SSL configuration (outbound).
smtp_tls_security_level = may
......
......@@ -19,6 +19,7 @@ flush unix n - y 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - y - - smtp
smtp-lowpri unix - - y - - smtp
relay unix - - y - - smtp
-o smtp_helo_timeout=5 -o smtp_connect_timeout=5
-o smtp_host_lookup=native
......
# Send high-volume, high-spam traffic onto the lower-priority
# smtp transport.
/(yahoo|hotmail|live)(\.[a-z]{2,3}){1,2}$/ smtp-lowpri:
{% for pattern in postfix_low_priority_domains | default([]) %}
/{{ pattern }}/ smtp-lowpri:
{% endfor %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment