From d363522c15b1d1ce61b2780a539dd09e2e679d34 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 1 Dec 2013 23:51:28 +0100 Subject: Configure the MX:es. --- roles/mx/files/etc/postfix/virtual/alias_catchall_maps.cf | 8 ++++++++ roles/mx/files/etc/postfix/virtual/alias_maps.cf | 7 +++++++ roles/mx/files/etc/postfix/virtual/lists_maps.cf | 8 ++++++++ roles/mx/files/etc/postfix/virtual/mailbox_domains.cf | 9 +++++++++ roles/mx/files/etc/postfix/virtual/mailbox_maps.cf | 9 +++++++++ roles/mx/files/etc/postfix/virtual/reserved_maps.pcre | 5 +++++ roles/mx/files/etc/postfix/virtual/reserved_transport_maps | 2 ++ roles/mx/files/etc/postfix/virtual/transport_lists_maps.cf | 12 ++++++++++++ 8 files changed, 60 insertions(+) create mode 100644 roles/mx/files/etc/postfix/virtual/alias_catchall_maps.cf create mode 100644 roles/mx/files/etc/postfix/virtual/alias_maps.cf create mode 100644 roles/mx/files/etc/postfix/virtual/lists_maps.cf create mode 100644 roles/mx/files/etc/postfix/virtual/mailbox_domains.cf create mode 100644 roles/mx/files/etc/postfix/virtual/mailbox_maps.cf create mode 100644 roles/mx/files/etc/postfix/virtual/reserved_maps.pcre create mode 100644 roles/mx/files/etc/postfix/virtual/reserved_transport_maps create mode 100644 roles/mx/files/etc/postfix/virtual/transport_lists_maps.cf (limited to 'roles/mx/files/etc') diff --git a/roles/mx/files/etc/postfix/virtual/alias_catchall_maps.cf b/roles/mx/files/etc/postfix/virtual/alias_catchall_maps.cf new file mode 100644 index 0000000..2de4667 --- /dev/null +++ b/roles/mx/files/etc/postfix/virtual/alias_catchall_maps.cf @@ -0,0 +1,8 @@ +server_host = ldapi://%2Fprivate%2Fldapi/ +version = 3 +search_base = fvd=%d,ou=virtual,o=mailHosting,dc=fripost,dc=org +scope = base +bind = sasl +sasl_mechs = EXTERNAL +query_filter = (&(ObjectClass=FripostVirtualDomain)(fvd=%d)(fripostOptionalMaildrop=*)) +result_attribute = fripostOptionalMaildrop diff --git a/roles/mx/files/etc/postfix/virtual/alias_maps.cf b/roles/mx/files/etc/postfix/virtual/alias_maps.cf new file mode 100644 index 0000000..aa26e18 --- /dev/null +++ b/roles/mx/files/etc/postfix/virtual/alias_maps.cf @@ -0,0 +1,7 @@ +server_host = ldapi://%2Fprivate%2Fldapi/ +version = 3 +search_base = fvl=%u,fvd=%d,ou=virtual,o=mailHosting,dc=fripost,dc=org +bind = sasl +sasl_mechs = EXTERNAL +query_filter = (&(ObjectClass=FripostVirtualAlias)(fvl=%u)) +result_attribute = fripostMaildrop diff --git a/roles/mx/files/etc/postfix/virtual/lists_maps.cf b/roles/mx/files/etc/postfix/virtual/lists_maps.cf new file mode 100644 index 0000000..a4657ec --- /dev/null +++ b/roles/mx/files/etc/postfix/virtual/lists_maps.cf @@ -0,0 +1,8 @@ +server_host = ldapi://%2Fprivate%2Fldapi/ +version = 3 +search_base = fvl=%u,fvd=%d,ou=virtual,o=mailHosting,dc=fripost,dc=org +scope = base +bind = sasl +sasl_mechs = EXTERNAL +query_filter = (&(|(ObjectClass=FripostVirtualList)(ObjectClass=FripostVirtualListCommand))(fvl=%u)(fripostLocalAlias=%u#%d)) +result_attribute = fripostLocalAlias diff --git a/roles/mx/files/etc/postfix/virtual/mailbox_domains.cf b/roles/mx/files/etc/postfix/virtual/mailbox_domains.cf new file mode 100644 index 0000000..d580cb9 --- /dev/null +++ b/roles/mx/files/etc/postfix/virtual/mailbox_domains.cf @@ -0,0 +1,9 @@ +server_host = ldapi://%2Fprivate%2Fldapi/ +version = 3 +search_base = fvd=%s,ou=virtual,o=mailHosting,dc=fripost,dc=org +scope = base +bind = sasl +sasl_mechs = EXTERNAL +query_filter = (&(ObjectClass=FripostVirtualDomain)(fvd=%s)) +result_attribute = fvd +result_format = OK diff --git a/roles/mx/files/etc/postfix/virtual/mailbox_maps.cf b/roles/mx/files/etc/postfix/virtual/mailbox_maps.cf new file mode 100644 index 0000000..0f0e0e4 --- /dev/null +++ b/roles/mx/files/etc/postfix/virtual/mailbox_maps.cf @@ -0,0 +1,9 @@ +server_host = ldapi://%2Fprivate%2Fldapi/ +version = 3 +search_base = fvl=%u,fvd=%d,ou=virtual,o=mailHosting,dc=fripost,dc=org +scope = base +bind = sasl +sasl_mechs = EXTERNAL +query_filter = (&(ObjectClass=FripostVirtualUser)(fvl=%u)) +result_attribute = fvl +result_format = OK diff --git a/roles/mx/files/etc/postfix/virtual/reserved_maps.pcre b/roles/mx/files/etc/postfix/virtual/reserved_maps.pcre new file mode 100644 index 0000000..58572d1 --- /dev/null +++ b/roles/mx/files/etc/postfix/virtual/reserved_maps.pcre @@ -0,0 +1,5 @@ +# These reserved aliases will always be redirected to us and the domain +# owner. +# TODO: check 'postmaster+test@fripost.org' +/^(?:postmaster|abuse)(?:\+.*)?@fripost\.org$/ admin@fripost.org +/^((?:postmaster|abuse)(?:\+.*)?)@/ $1 diff --git a/roles/mx/files/etc/postfix/virtual/reserved_transport_maps b/roles/mx/files/etc/postfix/virtual/reserved_transport_maps new file mode 100644 index 0000000..dce8710 --- /dev/null +++ b/roles/mx/files/etc/postfix/virtual/reserved_transport_maps @@ -0,0 +1,2 @@ +abuse reserved-alias: +postmaster reserved-alias: diff --git a/roles/mx/files/etc/postfix/virtual/transport_lists_maps.cf b/roles/mx/files/etc/postfix/virtual/transport_lists_maps.cf new file mode 100644 index 0000000..3cca999 --- /dev/null +++ b/roles/mx/files/etc/postfix/virtual/transport_lists_maps.cf @@ -0,0 +1,12 @@ +# Despite the index on 'fripostLocalAlias' it's a bit more inefficient, +# but more precise, than the alternative of using regexes here, and a +# plain hash on the list managers' side. +server_host = ldapi://%2Fprivate%2Fldapi/ +version = 3 +search_base = ou=virtual,o=mailHosting,dc=fripost,dc=org +scope = sub +bind = sasl +sasl_mechs = EXTERNAL +query_filter = (&(|(ObjectClass=FripostVirtualList)(ObjectClass=FripostVirtualListCommand))(fripostLocalAlias=%s)) +result_attribute = fripostLocalAlias +result_format = smtp:[127.0.0.1]:2345 -- cgit v1.2.3