diff --git a/Cfg/etc/postfix/canonical/canonical b/Cfg/etc/postfix/canonical/canonical deleted file mode 100644 index 3f4fd41..0000000 --- a/Cfg/etc/postfix/canonical/canonical +++ /dev/null @@ -1 +0,0 @@ -/^(.*)@(.*)crans.org$/ ${1}@crans.org diff --git a/Python/etc/postfix/canonical b/Python/etc/postfix/canonical new file mode 100644 index 0000000..47d08ac --- /dev/null +++ b/Python/etc/postfix/canonical @@ -0,0 +1,11 @@ +# -*- mode: python; coding: utf-8 -*- + +include("ip") + +if has("bug-tracker"): + # On ne sait jamais + @/^(.*)@bugs.crans.org$/ ${1}@bugs.crans.org + +print "/^(.*)@%s$/ ${1}@crans.org" % admhostname +if not has("adm-only"): + print "/^(.*)@%s$/ ${1}@crans.org" % pubhostname diff --git a/Python/etc/postfix/main.cf b/Python/etc/postfix/main.cf index 7e80993..26c2cc2 100644 --- a/Python/etc/postfix/main.cf +++ b/Python/etc/postfix/main.cf @@ -25,6 +25,9 @@ tracker = has("tracker") # Si vrai, on est sur le tracker debbugs bugtracker = has("bug-tracker") +# Si vrai, on est sur un serveur adm-only +admonly = has("adm-only") + # La base de donnee utilise (pour les mx) if has("ldap"): db = "ldap" @@ -54,7 +57,10 @@ client_networks = ["138.231.136.0/21", "138.231.144.0/21", "138.231.148.0/22"] @# +------------------+ @# Definition par securite (sinon il utilise gethostname) -myhostname = pubhostname +if admonly: + myhostname = admhostname +else: + myhostname = pubhostname mydomain = "crans.org" @# Origine des mails