From cde4cfac8011823f1e42727f70c5d18e571d2409 Mon Sep 17 00:00:00 2001 From: earnolmartin Date: Mon, 8 Apr 2019 19:57:47 -0600 Subject: [PATCH] Fixes for Quota --- ehcp/ehcpforceupdate.sh | 7 +++++++ ehcp/etc/postfix/main.cf.sample | 1 + ehcp/install_lib.php | 1 + ehcp/install_main.sh | 7 +++++++ ehcp/main.cf.sample | 1 + 5 files changed, 17 insertions(+) diff --git a/ehcp/ehcpforceupdate.sh b/ehcp/ehcpforceupdate.sh index b3bda8d..838634c 100755 --- a/ehcp/ehcpforceupdate.sh +++ b/ehcp/ehcpforceupdate.sh @@ -2873,6 +2873,13 @@ function fixQuotaForEmailsPostfix3x(){ fi fi + # Make sure main.cf has virtual_mailbox_extended + PostfixMainConf="/etc/postfix/main.cf" + hasVMExtended=$(cat "$PostfixMainConf" | grep -o "virtual_maildir_extended") + if [ -z "$hasVMExtended" ]; then + echo -e "virtual_maildir_extended = yes" >> "$PostfixMainConf" + fi + cd $origDir } diff --git a/ehcp/etc/postfix/main.cf.sample b/ehcp/etc/postfix/main.cf.sample index 009d65a..e2087cb 100755 --- a/ehcp/etc/postfix/main.cf.sample +++ b/ehcp/etc/postfix/main.cf.sample @@ -59,6 +59,7 @@ smtpd_tls_session_cache_timeout = 3600s tls_random_source = dev:/dev/urandom virtual_create_maildirsize = yes virtual_mailbox_extended = yes +virtual_maildir_extended = yes virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf virtual_mailbox_limit_override = yes virtual_maildir_limit_message = "The user you are trying to reach is over quota." diff --git a/ehcp/install_lib.php b/ehcp/install_lib.php index bd3bc90..33f1af0 100755 --- a/ehcp/install_lib.php +++ b/ehcp/install_lib.php @@ -804,6 +804,7 @@ hosts = localhost"; passthru3("postconf -e 'virtual_create_maildirsize = yes'"); passthru3("postconf -e 'virtual_mailbox_extended = yes'"); + passthru3("postconf -e 'virtual_maildir_extended = yes'"); passthru3("postconf -e 'virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf'"); passthru3("postconf -e 'virtual_mailbox_limit_override = yes'"); passthru3("postconf -e 'virtual_maildir_limit_message = \"The user you are trying to reach is over quota.\"'"); diff --git a/ehcp/install_main.sh b/ehcp/install_main.sh index f59d063..a35b9c4 100755 --- a/ehcp/install_main.sh +++ b/ehcp/install_main.sh @@ -2604,6 +2604,13 @@ function fixQuotaForEmailsPostfix3x(){ fi fi + # Make sure main.cf has virtual_mailbox_extended + PostfixMainConf="/etc/postfix/main.cf" + hasVMExtended=$(cat "$PostfixMainConf" | grep -o "virtual_maildir_extended") + if [ -z "$hasVMExtended" ]; then + echo -e "virtual_maildir_extended = yes" >> "$PostfixMainConf" + fi + cd $origDir } diff --git a/ehcp/main.cf.sample b/ehcp/main.cf.sample index 6a87f91..444bbee 100755 --- a/ehcp/main.cf.sample +++ b/ehcp/main.cf.sample @@ -58,6 +58,7 @@ smtpd_tls_session_cache_timeout = 3600s tls_random_source = dev:/dev/urandom virtual_create_maildirsize = yes virtual_mailbox_extended = yes +virtual_maildir_extended = yes virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf virtual_mailbox_limit_override = yes virtual_maildir_limit_message = "The user you are trying to reach is over quota."