dovecot quota service for postfix

Michael Peter roundcube222 at alaadin.org
Sat Oct 3 15:56:24 UTC 2015


Hello,

Thanks for the clarifications

plugin {
      quota = maildir:User quota
      quota_rule = *:storage=1G
      quota_grace = 10%%
      # 10% is the default
      quota_status_success = DUNNO
      quota_status_nouser = DUNNO
      quota_status_overquota = "552 5.2.2 Mailbox is full"
 }

The above configurations is my default for all users. but my mail system
is using mbox format and not maildir.... so what should i change in the
above configuration to use mbox INSTEAD of maildir ??

Also for the quota paramater, can i use (myquota =  maildir:User quota)
INSTEAD of (quota = maildir:User quota) ?? or it must "QUOTA =" and not
any thing else to work ?

same for quota_rule parameter, should i add (_rule) after quota to work
??? can i add for example qouta_restriction INSTEAD of quota_rules ?? i am
asking this question to better understand how dovecot work..

also last question
when i use the following command to get quota for existing system user
called michael , it gives me an error as follow, so why dovecot is not
able to get the quota for the system users?

doveadm quota get -u michael
doveadm(michael): Fatal: User doesn't exist


Many thanks


>> Incase user is underquota, then the email is returned back to postfix
for
>> processing and delivering email to user mbox, incase user has no
sufficient quota then dovecot will inform postfix to reject email. Please
confirm if what i mentioned above is correct and that i
>> understand
>> correctly how dove-cot policy works with postfix.
> Your understanding is mor or less correct, except that postfix never
passes the email itself to dovecot when performing the quota check. It
simply sends a message to the quota policy service asking if the
recipient is over quota. If the recipient is over quota, dovecot
provides postfix with the response configured in quota_status_overquota.
If the recipient is under quota, dovecot provides postfix with the
response configured in quota_status_success. If dovecot does not know the
user, it provides postfix with the response configured in
> quota_status_nouser.
>> Kindly check my configuration below and advise the missing parts to
add...
> I don't see anything wrong with your configuration on first appraisal,
but if it isn't working I would recommend you perform the following
troubleshooting steps.
> 1. Verify the user's mailbox is over or under quota in alignment with
your expectations
>      - `doveadm quota -u $RECIPIENT`
> 2. Test that the quota service provides the response you expect it to
>      - `echo "recipient=$RECIPIENT" | nc -q1 localhost 12340`
> On 09/26/2015 01:40 AM, Michael Peter wrote:
>> Hello,
>> I am trying to use dovecot quota service for postfix in order set quota
for some users.
>> i configure postfix policy service to ask dovecot if user quota is
sufficient to accept the email or not.
>> (dovecot in this case acts only as policy server to postfix as it only
ACCEPT/REJECT email according to user quota, but it is not used to deliver
>> email , because postfix will deliver the email to user mailbox) Incase
user is underquota, then the email is returned back to postfix for
>> processing and delivering email to user mbox, incase user has no
sufficient quota then dovecot will inform postfix to reject email. Please
confirm if what i mentioned above is correct and that i
>> understand
>> correctly how dove-cot policy works with postfix.
>> Kindly check my configuration below and advise the missing parts to
add...
>> plugin {
>>      quota_rule = *:storage=1G
>>      quota_grace = 10%%
>>      # 10% is the default
>>      quota_status_success = DUNNO
>>      quota_status_nouser = DUNNO
>>      quota_status_overquota = "552 5.2.2 Mailbox is full"
>>      ...
>> }
>> The above configurations is for all users which is not override by
quota
>> rules in  userdb's extra fields in my password file below.
>> Is the above configuration missing some thing ? i am using mbox format
for
>> emails storage. do you i have to add (quota= SOMETHING) before
>> (quote_rule
>> =  *:storage=1G) and what to do add to make dovecot support mbox quota?
smtpd_recipient_restrictions =
>>      check_policy_service inet:SERVER-HIDDEN-FOR-SECRUITY.com:12340
>> service quota-status {
>>      executable = quota-status -p postfix
>>      inet_listener {
>>          port = 12340
>>      }
>>      client_limit = 1
>> }
>> now in order to configure dovecot specific quota for user named (user1)
i
>> use passwd-file as follow
>> user1:{plain}pass3:1002:1002::/home/user1::userdb_mail=mbox:~/mymail:INBOX=/var/mail/user1
userdb_quota_rule=*:bytes=300M
>> All other users except users1 should have 1GB storage according to this
configuration. which user1 will only have 300MB
>> Please advise what is my configuration is missing and if i need to add
any
>> thing to run without issues.
>> Many thanks
>> Michael Peter







More information about the dovecot mailing list