Problem solved whith the patch you have suggested and some other adjustments.
System ubuntu 18.04 default postfix 3.3.0
1 - updated postfix to 3.3.2 (but I think it work also on 3.3.0) here source:
https://packages.ubuntu.com/disco/amd64/postfix/download2 - patched using this commands:
- aptitude build-dep postfix
- cd /usr/src
- apt-get source postfix
- wget
https://sourceforge.net/p/vda/bugs/2/attachment/vda_3.3.patch- cd postfix-3.3.2
- patch -p0 < ../vda_3.3.patch
- dpkg-buildpackage ( if return any errors add "-b" at the end)
3 - re-installed postfix and postfix-mysql packages:
- cd ..
- dpkg -i postfix_3.3.2-4_amd64.deb postfix-mysql_3.3.2-4_amd64.deb
4 - postfix adjustments:
- in main.cf changed "virtual_mailbox_extended = yes" to "virtual_maildir_extended = yes"
- changed /etc/postfix/mysql-virtual_mailbox_limit_maps.cf :
user = ehcp
password = yourpassword
dbname = ehcp
query = SELECT quota*1048576 FROM emailusers WHERE email='%s'
hosts = 127.0.0.1
Now it seems email where bounced when reach quota limit.
here
http://www.maxiozzia.it/src.rar you can download .deb files used and I suggest to add possibility to set via control panel the maximum quota that the user can assign for each new email account
Best regards
Max