merge du main.cf des mx satellites avec le template des mx
En fait Bcfg2 veut que chaque entree est exactement un seul generateur. darcs-hash:20071203184714-af139-d7a6430ad19e21389f812683a9102c2d546d65e1.gz
This commit is contained in:
parent
67f08bacb6
commit
dff5b4dd5a
2 changed files with 46 additions and 38 deletions
|
@ -1,25 +0,0 @@
|
|||
# -*- coding: utf-8; mode: conf-unix -*-
|
||||
#
|
||||
# Fichier gere par BCfg2
|
||||
|
||||
# Les mails viennent de @crans.org
|
||||
myorigin = crans.org
|
||||
|
||||
# Alias
|
||||
alias_database = hash:/etc/postfix/aliases
|
||||
alias_maps = $alias_database
|
||||
|
||||
# Les mails sont envoyes a notre MX
|
||||
relayhost = smtp.adm.crans.org
|
||||
|
||||
# Utilisation locale uniquement
|
||||
mynetworks = 127.0.0.0/8
|
||||
inet_interfaces = loopback-only
|
||||
|
||||
# Reecriture des entetes: @host.crans.org -> @crans.org
|
||||
canonical_maps = regexp:/etc/postfix/canonical
|
||||
|
||||
# Autres
|
||||
recipient_delimiter =
|
||||
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
|
||||
biff = no
|
|
@ -18,6 +18,7 @@ directiveEndToken = %
|
|||
%# | Utils pour le template |
|
||||
%# +------------------------+
|
||||
|
||||
%set @mx = "mail-mx" in @metadata.groups
|
||||
%# Indique si c'est un MX principal ou secondaire.
|
||||
%set @main = "mail-mx-main" in @metadata.groups
|
||||
%set @secondary = "mail-mx-secondary" in @metadata.groups
|
||||
|
@ -56,42 +57,56 @@ mydomain = crans.org
|
|||
myorigin = crans.org
|
||||
|
||||
# Reseaux locaux
|
||||
mynetworks = 138.231.136.0/21, 138.231.144.0/21, 138.231.148.0/22, 127.0.0.1/8
|
||||
mynetworks = 127.0.0.1/8
|
||||
%if @mx
|
||||
138.231.136.0/21, 138.231.144.0/21, 138.231.148.0/22
|
||||
%end if
|
||||
|
||||
%if not @mx
|
||||
# Ecoute en local uniquement
|
||||
inet_interfaces = loopback-only
|
||||
%end if
|
||||
|
||||
%if @mx
|
||||
# Destinations acceptees
|
||||
mydestination = @shorthostname, $myhostname,
|
||||
localhost, localhost.$mydomain
|
||||
%if @main
|
||||
%if @main
|
||||
$mydomain, crans.ens-cachan.fr, clubs.ens-cachan.fr,
|
||||
install-party.ens-cachan.fr
|
||||
%end if
|
||||
%if @manage_ml
|
||||
%end if
|
||||
%if @manage_ml
|
||||
lists.$mydomain
|
||||
%end if
|
||||
%end if
|
||||
|
||||
%if @resuce
|
||||
# Origine des mails poste localement
|
||||
myorigin = $myhostname
|
||||
%end if
|
||||
|
||||
%if @mx
|
||||
# Domaine relaye par ce MX
|
||||
relay_domains = $mydestination,
|
||||
%if @secondary
|
||||
%if @secondary
|
||||
$mydomain, crans.ens-cachan.fr, clubs.ens-cachan.fr,
|
||||
install-party.ens-cachan.fr
|
||||
%end if
|
||||
%if @public and not @manage_ml
|
||||
%end if
|
||||
%if @public and not @manage_ml
|
||||
lists.$mydomain
|
||||
%end if
|
||||
%end if
|
||||
|
||||
%if not @mx
|
||||
# Les mails sont envoyes au MX principal
|
||||
relayhost = smtp.adm.crans.org
|
||||
%end if
|
||||
|
||||
# Etre notifie ou non de l'arrive de nouveaux mails
|
||||
biff = @yesno(@users)
|
||||
|
||||
%if @mx
|
||||
# Pour pouvoir tester sans tout casser, on active les soft bounces.
|
||||
# Ca permet aux mails de ne pas etre bounces en cas d'erreur, mais
|
||||
# a la place, de renvoyer une erreur non permanente. En production
|
||||
# il faut enlever ca.
|
||||
soft_bounce = no
|
||||
%end if
|
||||
|
||||
%if @users
|
||||
# On delivre dans des maildir
|
||||
|
@ -108,11 +123,18 @@ delay_warning_time = 24h
|
|||
# Esthetisme
|
||||
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
|
||||
|
||||
%if @mx
|
||||
# Reecriture des entetes
|
||||
canonical_maps = ldap:/etc/postfix/ldap-canonical.cf
|
||||
%else
|
||||
# Reecriture des entetes: @host.crans.org -> @crans.org
|
||||
canonical_maps = regexp:/etc/postfix/canonical
|
||||
%end if
|
||||
|
||||
%if @mx
|
||||
# Par ou passer (notement pour la distrtibution des adresse locales par bleu)
|
||||
transport_maps = hash:/etc/postfix/transport
|
||||
%end if
|
||||
|
||||
# Une infinite d'adresses mail par personne
|
||||
recipient_delimiter = +
|
||||
|
@ -127,15 +149,24 @@ alias_database = hash:/etc/postfix/aliases
|
|||
hash:/var/lib/mailman/data/aliases
|
||||
%end if
|
||||
|
||||
alias_maps = $alias_database
|
||||
%if @mx
|
||||
# Plus les alias dans la base de donnees
|
||||
alias_maps = $alias_database, ldap:/etc/postfix/ldap-aliases.cf
|
||||
ldap:/etc/postfix/ldap-aliases.cf
|
||||
%end if
|
||||
|
||||
%if @mx
|
||||
# On prend aussi en compte les utilisateurs de /etc/passwd
|
||||
local_recipient_maps = $alias_maps unix:passwd.byname
|
||||
%end if
|
||||
|
||||
%if @mx
|
||||
# Les anciennes ML @crans.org, @crans.ens-cachan.fr -> @lists.crans.org
|
||||
virtual_alias_maps = hash:/etc/postfix/virtual
|
||||
%end if
|
||||
|
||||
%# Pour les non-mx il n'y a plus rien d'interessant jusqu'a la fin
|
||||
%if @mx
|
||||
# +-------------+
|
||||
# | TLS et SASL |
|
||||
# +-------------+
|
||||
|
@ -230,3 +261,5 @@ mime_header_checks = regexp:/etc/postfix/mime_header_checks
|
|||
#relayhost = [ultra-adsl.crans.org]:25
|
||||
### END RESCUR MODE
|
||||
%endif
|
||||
|
||||
%end if
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue