[Dovecot] quota not working on delivery
Hi, I am using the Debian dovecot packages and the deliver LDA from postfix, all version 1.0.beta8. My problem is with quota support, I am using Maildirs. The relevant configuration stuff is included at the bottom of this email.
Quota support seems to work with IMAP. However, even when IMAP complains about an account being over quota, the deliver LDA still happily writes new mail to the (correct) Maildirs. I cannot see any warnings or other hints.
Can you spot what I am doing wrong?
Thanks!
dovecot.conf:
protocols = imap default_mail_env = maildir:~/.maildir auth default { mechanisms = plain passdb sql { args = /etc/dovecot/dovecot-sql.conf } userdb sql { args = /etc/dovecot/dovecot-sql.conf } socket listen { master { # LDA path = /var/run/dovecot-auth-master mode = 0600 user = vmail } } } plugin { quota = maildir } protocol imap { mail_plugins = quota imap_quota } protocol lda { postmaster_address = postmaster@seamus.madduck.net mail_plugins = quota }
dovecot-sql.conf:
driver = pgsql connect = host=localhost dbname=users user=dovecot password=XXXXXXXX password_query = select password from vmail.users where email='%u' user_query = select home, uid, gid, 'maildir:storage=' || quota as quote from vmail.users where email='%u'
-- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
spamtraps: madduck.bogus@madduck.net
"women love us for our defects. if we have enough of them, they will forgive us everything, even our gigantic intellects." -- oscar wilde
Martin:
On 6/27/06, martin f krafft madduck@madduck.net wrote:
Hi, I am using the Debian dovecot packages and the deliver LDA from postfix, all version 1.0.beta8. My problem is with quota support, I am using Maildirs. The relevant configuration stuff is included at the bottom of this email.
Quota support seems to work with IMAP. However, even when IMAP complains about an account being over quota, the deliver LDA still happily writes new mail to the (correct) Maildirs. I cannot see any warnings or other hints.
Had a similar problem setting up quota. You may want to ensure that postfix is actually using dovecot as a delivery agent. Does it show dovecot being used in mail logs?
The wiki instructions didn't work for me to get postfix to work with the dovecot as the LDA -- here is what I have in my main.cf and master.cf (relevant bits pasted below):
# master.cf: # dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/local/dovecot/libexec/dovecot/deliver -d ${user}
# main.cf # transport_maps = ldap:ldaptransport ldap:ldaptransportlocal
ldaptransport_result_filter = smtp:[%s] ldaptransport_version = 3 ldaptransport_server_host = ldap.company.com ldaptransport_search_base = dc=company, dc=com ldaptransport_query_filter = (&(|(mail=%s)(mailAlternateAddress=%s))(!(mailHost=$localroute))(|(AccountStatus=active))) ldaptransport_result_attribute = mailHost
# # The below is required for handing over the # message to dovecot for local delivery # ldaptransportlocal_result_filter = dovecot ldaptransportlocal_version = 3 ldaptransportlocal_server_host = ldap.company.com ldaptransportlocal_search_base = dc=company, dc=com ldaptransportlocal_query_filter = (&(|(mail=%s)(mailAlternateAddress=%s))(mailHost=$localroute)(|(AccountStatus=active))) ldaptransportlocal_result_attribute = uid # We don't really need a result attribute here.
# end.
Regards,
Mustafa A. Hashmi mahashmi@gmail.com mh@stderr.net
also sprach Mustafa A. Hashmi mahashmi@gmail.com [2006.06.28.0712 +0200]:
Had a similar problem setting up quota. You may want to ensure that postfix is actually using dovecot as a delivery agent. Does it show dovecot being used in mail logs?
Yes, certainly.
The wiki instructions didn't work for me to get postfix to work with the dovecot as the LDA -- here is what I have in my main.cf and master.cf (relevant bits pasted below):
# master.cf: # dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/local/dovecot/libexec/dovecot/deliver -d ${user}
I have recipient instead of user here, but I think they're the same.
# main.cf # transport_maps = ldap:ldaptransport ldap:ldaptransportlocal
I don't see any of this relevant to my setup.
Also, since you're using a /usr/local install, which version are you using?
-- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
spamtraps: madduck.bogus@madduck.net
"we are trapped in the belly of this horrible machine, and the machine is bleeding to death." -- godspeed you black emperor!
On 2006-06-28 11:30:58 +0200, martin f krafft wrote:
# master.cf: # dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/local/dovecot/libexec/dovecot/deliver -d ${user}
side question: am i the only one, who uses mailbox_command with dovecot lda? i dont use the quota plugin so far. but the cmu plugin works fine for me.
[[[ protocol lda { # Address to use when sending rejection mails. postmaster_address = postmaster@example.com
# Hostname to use in various parts of sent mails, eg. in Message-Id. # Default is the system's real hostname. #hostname =.
# Support for dynamically loadable plugins. mail_plugins is a space separated # list of plugins to load. mail_plugins = cmusieve. mail_plugin_dir = /usr/lib/dovecot/modules/lda
# Binary to use for sending mails. #sendmail_path = /usr/lib/sendmail
# UNIX socket path to master authentication server to find users. #auth_socket_path = /var/run/dovecot/auth-master } ]]]
the relevant snippet from my dovecot.conf.
darix
-- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org
On 6/28/06, martin f krafft madduck@madduck.net wrote:
also sprach Mustafa A. Hashmi mahashmi@gmail.com [2006.06.28.0712 +0200]:
Had a similar problem setting up quota. You may want to ensure that postfix is actually using dovecot as a delivery agent. Does it show dovecot being used in mail logs?
Yes, certainly.
Okay then you're good right away -- my issue was dovecot not being used at all as the delivery agent till I put in the described changes.
Also, since you're using a /usr/local install, which version are you using?
1.0-beta8.
Sorry couldn't really help.
Regards,
Mustafa A. Hashmi mahashmi@gmail.com mh@stderr.net
On Tue, 2006-06-27 at 20:55 +0200, martin f krafft wrote:
Hi, I am using the Debian dovecot packages and the deliver LDA from postfix, all version 1.0.beta8. My problem is with quota support, I am using Maildirs. The relevant configuration stuff is included at the bottom of this email. .. protocol lda { postmaster_address = postmaster@seamus.madduck.net mail_plugins = quota }
I think this was a bit broken if you didn't have mail_plugin_dir specified. Try 1.0rc1 where it's not necessary and it's a good idea to upgrade anyway to it :)
also sprach Timo Sirainen tss@iki.fi [2006.06.28.0837 +0200]:
I think this was a bit broken if you didn't have mail_plugin_dir specified. Try 1.0rc1 where it's not necessary and it's a good idea to upgrade anyway to it :)
Ah, but it's not in Debian yet. Thus, I'd really rather work around it for now. I cannot find the answer in this thread
http://www.dovecot.org/list/dovecot/2006-June/013997.html
and there seems to be no other usable reference.
So I tried to add mail_plugin_dir = /usr/lib/dovecot/modules/lda to the protocol lda stanza, but that did not fix things.
Any further hints?
-- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
spamtraps: madduck.bogus@madduck.net
"picture yourself in a boat on a river with tangerine trees and marmelade skies..." -- the beatles
Hi,
martin f krafft wrote:
Hi, I am using the Debian dovecot packages and the deliver LDA from postfix, all version 1.0.beta8. My problem is with quota support, I am using Maildirs. The relevant configuration stuff is included at the bottom of this email.
Quota support seems to work with IMAP. However, even when IMAP complains about an account being over quota, the deliver LDA still happily writes new mail to the (correct) Maildirs. I cannot see any warnings or other hints.
Can you spot what I am doing wrong?
Thanks!
dovecot.conf:
protocols = imap default_mail_env = maildir:~/.maildir auth default { mechanisms = plain passdb sql { args = /etc/dovecot/dovecot-sql.conf } userdb sql { args = /etc/dovecot/dovecot-sql.conf } socket listen { master { # LDA path = /var/run/dovecot-auth-master mode = 0600 user = vmail } } } plugin { quota = maildir } protocol imap { mail_plugins = quota imap_quota } protocol lda { postmaster_address = postmaster@seamus.madduck.net mail_plugins = quota }
dovecot-sql.conf:
driver = pgsql connect = host=localhost dbname=users user=dovecot password=XXXXXXXX password_query = select password from vmail.users where email='%u' user_query = select home, uid, gid, 'maildir:storage=' || quota as quote from vmail.users where email='%u'
Dovecot LDA in Debian packages is a bit outdated. In packages starting 1.0.beta5 to 1.0.beta9, LDA build is the same (from beginning of April I guess):
dovecot (1.0.beta5-1) unstable; urgency=low
- New upstream version. *Also updated dovecot-lda from CVS.*
- debian/control. Added build-depends on flex to prevent FTBS.
-- Jaldhar H. Vyas jaldhar@debian.org *Thu, 6 Apr 2006 16:22:46 -0400
*See http://packages.debian.org/changelogs/pool/main/d/dovecot/dovecot_1.0.beta9-...
And as far as I tested, this version of LDA does not care about quota at all.
Regards, Dumitru
participants (5)
-
Dumitru Negara
-
Marcus Rueckert
-
martin f krafft
-
Mustafa A. Hashmi
-
Timo Sirainen