Dovecot quota and Postfix smtpd_recipient_restrictions?

Urban Loesch bind at enas.net
Wed Mar 20 12:37:29 EET 2019


Hi,


> Well,
> 
> so the right syntax (in my case) would be:
> 
> -o smtpd_recipient_restrictions = reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit_sasl_authenticated,reject,check_policy_service 
> inet:mailstore.example.com:12340
> 
> right?  :-)

I configured it before the "permit_sasl_authenticated" and the "reject" statement.

> 
> 
> And eventually, should you suggest me how made some functional verification test?

According to: http://www.postfix.org/SMTPD_POLICY_README.html try on your postfix:

telnet mailstore.example.com 12340

and insert the following lines:

sender=somesender at somedomain.com
recipient=your at recipient.com
size=12345
[empty line]


Set a size= in bytes which is greater that your configured quota.
In theory the policy service should respond with your configured error message "552 5.2.2 Mailbox is full".

Example on my server:

...
sender=postmaster at somedomain.com
recipient=my at recipient.com
size=123450000000

action=552 5.2.2 Mailbox is full
...


For a livetest reduce the quota of your testaccount to ex. 100KB and the send a mail > 100BK from outside to it. You should see the "552" error 
message in your logs and you should get back a bouncemail from the sending server.

Hope I explained it correct.

Best
Urban


More information about the dovecot mailing list