diff --git a/bin/v-change-mail-account-password b/bin/v-change-mail-account-password index 28c8809b1..5c01ffbd8 100755 --- a/bin/v-change-mail-account-password +++ b/bin/v-change-mail-account-password @@ -52,8 +52,11 @@ salt=$(generate_password "$PW_MATRIX" "8") md5="{MD5}$($BIN/v-generate-password-hash md5 $salt <<<$password)" if [[ "$MAIL_SYSTEM" =~ exim ]]; then + quota=$(grep $account $VESTA/data/users/${user}/mail/${domain}.conf) + quota=$(echo $quota | awk '{ print $7 }' | sed -e "s/'//g" ) + quota=$(echo $quota | cut -d "=" -f 2 | sed -e "s/unlimited/0/g") sed -i "/^$account:/d" $HOMEDIR/$user/conf/mail/$domain/passwd - str="$account:$md5:$user:mail::$HOMEDIR/$user:$quota" + str="$account:$md5:$user:mail::$HOMEDIR/$user:${quota}M" echo $str >> $HOMEDIR/$user/conf/mail/$domain/passwd fi diff --git a/bin/v-change-sys-service-config b/bin/v-change-sys-service-config index 0500ecb96..f90326b72 100755 --- a/bin/v-change-sys-service-config +++ b/bin/v-change-sys-service-config @@ -63,6 +63,7 @@ case $service in spamd) dst=$($BIN/v-list-sys-spamd-config plain);; spamassassin) dst=$($BIN/v-list-sys-spamd-config plain);; clamd) dst=$($BIN/v-list-sys-clamd-config plain);; + clamd.scan) dst=$($BIN/v-list-sys-clamd-config plain);; cron) dst='/etc/crontab';; crond) dst='/etc/crontab';; fail2ban) dst='/etc/fail2ban/jail.local';; diff --git a/bin/v-restore-user b/bin/v-restore-user index 3982d11d6..c766f06be 100755 --- a/bin/v-restore-user +++ b/bin/v-restore-user @@ -56,6 +56,7 @@ ftpc() { quote USER $USERNAME quote PASS $PASSWORD binary + lcd $BACKUP $1 $2 $3 diff --git a/install/vst-install-amazon.sh b/install/vst-install-amazon.sh index dcd345196..9efdc29ad 100644 --- a/install/vst-install-amazon.sh +++ b/install/vst-install-amazon.sh @@ -23,7 +23,7 @@ software="nginx httpd mod_ssl mod_ruid2 mod_fcgid mod_extract_forwarded php php-common php-cli php-bcmath php-gd php-imap php-mbstring php-mcrypt php-mysql php-pdo php-soap php-tidy php-xml php-xmlrpc php-fpm php-pgsql awstats webalizer vsftpd proftpd bind bind-utils bind-libs exim dovecot - clamd spamassassin mysql mysql-server phpMyAdmin postgresql + clamd clamav-update spamassassin mysql mysql-server phpMyAdmin postgresql postgresql-server postgresql-contrib phpPgAdmin e2fsprogs openssh-clients ImageMagick curl mc screen ftp zip unzip flex sqlite pcre sudo bc jwhois mailx lsof tar telnet rrdtool net-tools ntp GeoIP freetype fail2ban @@ -530,7 +530,7 @@ service exim stop > /dev/null 2>&1 cp -r /etc/exim/* $vst_backups/exim >/dev/null 2>&1 # Backup ClamAV configuration -service clamd stop > /dev/null 2>&1 +service clamd.scan stop > /dev/null 2>&1 cp /etc/clamd.conf $vst_backups/clamd >/dev/null 2>&1 cp -r /etc/clamd.d $vst_backups/clamd >/dev/null 2>&1 @@ -648,7 +648,6 @@ if [ "$exim" != 'no' ]; then check_result $? "yum install failed" fi - #----------------------------------------------------------# # Configure system # #----------------------------------------------------------# @@ -790,7 +789,7 @@ fi if [ "$exim" = 'yes' ]; then echo "MAIL_SYSTEM='exim'" >> $VESTA/conf/vesta.conf if [ "$clamd" = 'yes' ]; then - echo "ANTIVIRUS_SYSTEM='clamav'" >> $VESTA/conf/vesta.conf + echo "ANTIVIRUS_SYSTEM='clamd.scan'" >> $VESTA/conf/vesta.conf fi if [ "$spamd" = 'yes' ]; then echo "ANTISPAM_SYSTEM='spamassassin'" >> $VESTA/conf/vesta.conf @@ -1147,10 +1146,12 @@ if [ "$clamd" = 'yes' ]; then useradd clam -s /sbin/nologin -d /var/lib/clamav 2>/dev/null gpasswd -a clam exim gpasswd -a clam mail - cp -f $vestacp/clamav/clamd.conf /etc/ + cp -r /etc/clamd.d $vst_backups/clamd >/dev/null 2>&1 + cp -f $vestacp/clamav/clamd.conf /etc/clamd.conf + ln -sf /etc/clamd.conf /etc/clamd.d/scan.conf cp -f $vestacp/clamav/freshclam.conf /etc/ - mkdir -p /var/log/clamav /var/run/clamav - chown clam:clam /var/log/clamav /var/run/clamav + mkdir -p /var/log/clamav /var/run/clamav /var/run/clamd.scan + chown clam:clam /var/log/clamav /var/run/clamav /var/run/clamd.scan chown -R clam:clam /var/lib/clamav if [ "$release" -ge '7' ]; then cp -f $vestacp/clamav/clamd.service /usr/lib/systemd/system/ @@ -1161,8 +1162,8 @@ if [ "$clamd" = 'yes' ]; then sed -i "s/nofork/foreground/" /usr/lib/systemd/system/clamd.service systemctl daemon-reload fi - chkconfig clamd on - service clamd start + chkconfig clamd.scan on + service clamd.scan start #check_result $? "clamd start failed" fi diff --git a/web/edit/server/clamd.scan/index.php b/web/edit/server/clamd.scan/index.php new file mode 100644 index 000000000..06be0bfa1 --- /dev/null +++ b/web/edit/server/clamd.scan/index.php @@ -0,0 +1,46 @@ +