On stabilise le plugin Python en virant toute occurrence de print.

* Désolé. \o/
This commit is contained in:
Pierre-Elliott Bécue 2015-05-14 07:19:56 +02:00
parent 2c27a030ee
commit 4b36a51d99
102 changed files with 513 additions and 703 deletions

View file

@ -22,7 +22,7 @@ for dest in ["abuse", "amavis", "backup", "bind", "bin", "clamav", "daemon",
"irc", "list", "logcheck", "lp", "mail", "majordom", "man", "msql",
"munin", "nagios", "news", "operator", "postgres", "proxy", "sync",
"sys", "usenet", "uucp", "webmaster", "www-clubs", "www-data", "www-perso"]:
print "%s: root" % dest
out("%s: root" % (dest,))
if not has("users") and not has('mail-mx'):
@root: root@crans.org

View file

@ -2,13 +2,13 @@
include("ip")
print "# Fichier Gere par Bcfg2, tout changement local sera ecrase !"
header("Fichier fournissant des méthodes pour traduire certaines adresses")
if has("bug-tracker"):
# On ne sait jamais
@/^(.*)@bugs.crans.org$/ ${1}@bugs.crans.org
print "/^(.*)@localhost(\.crans\.org)?$/ ${1}@crans.org"
print "/^(.*)@%s$/ ${1}@crans.org" % admhostname
out("/^(.*)@localhost(\.crans\.org)?$/ ${1}@crans.org")
out("/^(.*)@%s$/ ${1}@crans.org" % (admhostname,))
if not has("non-vlan-adherent"):
print "/^(.*)@%s$/ ${1}@crans.org" % pubhostname
out("/^(.*)@%s$/ ${1}@crans.org" % (pubhostname,))

View file

@ -65,11 +65,11 @@ else:
@# Reseaux locaux
%mynetworks local_networks
if mx and not users:
out(" " + tostring(client_networks + adm_networks) + "\n")
out(" " + tostring(client_networks + adm_networks))
elif users:
out(" " + tostring(adm_networks) + "\n")
out(" " + tostring(adm_networks))
elif tracker:
out(" " + tostring(adm_networks) + "\n")
out(" " + tostring(adm_networks))
if not mx:
if tracker or corbeau:
@ -83,16 +83,16 @@ if mx:
@# Destinations acceptees
%mydestination [hostname, "$myhostname", "localhost", "localhost.$mydomain"]
if main or users:
out(" " + tostring(["$mydomain", "crans.ens-cachan.fr", "clubs.ens-cachan.fr", "install-party.ens-cachan.fr"]) + "\n")
out(" " + tostring(["$mydomain", "crans.ens-cachan.fr", "clubs.ens-cachan.fr", "install-party.ens-cachan.fr"]))
if manage_ml:
out(" " + tostring(["lists.$mydomain"]) + "\n")
out(" " + tostring(["lists.$mydomain"]))
@# Domaine relaye par ce MX
@relay_domains = $mydestination
if secondary:
out(" " + tostring(["$mydomain", "crans.ens-cachan.fr", "clubs.ens-cachan.fr", "install-party.ens-cachan.fr"]) + "\n")
out(" " + tostring(["$mydomain", "crans.ens-cachan.fr", "clubs.ens-cachan.fr", "install-party.ens-cachan.fr"]))
if public and not manage_ml:
out(" " + tostring(["lists.$mydomain"]) + "\n")
out(" " + tostring(["lists.$mydomain"]))
if not mx:
if tracker:
@ -154,7 +154,7 @@ if manage_ml:
# Pour les non-mx il n'y a plus rien d'interessant
if mx:
@# Plus les alias dans la base de donnees
out(" " + tostring(db_file("search")) + "\n")
out(" " + tostring(db_file("search")))
@# On prend aussi en compte les utilisateurs de /etc/passwd
@local_recipient_maps = $alias_maps unix:passwd.byname
@# Les anciennes ML @crans.org, @crans.ens-cachan.fr -> @lists.crans.org
@ -213,7 +213,7 @@ if mx:
@# On n'ignore que les messages venant d'adresses "protégées"
@smtpd_client_event_limit_exceptions = local_networks
if mx:
out(" " + tostring(adm_networks) + "\n")
out(" " + tostring(adm_networks))
@
@# On limite à 10 messages par minute
@smtpd_client_message_rate_limit = 10
@ -241,7 +241,7 @@ if mx:
if public:
@# accepte si le champ contourneGreylist de la base est a OK
@ permit_sasl_authenticated
out(" check_recipient_access " + tostring(db_file("sqlgrey")) + "\n")
out(" check_recipient_access " + tostring(db_file("sqlgrey")))
@# accepte si la greylist est d'accord
@ check_policy_service inet:127.0.0.1:2501
@# jette le reste
@ -273,7 +273,7 @@ if mx:
@# +----------------------+
@#POUR SECOURS
if not has("rescue-mode"):
out("#")
_out("#")
@relayhost = [ovh.adm.crans.org]:25
if has("titanic"):

View file

@ -115,7 +115,7 @@ if main:
@ -o smtpd_sasl_auth_enable=yes
@ -o smtpd_client_restrictions=permit_sasl_authenticated,reject
if not public:
print " -o content_filter=lmtp:[amavis.adm.crans.org]:10024"
@ -o content_filter=lmtp:[amavis.adm.crans.org]:10024
@#628 inet n - - - - qmqpd
@pickup fifo n - - 60 1 pickup
@cleanup unix n - - - 0 cleanup