From a84600e42a24d85ad3703fa35c0f4cb33e50035f Mon Sep 17 00:00:00 2001 From: Francois Lesueur Date: Thu, 22 Dec 2022 17:35:23 +0100 Subject: [PATCH] kaz et claws aux bons endroits --- files/kaz/config/container-mail.list | 3 - files/kaz/config/container-orga.list | 1 - files/kaz/config/container-proxy.list | 1 - files/kaz/config/container-withMail.list | 9 -- files/kaz/config/container-withoutMail.list | 10 -- files/kaz/config/dockers.env | 120 ------------------ .../isp-a/home}/clawsmail/addclawsuser.sh | 0 .../home}/clawsmail/claws-mail/accountrc | 0 .../home}/clawsmail/claws-mail/accountrc.tmpl | 0 .../isp-a/home}/clawsmail/claws-mail/clawsrc | 0 .../home}/clawsmail/claws-mail/folderlist.xml | 0 .../clawsmail/claws-mail/folderlist_skel.xml | 0 .../clawsmail/claws-mail/passwordstorerc | 0 .../isp-a/home}/clawsmail/genpasswd | Bin .../isp-a/home}/clawsmail/genpasswd.c | 0 files/snster-kaz/isp-a/home/provision.sh | 22 ++++ files/snster-kaz/isp-a/infra/dns.conf | 4 +- files/snster-kaz/kaz/prod/dns.conf | 1 + 18 files changed, 25 insertions(+), 146 deletions(-) delete mode 100644 files/kaz/config/container-mail.list delete mode 100644 files/kaz/config/container-orga.list delete mode 100644 files/kaz/config/container-proxy.list delete mode 100644 files/kaz/config/container-withMail.list delete mode 100644 files/kaz/config/container-withoutMail.list delete mode 100644 files/kaz/config/dockers.env rename files/{ => snster-kaz/isp-a/home}/clawsmail/addclawsuser.sh (100%) mode change 100755 => 100644 rename files/{ => snster-kaz/isp-a/home}/clawsmail/claws-mail/accountrc (100%) rename files/{ => snster-kaz/isp-a/home}/clawsmail/claws-mail/accountrc.tmpl (100%) rename files/{ => snster-kaz/isp-a/home}/clawsmail/claws-mail/clawsrc (100%) rename files/{ => snster-kaz/isp-a/home}/clawsmail/claws-mail/folderlist.xml (100%) rename files/{ => snster-kaz/isp-a/home}/clawsmail/claws-mail/folderlist_skel.xml (100%) rename files/{ => snster-kaz/isp-a/home}/clawsmail/claws-mail/passwordstorerc (100%) rename files/{ => snster-kaz/isp-a/home}/clawsmail/genpasswd (100%) mode change 100755 => 100644 rename files/{ => snster-kaz/isp-a/home}/clawsmail/genpasswd.c (100%) create mode 100644 files/snster-kaz/isp-a/home/provision.sh diff --git a/files/kaz/config/container-mail.list b/files/kaz/config/container-mail.list deleted file mode 100644 index 921c9f5..0000000 --- a/files/kaz/config/container-mail.list +++ /dev/null @@ -1,3 +0,0 @@ -# e-mail server composer -postfix -sympa diff --git a/files/kaz/config/container-orga.list b/files/kaz/config/container-orga.list deleted file mode 100644 index 799bea5..0000000 --- a/files/kaz/config/container-orga.list +++ /dev/null @@ -1 +0,0 @@ -# orga composer diff --git a/files/kaz/config/container-proxy.list b/files/kaz/config/container-proxy.list deleted file mode 100644 index 125f526..0000000 --- a/files/kaz/config/container-proxy.list +++ /dev/null @@ -1 +0,0 @@ -proxy diff --git a/files/kaz/config/container-withMail.list b/files/kaz/config/container-withMail.list deleted file mode 100644 index 79a3639..0000000 --- a/files/kaz/config/container-withMail.list +++ /dev/null @@ -1,9 +0,0 @@ -cloud -dokuwiki -#framadate -garradin -gitea -jirafeau -#mattermost -roundcube -#keycloak diff --git a/files/kaz/config/container-withoutMail.list b/files/kaz/config/container-withoutMail.list deleted file mode 100644 index 7d87ccc..0000000 --- a/files/kaz/config/container-withoutMail.list +++ /dev/null @@ -1,10 +0,0 @@ -cachet -jirafeau -ethercalc -collabora -ethercalc -etherpad -ldap -quotas -web -#vigilo diff --git a/files/kaz/config/dockers.env b/files/kaz/config/dockers.env deleted file mode 100644 index 7557688..0000000 --- a/files/kaz/config/dockers.env +++ /dev/null @@ -1,120 +0,0 @@ -# Les variables d'environnements utilisées -# par les dockers via le lien : -# .env -> ../../config/dockers.env - -####################################### -# prod / dev / local -mode=local - -######################################## -# choix du domaine -# prod=kaz.bzh / dev=dev.kaz.bzh / local=kaz.local -domain=kaz.local - -######################################## -# choix du domaine des mails sympa -# prod=kaz.bzh / dev=kaz2.ovh / local=kaz.local -domain_sympa=kaz.local - -######################################## -# choix d'un serveur partiel -# site=site-2 -site= - -######################################## -# Pour garradin qui met en "dure" dans -# sa config l'URL pour l'atteindre - -# prod=https (gandi) / dev=https (letsencrypt) / local=http -httpProto=https - -# prod=89.234.186.111 / dev=192.168.57.1 / local=127.0.0.1 -MAIN_IP=127.0.0.1 - -# prod=89.234.186.151 / dev=192.168.57.2 / local=127.0.0.2 -SYMPA_IP=127.0.0.2 - -######################################## -# noms des services - -# ou www (mais bof) -webHost= - -cachetHost=cachet -calcHost=tableur -cloudHost=cloud -dateHost=sondage -dokuwikiHost=wiki -fileHost=depot -garHost=garradin -gitHost=git -gravHost=grav -ldapHost=ldap -matterHost=agora -officeHost=office -padHost=pad -quotasHost=quotas -smtpHost=smtp -sympaHost=listes -vigiloHost=vigilo -webmailHost=webmail -wordpressHost=wp - -######################################## -# noms des containers - -cachetServName=cachetServ -dokuwikiServName=dokuwikiServ -ethercalcServName=ethercalcServ -etherpadServName=etherpadServ -framadateServName=framadateServ -garradinServName=garradinServ -gitServName=gitServ -gravServName=gravServ -jirafeauServName=jirafeauServ -ldapServName=ldapServ -mattermostServName=mattermostServ -nextcloudServName=nextcloudServ -officeServName=officeServ -proxyServName=proxyServ -quotasServName=quotasServ -roundcubeServName=roundcubeServ -smtpServName=mailServ -sympaServName=sympaServ -vigiloServName=vigiloServ -webServName=webServ -wordpressServName=wpServ - -cachetDBName=cachetDB -ethercalcDBName=ethercalcDB -etherpadDBName=etherpadDB -framadateDBName=framadateDB -gitDBName=gitDB -mattermostDBName=mattermostDB -nextcloudDBName=nextcloudDB -quotasDBName=quotasDB -roundcubeDBName=roundcubeDB -sympaDBName=sympaDB -vigiloDBName=vigiloDB -wordpressDBName=wpDB - -ldapIUName=ldapIU - -######################################## -# politique de redémarrage -# prod=always / test=unless-stopped / local=no -restartPolicy=no - -######################################## -# devrait être dans env-jirafeauServ -# mais seuls les variables de ".env" sont -# utilisables pour le montage des volumes - -jirafeauDir=/var/jirafeauData/lkuDM16R5Sp4QHr/ - -ldapRoot=dc=kaz,dc=local - -######################################## -# services activés par container.sh -# variables d'environneements utilisées -# pour le tmpl du mandataire (proxy) diff --git a/files/clawsmail/addclawsuser.sh b/files/snster-kaz/isp-a/home/clawsmail/addclawsuser.sh old mode 100755 new mode 100644 similarity index 100% rename from files/clawsmail/addclawsuser.sh rename to files/snster-kaz/isp-a/home/clawsmail/addclawsuser.sh diff --git a/files/clawsmail/claws-mail/accountrc b/files/snster-kaz/isp-a/home/clawsmail/claws-mail/accountrc similarity index 100% rename from files/clawsmail/claws-mail/accountrc rename to files/snster-kaz/isp-a/home/clawsmail/claws-mail/accountrc diff --git a/files/clawsmail/claws-mail/accountrc.tmpl b/files/snster-kaz/isp-a/home/clawsmail/claws-mail/accountrc.tmpl similarity index 100% rename from files/clawsmail/claws-mail/accountrc.tmpl rename to files/snster-kaz/isp-a/home/clawsmail/claws-mail/accountrc.tmpl diff --git a/files/clawsmail/claws-mail/clawsrc b/files/snster-kaz/isp-a/home/clawsmail/claws-mail/clawsrc similarity index 100% rename from files/clawsmail/claws-mail/clawsrc rename to files/snster-kaz/isp-a/home/clawsmail/claws-mail/clawsrc diff --git a/files/clawsmail/claws-mail/folderlist.xml b/files/snster-kaz/isp-a/home/clawsmail/claws-mail/folderlist.xml similarity index 100% rename from files/clawsmail/claws-mail/folderlist.xml rename to files/snster-kaz/isp-a/home/clawsmail/claws-mail/folderlist.xml diff --git a/files/clawsmail/claws-mail/folderlist_skel.xml b/files/snster-kaz/isp-a/home/clawsmail/claws-mail/folderlist_skel.xml similarity index 100% rename from files/clawsmail/claws-mail/folderlist_skel.xml rename to files/snster-kaz/isp-a/home/clawsmail/claws-mail/folderlist_skel.xml diff --git a/files/clawsmail/claws-mail/passwordstorerc b/files/snster-kaz/isp-a/home/clawsmail/claws-mail/passwordstorerc similarity index 100% rename from files/clawsmail/claws-mail/passwordstorerc rename to files/snster-kaz/isp-a/home/clawsmail/claws-mail/passwordstorerc diff --git a/files/clawsmail/genpasswd b/files/snster-kaz/isp-a/home/clawsmail/genpasswd old mode 100755 new mode 100644 similarity index 100% rename from files/clawsmail/genpasswd rename to files/snster-kaz/isp-a/home/clawsmail/genpasswd diff --git a/files/clawsmail/genpasswd.c b/files/snster-kaz/isp-a/home/clawsmail/genpasswd.c similarity index 100% rename from files/clawsmail/genpasswd.c rename to files/snster-kaz/isp-a/home/clawsmail/genpasswd.c diff --git a/files/snster-kaz/isp-a/home/provision.sh b/files/snster-kaz/isp-a/home/provision.sh new file mode 100644 index 0000000..685399b --- /dev/null +++ b/files/snster-kaz/isp-a/home/provision.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# ISP-A infra +set -e +if [ -z $MILXCGUARD ] ; then exit 1; fi +DIR=`dirname $0` +cd `dirname $0` + +# les scripts de créations de BAL pour clawsmail +cp -ar "clawsmail" / +chmod +x /clawsmail/addclawsuser.sh +chmod +x /clawsmail/genpasswd + +#client pour tester la messagerie +DEBIAN_FRONTEND=noninteractive apt-get install -y claws-mail + +if [ -f /clawsmail/addclawsuser.sh ]; then + /clawsmail/addclawsuser.sh contact1 kaz.milxc toto 1 + /clawsmail/addclawsuser.sh contact2 kaz.milxc toto 2 + /clawsmail/addclawsuser.sh contact3 kaz.milxc toto 3 + /clawsmail/addclawsuser.sh contact4 kaz.milxc toto 4 + /clawsmail/addclawsuser.sh email isp-a.milxc email 4 +fi diff --git a/files/snster-kaz/isp-a/infra/dns.conf b/files/snster-kaz/isp-a/infra/dns.conf index 4e4ef45..c077a6f 100644 --- a/files/snster-kaz/isp-a/infra/dns.conf +++ b/files/snster-kaz/isp-a/infra/dns.conf @@ -1,9 +1,9 @@ server: interface: 0.0.0.0 access-control: 100.64.0.0/10 allow - + local-zone: "isp-a.milxc." static local-data: "smtp.isp-a.milxc. IN A 100.120.1.2" - local-data: "imap.isp-a.milxc. IN A 100.120.1.2" + local-data: "mail.isp-a.milxc. IN A 100.120.1.2" local-data: "ns.isp-a.milxc. IN A 100.120.1.2" local-data: "isp-a.milxc. IN MX 10 smtp.isp-a.milxc." diff --git a/files/snster-kaz/kaz/prod/dns.conf b/files/snster-kaz/kaz/prod/dns.conf index 1bc1c41..783d8c4 100644 --- a/files/snster-kaz/kaz/prod/dns.conf +++ b/files/snster-kaz/kaz/prod/dns.conf @@ -14,6 +14,7 @@ dmz IN A 100.80.0.2 smtp IN CNAME dmz imap IN CNAME dmz www IN CNAME dmz +mail IN CNAME dmz listes IN MX listes listes IN A 100.80.1.2 firewall IN A 100.80.0.1