> - 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 to be checking for over quota. It just sends every thing over to dovcot who knows that you want to be checking for over quota. One of the key=values postfix sends is size=<bytes> of the message size. Dovecot looks at this and ignores the rest of what postfix sent and returns a result. Now im guessing, maybe because you are using a testing tool, maybe it is not sending a message body in the email transmission, so postfix is correcting reporting that message has an email body of zero bytes (size=0). Dovecot must approve this because current maildir size + 0 != over limit. Maybe you are setup correctly and its just the testing tool that creates an edge case you wont experience in the wild. Like you said when sending a real email it gets rejected right?
Am 29.07.21 um 02:44 schrieb dovecot at 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 a message body in the email transmission, so postfix is > correcting reporting that message has an email body of zero bytes > (size=0).There is a little body reading "This is a test mailing".> Dovecot must approve this because current maildir size + 0 != > over limit. Maybe you are setup correctly and its just the testing tool > that creates an edge case you wont experience in the wild.That may totally be an edge case. But even then over-quota + 0 = still-over-quota> Like you said when sending a real email it gets rejected right?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. Thanks for your thoughts. ?Christoph
On 2021-07-29 02:44, dovecot at 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 then must send whole email first, and that require more bandwidth for all parties to do this, so it just checking dovecot quotas to find if there is room for one more email in a giving quotas, if its still room for more mails i send msg to postfix accept it, but when its not more quotas in dovecot result is changed to reject, postfix does not still know how much quotas is in dovecot hopefully the above make sense then quotas should imho just be disabled for sasl users, that is missing as an option on dovecot quota services and since dovecot does not know postfix virtual aliases is would make sense dovecot also support postfix virtual aliases in dovecot quota service, or postfix have to map alias before sending to lmtp server on dovecot