main #5

Merged
gnunux merged 2 commits from gnunux/dataset:main into main 2022-03-20 21:16:53 +01:00
8 changed files with 20 additions and 17 deletions
Showing only changes of commit 7751bdf2d1 - Show all commits

View file

@ -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

View file

@ -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:

View file

@ -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

View file

@ -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'

View file

@ -40,6 +40,7 @@ SOCIALACCOUNT_PROVIDERS = {
'ACCOUNT_USERNAME_REQUIRED': False,
'ACCOUNT_AUTHENTICATION_METHOD': 'email',
'SOCIALACCOUNT_AUTO_SIGNUP': True,
'VERIFIED_EMAIL': True,
},
}
#FIXME

View file

@ -6,4 +6,10 @@
<variable name="criteria_" description="transport criteria" type="string" multi="True" mandatory="True" hidden="True" provider="lmtp_criteria"/>
</family>
</variables>
<constraints>
<fill name="calc_postfix_relay_domains">
<param type="variable">lmtp.lmtp_.criteria_</param>
<target>postfix_relay_domains</target>
</fill>
</constraints>
</rougail>

View file

@ -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

View file

@ -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
#<GNUNUX