Fixes for Quota

This commit is contained in:
earnolmartin 2019-04-08 19:57:47 -06:00
parent c91db0ca19
commit cde4cfac80
5 changed files with 17 additions and 0 deletions

View file

@ -2873,6 +2873,13 @@ function fixQuotaForEmailsPostfix3x(){
fi fi
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 cd $origDir
} }

View file

@ -59,6 +59,7 @@ smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom tls_random_source = dev:/dev/urandom
virtual_create_maildirsize = yes virtual_create_maildirsize = yes
virtual_mailbox_extended = 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_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota." virtual_maildir_limit_message = "The user you are trying to reach is over quota."

View file

@ -804,6 +804,7 @@ hosts = localhost";
passthru3("postconf -e 'virtual_create_maildirsize = yes'"); passthru3("postconf -e 'virtual_create_maildirsize = yes'");
passthru3("postconf -e 'virtual_mailbox_extended = 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_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf'");
passthru3("postconf -e 'virtual_mailbox_limit_override = yes'"); 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.\"'"); passthru3("postconf -e 'virtual_maildir_limit_message = \"The user you are trying to reach is over quota.\"'");

View file

@ -2604,6 +2604,13 @@ function fixQuotaForEmailsPostfix3x(){
fi fi
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 cd $origDir
} }

View file

@ -58,6 +58,7 @@ smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom tls_random_source = dev:/dev/urandom
virtual_create_maildirsize = yes virtual_create_maildirsize = yes
virtual_mailbox_extended = 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_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota." virtual_maildir_limit_message = "The user you are trying to reach is over quota."