Browse Source

Fixed Amavis MySQL issue

old-stable
gau1991 10 years ago
parent
commit
f4bfda12a8
  1. 16
      bin/easyengine
  2. 7
      src/modules/stack/install/mail/ee_mod_setup_sieve.sh
  3. 5
      src/vendor/ee_ven_setup_vimbadmin.sh

16
bin/easyengine

@ -167,21 +167,21 @@ elif [ "$EE_FIRST" = "stack" ] || [ "$EE_FIRST" = "system" ]; then
# Configure Dovecot
ee_mod_setup_dovecot
# Setup ViMbAdmin
ee_ven_setup_vimbadmin
# Setup Roundcube
ee_ven_setup_roundcube
# Setup Amavis
ee_mod_setup_mailscan
# Setup Sieve
ee_mod_setup_sieve
ee_lib_service nginx postfix dovecot restart
# Setup ViMbAdmin
ee_ven_setup_vimbadmin
# Setup Roundcube
ee_ven_setup_roundcube
ee_lib_service nginx postfix dovecot amavis restart
ee_lib_git /etc/nginx/ /etc/dovecot /etc/php5/ /etc/mysql/ /etc/postfix "Initialize Git"
ee_lib_git /etc/nginx/ /etc/dovecot /etc/php5/ /etc/mysql/ /etc/postfix /etc/amavis "Initialize Git"
ee_lib_echo "Successfully installed mail server"

7
src/modules/stack/install/mail/ee_mod_setup_sieve.sh

@ -2,10 +2,15 @@
function ee_mod_setup_sieve()
{
EE_EMAIL=$($EE_CONFIG_GET wordpress.email)
if [[ $EE_EMAIL = "" ]]; then
EE_EMAIL=$(git config user.email)
fi
ee_lib_echo "Setting up Sieve, please wait..."
# Enable sieve plugin support for dovecot-lmtp
sed -i "s' #mail_plugins = \$mail_plugins' postmaster_address = admin@example.com\n mail_plugins = \$mail_plugins sieve'" /etc/dovecot/conf.d/20-lmtp.conf \
sed -i "s' #mail_plugins = \$mail_plugins' postmaster_address =$EE_EMAIL \n mail_plugins = \$mail_plugins sieve'" /etc/dovecot/conf.d/20-lmtp.conf \
|| ee_lib_error "Unable to add sieve plugin support for dovecot-lmtp, exit status = " $?
# Sieve dovecot-pluign configuration

5
src/vendor/ee_ven_setup_vimbadmin.sh

@ -46,6 +46,11 @@ function ee_ven_setup_vimbadmin()
sed -i "s/hosts=localhost/hosts=$EE_MYSQL_HOST/" /etc/dovecot/dovecot-sql.conf.ext \
|| ee_lib_error "Unable to setup ViMbAdmin database details in dovecot-sql.conf.ext file, exit status = " $?
# Changing hosts and password of ViMbAdmin database in Amavis configuration
sed -s "s/127.0.0.1/$EE_MYSQL_HOST/" /etc/amavis/conf.d/50-user &&
sed -s "s/password/$ee_random/" /etc/amavis/conf.d/50-user \
|| ee_lib_error "Unable to setup ViMbAdmin database details in 50-user file, exit status = " $?
# Copying HTACCESS
cp -av /var/www/22222/htdocs/vimbadmin/public/.htaccess.dist /var/www/22222/htdocs/vimbadmin/public/.htaccess &>> $EE_COMMAND_LOG

Loading…
Cancel
Save