[postfix] Canonical filtrant seulement le necessaire, corrections adm-only
Ignore-this: b5bef4b9217a758c7ca3654fe25fd582 Pour eviter que le canonical transforme lists.crans.org -> crans.org ... On corrige aussi le hostname donne a postfix pour les serveurs adm-only. darcs-hash:20121021231019-ddb99-69ee4298a18252363452db169c9a2f54c34a819e.gz
This commit is contained in:
parent
3dc790892f
commit
452b3c1742
3 changed files with 18 additions and 2 deletions
|
@ -1 +0,0 @@
|
||||||
/^(.*)@(.*)crans.org$/ ${1}@crans.org
|
|
11
Python/etc/postfix/canonical
Normal file
11
Python/etc/postfix/canonical
Normal file
|
@ -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
|
|
@ -25,6 +25,9 @@ tracker = has("tracker")
|
||||||
# Si vrai, on est sur le tracker debbugs
|
# Si vrai, on est sur le tracker debbugs
|
||||||
bugtracker = has("bug-tracker")
|
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)
|
# La base de donnee utilise (pour les mx)
|
||||||
if has("ldap"):
|
if has("ldap"):
|
||||||
db = "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)
|
@# Definition par securite (sinon il utilise gethostname)
|
||||||
myhostname = pubhostname
|
if admonly:
|
||||||
|
myhostname = admhostname
|
||||||
|
else:
|
||||||
|
myhostname = pubhostname
|
||||||
mydomain = "crans.org"
|
mydomain = "crans.org"
|
||||||
|
|
||||||
@# Origine des mails
|
@# Origine des mails
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue