Re: quota-status fails when size=0 from Postfix

2021-07-29 Thread Benny Pedersen
On 2021-07-29 21:34, Christoph Haas wrote: Noel: The only solution is to reject all mail for an over-quota recipient during recipient restrictions, and if the mail passes that stage, deliver it anyway even if it makes the user go over quota. Seconded. Is that possible with the current

Re: quota-status fails when size=0 from Postfix

2021-07-29 Thread Christoph Haas
Am 29.07.21 um 22:08 schrieb Benny Pedersen: On 2021-07-29 20:13, Christoph Haas wrote: I really wouldn't want to script my own policy daemon just to avoid backscatter. :( why not ? :=) I'm considering it. But I still hope that I'm doing something wrong or that Dovecot's plugin can be

Re: quota-status fails when size=0 from Postfix

2021-07-29 Thread Benny Pedersen
On 2021-07-29 20:13, Christoph Haas wrote: I really wouldn't want to script my own policy daemon just to avoid backscatter. :( why not ? :=) quota grace is ideal with same size as max mailsize in postfix, with is 10MB as standard, the quota grace ensure one mail is possible to be sent if

Re: quota-status fails when size=0 from Postfix

2021-07-29 Thread Noel
On 7/29/2021 2:44 PM, dove...@ptld.com wrote: The only solution is to reject all mail for an over-quota recipient during recipient restrictions, and if the mail passes that stage, deliver it anyway even if it makes the user go over quota. But does this happen out of the box? Wont dovecot end

Re: quota-status fails when size=0 from Postfix

2021-07-29 Thread dovecot
The only solution is to reject all mail for an over-quota recipient during recipient restrictions, and if the mail passes that stage, deliver it anyway even if it makes the user go over quota. But does this happen out of the box? Wont dovecot end up back splatter bouncing one of the recipients

Re: quota-status fails when size=0 from Postfix

2021-07-29 Thread Christoph Haas
Noel: The only solution is to reject all mail for an over-quota recipient during recipient restrictions, and if the mail passes that stage, deliver it anyway even if it makes the user go over quota. Seconded. Is that possible with the current quota-status? …Christoph

Re: quota-status fails when size=0 from Postfix

2021-07-29 Thread Noel
On 7/29/2021 2:15 PM, dove...@ptld.com wrote: Plus Dovecot complains that the policy service is only supposed to be used in the RCPT stage. So clearly this is a bad approach. I want to explore this more. I tried it and also see: dovecot[1096]: quota-status(26164): Warning: Received policy

Re: quota-status fails when size=0 from Postfix

2021-07-29 Thread dovecot
Plus Dovecot complains that the policy service is only supposed to be used in the RCPT stage. So clearly this is a bad approach. I want to explore this more. I tried it and also see: dovecot[1096]: quota-status(26164): Warning: Received policy query from MTA in unexpected state END-OF-MESSAGE

Re: quota-status fails when size=0 from Postfix

2021-07-29 Thread Christoph Haas
>> At least from Thunderbird, yes. But SIZE=… does not seem to be a >> mandatory addition to the RCPT-TO line. Perhaps other mail clients do >> not use SIZE either. Just guessting. Correct. It's optional and can't be trusted anyway. > http://www.postfix.org/SMTPD_POLICY_README.html > The

Re: quota-status fails when size=0 from Postfix

2021-07-29 Thread dovecot
and since dovecot does not know postfix virtual aliases is would make sense dovecot also support postfix virtual aliases in dovecot quota service Why not? You can create a query telling dovecot to lookup the quota of the mailbox the alias points to. Ofcourse your tables wont look like mine

Re: quota-status fails when size=0 from Postfix

2021-07-29 Thread Benny Pedersen
On 2021-07-29 02:44, dove...@ptld.com wrote: Like you said when sending a real email it gets rejected right? postfix can only check results from dovecot, not dictate that new mails size is a real iso or other content, mta stage cant be made to hand over size in policy server since email

Re: quota-status fails when size=0 from Postfix

2021-07-29 Thread dovecot
At least from Thunderbird, yes. But SIZE=… does not seem to be a mandatory addition to the RCPT-TO line. Perhaps other mail clients do not use SIZE either. Just guessting. http://www.postfix.org/SMTPD_POLICY_README.html The "size" attribute value specifies the message size that the client

Re: quota-status fails when size=0 from Postfix

2021-07-29 Thread Christoph Haas
Am 29.07.21 um 02:44 schrieb dove...@ptld.com: - sending a test mail with SWAKS returns DUNNO   (swaks is an SMTP test tool) the difference appears to be the "size=0" line that Postfix sends if I use SWAKS. Now im guessing, maybe because you are using a testing tool, maybe it is not sending

Re: quota-status fails when size=0 from Postfix

2021-07-28 Thread dovecot
- sending a test mail with SWAKS returns DUNNO (swaks is an SMTP test tool) the difference appears to be the "size=0" line that Postfix sends if I use SWAKS. The postfix policy server sends over a bunch of key=values when it runs. It has no idea why its running, it doesn't know you want it

quota-status fails when size=0 from Postfix

2021-07-28 Thread Christoph Haas
Dear list, I've been pulling my hair out today and kindly ask you for help. I'm on Debian Bullseye with Dovecot 2.3.13 and Postfix 3.5.6. Users are stored in SQL and I want to use quotas. Basically I followed https://doc.dovecot.org/configuration_manual/quota_plugin/#quota-service With