Quota policy service not rejecting messages when user over quota

James Lott james at lottspot.com
Fri Jul 17 06:22:08 UTC 2015


This issue was another silly oversight on my part. It turns out I had 
neglected to include 'quota' in my mail_plugins directive. For shame.

On Thursday, July 16, 2015 18:42:50 james at lottspot.com wrote:
> For some very odd reason, the quota-status service is failing to enforce
> quotas. Every other aspect of my configuration is working with
> absolutely no problems. When I attempt delivery via LTMP, the message
> is, as expected, rejected due to the user's inbox being full.
> 
> root at smtp:/usr/local/etc/mail-config # nc -U
> /var/spool/postfix/private/dovecot-lmtp
> < 220 mx0.lottspot.com Dovecot ready.
> 
> > LHLO localhost
> 
> < 250-mx0.lottspot.com
> < 250-8BITMIME
> < 250-ENHANCEDSTATUSCODES
> < 250 PIPELINING
> 
> > MAIL FROM:<root at localhost>
> 
> < 250 2.1.0 OK
> 
> > RCPT TO:<james at lottspot.vpn>
> 
> < 552 5.2.2 <james at lottspot.vpn> Quota exceeded (mailbox for user is
> full)
> 
> The policy service however, just lets everything go right through. I
> know that accessing the userdb is not an issue, because I passed a bogus
> user before passing my real user and received the expected response.
> 
> root at smtp:/usr/local/etc/mail-config # nc -U
> /var/spool/postfix/private/policy-quota
> 
> > recipient=noop at fake.tld
> 
> < action=551 User not found
> <
> 
> > recipient=james at lottspot.vpn
> 
> < action=250 Quota status success
> <
> 
> I'm using Dovecot 2.2.15, and I have included my quota configuration
> below. If anyone wants to see full doveconf -n output, I can provide it,
> but figured it was a bit much for this case. Thanks in advance for any
> pointers!
> 
> --> Note: I'm the quota_status_* directives have been set as is for
> testing purposes only. I'm fully aware not to do that in production.
> 
> plugin {
>    quota = maildir:User quota
>    quota_rule  = *:bytes=1G
>    quota_rule2 = Trash:storage=+10%%
>    quota_status_success = "250 Quota status success"
>    quota_status_nouser  = "551 User not found"
>    quota_status_overquota = "552 5.2.2 Recipient mailbox is full"
> }
> service quota-status {
>    executable = quota-status -p postfix
>    unix_listener /var/spool/postfix/private/policy-quota {
>      user  = postfix
>      group = wheel
>      mode  = 0666
>    }
> }

-- 
James Lott


More information about the dovecot mailing list