summaryrefslogtreecommitdiffstats
path: root/roles/MX
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-06-05 18:25:09 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:54:27 +0200
commitf12db60f358dbf5506e373477c04488a2c269332 (patch)
tree5e7ee6493b3495a7361a85e6812e226528380491 /roles/MX
parent2c925ea17fcb6f71826e5c0f30f99c5daba10e14 (diff)
Add a reserved domain 'discard.fripost.org' to discard messages.
‘noreply@’ aliases can be added by routing them to ‘@discard.fripost.org’.
Diffstat (limited to 'roles/MX')
-rw-r--r--roles/MX/files/etc/postfix/virtual/reserved_alias.pcre5
-rw-r--r--roles/MX/templates/etc/postfix/virtual/transport.j21
2 files changed, 4 insertions, 2 deletions
diff --git a/roles/MX/files/etc/postfix/virtual/reserved_alias.pcre b/roles/MX/files/etc/postfix/virtual/reserved_alias.pcre
index f1c79c7..9fe60c8 100644
--- a/roles/MX/files/etc/postfix/virtual/reserved_alias.pcre
+++ b/roles/MX/files/etc/postfix/virtual/reserved_alias.pcre
@@ -1,5 +1,6 @@
-/^(?:postmaster|abuse)(?:\+.*)?@fripost\.org$/ admin@fripost.org
+/^(?:postmaster|abuse)(?:\+.*)?@fripost\.org$/ admin@fripost.org
# For other domains, RFC 822 section 6.3 and RFC 2142 section 4
# mandatory aliases are forwarded to OUR admin team and to the domain
# owner or postmaster, if there are any.
-/^(postmaster|abuse)(?:\+.*)?@(.*)/ $2/$1@reserved.fripost.org
+/^(postmaster|abuse)(?:\+.*)?@(.*)/ $2/$1@reserved.fripost.org
+/^(double-bounce)(?:\+.*)?@(.*)/ $2/$1@discard.fripost.org
diff --git a/roles/MX/templates/etc/postfix/virtual/transport.j2 b/roles/MX/templates/etc/postfix/virtual/transport.j2
index 69a8c83..49f3696 100644
--- a/roles/MX/templates/etc/postfix/virtual/transport.j2
+++ b/roles/MX/templates/etc/postfix/virtual/transport.j2
@@ -1,29 +1,30 @@
# Each valid address user@example.org is aliased (on the MX) into some
# example.org/user@xxx.fripost.org, and non-defaults next-hop:port are
# chosen here in that table, depending on 'xxx'. The reason for such
# indirection is that there is only one qmgr(8) daemon, which delegate
# the routing strategy to the trivial-rewrite(8), which in turns queries
# transport_maps. Hence high latency maps such as LDAP or SQL would
# congestion the queue manager. On the other hand, virtual aliasing is
# performed by cleanup(8), multiples instances of which can run in
# parallel. See http://www.postfix.org/ADDRESS_REWRITING_README.html .
#
# /!\ WARNING: xxx.fripost.org should NOT be in the list of valid
# domains ($virtual_alias_domains)! Otherwise at the next iteration of
# the alias resolution loop the domain will be validated but not the
# address, and the MTA will reply with "Recipient address rejected: User
# unknown in virtual alias table".
reserved.fripost.org reserved-alias:
+discard.fripost.org discard:
{% if 'LDA' in group_names %}
mda.fripost.org smtpl:[127.0.0.1]:{{ postfix_instance.IMAP.port }}
{% else %}
mda.fripost.org smtp:[mda.fripost.org]:{{ postfix_instance.IMAP.port }}
{% endif %}
{% if 'lists' in group_names %}
sympa.fripost.org smtpl:[127.0.0.1]:{{ postfix_instance.lists.port }}
{% else %}
sympa.fripost.org smtp:[lists.fripost.org]:{{ postfix_instance.lists.port }}
{% endif %}