diff --git a/DOC/schleuder3/install_schleuder3_debian_package.txt b/DOC/schleuder3/install_schleuder3_debian_package.txt index 47af4be..78b0ef6 100644 --- a/DOC/schleuder3/install_schleuder3_debian_package.txt +++ b/DOC/schleuder3/install_schleuder3_debian_package.txt @@ -166,7 +166,7 @@ fi cat << EOF > $virtual_schleuder_domains_file dbpath = /var/lib/schleuder/db.sqlite query = select distinct substr(email, instr(email, '@') + 1) from lists - where email like '%%%s' + where email like '%%@%s' EOF # - Add 'sqlite:$virtual_schleuder_domains_file' to virtual_mailbox_domains diff --git a/install_amavis.sh b/install_amavis.sh index 8ccd8de..826be0c 100755 --- a/install_amavis.sh +++ b/install_amavis.sh @@ -3855,13 +3855,13 @@ fi ## - localhost:10025 inet n - - - - smtpd ## - -o content_filter= ## - -o smtpd_proxy_filter= -## - -o smtpd_authorized_xforward_hosts=127.0.0.0/8 +## - -o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128 ## - -o smtpd_client_restrictions= ## - -o smtpd_helo_restrictions= ## - -o smtpd_sender_restrictions= ## - -o smtpd_recipient_restrictions=permit_mynetworks,reject ## - -o smtpd_data_restrictions= -## - -o mynetworks=127.0.0.0/8,<$_ipv4_address/32> +## - -o mynetworks=127.0.0.0/8,[::1]/128,<$_ipv4_address/32> ## - -o receive_override_options=no_unknown_recipient_checks ## - postfix_master_cf="/etc/postfix/master.cf" @@ -3917,15 +3917,15 @@ EOF localhost:10025 inet n - y - - smtpd -o content_filter= -o smtpd_proxy_filter= - -o smtpd_authorized_xforward_hosts=127.0.0.0/8 + -o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128 -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o smtpd_data_restrictions= - -o mynetworks=127.0.0.0/8 + -o mynetworks=127.0.0.0/8,[::1]/128 -o receive_override_options=no_unknown_recipient_checks - #-o mynetworks=127.0.0.0/8,${IPV4}/32 + #-o mynetworks=127.0.0.0/8,[::1]/128,${IPV4}/32 EOF fi @@ -3949,15 +3949,15 @@ EOF localhost:10025 inet n - y - - smtpd -o content_filter= -o smtpd_proxy_filter= - -o smtpd_authorized_xforward_hosts=127.0.0.0/8 + -o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128 -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o smtpd_data_restrictions= - -o mynetworks=127.0.0.0/8 + -o mynetworks=127.0.0.0/8,[::1]/128 -o receive_override_options=no_unknown_recipient_checks - #-o mynetworks=127.0.0.0/8,${IPV4}/32 + #-o mynetworks=127.0.0.0/8,[::1]/128,${IPV4}/32 EOF fi @@ -3992,15 +3992,15 @@ EOF localhost:10025 inet n - y - - smtpd -o content_filter= -o smtpd_proxy_filter= - -o smtpd_authorized_xforward_hosts=127.0.0.0/8 + -o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128 -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o smtpd_data_restrictions= - -o mynetworks=127.0.0.0/8 + -o mynetworks=127.0.0.0/8,[::1]/128 -o receive_override_options=no_unknown_recipient_checks - #-o mynetworks=127.0.0.0/8,${IPV4}/32 + #-o mynetworks=127.0.0.0/8,[::1]/128,${IPV4}/32 EOF fi @@ -4024,15 +4024,15 @@ EOF localhost:10025 inet n - y - - smtpd -o content_filter= -o smtpd_proxy_filter= - -o smtpd_authorized_xforward_hosts=127.0.0.0/8 + -o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128 -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o smtpd_data_restrictions= - -o mynetworks=127.0.0.0/8 + -o mynetworks=127.0.0.0/8,[::1]/128 -o receive_override_options=no_unknown_recipient_checks - #-o mynetworks=127.0.0.0/8,${IPV4}/32 + #-o mynetworks=127.0.0.0/8,[::1]/128,${IPV4}/32 EOF continue fi diff --git a/install_postfixadmin.sh b/install_postfixadmin.sh index f92071e..ee239ca 100755 --- a/install_postfixadmin.sh +++ b/install_postfixadmin.sh @@ -1859,10 +1859,20 @@ fi echo "" echononl "\tAdjust Postfix Admin's Configuration - Part 1" _failed=false +if [[ "$POSTFIX_DB_TYPE" = "pgsql" ]]; then + _config_db_type="pgsql" +else + # - database_type 'mysql' uses the deprecated mysql extension , and since PHP 7.0 this extension + # - is no longer available. + # - + # - So use 'mysqli' instead of 'mysql' + # - + _database_type="mysqli" +fi > $log_file perl -i -n -p -e "s#^(\s*\\\$CONF\['default_language'\]\s*=.*)#//!\1\n\\\$CONF['default_language'] = 'de';#" \ $pfa_conf_file >> $log_file 2>&1 || _failed=true -perl -i -n -p -e "s#^(\s*\\\$CONF\['database_type'\]\s*=.*)#//!\1\n\\\$CONF['database_type'] = '$POSTFIX_DB_TYPE';#" \ +perl -i -n -p -e "s#^(\s*\\\$CONF\['database_type'\]\s*=.*)#//!\1\n\\\$CONF['database_type'] = '$_database_type';#" \ $pfa_conf_file >> $log_file 2>&1 || _failed=true perl -i -n -p -e "s#^(\s*\\\$CONF\['database_host'\]\s*=.*)#//!\1\n\\\$CONF['database_host'] = 'localhost';#" \ $pfa_conf_file >> $log_file 2>&1 || _failed=true diff --git a/install_roundcube.sh b/install_roundcube.sh index 692db41..bbdf143 100755 --- a/install_roundcube.sh +++ b/install_roundcube.sh @@ -506,6 +506,15 @@ fi echo -e "\n\n\t\033[37m\033[1mInstall modules for PHP Version ${_version}..\033[m\n" if $PHP_DEBIAN_INSTALLATION ; then + echononl "\tUpdate protocols of channel \"pear.php.net\" .." + pear channel-update pear.php.net > $log_file 2>&1 + if [[ "$?" = "0" ]]; then + echo_ok + else + echo_failed + error "$(cat $log_file)" + fi + for _module in $needed_php_pear_modules ; do echononl "\tInstall Module '$_module'.." if ! pear list | grep -q "$_module" 2> /dev/null ; then @@ -534,7 +543,17 @@ if $PHP_DEBIAN_INSTALLATION ; then else for _version in $php_major_versions ; do + echononl "\tUpdate protocols of channel \"pear.php.net\" .." + pear channel-update pear.php.net > $log_file 2>&1 + if [[ "$?" = "0" ]]; then + echo_ok + else + echo_failed + error "$(cat $log_file)" + fi + for _module in $needed_php_pear_modules ; do + echononl "\tInstall Module '$_module'.." if ! /usr/local/php-${_version}/bin/pear list | grep -q "$_module" 2> /dev/null ; then /usr/local/php-${_version}/bin/pear install $_module > $log_file 2>&1 diff --git a/install_update_dovecot.sh b/install_update_dovecot.sh index e144489..74bc455 100755 --- a/install_update_dovecot.sh +++ b/install_update_dovecot.sh @@ -128,9 +128,63 @@ do echo -e "\n\t\033[33m\033[1mA version number is required!\033[m\n" fi done + + echo "" echo -e "\033[32m--\033[m" echo "" +echo "Is this a fresh new installation or an update?" +echo "" +echo "" +if [[ -n "$_update" ]]; then + if $_update || [[ "${_update,,}" = 'yes' ]] ; then + echo -e "\033[37m\033[1m[1] Update\033[m" + echo "[2] New Installation" + else + echo -e "[1] Update" + echo -e "\033[37m\033[1m[2] New Installation\033[m" + fi + echo "" + echononl "Choose a number or press for highlighted value: " +else + echo -e "[1] Update" + echo "[2] New Installation" + echo "" + echononl "Choose a Number: " +fi +update="" +while [[ "$update" != "true" && "$update" != "false" ]] ; do + read OPTION + case $OPTION in + 1) update=true + ;; + 2) update=false + ;; + '') if [[ -n "$_update" ]] ; then + if $_update || [[ "${_update,,}" = 'yes' ]] ; then + update=true + else + update=false + fi + else + echo "" + echo -e "\tWrong entry! [ 1 = Update ; 2 = New Installation ]" + echo "" + echononl "Reentry: " + fi + ;; + *) update="" + echo "" + if [[ -n "$_IS_RELAY_HOST" ]]; then + echo -e "\tWrong entry! [ 1 = Update ; 2 = New Installation ] or type " + else + echo -e "\tWrong entry! [ 1 = Update ; 2 = New Installation ]" + fi + echo "" + echononl "Reentry: " + ;; + esac +done @@ -143,8 +197,8 @@ echo "" clear; echo "" -if $_update ;then - echo -e "\tUpdate Dovecot................: $_update" +if $update ;then + echo -e "\tUpdate Dovecot................: $update" else echo -e "\tInstall Dovecot first time....: Yes" fi @@ -198,8 +252,10 @@ if $xmpp_listener ; then fi echo "" -if ! $_update ;then - warn "Take care, your PostgreSQL configuration (pg_hba.conf) contains the following line:\n\n\t pg_hba.conf:\n\t \033[1mlocal all postfix trust\033[m" +if ! $update ;then + if [[ "$database" = "psql" ]]; then + warn "Take care, your PostgreSQL configuration (pg_hba.conf) contains the following line:\n\n\t pg_hba.conf:\n\t \033[1mlocal all postfix trust\033[m" + fi fi echononl "Sind die Angaben richtig [ja/nein]: " @@ -221,7 +277,7 @@ done echo "" -if $_update ;then +if $update ;then _new=false; else _new=true; @@ -712,7 +768,7 @@ if $_new ; then echononl "\tCreate table expires in database ${dbname}.." cat << EOF | psql -U$dbuser $dbname > /dev/null 2>&1 -create table expires ( +CREATE TABLE IF NOT EXISTS expires ( username varchar(100) not null, mailbox varchar(255) not null, expire_stamp integer not null, @@ -724,7 +780,7 @@ EOF echo -e "$rc_done" else echo -e "$rc_failed" - fatal Creating table expires failed + error "Creating table expires failed" fi echononl "\tCreate function merge_expires() / trigger mergeexpires.." @@ -800,7 +856,7 @@ EOF echononl "\tCreate table expires in database ${dbname}.." cat << EOF | mysql -u$dbuser -p$dbpassword $dbname > /dev/null 2>&1 -create table expires ( +CREATE TABLE IF NOT EXISTS expires ( username varchar(100) not null, mailbox varchar(255) not null, expire_stamp integer not null, @@ -811,7 +867,7 @@ EOF echo -e "$rc_done" else echo -e "$rc_failed" - fatal Creating table expires failed + error "Creating table expires failed" fi fi fi @@ -2276,7 +2332,7 @@ if $_new ; then echononl "\tCreate table quota2 in database \"$dbname\".." cat << EOF | psql -U$dbuser $dbname > /dev/null 2>&1 -CREATE TABLE quota2 ( +CREATE TABLE IF NOT EXISTS quota2 ( username varchar(100) not null, bytes bigint not null default 0, messages integer not null default 0, @@ -2287,7 +2343,7 @@ EOF echo -e "$rc_done" else echo -e "$rc_failed" - fatal "Creating table quota2 in database \"$dbname\" failed" + error "Creating table quota2 in database \"$dbname\" failed" fi echononl "\tCreate Trigger mergequota2.." @@ -2344,7 +2400,7 @@ EOF elif [ "$db_driver" = "mysql" ]; then echononl "\tCreate table quota2 in database \"$dbname\".." cat << EOF | mysql -u$dbuser -p$dbpassword $dbname > /dev/null 2>&1 -CREATE TABLE quota2 ( +CREATE TABLE IF NOT EXISTS quota2 ( username varchar(100) not null, bytes bigint not null default 0, messages integer not null default 0, @@ -2355,7 +2411,7 @@ EOF echo -e "$rc_done" else echo -e "$rc_failed" - fatal "Creating table quota2 in database \"$dbname\" failed" + error "Creating table quota2 in database \"$dbname\" failed" fi fi @@ -2909,7 +2965,7 @@ if $_new ; then ## - echononl "\tCreate table user_share" cat << EOF | psql -U$dbuser $dbname > /dev/null 2>&1 -CREATE TABLE user_shares ( +CREATE TABLE IF NOT EXISTS user_shares ( from_user varchar(100) not null, to_user varchar(100) not null, dummy char(1) DEFAULT '1', -- always '1' currently @@ -2921,12 +2977,12 @@ EOF echo -e "$rc_done" else echo -e "$rc_failed" - fatal "Creating table user_shares failed" + error "Creating table user_shares failed" fi echononl "\tCreate table anyone_shares" cat << EOF | psql -U$dbuser $dbname > /dev/null 2>&1 -CREATE TABLE anyone_shares ( +CREATE TABLE IF NOT EXISTS anyone_shares ( from_user varchar(100) not null, dummy char(1) DEFAULT '1', -- always '1' currently primary key (from_user) @@ -2937,7 +2993,7 @@ EOF echo -e "$rc_done" else echo -e "$rc_failed" - fatal "Creating table anyone_shares failed" + error "Creating table anyone_shares failed" fi elif [ "$db_driver" = "mysql" ]; then @@ -2946,7 +3002,7 @@ EOF ## - echononl "\tCreate table user_share" cat << EOF | mysql -u$dbuser -p$dbpassword $dbname > /dev/null 2>&1 -CREATE TABLE user_shares ( +CREATE TABLE IF NOT EXISTS user_shares ( from_user varchar(100) not null, to_user varchar(100) not null, dummy char(1) DEFAULT '1', -- always '1' currently @@ -2957,12 +3013,12 @@ EOF echo -e "$rc_done" else echo -e "$rc_failed" - fatal "Creating table user_shares failed" + error "Creating table user_shares failed" fi echononl "\tCreate table anyone_shares" cat << EOF | mysql -u$dbuser -p$dbpassword $dbname > /dev/null 2>&1 -CREATE TABLE anyone_shares ( +CREATE TABLE IF NOT EXISTS anyone_shares ( from_user varchar(100) not null, dummy char(1) DEFAULT '1', -- always '1' currently primary key (from_user) @@ -2972,7 +3028,7 @@ EOF echo -e "$rc_done" else echo -e "$rc_failed" - fatal "Creating table anyone_shares failed" + error "Creating table anyone_shares failed" fi fi fi