1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/z-push_ynh.git synced 2024-09-03 18:05:58 +02:00

Fix IMAP configuration

This commit is contained in:
Yalh 2019-01-27 00:53:25 +01:00
parent d72826b5ed
commit 5da783402e

View file

@ -261,7 +261,7 @@ if sudo yunohost app list --installed -f baikal | grep -q id ; then
#sed -i "s@DOMAINTOCHANGE@$domain@g" /etc/z-push/imap.conf.php #sed -i "s@DOMAINTOCHANGE@$domain@g" /etc/z-push/imap.conf.php
ynh_replace_string "//$imap_smtp_params = array('host' => 'ssl://localhost', 'port' => 465, 'auth' => true, 'username' => 'imap_username', 'password' => 'imap_password');" "$imap_smtp_params = array('host' => 'tcp://$baikaldomain', 'port' => 587, 'auth' => true, 'username' => 'imap_username', 'password' => 'imap_password', 'localhost' => '$baikaldomain', 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true);" /etc/z-push/imap.conf.php ynh_replace_string "//$imap_smtp_params = array('host' => 'ssl://localhost', 'port' => 465, 'auth' => true, 'username' => 'imap_username', 'password' => 'imap_password');" "$imap_smtp_params = array('host' => 'tcp://$baikaldomain', 'port' => 587, 'auth' => true, 'username' => 'imap_username', 'password' => 'imap_password', 'localhost' => '$baikaldomain', 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true);" /etc/z-push/imap.conf.php
#sed -i "s@FLAGTOCHANGE@true@g" /etc/z-push/imap.conf.php #sed -i "s@FLAGTOCHANGE@true@g" /etc/z-push/imap.conf.php
ynh_replace_string"define('IMAP_MEETING_USE_CALDAV', false);" "define('IMAP_MEETING_USE_CALDAV', true);" /etc/z-push/imap.conf.php ynh_replace_string "define('IMAP_MEETING_USE_CALDAV', false);" "define('IMAP_MEETING_USE_CALDAV', true);" /etc/z-push/imap.conf.php
else else
# Configuration of backend # Configuration of backend
@ -270,8 +270,13 @@ else
# Copy config # Copy config
#sed -i "s@DOMAINTOCHANGE@$domain@g" /etc/z-push/imap.conf.php #sed -i "s@DOMAINTOCHANGE@$domain@g" /etc/z-push/imap.conf.php
ynh_replace_string "define('IMAP_PORT', 143);" "define('IMAP_PORT', 993);" /etc/z-push/imap.conf.php
ynh_replace_string "define('IMAP_OPTIONS', '/notls/norsh');" "define('IMAP_OPTIONS', '/ssl/novalidate-cert');" /etc/z-push/imap.conf.php
ynh_replace_string "define('IMAP_FOLDER_CONFIGURED', false);" "define('IMAP_FOLDER_CONFIGURED', true);" /etc/z-push/imap.conf.php
ynh_replace_string "define('IMAP_SMTP_METHOD', 'mail');" "define('IMAP_SMTP_METHOD', 'smtp');" /etc/z-push/imap.conf.php
ynh_replace_string "//\$imap_smtp_params = array('host' => 'ssl://localhost', 'port' => 465, 'auth' => true, 'username' => 'imap_username', 'password' => 'imap_password');" "\$imap_smtp_params = array('host' => 'tcp://$domain', 'port' => 587, 'auth' => true, 'username' => 'imap_username', 'password' => 'imap_password', 'localhost' => '$domain', 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true);" /etc/z-push/imap.conf.php ynh_replace_string "//\$imap_smtp_params = array('host' => 'ssl://localhost', 'port' => 465, 'auth' => true, 'username' => 'imap_username', 'password' => 'imap_password');" "\$imap_smtp_params = array('host' => 'tcp://$domain', 'port' => 587, 'auth' => true, 'username' => 'imap_username', 'password' => 'imap_password', 'localhost' => '$domain', 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true);" /etc/z-push/imap.conf.php
fi fi
#================================================= #=================================================
@ -297,6 +302,8 @@ ynh_store_file_checksum "/etc/z-push/z-push.conf.php"
# Set permissions to app files # Set permissions to app files
#chown -R www-data: $final_path #chown -R www-data: $final_path
chown -R www-data: "/var/log/z-push"
chown -R www-data: "/var/lib/z-push/"
#================================================= #=================================================
# SETUP LOGROTATE # SETUP LOGROTATE