[Dovecot] How to prevent delivery to mailboxes over quota at SMTP-time

Thomas Leuxner tlx at leuxner.net
Fri Apr 12 10:33:24 EEST 2013


* 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>


More information about the dovecot mailing list