some progress...

This commit is contained in:
Francois Lesueur 2022-12-23 13:50:27 +01:00
parent 5981655b54
commit 215e77c226
8 changed files with 55 additions and 17 deletions

View File

@ -186,6 +186,10 @@ EOF
#***********FIN CERTIF*******************
# clear apt cache
DEBIAN_FRONTEND=noninteractive apt-get autoremove -y
DEBIAN_FRONTEND=noninteractive apt-get clean
# SNSTER
cd
git clone https://framagit.org/flesueur/snster.git
@ -202,10 +206,16 @@ EOF
# Build SNSTER KAZ !
snster -c /root/snster-kaz -t /root/templates create
snster -c /root/snster-kaz -t /root/templates start
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x /mnt/snster/root/snster-kaz/kaz/prod/kaz.sh
# On crée quelques mails
SETUP_MAIL="docker exec -ti mailServ setup"
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x "${SETUP_MAIL} email add contact1@kaz.milxc toto"
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x "${SETUP_MAIL} email add contact2@kaz.milxc toto"
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x "${SETUP_MAIL} email add contact3@kaz.milxc toto"
snster -c /root/snster-kaz -t /root/templates attach kaz-prod -x "${SETUP_MAIL} email add contact4@kaz.milxc toto"
# clear apt cache
DEBIAN_FRONTEND=noninteractive apt-get autoremove -y
DEBIAN_FRONTEND=noninteractive apt-get clean
echo "########## ********** End Vagrant $(date +%D-%T)"
) > >(tee ${DebugLog}stdout.log) 2> >(tee ${DebugLog}stderr.log >&2)

View File

@ -9,8 +9,9 @@ cd `dirname $0`
name=$1
domainname=$2
password=$3
number=$4
login=$3
password=$4
number=$5
# cp -ar claws-mail ~/.claws-mail
@ -22,6 +23,7 @@ cat claws-mail/accountrc > /tmp/accountrc
sed -i -e "s/\$name/$name/" /tmp/accountrc
sed -i -e "s/\$domainname/$domainname/" /tmp/accountrc
sed -i -e "s/\$number/$number/" /tmp/accountrc
sed -i -e "s/\$login/$login/" /tmp/accountrc
cat /tmp/accountrc >> ~/.claws-mail/accountrc
if [ ! -f ~/.claws-mail/folderlist.xml ]; then
@ -32,6 +34,7 @@ cat claws-mail/folderlist.xml > /tmp/folderlist.xml
sed -i -e "s/\$name/$name/" /tmp/folderlist.xml
sed -i -e "s/\$domainname/$domainname/" /tmp/folderlist.xml
sed -i -e "s/\$number/$number/" /tmp/folderlist.xml
sed -i -e "s/\$login/$login/" /tmp/folderlist.xml
sed -i -e "s/<\/folderlist>//" ~/.claws-mail/folderlist.xml
cat /tmp/folderlist.xml >> ~/.claws-mail/folderlist.xml
echo "</folderlist>" >> ~/.claws-mail/folderlist.xml

View File

@ -15,7 +15,7 @@ use_mail_command=0
mail_command=/usr/sbin/sendmail -t -i
use_nntp_auth=0
use_nntp_auth_onconnect=0
user_id=$name@$domainname
user_id=$login
use_apop_auth=0
remove_mail=1
message_leave_time=7

View File

@ -13,10 +13,18 @@ chmod +x /clawsmail/genpasswd
#client pour tester la messagerie
DEBIAN_FRONTEND=noninteractive apt-get install -y claws-mail
# On configure les comptes mail
if [ -f /clawsmail/addclawsuser.sh ]; then
su debian /clawsmail/addclawsuser.sh contact1 kaz.milxc toto 1
su debian /clawsmail/addclawsuser.sh contact2 kaz.milxc toto 2
su debian /clawsmail/addclawsuser.sh contact3 kaz.milxc toto 3
su debian /clawsmail/addclawsuser.sh contact4 kaz.milxc toto 4
su debian /clawsmail/addclawsuser.sh email isp-a.milxc email 4
su debian /clawsmail/addclawsuser.sh contact1 kaz.milxc contact1@kaz.milxc toto 1
su debian /clawsmail/addclawsuser.sh contact2 kaz.milxc contact2@kaz.milxc toto 2
su debian /clawsmail/addclawsuser.sh contact3 kaz.milxc contact3@kaz.milxc toto 3
su debian /clawsmail/addclawsuser.sh contact4 kaz.milxc contact4@kaz.milxc toto 4
su debian /clawsmail/addclawsuser.sh email isp-a.milxc email email 5
fi
# On place les certifs
if [ -d letsencrypt ]; then
cp -ar letsencrypt /etc/
cp /etc/letsencrypt/local/rootCA.pem /usr/local/share/ca-certificates/rootCA.crt
/usr/sbin/update-ca-certificates --fresh
fi

View File

@ -9,12 +9,21 @@ $ORIGIN kaz.milxc.
)
IN NS ns.kaz.milxc.
IN MX 10 smtp.kaz.milxc.
IN A 100.80.0.2
ns IN A 100.80.0.2
dmz IN A 100.80.0.2
smtp IN CNAME dmz
imap IN CNAME dmz
www IN CNAME dmz
mail IN CNAME dmz
cloud IN CNAME dmz
tableur IN CNAME dmz
webmail IN CNAME dmz
garradin IN CNAME dmz
wiki IN CNAME dmz
git IN CNAME dmz
office IN CNAME dmz
depot IN CNAME dmz
listes IN MX 10 listes
listes IN A 100.80.1.2
firewall IN A 100.80.0.1

View File

@ -3,7 +3,7 @@ jirafeau
ethercalc
collabora
ethercalc
etherpad
#etherpad
ldap
quotas
web

View File

@ -4,7 +4,7 @@
#######################################
# prod / dev / local
mode=prod
mode=local
########################################
# choix du domaine

View File

@ -44,17 +44,25 @@ EOF
fi
# On met le KAZGUARD pour la mise au point
echo "export KAZGUARD='true'" >> /root/.bashrc
# On met le GUARD pour la mise au point
echo "export SNSTERGUARD='true'" >> /root/.bashrc
# On active fuse-overlayfs pour docker
cat >> /etc/docker/daemon.json <<EOF
{ "storage-driver": "fuse-overlayfs" }
EOF
service docker restart
mknod -m 666 /dev/fuse c 10 229 # + dans le rc.local ? + modprobe fuse sur l'ĥôte ?
echo -e '#!/bin/sh\nmknod -m 666 /dev/fuse c 10 229' >> /etc/rc.local
chmod +x /etc/rc.local
./kaz.sh
# On place les certifs
if [ -d letsencrypt ]; then
cp -ar letsencrypt /etc/
cp /etc/letsencrypt/local/rootCA.pem /usr/local/share/ca-certificates/rootCA.crt
/usr/sbin/update-ca-certificates --fresh
fi
# ./kaz.sh
# clear apt cache
DEBIAN_FRONTEND=noninteractive apt-get autoremove -y