mirror of
https://github.com/YunoHost-Apps/pixelfed_ynh.git
synced 2024-09-03 20:06:04 +02:00
Testing : fix emails (#232)
* v2 * v2 * Create tests.toml * Auto-update README * fix * Update _common.sh * Update install * Update manifest.toml * Update manifest.toml * cleaning * Auto-update README * Auto-update README * Add post edits (from dev branch) Using lastest commit as most of the previous ones fix edits stuff + bugs5cfe8cd56a
* bump version * Auto-update README * cleaning * Update manifest.toml * Auto-update README * Update ADMIN.md * Update change_url * php8.2 * php8.2 * add ressources needed * php8.2 * update PHP * post edit formatting fixes4479055e1e
* v0.11.8 * v0.11.8 * Auto-update README * Master -> ynh V2 (v0.11.8) * Auto-update README * Update .env * Fix .env + improvements https://github.com/YunoHost-Apps/pixelfed_ynh/pull/219#issuecomment-1568049256 * Update manifest.toml * Auto-update README * Typo * Patch file access right (fix post 0.11.5 installs) * Bump version (post v0.11.5 install fixes) * Auto-update README * Update extra_php-fpm.conf Fix #223 * Testing : fix ≥0.11.5 installs (#222) (#225) * v2 * v2 * Create tests.toml * Auto-update README * fix * Update _common.sh * Update install * Update manifest.toml * Update manifest.toml * cleaning * Auto-update README * Auto-update README * Add post edits (from dev branch) Using lastest commit as most of the previous ones fix edits stuff + bugs5cfe8cd56a
* bump version * Auto-update README * cleaning * Update manifest.toml * Auto-update README * Update ADMIN.md * Update change_url * php8.2 * php8.2 * add ressources needed * php8.2 * update PHP * post edit formatting fixes4479055e1e
* v0.11.8 * v0.11.8 * Auto-update README * Master -> ynh V2 (v0.11.8) * Auto-update README * Update .env * Fix .env + improvements https://github.com/YunoHost-Apps/pixelfed_ynh/pull/219#issuecomment-1568049256 * Update manifest.toml * Auto-update README * Typo * Patch file access right (fix post 0.11.5 installs) * Bump version (post v0.11.5 install fixes) * Auto-update README --------- Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: ericgaspar <junk.eg@free.fr> * Bump version * Auto-update README * Fix post-v2 issues * Patch post v0.11.5 permissions Why are they not correct by default ? * Testing : fix images rights in package v2 (#224) (#227) * v2 * v2 * Create tests.toml * Auto-update README * fix * Update _common.sh * Update install * Update manifest.toml * Update manifest.toml * cleaning * Auto-update README * Auto-update README * Add post edits (from dev branch) Using lastest commit as most of the previous ones fix edits stuff + bugs5cfe8cd56a
* bump version * Auto-update README * cleaning * Update manifest.toml * Auto-update README * Update ADMIN.md * Update change_url * php8.2 * php8.2 * add ressources needed * php8.2 * update PHP * post edit formatting fixes4479055e1e
* v0.11.8 * v0.11.8 * Auto-update README * Master -> ynh V2 (v0.11.8) * Auto-update README * Update .env * Fix .env + improvements https://github.com/YunoHost-Apps/pixelfed_ynh/pull/219#issuecomment-1568049256 * Update manifest.toml * Auto-update README * Typo * Patch file access right (fix post 0.11.5 installs) * Bump version (post v0.11.5 install fixes) * Auto-update README * Update extra_php-fpm.conf Fix #223 * Testing : fix ≥0.11.5 installs (#222) (#225) * v2 * v2 * Create tests.toml * Auto-update README * fix * Update _common.sh * Update install * Update manifest.toml * Update manifest.toml * cleaning * Auto-update README * Auto-update README * Add post edits (from dev branch) Using lastest commit as most of the previous ones fix edits stuff + bugs5cfe8cd56a
* bump version * Auto-update README * cleaning * Update manifest.toml * Auto-update README * Update ADMIN.md * Update change_url * php8.2 * php8.2 * add ressources needed * php8.2 * update PHP * post edit formatting fixes4479055e1e
* v0.11.8 * v0.11.8 * Auto-update README * Master -> ynh V2 (v0.11.8) * Auto-update README * Update .env * Fix .env + improvements https://github.com/YunoHost-Apps/pixelfed_ynh/pull/219#issuecomment-1568049256 * Update manifest.toml * Auto-update README * Typo * Patch file access right (fix post 0.11.5 installs) * Bump version (post v0.11.5 install fixes) * Auto-update README --------- * Bump version * Auto-update README * Fix post-v2 issues --------- Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: ericgaspar <junk.eg@free.fr> * Bump version * Auto-update README * Fix mail sendmail (#230) * Testing : patch install permissions (#226) * v2 * v2 * Create tests.toml * Auto-update README * fix * Update _common.sh * Update install * Update manifest.toml * Update manifest.toml * cleaning * Auto-update README * Auto-update README * Add post edits (from dev branch) Using lastest commit as most of the previous ones fix edits stuff + bugs5cfe8cd56a
* bump version * Auto-update README * cleaning * Update manifest.toml * Auto-update README * Update ADMIN.md * Update change_url * php8.2 * php8.2 * add ressources needed * php8.2 * update PHP * post edit formatting fixes4479055e1e
* v0.11.8 * v0.11.8 * Auto-update README * Master -> ynh V2 (v0.11.8) * Auto-update README * Update .env * Fix .env + improvements https://github.com/YunoHost-Apps/pixelfed_ynh/pull/219#issuecomment-1568049256 * Update manifest.toml * Auto-update README * Typo * Patch file access right (fix post 0.11.5 installs) * Bump version (post v0.11.5 install fixes) * Auto-update README * Update extra_php-fpm.conf Fix #223 * Testing : fix ≥0.11.5 installs (#222) (#225) * v2 * v2 * Create tests.toml * Auto-update README * fix * Update _common.sh * Update install * Update manifest.toml * Update manifest.toml * cleaning * Auto-update README * Auto-update README * Add post edits (from dev branch) Using lastest commit as most of the previous ones fix edits stuff + bugs5cfe8cd56a
* bump version * Auto-update README * cleaning * Update manifest.toml * Auto-update README * Update ADMIN.md * Update change_url * php8.2 * php8.2 * add ressources needed * php8.2 * update PHP * post edit formatting fixes4479055e1e
* v0.11.8 * v0.11.8 * Auto-update README * Master -> ynh V2 (v0.11.8) * Auto-update README * Update .env * Fix .env + improvements https://github.com/YunoHost-Apps/pixelfed_ynh/pull/219#issuecomment-1568049256 * Update manifest.toml * Auto-update README * Typo * Patch file access right (fix post 0.11.5 installs) * Bump version (post v0.11.5 install fixes) * Auto-update README --------- Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: ericgaspar <junk.eg@free.fr> * Bump version * Auto-update README * Fix post-v2 issues * Patch post v0.11.5 permissions Why are they not correct by default ? * Testing : fix images rights in package v2 (#224) (#227) * v2 * v2 * Create tests.toml * Auto-update README * fix * Update _common.sh * Update install * Update manifest.toml * Update manifest.toml * cleaning * Auto-update README * Auto-update README * Add post edits (from dev branch) Using lastest commit as most of the previous ones fix edits stuff + bugs5cfe8cd56a
* bump version * Auto-update README * cleaning * Update manifest.toml * Auto-update README * Update ADMIN.md * Update change_url * php8.2 * php8.2 * add ressources needed * php8.2 * update PHP * post edit formatting fixes4479055e1e
* v0.11.8 * v0.11.8 * Auto-update README * Master -> ynh V2 (v0.11.8) * Auto-update README * Update .env * Fix .env + improvements https://github.com/YunoHost-Apps/pixelfed_ynh/pull/219#issuecomment-1568049256 * Update manifest.toml * Auto-update README * Typo * Patch file access right (fix post 0.11.5 installs) * Bump version (post v0.11.5 install fixes) * Auto-update README * Update extra_php-fpm.conf Fix #223 * Testing : fix ≥0.11.5 installs (#222) (#225) * v2 * v2 * Create tests.toml * Auto-update README * fix * Update _common.sh * Update install * Update manifest.toml * Update manifest.toml * cleaning * Auto-update README * Auto-update README * Add post edits (from dev branch) Using lastest commit as most of the previous ones fix edits stuff + bugs5cfe8cd56a
* bump version * Auto-update README * cleaning * Update manifest.toml * Auto-update README * Update ADMIN.md * Update change_url * php8.2 * php8.2 * add ressources needed * php8.2 * update PHP * post edit formatting fixes4479055e1e
* v0.11.8 * v0.11.8 * Auto-update README * Master -> ynh V2 (v0.11.8) * Auto-update README * Update .env * Fix .env + improvements https://github.com/YunoHost-Apps/pixelfed_ynh/pull/219#issuecomment-1568049256 * Update manifest.toml * Auto-update README * Typo * Patch file access right (fix post 0.11.5 installs) * Bump version (post v0.11.5 install fixes) * Auto-update README --------- * Bump version * Auto-update README * Fix post-v2 issues --------- Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: ericgaspar <junk.eg@free.fr> * Bump version * Auto-update README --------- Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: ericgaspar <junk.eg@free.fr> * Update .env use sendmail for default mail sending, should work out of the box for fresh installs * patch source prevent privilege escalation * patching source prevent privilege escalation * patching source prevent privilege escalation * Update manifest.toml Enable authentication on the mail stack for the system user * Update .env authentication on the mail stack with app system user * Fix old email configs --------- Co-authored-by: lapineige <lapineige@users.noreply.github.com> Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: ericgaspar <junk.eg@free.fr> * remove full_domain * Add manual email verification doc (#233) * Add manual email verification doc * email verification doc (fr) * fix doc --------- Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: yunohost-bot <yunohost@yunohost.org> Co-authored-by: ericgaspar <junk.eg@free.fr> Co-authored-by: themancalledjakob <github@jrkb.land>
This commit is contained in:
parent
4fedebbb1b
commit
c0e39f528f
7 changed files with 50 additions and 8 deletions
10
conf/.env
10
conf/.env
|
@ -84,13 +84,13 @@ NODEINFO=true
|
||||||
WEBFINGER=true
|
WEBFINGER=true
|
||||||
|
|
||||||
## Mail Configuration (Post-Installer)
|
## Mail Configuration (Post-Installer)
|
||||||
MAIL_DRIVER=smtp
|
MAIL_DRIVER=sendmail
|
||||||
MAIL_HOST=localhost
|
MAIL_HOST=127.0.0.1
|
||||||
MAIL_PORT=25
|
MAIL_PORT=25
|
||||||
MAIL_USERNAME=null
|
MAIL_USERNAME=__APP__
|
||||||
MAIL_PASSWORD=null
|
MAIL_PASSWORD=__MAIL_PWD__
|
||||||
MAIL_ENCRYPTION=null
|
MAIL_ENCRYPTION=null
|
||||||
MAIL_FROM_ADDRESS="pixelfed@__DOMAIN__"
|
MAIL_FROM_ADDRESS="__APP__@__DOMAIN__"
|
||||||
MAIL_FROM_NAME="Pixelfed"
|
MAIL_FROM_NAME="Pixelfed"
|
||||||
|
|
||||||
## S3 Configuration (Post-Installer)
|
## S3 Configuration (Post-Installer)
|
||||||
|
|
|
@ -12,7 +12,10 @@ and respond yes to the question ` Add admin privileges to this user?`.
|
||||||
|
|
||||||
Registrations are open by default.
|
Registrations are open by default.
|
||||||
To change that setting, edit `__INSTALL_DIR__/.env` and set `OPEN_REGISTRATION=false` instead of `true`.
|
To change that setting, edit `__INSTALL_DIR__/.env` and set `OPEN_REGISTRATION=false` instead of `true`.
|
||||||
Then run `php8.2 artisan config:cache` to reload the settings.
|
Then run `php8.2 artisan config:cache` (from the app `/var/www/pixelfed…` folder) to reload the settings.
|
||||||
|
|
||||||
|
### Manually verifying emails
|
||||||
|
By default, email verification is activated (adjust the `.env` file if needed). If your server can't send emails, you can manually confirm one user's email in the admin UI, tab `Moderation`, and by using the command `php8.2 artisan user:verify UserName`.
|
||||||
|
|
||||||
### Disable search engine indexing
|
### Disable search engine indexing
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,10 @@ et répondez oui à la question « Ajouter des privilèges d'administrateur à c
|
||||||
|
|
||||||
Les inscriptions sont ouvertes par défaut.
|
Les inscriptions sont ouvertes par défaut.
|
||||||
Pour modifier ce paramètre, modifiez `__INSTALL_DIR__/.env` et définissez `OPEN_REGISTRATION=false` au lieu de `true`.
|
Pour modifier ce paramètre, modifiez `__INSTALL_DIR__/.env` et définissez `OPEN_REGISTRATION=false` au lieu de `true`.
|
||||||
Ensuite, exécutez `php8.2 artisan config:cache` pour recharger les paramètres.
|
Ensuite, exécutez `php8.2 artisan config:cache` depuis le dossier de l'application (dans `/var/www/pixelfed…`) pour recharger les paramètres.
|
||||||
|
|
||||||
|
### Vérification manuelle des emails
|
||||||
|
Par défaut, la vérification des emails est activée (ajustez le fichier `.env` si nécessaire). Si votre serveur ne peut pas envoyer d'emails, vous pouvez confirmer manuellement l'email d'un compte dans l'interface d'administration, onglet `Modération`, et en utilisant la commande `php8.2 artisan user:verify NomUtilisateur`.
|
||||||
|
|
||||||
### Désactiver l'indexation des moteurs de recherche
|
### Désactiver l'indexation des moteurs de recherche
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ ram.runtime = "100M"
|
||||||
[install]
|
[install]
|
||||||
[install.domain]
|
[install.domain]
|
||||||
type = "domain"
|
type = "domain"
|
||||||
full_domain = true
|
|
||||||
|
|
||||||
[install.init_main_permission]
|
[install.init_main_permission]
|
||||||
type = "group"
|
type = "group"
|
||||||
|
@ -42,6 +41,7 @@ ram.runtime = "100M"
|
||||||
autoupdate.strategy = "latest_github_tag"
|
autoupdate.strategy = "latest_github_tag"
|
||||||
|
|
||||||
[resources.system_user]
|
[resources.system_user]
|
||||||
|
allow_email = true
|
||||||
|
|
||||||
[resources.install_dir]
|
[resources.install_dir]
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,15 @@ ynh_setup_source --dest_dir="$install_dir"
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# PATCHING SOURCE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Patching source files..." --weight=1
|
||||||
|
|
||||||
|
# Prevent privilege escalation by injecting commands in an email name
|
||||||
|
# This described in more detail on the manpage https://www.postfix.org/sendmail.1.html under security
|
||||||
|
ynh_replace_string --match_string="'/usr/sbin/sendmail -bs'" --replace_string="'/usr/sbin/sendmail -bs -- '" --target_file=$install_dir/config/mail.php
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP-FPM CONFIGURATION
|
# PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -20,6 +20,15 @@ ynh_restore_file --origin_path="$install_dir"
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# PATCHING SOURCE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Patching source files..." --weight=1
|
||||||
|
|
||||||
|
# Prevent privilege escalation by injecting commands in an email name
|
||||||
|
# This described in more detail on the manpage https://www.postfix.org/sendmail.1.html under security
|
||||||
|
ynh_replace_string --match_string="'/usr/sbin/sendmail -bs'" --replace_string="'/usr/sbin/sendmail -bs -- '" --target_file=$install_dir/config/mail.php
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE PHP-FPM CONFIGURATION
|
# RESTORE THE PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -92,6 +92,15 @@ if dpkg --compare-versions "0.10.9~ynh3" gt "$(ynh_read_manifest --manifest="/et
|
||||||
yunohost service add "supervisor" --description="Supervisor daemon for $app" --log="/var/log/$app/${app}-horizon.log"
|
yunohost service add "supervisor" --description="Supervisor daemon for $app" --log="/var/log/$app/${app}-horizon.log"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Fix old email configs
|
||||||
|
if ynh_compare_current_package_version --comparison lt --version "0.11.8~ynh5" ; then
|
||||||
|
ynh_replace_special_string --match_string="MAIL_DRIVER=[^\\n]*" --replace_string="MAIL_DRIVER=sendmail" --target_file="$install_dir/.env" # two \\ because it's in a ""
|
||||||
|
ynh_replace_special_string --match_string="MAIL_HOST=[^\\n]*" --replace_string="MAIL_HOST=127.0.0.1" --target_file="$install_dir/.env" # two \\ because it's in a ""
|
||||||
|
ynh_replace_special_string --match_string="MAIL_USERNAME=[^\\n]*" --replace_string="MAIL_USERNAME=$app" --target_file="$install_dir/.env" # two \\ because it's in a ""
|
||||||
|
ynh_replace_special_string --match_string="MAIL_PASSWORD=[^\\n]*" --replace_string="MAIL_PASSWORD=$mail_pwd" --target_file="$install_dir/.env" # two \\ because it's in a ""
|
||||||
|
ynh_replace_special_string --match_string="MAIL_FROM_ADDRESS=pixelfed" --replace_string=`MAIL_FROM_ADDRESS="$app"` --target_file="$install_dir/.env"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -109,6 +118,15 @@ chown -R $app:www-data "$install_dir"
|
||||||
# Pixelfed app should be able to edit its settings from the admin panel
|
# Pixelfed app should be able to edit its settings from the admin panel
|
||||||
chmod 600 "$install_dir"/.env
|
chmod 600 "$install_dir"/.env
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# PATCHING SOURCE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Patching source files..." --weight=1
|
||||||
|
|
||||||
|
# Prevent privilege escalation by injecting commands in an email name
|
||||||
|
# This described in more detail on the manpage https://www.postfix.org/sendmail.1.html under security
|
||||||
|
ynh_replace_string --match_string="'/usr/sbin/sendmail -bs'" --replace_string="'/usr/sbin/sendmail -bs -- '" --target_file=$install_dir/config/mail.php
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP-FPM CONFIGURATION
|
# PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue