Closed ericgaspar closed 7 months ago
!testme
Il reste à résoudre:
pour que ça fonctionne correctement, il faut que le mail de l'association soit le mail de l'application __APP__@__DOMAIN__
.
Je ne sais pas comment régler cela pour les associations qui ont fait une post-installation du paquet Yunohost, à moins qu'il y ai un fichier à éditer quelque part pour ajouter ce paramètre, plutôt remplacer celui d'origine.
Et pour les nouvelles installations, il faudrait aussi imposer que le mail de l'association soit le mail de l'application __APP__@__DOMAIN__
, dans le champ de post-installation
Bref, pas évident, mais à réfléchir
En gros il faudrait une pour le script upgrade remplacer une valeur dans la base de données association.sqlite de l'application !! la table est "config" et la valeur à remplacer est devant une KEY
J'ai trouvé la manip à faire avec sqlite pour une upgrade par exemple:
sudo -u __APP__ sqlite3
sqlite>.open __DATA_DIR__/data/association.sqlite
sqlite> UPDATE "config" SET value ='__APP@DOMAIN' WHERE key = 'org_email';
sqlite>.quit
Ensuite me reste aussi à trouver si je peux imposer lors de l'installation de paheko que cette valeur org_email
soit par défaut __APP__@__DOMAIN
Là c'est délicat, je suis en train de chercher dans les fichiers de paheko où je pourrais imposer cette valeur...
Ahahhha j'ai peut-être trouvé mieux !!
sans changer le mail de l'association choisi, juste avec la constante
const MAIL_RETURN_PATH = '__APP__@__DOMAIN__';
Par contre bizarre que l'on ne puisse pas utiliser
const SMTP_SECURITY = 'NONE';
why ??
Déjà je suis trop content que ça marche ainsi, sans changer le mail de l'association !!
Du coup pour les tests, j'ai installé 2 paheko, paheko et paheko2, pour le premier paheko il est dans un domaine paheko.nomdomaine.tld pour le deuxième paheko2 dans un sous-path du domaine principal nomdomaine.tld/paheko
J'aimerai comprendre aussi pourquoi dans le fichier /etc/postfix/app_senders_login_maps
je ne vois ceci ??
cat /etc/postfix/app_senders_login_maps
# This file is regenerated automatically.
# Please DO NOT edit manually ... changes will be overwritten!
paheko__2@domain.tld paheko__2
Bizarre ???
!testme
hello @ericgaspar @orhtej2 , it is working like this, the only matter is we need keep const SMTP_SECURITY = 'STARTTLS';
Is it a problem ?
Also I was thinking about if we change_url does the parameters in config.local.php must be edited also to have the constants ??
const MAIL_RETURN_PATH = '__APP__@__DOMAIN__';
const MAIL_SENDER = '__APP__@__DOMAIN__';
hello @ericgaspar @orhtej2 , it is working like this, the only matter is we need keep
const SMTP_SECURITY = 'STARTTLS';
Is it a problem ?
Also I was thinking about if we change_url does the parameters in config.local.php must be edited also to have the constants ??
const MAIL_RETURN_PATH = '__APP__@__DOMAIN__'; const MAIL_SENDER = '__APP__@__DOMAIN__';
Ok, after a test of change_url, it works, the constants are changed as needed...
Hum, in fact if two app are present, they may not be on same domain like this. If we have a paheko@domain.tld and a paheko__2@domain.tld is not good.
I am ok to merge this PR this time, except if we found how resolve const SMTP_SECURITY = 'NONE';
, I don't know why it did not works...
@alexAubin @ericgaspar are you OK if I merge this PR ? I wait your review ?
STARTTLS
needs to stay because dovecot
is configured like that and this cannot be changed.
As for why second installation would require dedicated mail domain - that I don't understand, any rationale?
STARTTLS
needs to stay becausedovecot
is configured like that and this cannot be changed.
Ok so it's OK for keep STARTTLS
,
As for why second installation would require dedicated mail domain - that I don't understand, any rationale?
If I add an app with same DOMAIN I have errors SMTP_Exception: SMTP RCPT TO error: 553 5.7.1 <paheko@rodinux.fr>: Sender address rejected: not owned by user _APP__ [Code: 0]
Problem
Solution
PR Status
Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ after creating the PR, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)