diff --git a/seed/applicationservice/2022.03.08/dovecot/dictionaries/22_dovecot.xml b/seed/applicationservice/2022.03.08/dovecot/dictionaries/22_dovecot.xml
index e82fbaf..229fcd6 100644
--- a/seed/applicationservice/2022.03.08/dovecot/dictionaries/22_dovecot.xml
+++ b/seed/applicationservice/2022.03.08/dovecot/dictionaries/22_dovecot.xml
@@ -12,6 +12,9 @@
/etc/pki/ca-trust/source/anchors/ca_MailServer.crt
/etc/pki/tls/certs/postfix.crt
/etc/pki/tls/private/postfix.key
+ /etc/postfix/sni
+ postfix_pem_files
+ /etc/postfix/certs/postfix.pem
@@ -24,7 +27,7 @@
/etc/dovecot/conf.d/10-auth.conf
/etc/dovecot/conf.d/10-mail.conf
/etc/dovecot/conf.d/10-master.conf
- /etc/dovecot/conf.d/10-ssl.conf
+ /etc/dovecot/conf.d/10-ssl.conf
/etc/dovecot/conf.d/15-ldap.conf
/etc/dovecot/conf.d/30-service-stats.conf
@@ -41,9 +44,15 @@
/etc/pki/ca-trust/source/anchors/ca_IMAPServer.crt
/etc/pki/tls/certs/dovecot.crt
/etc/pki/tls/private/dovecot.key
+ external_imap_crt
+ external_imap_key
+
+ 587
+ 993
+
dovecot
@@ -52,12 +61,17 @@
postfix
-
-
-
+
+
+
+
+
+
+
-
+
+
@@ -68,16 +82,6 @@
-
- domain_name_eth0
- MailServer
- postfix_ca_chain
-
-
- domain_name_eth0
- IMAPServer
- dovecot_ca_chain
-
domain_name_eth0
@@ -89,13 +93,13 @@
smtp_relay_address
lmtp_server
domain_name_eth0
- postfix_my_domains
+ mail_domains
smtp_relay_address
lmtp_criteria
domain_name_eth0
- postfix_my_domains
+ mail_domains
tls_ca_directory
@@ -103,5 +107,29 @@
/
revprox_ca_file
+
+ /etc/pki/tls/certs/imap_
+ imap_domainname
+ .crt
+
+ True
+ external_imap_crt
+
+
+ /etc/pki/tls/private/imap_
+ imap_domainname
+ .key
+
+ True
+ external_imap_key
+
+
+ /etc/postfix/certs/
+ submission_domainname
+ .pem
+
+ True
+ postfix_pem_files
+
diff --git a/seed/applicationservice/2022.03.08/dovecot/templates/10-ssl.conf b/seed/applicationservice/2022.03.08/dovecot/templates/10-ssl.conf
index 2c9459b..6adcf9f 100644
--- a/seed/applicationservice/2022.03.08/dovecot/templates/10-ssl.conf
+++ b/seed/applicationservice/2022.03.08/dovecot/templates/10-ssl.conf
@@ -16,6 +16,16 @@ ssl = required
#>GNUNUX
ssl_cert = GNUNUX
+tls_server_sni_maps = hash:/etc/postfix/sni
+#
-
-
@@ -12,8 +10,7 @@
- authority_cn
- authority_name
+ domain_name_eth0
plugin_name
credential_filename
email
diff --git a/seed/applicationservice/2022.03.08/letsencrypt/funcs/letsencrypt.py b/seed/applicationservice/2022.03.08/letsencrypt/funcs/letsencrypt.py
index 2270e43..b5a3974 100644
--- a/seed/applicationservice/2022.03.08/letsencrypt/funcs/letsencrypt.py
+++ b/seed/applicationservice/2022.03.08/letsencrypt/funcs/letsencrypt.py
@@ -14,13 +14,13 @@ _X509_DIR = _join(_HERE, 'pki', 'x509')
def letsencrypt_certif(domain: str,
authority_cn: str,
- authority_name: str,
plugin_name: str,
credential_filename: str,
email: str,
) -> None:
- if None in (domain, authority_cn, authority_name, plugin_name, credential_filename, email):
+ if None in (domain, authority_cn, plugin_name, credential_filename, email):
return
+ authority_name = 'External'
date_file = _join(_LE_DIR, f'{domain}.date')
date = _datetime.now()
today = str(date.date())
diff --git a/seed/applicationservice/2022.03.08/mailman/DEBUG.md b/seed/applicationservice/2022.03.08/mailman/DEBUG.md
index 871c9ed..c9713d2 100644
--- a/seed/applicationservice/2022.03.08/mailman/DEBUG.md
+++ b/seed/applicationservice/2022.03.08/mailman/DEBUG.md
@@ -42,3 +42,4 @@ export MAILMAN_WEB_CONFIG=/usr/share/postorius/m_postorius/settings.py
echo "DEBUG=True" >> /etc/mailman3.d/postorius.py
systemctl restart postorius
+
diff --git a/seed/applicationservice/2022.03.08/nextcloud/dictionaries/31_nextcloud.xml b/seed/applicationservice/2022.03.08/nextcloud/dictionaries/31_nextcloud.xml
index 4bff537..6aa37d1 100644
--- a/seed/applicationservice/2022.03.08/nextcloud/dictionaries/31_nextcloud.xml
+++ b/seed/applicationservice/2022.03.08/nextcloud/dictionaries/31_nextcloud.xml
@@ -17,6 +17,8 @@
+
+
@@ -55,5 +57,39 @@
True
nextcloud_instance_id
+
+ revprox_clients
+ revprox_client_external_domainname
+ revprox_location
+ /.well-known/caldav
+ revprox_is_websocket
+ False
+ revprox_url
+ nexcloud_well_known_caldav
+ revprox_client_server_domainname
+
+
+ domain_name_eth0
+ revprox_client_port
+ /.well-known/caldav
+ nexcloud_well_known_caldav
+
+
+ revprox_clients
+ revprox_client_external_domainname
+ revprox_location
+ /.well-known/carddav
+ revprox_is_websocket
+ False
+ revprox_url
+ nexcloud_well_known_carddav
+ revprox_client_server_domainname
+
+
+ domain_name_eth0
+ revprox_client_port
+ /.well-known/carddav
+ nexcloud_well_known_carddav
+
diff --git a/seed/applicationservice/2022.03.08/nextcloud/templates/nextcloud.init b/seed/applicationservice/2022.03.08/nextcloud/templates/nextcloud.init
index db827d6..5d6e74f 100644
--- a/seed/applicationservice/2022.03.08/nextcloud/templates/nextcloud.init
+++ b/seed/applicationservice/2022.03.08/nextcloud/templates/nextcloud.init
@@ -14,6 +14,8 @@ else
sed -i "s/'installed' => false,/'installed' => true,/g" /etc/nextcloud/config.php
/usr/bin/php /usr/share/nextcloud/occ app:enable user_ldap -q
fi
+# Upgrade
+/usr/bin/php /usr/share/nextcloud/occ upgrade || true
# SSO
/usr/bin/php /usr/share/nextcloud/occ app:enable oidc_login
# Feature
@@ -49,7 +51,6 @@ fi
# Need network
/usr/bin/php /usr/share/nextcloud/occ app:disable weather_status
# Maintenance
-/usr/bin/php /usr/share/nextcloud/occ upgrade
/usr/bin/php /usr/share/nextcloud/occ files:scan --all -q
/usr/bin/php /usr/share/nextcloud/occ maintenance:repair -q
diff --git a/seed/applicationservice/2022.03.08/nginx-reverse-proxy-server/templates/certificate.crt b/seed/applicationservice/2022.03.08/nginx-reverse-proxy-server/templates/certificate.crt
index 9e4b28f..45a1426 100644
--- a/seed/applicationservice/2022.03.08/nginx-reverse-proxy-server/templates/certificate.crt
+++ b/seed/applicationservice/2022.03.08/nginx-reverse-proxy-server/templates/certificate.crt
@@ -1 +1 @@
-%%get_certificate(cn=%%rougail_variable, authority_cn=%%domain_name_eth0, authority_name='ReverseProxy')
+%%get_certificate(cn=%%rougail_variable, authority_cn=%%domain_name_eth0, authority_name='External')
diff --git a/seed/applicationservice/2022.03.08/nginx-reverse-proxy-server/templates/private.key b/seed/applicationservice/2022.03.08/nginx-reverse-proxy-server/templates/private.key
index 9e2828c..1662468 100644
--- a/seed/applicationservice/2022.03.08/nginx-reverse-proxy-server/templates/private.key
+++ b/seed/applicationservice/2022.03.08/nginx-reverse-proxy-server/templates/private.key
@@ -1 +1 @@
-%%get_private_key(cn=%%rougail_variable, authority_cn=%%domain_name_eth0, authority_name='ReverseProxy')
+%%get_private_key(cn=%%rougail_variable, authority_cn=%%domain_name_eth0, authority_name='External')
diff --git a/seed/applicationservice/2022.03.08/postfix-relay/DEBUG.md b/seed/applicationservice/2022.03.08/postfix-relay/DEBUG.md
index be1cb65..324683b 100644
--- a/seed/applicationservice/2022.03.08/postfix-relay/DEBUG.md
+++ b/seed/applicationservice/2022.03.08/postfix-relay/DEBUG.md
@@ -45,3 +45,7 @@ postconf maillog_file
postconf maillog_file=/dev/stdout
+# Test mail en ligne
+
+https://www.mail-tester.com/
+https://dkimvalidator.com/
diff --git a/seed/applicationservice/2022.03.08/postfix-relay/dictionaries/30_postfix.xml b/seed/applicationservice/2022.03.08/postfix-relay/dictionaries/30_postfix.xml
index 72c6201..7926827 100644
--- a/seed/applicationservice/2022.03.08/postfix-relay/dictionaries/30_postfix.xml
+++ b/seed/applicationservice/2022.03.08/postfix-relay/dictionaries/30_postfix.xml
@@ -37,14 +37,14 @@
-
+
-
+
diff --git a/seed/applicationservice/2022.03.08/postfix-relay/funcs/postfix.py b/seed/applicationservice/2022.03.08/postfix-relay/funcs/postfix.py
new file mode 100644
index 0000000..4c43fd1
--- /dev/null
+++ b/seed/applicationservice/2022.03.08/postfix-relay/funcs/postfix.py
@@ -0,0 +1,12 @@
+from risotto.utils import multi_function as _multi_function
+
+
+@_multi_function
+def calc_postfix_relay_domains(criteria):
+ relay = set()
+ for lsts in criteria:
+ for lst in lsts:
+ if '@' in lst:
+ lst = lst.split('@')[1]
+ relay.add(lst)
+ return list(relay)
diff --git a/seed/applicationservice/2022.03.08/reverse-proxy-client/funcs/revprox_client.py b/seed/applicationservice/2022.03.08/reverse-proxy-client/funcs/revprox_client.py
index 4813751..d781120 100644
--- a/seed/applicationservice/2022.03.08/reverse-proxy-client/funcs/revprox_client.py
+++ b/seed/applicationservice/2022.03.08/reverse-proxy-client/funcs/revprox_client.py
@@ -1,7 +1,9 @@
-def calc_web_address(domain_name:str, port:str, local_location:str):
+def calc_web_address(domain_name: str, port: str, local_location: str) -> str:
if not domain_name or not port:
return
- web_address = f'https://{domain_name}:{port}'
+ web_address = f'https://{domain_name}'
+ if port != '443':
+ web_address += f':{port}'
if local_location:
web_address += local_location
return web_address