Axel Luttgens <AxelLuttgens at swing.be> wrote: Hi Axel,> Le 11 f?vr. 2014 ? 08:34, Bernhard Schmidt a ?crit : > >> [...] >> so Dovecot should reject in RCPT TO phase, but according to the logs of the >> upstream Postfix it does so after END-OF-DATA >> >> (host xxx[2001:xxx] said: 452 4.2.2 >> <user at domain.de> Quota exceeded (mailbox for user is >> full) (in reply to end of DATA command)) >> [...] > > Hello Bernhard, > > Could you exercise your quota-status service with variations of: > > # telnet xxx 12340 > Trying xxx... > Connected to xxx. > Escape character is '^]'. > recipient=john.doe at example.com > size=1000000 > > action=OK > > ^] > > and see whether the replies are the expected one? > > If yes, this would point to some error in Postfix' configuration. > > If not, well... could be you are facing the same kind of problem I'm > having here (never managed to have the service reply anything else > than "OK" or "REJECT Unknown user"...)quota-status works absolutely fine, our frontend MXes defer mails for mailboxes over quota. But when we try to send a mail to the mailbox nevertheless through LMTP (i.e. because it was generated on a server that doesn't check quota-status), it is deferred in LMTP in the END-OF-DATA phase, not in RCPT TO as expected. Bernhard
Bernhard Schmidt
2015-Jan-29 12:53 UTC
quota_full_tempfail = yes broken with lmtp_rcpt_check_quota (was: Re: lmtp_rcpt_check_quota not working)
Bernhard Schmidt <berni at birkenwald.de> wrote: Hi,> Axel Luttgens <AxelLuttgens at swing.be> wrote: > > Hi Axel, > >> Le 11 f?vr. 2014 ? 08:34, Bernhard Schmidt a ?crit : >> >>> [...] >>> so Dovecot should reject in RCPT TO phase, but according to the logs of the >>> upstream Postfix it does so after END-OF-DATA >>> >>> (host xxx[2001:xxx] said: 452 4.2.2 >>> <user at domain.de> Quota exceeded (mailbox for user is >>> full) (in reply to end of DATA command)) >>> [...] >> >> Hello Bernhard, >> >> Could you exercise your quota-status service with variations of: >> >> # telnet xxx 12340 >> Trying xxx... >> Connected to xxx. >> Escape character is '^]'. >> recipient=john.doe at example.com >> size=1000000 >> >> action=OK >> >> ^] >> >> and see whether the replies are the expected one? >> >> If yes, this would point to some error in Postfix' configuration. >> >> If not, well... could be you are facing the same kind of problem I'm >> having here (never managed to have the service reply anything else >> than "OK" or "REJECT Unknown user"...) > > quota-status works absolutely fine, our frontend MXes defer mails for > mailboxes over quota. But when we try to send a mail to the mailbox > nevertheless through LMTP (i.e. because it was generated on a server > that doesn't check quota-status), it is deferred in LMTP in the > END-OF-DATA phase, not in RCPT TO as expected.To follow up here: Dovecot 2.2.13 (from Debian testing compiled on wheezy) is still showing the same behaviour as 2.2.9. lmtp_rcpt_check_quota is apparently ignored, the over-quota defer happens after the DATA phase. # 2.2.13: /etc/dovecot/dovecot.conf # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.8 [...] lmtp_rcpt_check_quota = yes quota_full_tempfail = yes protocol lmtp { mail_plugins = quota sieve } -> MAIL FROM:<sender at domain.de> <- 250 2.1.0 OK -> RCPT TO:<recipient at domain.de> <- 250 2.1.5 OK -> DATA <- 354 OK -> Date: Thu, 29 Jan 2015 13:35:51 +0100 -> To: recipient at domain.de -> From: sender at domain.de -> Subject: test Thu, 29 Jan 2015 13:35:51 +0100 -> X-Mailer: swaks v20120320.0 jetmore.org/john/code/swaks/ -> -> This is a test mailing -> -> . <** 452 4.2.2 <recipient at domain.de> Quota exceeded (mailbox for user is full) With 2.2.15 from dovecot-ee it is different. The quota is now checked at RCPT stage # 2.2.15.8 (912dd04d7a14+): /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.6 (4b9b9a88ac9b) # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.8 -> MAIL FROM:<sender at domain.de> <- 250 2.1.0 OK -> RCPT TO:<recipient at domain.de> <** 552 5.2.2 <recipient at domain.de> Quota exceeded (mailbox for user is full) But as you can see, the setting for quota_full_tempfail is now ignored. It should be deferring the message, not rejecting it. When I disable lmtp_rcpt_check_quota it behaves like 2.2.13. Summary: - In 2.2.9 and 2.2.13 lmtp_rcpt_check_quota is ignored - In 2.2.15 lmtp_rcpt_check_quota works, but quota_full_tempfail is ignored at the RCPT TO stage. It still works at the DATA stage, so disabling lmtp_rcpt_check_quota is a workaround falling back to 2.2.13 behaviour Bernhard