diff --git a/README.md b/README.md index 0bbd79f..28a08fc 100644 --- a/README.md +++ b/README.md @@ -17,10 +17,41 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Lightweight multi-account webmail +### Features + +- Modern user interface. +- Complete support of IMAP and SMTP protocols including SSL and STARTTLS. +- Sieve scripts (Filters and vacation message). +- Direct access to mail server is used (mails are not stored locally on web server). +- Allows for adding multiple accounts to primary one, simultaneous access to different accounts in different browser tabs is supported. Additional identities. +- Administrative panel for configuring main options. +- Integration with Facebook, Google, Twitter and Dropbox. +- Managing folders list. +- Configurable multi-level caching system. +- Extending functionality with plugins installed through admin panel. +- Perfect rendering of complex HTML mails. +- Drag'n'drop for mails and attachments. +- Keyboard shortcuts support. +- Autocompletion of e-mail addresses. + + **Shipped version:** 1.16.0~ynh2 **Demo:** https://mail.rainloop.net/ +## Screenshots + +![](./doc/screenshots/screenshot.png) + +## Disclaimers / important information + +## Access to admin panel + +To access admin panel, use URL of the following kind: http://product_installation_URL/app/?admin + +For example: http://webmail.domain.com/app/?admin + +Default login is `admin`, the password is the one you chose during installation. ## Documentation and resources * Official app website: https://www.rainloop.net/ diff --git a/README_fr.md b/README_fr.md index 134cca8..eff50e7 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,12 +11,43 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour ## Vue d'ensemble -Webmail léger multi-comptes +Lightweight multi-account webmail + +### Features + +- Modern user interface. +- Complete support of IMAP and SMTP protocols including SSL and STARTTLS. +- Sieve scripts (Filters and vacation message). +- Direct access to mail server is used (mails are not stored locally on web server). +- Allows for adding multiple accounts to primary one, simultaneous access to different accounts in different browser tabs is supported. Additional identities. +- Administrative panel for configuring main options. +- Integration with Facebook, Google, Twitter and Dropbox. +- Managing folders list. +- Configurable multi-level caching system. +- Extending functionality with plugins installed through admin panel. +- Perfect rendering of complex HTML mails. +- Drag'n'drop for mails and attachments. +- Keyboard shortcuts support. +- Autocompletion of e-mail addresses. + **Version incluse :** 1.16.0~ynh2 **Démo :** https://mail.rainloop.net/ +## Captures d'écran + +![](./doc/screenshots/screenshot.png) + +## Avertissements / informations importantes + +## Access to admin panel + +To access admin panel, use URL of the following kind: http://product_installation_URL/app/?admin + +For example: http://webmail.domain.com/app/?admin + +Default login is `admin`, the password is the one you chose during installation. ## Documentations et ressources * Site officiel de l'app : https://www.rainloop.net/ diff --git a/conf/data/configs/application.ini b/conf/data/configs/application.ini index e8873eb..63272e3 100644 --- a/conf/data/configs/application.ini +++ b/conf/data/configs/application.ini @@ -61,7 +61,7 @@ allow_sync = On sync_interval = 20 type = "mysql" pdo_dsn = "mysql:host=127.0.0.1;port=3306;dbname=__DB_NAME__" -pdo_user = "__DB_NAME__" +pdo_user = "__DB_USER__" pdo_password = "__DB_PWD__" suggestions_limit = 30 @@ -142,7 +142,7 @@ sign_me_auto = "DefaultOff" enable = On ; List of enabled plugins -enabled_list = "__PLUGINS_" +enabled_list = "__PLUGINS__" [defaults] ; Editor mode used by default (Plain, Html, HtmlForced or PlainForced) diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..dcb16ab --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1,18 @@ +Lightweight multi-account webmail + +### Features + +- Modern user interface. +- Complete support of IMAP and SMTP protocols including SSL and STARTTLS. +- Sieve scripts (Filters and vacation message). +- Direct access to mail server is used (mails are not stored locally on web server). +- Allows for adding multiple accounts to primary one, simultaneous access to different accounts in different browser tabs is supported. Additional identities. +- Administrative panel for configuring main options. +- Integration with Facebook, Google, Twitter and Dropbox. +- Managing folders list. +- Configurable multi-level caching system. +- Extending functionality with plugins installed through admin panel. +- Perfect rendering of complex HTML mails. +- Drag'n'drop for mails and attachments. +- Keyboard shortcuts support. +- Autocompletion of e-mail addresses. diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..eb5138e --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,7 @@ +## Access to admin panel + +To access admin panel, use URL of the following kind: http://product_installation_URL/app/?admin + +For example: http://webmail.domain.com/app/?admin + +Default login is `admin`, the password is the one you chose during installation. \ No newline at end of file diff --git a/doc/screenshots/screenshot.png b/doc/screenshots/screenshot.png new file mode 100644 index 0000000..d7df2c6 Binary files /dev/null and b/doc/screenshots/screenshot.png differ diff --git a/scripts/backup b/scripts/backup index e5592ac..299fc32 100644 --- a/scripts/backup +++ b/scripts/backup @@ -69,6 +69,7 @@ ynh_backup --src_path="/etc/logrotate.d/$app" #================================================= # BACKUP THE MYSQL DATABASE #================================================= +ynh_print_info --message="Backing up the MySQL database..." ynh_mysql_dump_db --database="$db_name" > db.sql diff --git a/scripts/install b/scripts/install index b367332..b5059fc 100644 --- a/scripts/install +++ b/scripts/install @@ -58,6 +58,14 @@ ynh_script_progression --message="Installing dependencies..." --weight=1 ynh_install_app_dependencies $pkg_dependencies +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --weight=2 + +# Create a system user +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # STANDARD MODIFICATIONS #================================================= @@ -66,8 +74,9 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Creating a MySQL database..." --weight=2 db_name=$(ynh_sanitize_dbid --db_name=$app) +db_user=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name -ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name +ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -81,19 +90,11 @@ ynh_setup_source --dest_dir="$final_path/app" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring NGINX web server..." +ynh_script_progression --message="Configuring NGINX web server..." --weight=2 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=2 - -# Create a system user -ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -158,7 +159,7 @@ ynh_store_file_checksum --file="$application_file" #================================================= # SETUP LOGROTATE #================================================= -ynh_script_progression --message="Configuring log rotation..." +ynh_script_progression --message="Configuring log rotation..." --weight=1 mkdir -p $final_path/app/data/_data_/_default_/logs/fail2ban touch $final_path/app/data/_data_/_default_/logs/fail2ban/auth-fail.log @@ -187,7 +188,7 @@ ynh_add_fail2ban_config --logpath="$final_path/app/data/_data_/_default_/logs/fa #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring permissions..." +ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary or protect it if [ $is_public -eq 1 ] @@ -198,7 +199,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading NGINX web server..." +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/remove b/scripts/remove index 1bd247c..c721258 100644 --- a/scripts/remove +++ b/scripts/remove @@ -18,6 +18,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) db_name=$(ynh_app_setting_get --app=$app --key=db_name) +db_user=$db_name final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= @@ -28,7 +29,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) ynh_script_progression --message="Removing the MySQL database..." --weight=2 # Remove a database if it exists, along with the associated user -ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name +ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name #================================================= # REMOVE DEPENDENCIES diff --git a/scripts/restore b/scripts/restore index 3d29401..b4fb151 100644 --- a/scripts/restore +++ b/scripts/restore @@ -27,6 +27,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) +db_user=$db_name phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= @@ -44,6 +45,14 @@ test ! -d $final_path || ynh_die --message="There is already a directory: $final ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# RECREATE THE DEDICATED USER +#================================================= +ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 + +# Create the dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -51,34 +60,23 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$final_path" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # RESTORE THE MYSQL DATABASE #================================================= ynh_script_progression --message="Restoring the MySQL database..." --weight=2 db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$db_pwd -ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ./db.sql - -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=2 - -# Create the dedicated user (if not existing) -ynh_system_user_create --username=$app - -#================================================= -# RESTORE USER RIGHTS -#================================================= - -# Restore permissions on app files -chmod -R o-rwx $final_path -chown -R $app:www-data $final_path +ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd +ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= +ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" @@ -102,6 +100,7 @@ ynh_systemd_action --action=restart --service_name=fail2ban #================================================= # RESTORE THE LOGROTATE CONFIGURATION #================================================= +ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1 ynh_restore_file --origin_path="/etc/logrotate.d/$app" diff --git a/scripts/upgrade b/scripts/upgrade index b670943..caf3e4b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -28,6 +28,20 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up Rainloop before upgrading (may take a while)..." --weight=4 + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + # restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -49,7 +63,6 @@ fi if [ -z "$language" ]; then language="en" ynh_app_setting_set --app=$app --key=language --value=$language - ynh_app_setting_delete --app=$app --key=$lang fi case "$language" in @@ -73,18 +86,12 @@ if ynh_legacy_permissions_exists; then fi #================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +# CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Backing up Rainloop before upgrading (may take a while)..." --weight=4 +ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors +# Create a dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # STANDARD UPGRADE STEPS @@ -115,14 +122,6 @@ ynh_script_progression --message="Upgrading dependencies..." --weight=1 ynh_install_app_dependencies $pkg_dependencies -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." - -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #=================================================