From 7d23fd3ef1fdc7514ed01c4d1b24f56c223758a9 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 5 Jun 2022 14:15:56 +0000 Subject: [PATCH 1/3] Auto-update README --- README.md | 21 +++++++++++---------- README_fr.md | 27 ++++++++++++++++----------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 4598e6a..3dcf1f0 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Mailman3 for YunoHost -[![Integration level](https://dash.yunohost.org/integration/mailman3.svg)](https://dash.yunohost.org/appci/app/mailman3) ![](https://ci-apps.yunohost.org/ci/badges/mailman3.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mailman3.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/mailman3.svg)](https://dash.yunohost.org/appci/app/mailman3) ![Working status](https://ci-apps.yunohost.org/ci/badges/mailman3.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/mailman3.maintain.svg) [![Install Mailman3 with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mailman3) *[Lire ce readme en français.](./README_fr.md)* @@ -23,7 +23,7 @@ Electronic mailing lists manager ## Screenshots -![](./doc/screenshots/screenshot1.webp) +![Screenshot of Mailman3](./doc/screenshots/screenshot1.webp) ## Disclaimers / important information @@ -121,22 +121,23 @@ Finally, you also configure things through the Django web admin available at `/a ## Documentation and resources -* Official app website: http://www.list.org/ -* Official user documentation: http://docs.mailman3.org/en/latest/userguide.html -* Official admin documentation: https://docs.mailman3.org/en/latest/ -* Upstream app code repository: https://gitlab.com/mailman/mailman-suite -* YunoHost documentation for this app: https://yunohost.org/app_mailman3 -* Report a bug: https://github.com/YunoHost-Apps/mailman3_ynh/issues +* Official app website: +* Official user documentation: +* Official admin documentation: +* Upstream app code repository: +* YunoHost documentation for this app: +* Report a bug: ## Developer info Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/mailman3_ynh/tree/testing). To try the testing branch, please proceed like that. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/mailman3_ynh/tree/testing --debug or sudo yunohost app upgrade mailman3 -u https://github.com/YunoHost-Apps/mailman3_ynh/tree/testing --debug ``` -**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file +**More info regarding app packaging:** diff --git a/README_fr.md b/README_fr.md index 74b2709..4949044 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,10 +1,14 @@ + + # Mailman3 pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/mailman3.svg)](https://dash.yunohost.org/appci/app/mailman3) ![](https://ci-apps.yunohost.org/ci/badges/mailman3.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mailman3.maintain.svg) +[![Niveau d'intégration](https://dash.yunohost.org/integration/mailman3.svg)](https://dash.yunohost.org/appci/app/mailman3) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/mailman3.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/mailman3.maintain.svg) [![Installer Mailman3 avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mailman3) *[Read this readme in english.](./README.md)* -*[Lire ce readme en français.](./README_fr.md)* > *Ce package vous permet d'installer Mailman3 rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* @@ -19,7 +23,7 @@ Un gestionnaire de liste de discussion par email ## Captures d'écran -![](./doc/screenshots/screenshot1.webp) +![Capture d'écran de Mailman3](./doc/screenshots/screenshot1.webp) ## Avertissements / informations importantes @@ -117,22 +121,23 @@ Finally, you also configure things through the Django web admin available at `/a ## Documentations et ressources -* Site officiel de l'app : http://www.list.org/ -* Documentation officielle utilisateur : http://docs.mailman3.org/en/latest/userguide.html -* Documentation officielle de l'admin : https://docs.mailman3.org/en/latest/ -* Dépôt de code officiel de l'app : https://gitlab.com/mailman/mailman-suite -* Documentation YunoHost pour cette app : https://yunohost.org/app_mailman3 -* Signaler un bug : https://github.com/YunoHost-Apps/mailman3_ynh/issues +* Site officiel de l'app : +* Documentation officielle utilisateur : +* Documentation officielle de l'admin : +* Dépôt de code officiel de l'app : +* Documentation YunoHost pour cette app : +* Signaler un bug : ## Informations pour les développeurs Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/mailman3_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. -``` + +``` bash sudo yunohost app install https://github.com/YunoHost-Apps/mailman3_ynh/tree/testing --debug ou sudo yunohost app upgrade mailman3 -u https://github.com/YunoHost-Apps/mailman3_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file +**Plus d'infos sur le packaging d'applications :** From 5d1eb88a2e0b3e224b3d3488683f54989d2f70c1 Mon Sep 17 00:00:00 2001 From: ljf Date: Fri, 15 Jul 2022 22:51:40 +0200 Subject: [PATCH 2/3] Some steps was missing in install --- doc/DISCLAIMER.md | 53 +------------------- manifest.json | 10 +++- scripts/install | 21 ++++++++ sources/hooks/conf_regen/98-postfix_mailman3 | 2 +- 4 files changed, 33 insertions(+), 53 deletions(-) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 0359a49..b1cacf5 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -6,58 +6,9 @@ * Users can also just sign up themselves to manage details * Users can use mailing lists without signing up? -## Post-installation steps +Classical admin is available on the page: https://myyunohost.org/ -### Setup Admin User - -You must [configure the admin user](http://docs.mailman3.org/en/latest/config-web.html#setting-up-admin-account): - -```bash -$ cd /usr/share/mailman3-web -$ python3 manage.py createsuperuser -``` - -You should then attempt to log in with this user account in the web UI. Once you've logged in, a confirmation mail will be sent to your email address that you specified. Therefore, you should have something like [Rainloop](https://github.com/YunoHost-Apps/rainloop_ynh) installed to view mail on your YunoHost installation. - -### Setup your main domain - -You'll need to log in as administrator and visit the `/admin/site/site`. - -If you're Mailman3 is setup on `https://myyunohost.org` then that would be the following: - -> https://myyunohost.org/admin/site/site - -### Configure incoming mail - -Mailman3 implements an LMTP server for receiving mail from Postfix. This means that Mailman3 doesn't need anything from Dovecot. This is important to understand because Dovecot is the default YunoHost local delivery agent. Therefore, the default YunoHost Postfix configuration uses Dovecot. So, in order to deliver incoming mail, we need to override which delivery agent handles which mails based on the addresses. In other words, if you create a mailing list "mylist@myyunohost.org" you want Mailman3's LMTP server to receive this, *not* Dovecot, becaues Dovecot only delivers to LDAP created user accounts. - -You'll need to add this to your Postfix configuration: - -```bash -owner_request_special = no - -transport_maps = - hash:/var/lib/mailman3/data/postfix_lmtp - -local_recipient_maps = - hash:/var/lib/mailman3/data/postfix_lmtp - -virtual_mailbox_maps = ldap:/etc/postfix/ldap-accounts.cf, hash:/var/lib/mailman3/data/postfix_lmtp -``` - -And then run: - -```bash -$ sudo -su list mailman aliases -``` - -This is unfortunately a manual step at this point because the package remains experimental. Once it matures, this will be integrated into a hook or the default Postfix configuration. For now, remember that when you run `yunohost tools regen-conf postfix` or if any installation invokes `regen-conf`, your Postfix configuration will not be changed because it has diverged from the default configuration. This may cause you problems if YunoHost core expects that there is some new value in your Postfix configuration. - -### Configure outgoing mail - -Postfix relies on using SMTP which should be configured in your `/etc/postfix/main.cf`. - -You should make sure that you have outgoing mail working before getting started with Mailman 3. +Django admin on: https://myyunohost.org/admin/ ## General Configuration diff --git a/manifest.json b/manifest.json index 0cb3d5d..72ca265 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Electronic mailing lists manager", "fr": "Un gestionnaire de liste de discussion par email" }, - "version": "1.0~ynh1", + "version": "1.0~ynh2", "url": "http://www.list.org/", "upstream": { "license": "AGPL-3.0-or-later", @@ -39,6 +39,14 @@ "name": "is_public", "type": "boolean", "default": true + }, + { + "name": "admin", + "type": "user" + }, + { + "name": "password", + "type": "password" } ] } diff --git a/scripts/install b/scripts/install index 9cf78db..9635462 100755 --- a/scripts/install +++ b/scripts/install @@ -26,6 +26,8 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC +admin=$YNH_APP_ARG_ADMIN +password=$YNH_APP_ARG_PASSWORD app=$YNH_APP_INSTANCE_NAME @@ -48,6 +50,8 @@ ynh_script_progression --message="Storing installation settings..." ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url +ynh_app_setting_set --app=$app --key=admin --value=admin +ynh_app_setting_set --app=$app --key=password --value=password #================================================= # STANDARD MODIFICATIONS @@ -140,6 +144,22 @@ pushd /usr/share/mailman3-web python3 manage.py migrate || ynh_die --message="Mailman3 migrations failed!" popd +#================================================= +# CREATE SUPERUSER +#================================================= +ynh_script_progression --message="Creating superuser..." +pushd /usr/share/mailman3-web + echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('$admin', '$email', '$password')" | python manage.py shell +popd + +#================================================= +# CONFIGURE MAINDOMAIN +#================================================= +ynh_script_progression --message="Configuring maindomain..." +pushd /usr/share/mailman3-web + echo "UPDATE django_site SET domain='$domain',name='$domain' WHERE domain='example.com';" | python3 manage.py dbshell +popd + #================================================= # POSTFIX CONFIGURATION #================================================= @@ -148,6 +168,7 @@ ynh_script_progression --message="Configuring postfix mail server..." # Add postfix configuration hook and regen postfix conf cp -R ../sources/hooks/conf_regen/98-postfix_mailman3 /usr/share/yunohost/hooks/conf_regen/ yunohost tools regen-conf postfix +sudo -su list mailman aliases ynh_systemd_action --service_name=postfix --action="restart" #================================================= diff --git a/sources/hooks/conf_regen/98-postfix_mailman3 b/sources/hooks/conf_regen/98-postfix_mailman3 index 5eff47d..e0f9e0c 100644 --- a/sources/hooks/conf_regen/98-postfix_mailman3 +++ b/sources/hooks/conf_regen/98-postfix_mailman3 @@ -10,7 +10,7 @@ do_pre_regen() { # FIXME : check this file actually exists to not crash when only running this # hook alone - + sed -i 's@virtual_mailbox_maps = ldap:/etc/postfix/ldap-accounts.cf@virtual_mailbox_maps = ldap:/etc/postfix/ldap-accounts.cf, hash:/var/lib/mailman3/data/postfix_lmtp@' $postfix_main_cf cat << EOT >> $postfix_main_cf unknown_local_recipient_reject_code = 550 owner_request_special = no From 8c354ab1a26267aeddd492d671c29ac1f66b373c Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 15 Jul 2022 20:51:47 +0000 Subject: [PATCH 3/3] Auto-update README --- README.md | 55 +++------------------------------------------------- README_fr.md | 55 +++------------------------------------------------- 2 files changed, 6 insertions(+), 104 deletions(-) diff --git a/README.md b/README.md index 3dcf1f0..b574b7c 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Electronic mailing lists manager -**Shipped version:** 1.0~ynh1 +**Shipped version:** 1.0~ynh2 **Demo:** https://lists.mailman3.org/mailman3/lists/ @@ -35,58 +35,9 @@ Electronic mailing lists manager * Users can also just sign up themselves to manage details * Users can use mailing lists without signing up? -## Post-installation steps +Classical admin is available on the page: https://myyunohost.org/ -### Setup Admin User - -You must [configure the admin user](http://docs.mailman3.org/en/latest/config-web.html#setting-up-admin-account): - -```bash -$ cd /usr/share/mailman3-web -$ python3 manage.py createsuperuser -``` - -You should then attempt to log in with this user account in the web UI. Once you've logged in, a confirmation mail will be sent to your email address that you specified. Therefore, you should have something like [Rainloop](https://github.com/YunoHost-Apps/rainloop_ynh) installed to view mail on your YunoHost installation. - -### Setup your main domain - -You'll need to log in as administrator and visit the `/admin/site/site`. - -If you're Mailman3 is setup on `https://myyunohost.org` then that would be the following: - -> https://myyunohost.org/admin/site/site - -### Configure incoming mail - -Mailman3 implements an LMTP server for receiving mail from Postfix. This means that Mailman3 doesn't need anything from Dovecot. This is important to understand because Dovecot is the default YunoHost local delivery agent. Therefore, the default YunoHost Postfix configuration uses Dovecot. So, in order to deliver incoming mail, we need to override which delivery agent handles which mails based on the addresses. In other words, if you create a mailing list "mylist@myyunohost.org" you want Mailman3's LMTP server to receive this, *not* Dovecot, becaues Dovecot only delivers to LDAP created user accounts. - -You'll need to add this to your Postfix configuration: - -```bash -owner_request_special = no - -transport_maps = - hash:/var/lib/mailman3/data/postfix_lmtp - -local_recipient_maps = - hash:/var/lib/mailman3/data/postfix_lmtp - -virtual_mailbox_maps = ldap:/etc/postfix/ldap-accounts.cf, hash:/var/lib/mailman3/data/postfix_lmtp -``` - -And then run: - -```bash -$ sudo -su list mailman aliases -``` - -This is unfortunately a manual step at this point because the package remains experimental. Once it matures, this will be integrated into a hook or the default Postfix configuration. For now, remember that when you run `yunohost tools regen-conf postfix` or if any installation invokes `regen-conf`, your Postfix configuration will not be changed because it has diverged from the default configuration. This may cause you problems if YunoHost core expects that there is some new value in your Postfix configuration. - -### Configure outgoing mail - -Postfix relies on using SMTP which should be configured in your `/etc/postfix/main.cf`. - -You should make sure that you have outgoing mail working before getting started with Mailman 3. +Django admin on: https://myyunohost.org/admin/ ## General Configuration diff --git a/README_fr.md b/README_fr.md index 4949044..4d37b32 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Un gestionnaire de liste de discussion par email -**Version incluse :** 1.0~ynh1 +**Version incluse :** 1.0~ynh2 **Démo :** https://lists.mailman3.org/mailman3/lists/ @@ -35,58 +35,9 @@ Un gestionnaire de liste de discussion par email * Users can also just sign up themselves to manage details * Users can use mailing lists without signing up? -## Post-installation steps +Classical admin is available on the page: https://myyunohost.org/ -### Setup Admin User - -You must [configure the admin user](http://docs.mailman3.org/en/latest/config-web.html#setting-up-admin-account): - -```bash -$ cd /usr/share/mailman3-web -$ python3 manage.py createsuperuser -``` - -You should then attempt to log in with this user account in the web UI. Once you've logged in, a confirmation mail will be sent to your email address that you specified. Therefore, you should have something like [Rainloop](https://github.com/YunoHost-Apps/rainloop_ynh) installed to view mail on your YunoHost installation. - -### Setup your main domain - -You'll need to log in as administrator and visit the `/admin/site/site`. - -If you're Mailman3 is setup on `https://myyunohost.org` then that would be the following: - -> https://myyunohost.org/admin/site/site - -### Configure incoming mail - -Mailman3 implements an LMTP server for receiving mail from Postfix. This means that Mailman3 doesn't need anything from Dovecot. This is important to understand because Dovecot is the default YunoHost local delivery agent. Therefore, the default YunoHost Postfix configuration uses Dovecot. So, in order to deliver incoming mail, we need to override which delivery agent handles which mails based on the addresses. In other words, if you create a mailing list "mylist@myyunohost.org" you want Mailman3's LMTP server to receive this, *not* Dovecot, becaues Dovecot only delivers to LDAP created user accounts. - -You'll need to add this to your Postfix configuration: - -```bash -owner_request_special = no - -transport_maps = - hash:/var/lib/mailman3/data/postfix_lmtp - -local_recipient_maps = - hash:/var/lib/mailman3/data/postfix_lmtp - -virtual_mailbox_maps = ldap:/etc/postfix/ldap-accounts.cf, hash:/var/lib/mailman3/data/postfix_lmtp -``` - -And then run: - -```bash -$ sudo -su list mailman aliases -``` - -This is unfortunately a manual step at this point because the package remains experimental. Once it matures, this will be integrated into a hook or the default Postfix configuration. For now, remember that when you run `yunohost tools regen-conf postfix` or if any installation invokes `regen-conf`, your Postfix configuration will not be changed because it has diverged from the default configuration. This may cause you problems if YunoHost core expects that there is some new value in your Postfix configuration. - -### Configure outgoing mail - -Postfix relies on using SMTP which should be configured in your `/etc/postfix/main.cf`. - -You should make sure that you have outgoing mail working before getting started with Mailman 3. +Django admin on: https://myyunohost.org/admin/ ## General Configuration