This is usefull for mailbox quotas. I almost consider it mandatory for a prodution system running multiple domains with MySQL. Reproducible: Always Steps to Reproduce:
Does this patch work with the other patches currently being applied to postfix. Primarily, TLS, IPV6, and postgresql (and any combinations thereof)? Aside from this, I seriosly don't like the idea of the MTA enforcing quotas. Just a personal opinion.
Well i tryed the patch with postfix-2.0.16 and all works great. Can't really say if it works with IPV6 and postgresql cuz i'm not using it. For two months now i'm running the patch on my server and the quotas are enforced and with my custom message :) Anyway i as conviced that this was the only way to enforce quotas on virtual users.
Quotas depend entirely on the backend. For example, cyrus maintains quotas internally and doesn't require the MTA to deal with any of it. The cyrus lmtp server returns a regular protocol error (either 4xx for a temporary error or 5xx for permanent error). This way postfix can spend it's time routing mail instead of calculating usage and whatnot. This setup also allows you to separate the mta and backend to separate machines for load distribution and security. As you can imagine, this is what I use for mail services. Right now I have about 40 domains and roughly 2000 virtual users spread among them. In any case as long as this patch behaves well with the other stuff we have in postfix, I certainly don't mind including it. Would you mind testing it with various combinations of the current USE flags to make sure it works? Feel free to post a patch for the current ebuild. That'll speed things up.
I added in the postfix-2.0.16.ebuild this: if [ "`use postgres`" ] ; then epatch "${DISTDIR}/${PGSQL_P}.patch" fi if [ "`use mysql`" ] ; then # Postfix patch for quotas epatch "${FILESDIR}/postfix-2.0.16.patch" fi # Postfix does not get the FQDN if no hostname is configured. epatch "${FILESDIR}/${PN}-2.0.9-get-FQDN.patch" and all compiled well, if this is correct the patch will be applied only wen we choose mysql support on the USE flags. I can say it works well with the FQDN.patch but i dont have a spare machine to test if the posgres patch works well thought. You have a point on the performance of the MTA, i only have 50 users in 3 domains all works fast and great, but i dont know how it would behave with 2000 or more :| If it helps, some ISP's are using the same patch, that o know some on Brazil for instance.
Created attachment 27259 [details, diff] Modify ebuild to support postfix VDA patch (http://web.onda.com.br/nadal/) I, too, would like official Gentoo support for the VDA patch. To that end, here's a trivial patch to net-mail/postfix/postfix-2.0.18.ebuild that accomplishes that. I'm hoping that 2.0.18 is on the verge of going stable on x86. If not, the patch is ridiculously trivial and could easily be massaged and applied to postfix-2.0.16.ebuild, instead. In any case, PUHLEEZ support it. :D
Oops...forgot to mention that I assumed the use of a new local USE flag ("vda") to make the whole thing optional. This would, of course, also need to be added to /usr/portage/profile/use.local.desc. The previously suggested solution of only applying the VDA patch when mysql is in USE is ill-advised: the VDA patch can be used regardless of table backends. There is no correlation, and should be its own separate option, as I've done.
Another comment: Regarding your reservations about putting quota enforcement in an MTA: Keep in mind that the Postfix distribution is not purely an MTA (although it certainly can be configured as such). It comes with several MDAs built into it, one of which is the virtual delivery agent. It is not alone in this regard, every MTA I can think of off the top of my head includes at least one MDA (usually a simple mbox local delivery agent). The VDA patch is a patch to one MDA portion of Postfix, not a patch to an MTA. The MTA functions are unaffected by it.
I'll try to ingetrate this as part of postfix-2.0.19-r1. Any chance you can test it with combinations of various other USE flags? (postgresql, ipv6, ssl, etc). Thanks.
ok...it's in portage. please test.