Ralf Hildebrandt
2013-Apr-11 21:00 UTC
[Dovecot] How to prevent delivery to mailboxes over quota at SMTP-time
Hi! I wrote a little something about how to prevent delivery to mailboxes over quota while still being in the SMTP dialogue: http://sys4.de/en/blog/2013/04/08/postfix-dovecot-mailbox-quota/ (Postfix/Dovecot-2.2) -- [*] sys4 AG http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstra?e 15, 81669 M?nchen Sitz der Gesellschaft: M?nchen, Amtsgericht M?nchen: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Joerg Heidrich
Thomas Leuxner
2013-Apr-12 07:33 UTC
[Dovecot] How to prevent delivery to mailboxes over quota at SMTP-time
* Ralf Hildebrandt <r at sys4.de> 2013.04.11 23:00:> http://sys4.de/en/blog/2013/04/08/postfix-dovecot-mailbox-quota/Hi Ralf, played around with it a bit. There is another thread here which indicates people couldn't get it to work. With the latest and greatest it seems to have some query issue: [...] Apr 12 09:22:04 spectre postfix/smtpd[18355]: warning: access table inet:127.0.0.1:10027 entry has empty value [...] Regards Thomas # 2.2.rc7 (cf898dbcbffb): /etc/dovecot/dovecot.conf # OS: Linux 3.2.0-0.bpo.4-amd64 x86_64 Debian 6.0.7 auth_cache_size = 16 k auth_verbose = yes mail_location = mdbox:~/mdbox mail_plugins = acl quota stats mailbox_list_index = yes namespace { list = yes location = mdbox:/var/vmail/public:INDEXPVT=~/mdbox/public prefix = Public/ separator = / subscriptions = no type = public } namespace inbox { hidden = no inbox = yes location mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix separator = / type = private } passdb { args = username_format=%u /var/vmail/auth.d/%d/passwd driver = passwd-file } plugin { acl = vfile:/var/vmail/conf.d/%d/acls:cache_secs=300 mail_log_events = expunge mailbox_delete quota = dict:user::file:%h/mdbox/dovecot-quota quota_grace = 10%% quota_rule = *:storage=1GB quota_rule2 = Trash:storage=+10%% quota_status_nouser = DUNNO quota_status_success = DUNNO sieve = ~/.dovecot.sieve sieve_dir = ~/sieve sieve_global_dir = /var/vmail/conf.d/%d/sieve stats_refresh = 30s stats_track_cmds = yes } protocols = " imap lmtp" quota_full_tempfail = yes service auth-worker { unix_listener auth-worker { user = doveauth } user = doveauth } service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } user = doveauth } service imap-login { inet_listener imap { address = 1.2.3.4 port = 143 } inet_listener imaps { port = 0 } } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0660 user = postfix } } service quota-status { client_limit = 1 executable = quota-status -p postfix inet_listener { address = 127.0.0.1 port = 10027 } } service stats { fifo_listener stats-mail { mode = 0600 user = vmail } } ssl_ca = </etc/ssl/certs/SSL123_CA_Bundle.pem ssl_cert = </etc/ssl/certs/host_domain_tld_2012.crt ssl_key = </etc/ssl/private/host_domain_tld_2012.key syslog_facility = local1 userdb { args = username_format=%u /var/vmail/auth.d/%d/passwd driver = passwd-file } verbose_proctitle = yes protocol lmtp { mail_plugins = acl quota stats sieve } protocol imap { mail_max_userip_connections = 20 mail_plugins = acl quota stats mail_log notify imap_acl imap_quota imap_stats } -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20130412/ccb4d0d5/attachment.bin>
Per Jessen
2013-Apr-12 07:43 UTC
[Dovecot] How to prevent delivery to mailboxes over quota at SMTP-time
Ralf Hildebrandt wrote:> Hi! > > I wrote a little something about how to prevent delivery to mailboxes > over quota while still being in the SMTP dialogue: > http://sys4.de/en/blog/2013/04/08/postfix-dovecot-mailbox-quota/ > (Postfix/Dovecot-2.2) >Cool, thanks for posting that. I guess I'll have to upgrade, I think we're dovecot 2.0. -- Per Jessen, Z?rich (9.6?C) http://www.dns24.ch/ - free DNS hosting, made in Switzerland.
Thomas Leuxner
2013-Apr-12 07:55 UTC
[Dovecot] How to prevent delivery to mailboxes over quota at SMTP-time
* Thomas Leuxner <tlx at leuxner.net> 2013.04.12 09:33:> [...] > Apr 12 09:22:04 spectre postfix/smtpd[18355]: warning: access table inet:127.0.0.1:10027 entry has empty value > [...]After some mails have been accepted it starts to reject like this: ==> /var/log/dovecot/dovecot.log <=Apr 12 09:46:30 spectre dovecot: quota-status(tlx at leuxner.net): Error: user tlx at leuxner.net: Error reading configuration: net_connect_unix(/var/run/dovecot/config) failed: Permission denied ==> /var/log/mail.log <=Apr 12 09:46:31 spectre postfix/smtpd[18494]: NOQUEUE: reject: RCPT from duonullaocto.xi.ecm-cluster.com[91.192.42.208]: 450 4.7.1 <tlx at leuxner.net>: Recipient address rejected: Internal error occurred. Refer to server log for more information.; from=<g-2111333234-2080-200833342-1365752783888 at bounce.newsletter.frontlineshop.com> to=<tlx at leuxner.net> proto=ESMTP helo=<duonullaocto.xi.ecm-cluster.com> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20130412/63a5cff3/attachment.bin>