diff --git a/seed/applicationservice/2022.03.08/base/manual/install/install_host b/seed/applicationservice/2022.03.08/base/manual/install/install_host
index 99bf6034..f63b5cd6 100755
--- a/seed/applicationservice/2022.03.08/base/manual/install/install_host
+++ b/seed/applicationservice/2022.03.08/base/manual/install/install_host
@@ -5,7 +5,7 @@ if [ -z "$HOST_NAME" ]; then
echo "usage: $0 host name"
exit 1
fi
-apt install --yes systemd-container dnf jq debootstrap htop
+apt install --yes systemd-container dnf jq debootstrap htop gettext
systemd-tmpfiles --create --clean --remove $PWD/host/configurations/$HOST_NAME/tmpfiles.d/0asystemd-nspawn.conf
systemd-tmpfiles --create --clean --remove $PWD/host/configurations/$HOST_NAME/tmpfiles.d/0rougail.conf
systemctl daemon-reload
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 e82fbafc..229fcd63 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 2c9459b2..6adcf9f7 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 2270e43a..b5a39745 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 871c9ed0..c9713d23 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/mailman/funcs/mailman.py b/seed/applicationservice/2022.03.08/mailman/funcs/mailman.py
index 8e72ae1a..07372bc5 100644
--- a/seed/applicationservice/2022.03.08/mailman/funcs/mailman.py
+++ b/seed/applicationservice/2022.03.08/mailman/funcs/mailman.py
@@ -1,12 +1,11 @@
from risotto.utils import multi_function as _multi_function
from itertools import chain
-
@_multi_function
def mailman_emails(lists, domain):
ret = []
for lst in lists:
- for suffix in [None, 'bounces', 'confirm', 'join', 'leave', 'owner', 'request', 'subscribe', 'unsubscribe']:
+ for suffix in [None, 'bounces(\+.*)?', 'confirm(\+.*)?', 'join', 'leave', 'owner', 'request', 'subscribe', 'unsubscribe']:
if suffix:
lst_name = lst + '-' + suffix
else:
diff --git a/seed/applicationservice/2022.03.08/mailman/manual/image/postinstall/postorius.sh b/seed/applicationservice/2022.03.08/mailman/manual/image/postinstall/postorius.sh
index 483a88b4..41d27a0a 100644
--- a/seed/applicationservice/2022.03.08/mailman/manual/image/postinstall/postorius.sh
+++ b/seed/applicationservice/2022.03.08/mailman/manual/image/postinstall/postorius.sh
@@ -6,3 +6,7 @@ chmod +x "$IMAGE_NAME_RISOTTO_IMAGE_DIR/usr/share/postorius/manage.py"
ln -s /etc/mailman3.d/postorius.py "$IMAGE_NAME_RISOTTO_IMAGE_DIR/usr/share/postorius/m_postorius/settings_local.py"
ln -s ../../django_mailman3/static/django-mailman3 "$IMAGE_NAME_RISOTTO_IMAGE_DIR/$PYTHON/postorius/static/"
ln -s ../../django/contrib/admin/static/admin "$IMAGE_NAME_RISOTTO_IMAGE_DIR/$PYTHON/postorius/static/"
+#translation
+msgfmt $IMAGE_NAME_RISOTTO_IMAGE_DIR/$PYTHON/postorius/locale/fr/LC_MESSAGES/django.po -o $IMAGE_NAME_RISOTTO_IMAGE_DIR/$PYTHON/postorius/locale/fr/LC_MESSAGES/django.mo
+sed -i 's/$event.mlist.fqdn_listname\./$event.mlist.fqdn_listname/g' $IMAGE_NAME_RISOTTO_IMAGE_DIR/$PYTHON/mailman/messages/fr/LC_MESSAGES/mailman.po
+msgfmt $IMAGE_NAME_RISOTTO_IMAGE_DIR/$PYTHON/mailman/messages/fr/LC_MESSAGES/mailman.po -o $IMAGE_NAME_RISOTTO_IMAGE_DIR/$PYTHON/mailman/messages/fr/LC_MESSAGES/mailman.mo
diff --git a/seed/applicationservice/2022.03.08/mailman/manual/image/postinstall/postorius/m_postorius/settings.py b/seed/applicationservice/2022.03.08/mailman/manual/image/postinstall/postorius/m_postorius/settings.py
index 64dce24e..ed10c031 100644
--- a/seed/applicationservice/2022.03.08/mailman/manual/image/postinstall/postorius/m_postorius/settings.py
+++ b/seed/applicationservice/2022.03.08/mailman/manual/image/postinstall/postorius/m_postorius/settings.py
@@ -172,7 +172,7 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# https://docs.djangoproject.com/en/1.9/topics/i18n/
-LANGUAGE_CODE = 'en-us'
+LANGUAGE_CODE = 'fr'
TIME_ZONE = 'UTC'
diff --git a/seed/applicationservice/2022.03.08/mailman/templates/postorius-settings.py b/seed/applicationservice/2022.03.08/mailman/templates/postorius-settings.py
index 0a66a483..7cfe027a 100644
--- a/seed/applicationservice/2022.03.08/mailman/templates/postorius-settings.py
+++ b/seed/applicationservice/2022.03.08/mailman/templates/postorius-settings.py
@@ -40,6 +40,7 @@ SOCIALACCOUNT_PROVIDERS = {
'ACCOUNT_USERNAME_REQUIRED': False,
'ACCOUNT_AUTHENTICATION_METHOD': 'email',
'SOCIALACCOUNT_AUTO_SIGNUP': True,
+ 'VERIFIED_EMAIL': True,
},
}
#FIXME
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 4bff5373..6aa37d18 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 db827d6d..5d6e74f5 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 9e4b28f5..45a1426c 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 9e2828c8..1662468a 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 be1cb65d..324683b4 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 72c6201e..7926827a 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/extras/lmtp/00-lmtp.xml b/seed/applicationservice/2022.03.08/postfix-relay/extras/lmtp/00-lmtp.xml
index 9a22c223..93479ab2 100644
--- a/seed/applicationservice/2022.03.08/postfix-relay/extras/lmtp/00-lmtp.xml
+++ b/seed/applicationservice/2022.03.08/postfix-relay/extras/lmtp/00-lmtp.xml
@@ -6,4 +6,10 @@
+
+
+ lmtp.lmtp_.criteria_
+ postfix_relay_domains
+
+
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 00000000..4c43fd16
--- /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/postfix-relay/templates/lmtp b/seed/applicationservice/2022.03.08/postfix-relay/templates/lmtp
index f0657b21..a7dea3cf 100644
--- a/seed/applicationservice/2022.03.08/postfix-relay/templates/lmtp
+++ b/seed/applicationservice/2022.03.08/postfix-relay/templates/lmtp
@@ -1,6 +1,9 @@
%for %%domain in %%lmtp.server_lmtp
%set %%name=%%normalize_family(%%domain)
%for %%lst in %%lmtp['lmtp_' + name]['criteria_' + %%name]
-%%lst lmtp:[%%domain]:8024
+%if '@' not in %%lst
+%set %%lst = '.*@' + %%lst
+%end if
+/^%%lst$/ lmtp:[%%domain]:8024
%end for
%end for
diff --git a/seed/applicationservice/2022.03.08/postfix-relay/templates/main.cf b/seed/applicationservice/2022.03.08/postfix-relay/templates/main.cf
index 070470c1..b7ec3e8a 100644
--- a/seed/applicationservice/2022.03.08/postfix-relay/templates/main.cf
+++ b/seed/applicationservice/2022.03.08/postfix-relay/templates/main.cf
@@ -350,19 +350,9 @@ mynetworks = 172.0.0.0/8
#
#relay_domains = $mydestination
#>GNUNUX
-%set %%relay = %%set()
-%for %%domain in %%lmtp.server_lmtp
- %set %%name=%%normalize_family(%%domain)
- %for %%lst in %%lmtp['lmtp_' + name]['criteria_' + %%name]
- %if '@' in %%lst
- %set %%lst = %%lst.split('@')[1]
- %end if
-%%relay.add(%%lst)%slurp
- %end for
-%end for
-relay_domains = %echo ', '.join(%%relay)
+relay_domains = %echo ', '.join(%%postfix_relay_domains)
%if %%lmtp.server_lmtp
-transport_maps = hash:/etc/postfix/lmtp
+transport_maps = regexp:/etc/postfix/lmtp
%end if
# 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