Re: [Dovecot] Expire plugin does not delete expired mail
On Wed, 11 Feb 2009 09:22:04 +0100 Nicolas Letellier nico...@nicoelro.net wrote: Hello. I use expire plugin with dovecot 1.1.10. See my dovecot -n: # 1.1.10: /usr/local/etc/dovecot.conf # OS: FreeBSD 6.3-RELEASE-p9 i386 ufs syslog_facility: local6 protocols: imap imaps managesieve ssl_cert_file: /etc/ssl/mail/mail.domain.net.cert ssl_key_file: /etc/ssl/mail/mail.domain.net.key disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/local/libexec/dovecot/imap-login login_executable(imap): /usr/local/libexec/dovecot/imap-login login_executable(managesieve): /usr/local/libexec/dovecot/managesieve-login login_user: dovecot-auth login_greeting: Domain mail server login_processes_count: 2 verbose_proctitle: yes first_valid_uid: 143 last_valid_uid: 143 first_valid_gid: 143 last_valid_gid: 143 mail_access_groups: mail mail_location: maildir:/var/mail/vmail/%u/ mail_debug(default): no mail_debug(imap): no mail_debug(managesieve): yes mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(managesieve): /usr/local/libexec/dovecot/managesieve mail_plugins(default): quota imap_quota mail_log expire mail_plugins(imap): quota imap_quota mail_log expire mail_plugins(managesieve): mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(managesieve): /usr/local/lib/dovecot/managesieve imap_client_workarounds(default): delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(managesieve): sieve(default): sieve(imap): sieve(managesieve): ~/dovecot.sieve auth default: mechanisms: plain login master_user_separator: * passdb: driver: passwd-file args: /usr/local/etc/dovecot.masterusers master: yes passdb: driver: sql args: /usr/local/etc/dovecot/dovecot-sql.conf userdb: driver: sql args: /usr/local/etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix master: path: /var/run/dovecot/auth-master mode: 432 user: dovecot group: mail plugin: quota: maildir quota_rule: *:storage=1000M quota_rule2: Trash:storage=50M quota_warning: storage=80%% /usr/home/scripts/mail_quota-warning.sh 80 quota_warning2: storage=90%% /usr/home/scripts/mail_quota-warning.sh 85 quota_warning3: storage=95%% /usr/home/scripts/mail_quota-warning.sh 90 quota_warning4: storage=95%% /usr/home/scripts/mail_quota-warning.sh 95 sieve: /var/mail/vmail/%u/dovecot.sieve expire: Trash 7 Pubs 15 Junk 1 expire_dict: proxy::expire dict: expire: mysql:/usr/local/etc/dovecot/dovecot-dict-expire.conf The expire plugin works with mysql database. The mysql table is used, and expire_stamp are written on it: us...@domain.net/Trash1234701558 us...@domain.net/Junk 1234386055 us...@domain.net/Trash1234874172 us...@domain.net/Junk 1234400921 us...@domain.net/Pubs 1235576243 I launch /usr/local/sbin/dovecot --exec-mail ext /usr/local/libexec/dovecot/expire-tool every 4 hours. For 3 days, no mails were deleted. However, I have date_stamp in mysql table. I dropped ALL my mails in Junk/Trash folder ; and delete all dovecot.index* in these folders. After, I restarted dovecot with expire plugin, and when a first mail arrived in one of these folder, a line is created in mysql table. But nothing is deleted in my Trash/Pubs/Junk folder. I'm waiting for 3 days. (first mail arrived in these folder on 2009/02/08). Any ideas? Have I to use cronjob/find to delete the expired mail? Regards, -- -Nicolas. Hello. I'm sorry but I need help for expire plugin. It does not delete 'expired' messages. Is anybody could help me for this problem? Thanks a lot. Regards, -- -Nicolas.
Re: [Dovecot] Replication status
On Mon, 9 Feb 2009, Timo Sirainen wrote: Replication is still on my TODO list and I've a bit of code for the replication plugin implemented, but it's not very far. Anyway since I now started working for Mailtrust they'll decide what the priorities are for new Dovecot features. I can't say for sure if/when I'll start coding the replication again, but my current understanding is that they're interested in it, but some other things are more important to get done first. My reaction to some other things are more important to get done first is, I can't think of anything. (-: So throwing money at me won't help, but nothing of course stops you from writing the code :) I can send you the code I have so far if you want it. By all means, send me the code, or preferably toss it in some hg branch on the web. -- Asheesh. -- Q: What's the difference betweeen USL and the Graf Zeppelin? A: The Graf Zeppelin represented cutting edge technology for its time.
[Dovecot] digest-md5 problem
Info: v1.1.11 OS = Linux 32bit, custom build CPU Arch = i686 Filesystem = NFSv4 Problem: Digest-md5 not working. Tested plain, login and cram-md5 with pop3, imap and smtp/sasl fine. Using digest-md5 doesn't authenticate with the below error *** Feb 15 12:46:45 s03-400-134 dovecot: auth(default): client in: AUTH^I1^IDIGEST-MD5^Iservice=pop3^Ilip=10.0.2.134^Irip=10.0.2.1^Ilport=110^Irport=41579^Iresp=hidden Feb 15 12:46:45 s03-400-134 dovecot: auth(default): client out: CONT^I1^IcmVhbG09IiIsbm9uY2U9IktvMkFoK0lyeVhHRWtmY1k5TjM1TXc9PSIscW9wPSJhdXRoIixjaGFyc2V0PSJ1dGYtOCIsYWxnb3JpdGhtPSJtZDUtc2VzcyI= Feb 15 12:46:45 s03-400-134 dovecot: auth(default): client in: CONThidden Feb 15 12:46:47 s03-400-134 dovecot: auth(default): client out: FAIL^I1 Feb 15 12:46:47 s03-400-134 dovecot: pop3-login: Disconnected (auth failed, 1 attempts): method=DIGEST-MD5, rip=10.0.2.1, lip=10.0.2.134 *** The decoded reply is ... authzid=USERNAME_HERE,charset=utf-8,cnonce=32d669a1334164b3362bff5f809acf12,digest-uri=pop/SERVER_URL_HERE,nc=0001,nonce=rDWjRuMzuvbr5TLsinsE0A==,qop=auth,realm=,response=5c7c2ff3284f350fc62c5a2a80d2be64,username=USERNAME_HERE On the same database cyrus imap sasl is working 100%. All passwords are in plaintext format. Maybe Im doing something wrong? Below my dovecot config... # 1.1.11: /etc/dovecot/dovecot.conf # OS: Linux 2.6.27.10 i686 none protocols: imap imaps pop3 pop3s listen: 10.0.2.134 shutdown_clients: no login_dir: /var/run/dovecot/login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login login_greeting: s03-400-134 Secure server ready. max_mail_processes: 100 verbose_proctitle: yes first_valid_uid: 1000 first_valid_gid: 1000 mail_location: maildir:/var/vmail/%h mail_debug: yes mmap_disable: yes mail_nfs_storage: yes mail_nfs_index: yes mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(pop3): /usr/libexec/dovecot/pop3 mail_plugins(default): quota imap_quota trash mail_plugins(imap): quota imap_quota trash mail_plugins(pop3): mail_plugin_dir(default): /usr/lib/dovecot/imap mail_plugin_dir(imap): /usr/lib/dovecot/imap mail_plugin_dir(pop3): /usr/lib/dovecot/pop3 imap_client_workarounds(default): delay-newmail outlook-idle netscape-eoh imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh imap_client_workarounds(pop3): pop3_enable_last(default): no pop3_enable_last(imap): no pop3_enable_last(pop3): yes pop3_lock_session(default): no pop3_lock_session(imap): no pop3_lock_session(pop3): yes pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes auth default: mechanisms: digest-md5 cram-md5 login plain cache_size: 256 user: nobody master_user_separator: * verbose: yes debug: yes passdb: driver: sql args: /etc/dovecot/sql.conf userdb: driver: sql args: /etc/dovecot/sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: dovecot group: mail master: path: /var/run/dovecot/auth-master mode: 432 user: dovecot group: vmail plugin: quota: maildir trash: /etc/dovecot/trash.conf
Re: [Dovecot] unkillable imap process(es) with high CPU-usage
I have this EXACT same problem after upgrading to SuSE 11.1, which uses this exact kernel version!! After reading this, I was excited to think that if I killed the nfsserver daemon (which I had running for no good reason), that it would sort my problem Sure enough, my computer - which up to now had been going unresponsive every 24 hours - was running fine for 72 hours and then BOOM... it happened again. Just wanted to let people know that it seems that at the minute, the dovecot that ships with SuSE and the kernel they are using in 11.1 exhibit this problem. Gino Arno Wald wrote: I have running the older debian/sid dovecot 1:1.0.15-2.3 again, now with kernel 2.6.27-10.slh.1-sidux-686 and the issue seems to be fixed. So I recommend to use at least 2.6.27.10. Bye, Arno. -- View this message in context: http://www.nabble.com/unkillable-imap-process%28es%29-with-high-CPU-usage-tp20953049p22014569.html Sent from the Dovecot mailing list archive at Nabble.com.
Re: [Dovecot] Replication status
On Sun, 2009-02-15 at 03:44 -0800, Asheesh Laroia wrote: So throwing money at me won't help, but nothing of course stops you from writing the code :) I can send you the code I have so far if you want it. By all means, send me the code, or preferably toss it in some hg branch on the web. http://hg.dovecot.org/dovecot-replication/ I just merged it with latest v1.2 changes, didn't bother testing if it still compiles or not.. I also hate the aggregator and writer names, but couldn't think of anything better. The idea is that replication plugin is loaded to all imap/pop3/deliver processes. It talks to aggregator, which in turn connects to remote writer, which writes the changes to disk. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] unkillable imap process(es) with high CPU-usage
On Feb 14, 2009, at 9:57 AM, agent59624285 wrote: I have this EXACT same problem after upgrading to SuSE 11.1, which uses this exact kernel version!! After reading this, I was excited to think that if I killed the nfsserver daemon (which I had running for no good reason), that it would sort my problem Sure enough, my computer - which up to now had been going unresponsive every 24 hours - was running fine for 72 hours and then BOOM... it happened again. Just wanted to let people know that it seems that at the minute, the dovecot that ships with SuSE and the kernel they are using in 11.1 exhibit this problem. Gino This is sounding similar to the problem I have with my setup: 1. High CPU usage. 2. Can't kill IMAP. 3. Server becomes unresponsive. I'm using CentOS 5.2 64-bit version with the latest cPanel. So what am I missing, other than the problem nobody else is having is clearly something they ARE having? Peace, Gene
Re: [Dovecot] unkillable imap process(es) with high CPU-usage
On Sun, 2009-02-15 at 12:10 -0700, Gene Steinberg wrote: This is sounding similar to the problem I have with my setup: 1. High CPU usage. 2. Can't kill IMAP. kill -9 doesn't work for imap processes? You didn't mention this before. I'm using CentOS 5.2 64-bit version with the latest cPanel. So what am I missing, other than the problem nobody else is having is clearly something they ARE having? If you can't kill -9 a process, it means the kernel is buggy. At least 2.6.27 was buggy and it was fixed in 2.6.27.10. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] unkillable imap process(es) with high CPU-usage
On Feb 15, 2009, at 12:43 PM, Timo Sirainen wrote: On Sun, 2009-02-15 at 12:10 -0700, Gene Steinberg wrote: This is sounding similar to the problem I have with my setup: 1. High CPU usage. 2. Can't kill IMAP. kill -9 doesn't work for imap processes? You didn't mention this before. I'm using CentOS 5.2 64-bit version with the latest cPanel. So what am I missing, other than the problem nobody else is having is clearly something they ARE having? If you can't kill -9 a process, it means the kernel is buggy. At least 2.6.27 was buggy and it was fixed in 2.6.27.10. Some of this is above my pay grade (so forgive the imprecision), but I did try to restart IMAP in cPanel with no success, assuming I catch it before the load makes it impossible to do anything. Yes, I have been able to kill processes by the standard ID number. I did that with rsync the other day when changing the backup parameters. Here's the kernel info on my box: Linux server.paracastworld.net 2.6.27.9rootserver-20081216a #1 SMP Tue Dec 16 02:29:13 EST 2008 x86_64 So that's a buggy kernel? Or is the 2.6.27.9 version better than 2.6.27 in this regard? Peace, Gene
Re: [Dovecot] unkillable imap process(es) with high CPU-usage
Timo Sirainen wrote: On Sun, 2009-02-15 at 12:10 -0700, Gene Steinberg wrote: This is sounding similar to the problem I have with my setup: 1. High CPU usage. 2. Can't kill IMAP. kill -9 doesn't work for imap processes? You didn't mention this before. I'm using CentOS 5.2 64-bit version with the latest cPanel. So what am I missing, other than the problem nobody else is having is clearly something they ARE having? If you can't kill -9 a process, it means the kernel is buggy. At least 2.6.27 was buggy and it was fixed in 2.6.27.10. Or it's I/O locked on the filesystem i.e. NFS server went away or something else. What state ate the un-killable processes in? (Z, D, S, etc.) ~Seth
Re: [Dovecot] unkillable imap process(es) with high CPU-usage
On Feb 15, 2009, at 12:53 PM, Seth Mattinen wrote: Or it's I/O locked on the filesystem i.e. NFS server went away or something else. What state ate the un-killable processes in? (Z, D, S, etc.) ~Seth I'd have to switch back to Dovecot in order to test for this, and arrange to have someone with far more expertise than I possess to continue monitoring the server to catch this when it happens. cPanel support can't be expected to devote that much attention to preventive medicine. My admin could do it, I suppose, though I'm only one of his smaller clients, so I wouldn't expect it either. As I said, I'm inclined to want to try this again for testing, if someone would work with me on the initial setup, switching to a later version of Dovecot than the one that cPanel operates with (if it'll still integrate with cPanel -- is that possible?). Peace, GEne
Re: [Dovecot] Expire plugin does not delete expired mail
On 2/15/2009, Nicolas Letellier (nico...@nicoelro.net) wrote: I'm sorry but I need help for expire plugin. It does not delete 'expired' messages. Is anybody could help me for this problem? You are aware that the time you have set for expire is from the time the messages were moved into the folder, NOT from the date/time stamp of the message itself, right? Otherwise, we'll need a lot more details, like output of dovecot -n... -- Best regards, Charles
Re: [Dovecot] unkillable imap process(es) with high CPU-usage
On Sun, 2009-02-15 at 12:48 -0700, Gene Steinberg wrote: Here's the kernel info on my box: Linux server.paracastworld.net 2.6.27.9rootserver-20081216a #1 SMP Tue Dec 16 02:29:13 EST 2008 x86_64 So that's a buggy kernel? Or is the 2.6.27.9 version better than 2.6.27 in this regard? 2.6.27.9 is buggy. I'm pretty sure upgrading the kernel will fix your problem. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] unkillable imap process(es) with high CPU-usage
just again to the list wasnt in reply Robert Schetterer schrieb: Hi Gene , small tips depending suse Gene Steinberg schrieb: On Feb 14, 2009, at 9:57 AM, agent59624285 wrote: I have this EXACT same problem after upgrading to SuSE 11.1, which uses this exact kernel version!! After reading this, I was excited to think that if I killed the nfsserver daemon (which I had running for no good reason), that it would sort my problem Sure enough, my computer - which up to now had been going unresponsive every 24 hours - was running fine for 72 hours and then BOOM... it happened again. Just wanted to let people know that it seems that at the minute, the dovecot that ships with SuSE and the kernel they are using in 11.1 exhibit this problem. ---my reply Suse kernels are not like vanilla kernels, they are deeply patched an mostly have stuff from the next kernel version allready in you might use yast for upgrading latest suse kernel it might fixed allready a short look gives http://download.opensuse.org/repositories/home:/tristanhoffmann/openSUSE_11.1/ gives dovecot 1.1.11 which is latest also loadable by yast or just download rpm and upgrade wtih rpm -u standart rep for mail stuff is http://download.opensuse.org/repositories/server:/mail/openSUSE_11.1/ but here dovecot is not at latest but it shouldnt be any big problem downloading src and prepare the spec with latest src dovecot and compile by yourself which is the best way and gives you the suse splitted packs too and the advantage to see compile stuff for sure you need some others libs etc cause of dependencies befor but they are mostly downloadable also by yast be aware that suse sometimes splits up funktions in own packs like dovecot-autocreate11, dovecot-antispam11 etc this musnt be the same by versions compile from home suse users also help full send a mail to the build service, normally it takes only days and the newest version gets compiled use http://software.opensuse.org/search if looking for newer versions of software - Gino This is sounding similar to the problem I have with my setup: 1. High CPU usage. 2. Can't kill IMAP. 3. Server becomes unresponsive. I'm using CentOS 5.2 64-bit version with the latest cPanel. So what am I missing, other than the problem nobody else is having is clearly something they ARE having? Peace, Gene -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
Re: [Dovecot] unkillable imap process(es) with high CPU-usage
On Feb 15, 2009, at 1:16 PM, Timo Sirainen wrote: 2.6.27.9 is buggy. I'm pretty sure upgrading the kernel will fix your problem. Would this be a simple yum upgrade to deliver? I don't want to cause worse difficulties. Peace, Gene
Re: [Dovecot] unkillable imap process(es) with high CPU-usage
On Sun, 2009-02-15 at 13:42 -0700, Gene Steinberg wrote: On Feb 15, 2009, at 1:16 PM, Timo Sirainen wrote: 2.6.27.9 is buggy. I'm pretty sure upgrading the kernel will fix your problem. The yum upgrade function doesn't produce any updates. Your kernel version looks like it's self-compiled instead of from CentOS, so yum won't help you. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] unkillable imap process(es) with high CPU-usage
It was likely compiled by the host/DC then, so it would not be a good idea to change it. Peace, Gene On Feb 15, 2009, at 2:19 PM, Timo Sirainen t...@iki.fi wrote: On Sun, 2009-02-15 at 13:42 -0700, Gene Steinberg wrote: On Feb 15, 2009, at 1:16 PM, Timo Sirainen wrote: 2.6.27.9 is buggy. I'm pretty sure upgrading the kernel will fix your problem. The yum upgrade function doesn't produce any updates. Your kernel version looks like it's self-compiled instead of from CentOS, so yum won't help you.
[Dovecot] quota warning issue
Hello to all, I'm using version 1.1.11 of dovecot. I set the quota using the following configuration: in /etc/dovecot/dovecot.conf quota = maildir:%u quota_warning = storage=75%% /root/quota-warning.sh 75 %u in /etc/dovecot/dovecot-sql.conf user_query = SELECT concat('/var/vmail/', maildir) as home, concat('maildir:/var/vmail/', maildir) as mail, 1000 AS uid, 12 AS gid, concat('*:storage=', ROUND(quota/1000)) AS quota_rule FROM mailbox WHERE username = '%u' AND active = '1' ## password_query = SELECT username as user, password, concat('/var/vmail/', maildir) as home, concat('maildir:/var/vmail/', maildir) as mail, 1000 AS uid, 12 AS gid, concat('*:storage=', ROUND(quota/1000)) AS quota_rule FROM mailbox WHERE username = '%u' AND active = '1' # 1.1.11: /etc/dovecot/dovecot.conf # OS: Linux 2.6.25-hardened-r11 x86_64 Gentoo base_dir: /var/run/dovecot/ log_path: /var/log/mail.log info_log_path: /var/log/mail.log protocols: imap imaps pop3 pop3s listen(default): *:143 listen(imap): *:143 listen(pop3): *:110 ssl_listen(default): *:993 ssl_listen(imap): *:993 ssl_listen(pop3): *:995 disable_plaintext_auth: no login_dir: /var/run/dovecot//login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login first_valid_uid: 1000 last_valid_uid: 1000 mail_location: maildir:/var/vmail/%d/%u mail_debug: yes mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(pop3): /usr/libexec/dovecot/pop3 mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugin_dir(default): /usr/lib64/dovecot/imap mail_plugin_dir(imap): /usr/lib64/dovecot/imap mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3 imap_client_workarounds(default): outlook-idle delay-newmail imap_client_workarounds(imap): outlook-idle delay-newmail imap_client_workarounds(pop3): pop3_uidl_format(default): %08Xu%08Xv pop3_uidl_format(imap): %08Xu%08Xv pop3_uidl_format(pop3): %v.%u pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh auth default: user: nobody verbose: yes passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: prefetch socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: mail master: path: /var/run/dovecot/auth-master mode: 384 user: vmail group: mail plugin: quota: maildir:%u quota_warning: storage=75%% /root/quota-warning.sh 75 %u sieve: /var/vmail/%d/%n/.dovecot.sieve The warning is not delivered to users. In my logs the user quota's percentage is calculated right dovecot: Feb 15 23:42:33 Info: IMAP(a...@foo.org): Loading modules from directory: /usr/lib64/dovecot/imap dovecot: Feb 15 23:42:33 Info: IMAP(a...@foo.org): Module loaded: /usr/lib64/dovecot/imap/lib10_quota_plugin.so dovecot: Feb 15 23:42:33 Info: IMAP(a...@foo.org): Module loaded: /usr/lib64/dovecot/imap/lib11_imap_quota_plugin.so dovecot: Feb 15 23:42:33 Info: IMAP(a...@foo.org): Effective uid=1000, gid=12, home=/var/vmail/foo.org/alex/ dovecot: Feb 15 23:42:33 Info: IMAP(a...@foo.org): Quota root: name=a...@foo.org backend=maildir args= dovecot: Feb 15 23:42:33 Info: IMAP(a...@foo.org): Quota rule: root=a...@foo.org mailbox=* bytes=52428800 messages=0 dovecot: Feb 15 23:42:33 Info: imap-login: Login: user=a...@foo.org, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured dovecot: Feb 15 23:42:33 Info: IMAP(a...@foo.org): Quota warning: bytes=39321600 (75%) messages=0 command=/root/quota-warning.sh 75 a...@foo.org but also overcoming the space defined on quota warning, the command is not performed. The command does not contain errors because if performed by cli correctly sends the alert. Any ideas? Regards. Alex
Re: [Dovecot] quota warning issue
permissions... /root/quota-warning.sh User vmail does not get access to this directory put it in /usr/local/bin chown vmail quota-warning* On Mon, 2009-02-16 at 08:53, Alex wrote: Hello to all, I'm using version 1.1.11 of dovecot. I set the quota using the following configuration: in /etc/dovecot/dovecot.conf quota = maildir:%u quota_warning = storage=75%% /root/quota-warning.sh 75 %u in /etc/dovecot/dovecot-sql.conf user_query = SELECT concat('/var/vmail/', maildir) as home, concat('maildir:/var/vmail/', maildir) as mail, 1000 AS uid, 12 AS gid, concat('*:storage=', ROUND(quota/1000)) AS quota_rule FROM mailbox WHERE username = '%u' AND active = '1' ## password_query = SELECT username as user, password, concat('/var/vmail/', maildir) as home, concat('maildir:/var/vmail/', maildir) as mail, 1000 AS uid, 12 AS gid, concat('*:storage=', ROUND(quota/1000)) AS quota_rule FROM mailbox WHERE username = '%u' AND active = '1' # 1.1.11: /etc/dovecot/dovecot.conf # OS: Linux 2.6.25-hardened-r11 x86_64 Gentoo base_dir: /var/run/dovecot/ log_path: /var/log/mail.log info_log_path: /var/log/mail.log protocols: imap imaps pop3 pop3s listen(default): *:143 listen(imap): *:143 listen(pop3): *:110 ssl_listen(default): *:993 ssl_listen(imap): *:993 ssl_listen(pop3): *:995 disable_plaintext_auth: no login_dir: /var/run/dovecot//login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(pop3): /usr/libexec/dovecot/pop3-login first_valid_uid: 1000 last_valid_uid: 1000 mail_location: maildir:/var/vmail/%d/%u mail_debug: yes mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(pop3): /usr/libexec/dovecot/pop3 mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugin_dir(default): /usr/lib64/dovecot/imap mail_plugin_dir(imap): /usr/lib64/dovecot/imap mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3 imap_client_workarounds(default): outlook-idle delay-newmail imap_client_workarounds(imap): outlook-idle delay-newmail imap_client_workarounds(pop3): pop3_uidl_format(default): %08Xu%08Xv pop3_uidl_format(imap): %08Xu%08Xv pop3_uidl_format(pop3): %v.%u pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh auth default: user: nobody verbose: yes passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: prefetch socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: mail master: path: /var/run/dovecot/auth-master mode: 384 user: vmail group: mail plugin: quota: maildir:%u quota_warning: storage=75%% /root/quota-warning.sh 75 %u sieve: /var/vmail/%d/%n/.dovecot.sieve The warning is not delivered to users. In my logs the user quota's percentage is calculated right dovecot: Feb 15 23:42:33 Info: IMAP(a...@foo.org): Loading modules from directory: /usr/lib64/dovecot/imap dovecot: Feb 15 23:42:33 Info: IMAP(a...@foo.org): Module loaded: /usr/lib64/dovecot/imap/lib10_quota_plugin.so dovecot: Feb 15 23:42:33 Info: IMAP(a...@foo.org): Module loaded: /usr/lib64/dovecot/imap/lib11_imap_quota_plugin.so dovecot: Feb 15 23:42:33 Info: IMAP(a...@foo.org): Effective uid=1000, gid=12, home=/var/vmail/foo.org/alex/ dovecot: Feb 15 23:42:33 Info: IMAP(a...@foo.org): Quota root: name=a...@foo.org backend=maildir args= dovecot: Feb 15 23:42:33 Info: IMAP(a...@foo.org): Quota rule: root=a...@foo.org mailbox=* bytes=52428800 messages=0 dovecot: Feb 15 23:42:33 Info: imap-login: Login: user=a...@foo.org, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured dovecot: Feb 15 23:42:33 Info: IMAP(a...@foo.org): Quota warning: bytes=39321600 (75%) messages=0 command=/root/quota-warning.sh 75 a...@foo.org but also overcoming the space defined on quota warning, the command is not performed. The command does not contain errors because if performed by cli correctly sends the alert. Any ideas? Regards. Alex
Re: [Dovecot] quota warning issue
On Sun, 2009-02-15 at 23:53 +0100, Alex wrote: quota: maildir:%u quota_warning: storage=75%% /root/quota-warning.sh 75 %u sieve: /var/vmail/%d/%n/.dovecot.sieve The warning is not delivered to users. Are you testing it correctly? Like http://wiki.dovecot.org/Quota/1.1 says: Note that the warning is ONLY executed at the exact time when the limit is being crossed, so when you're testing it you have to do it by crossing the limit by saving a new mail. If something else besides Dovecot updates quota so that the limit is crossed, the warning is never executed. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] quota warning issue
Timo Sirainen wrote: On Sun, 2009-02-15 at 23:53 +0100, Alex wrote: quota: maildir:%u quota_warning: storage=75%% /root/quota-warning.sh 75 %u sieve: /var/vmail/%d/%n/.dovecot.sieve The warning is not delivered to users. Are you testing it correctly? Like http://wiki.dovecot.org/Quota/1.1 says: Note that the warning is ONLY executed at the exact time when the limit is being crossed, so when you're testing it you have to do it by crossing the limit by saving a new mail. If something else besides Dovecot updates quota so that the limit is crossed, the warning is never executed. Yes I do. I leave my mailbox quota to 70% and I sent an email with an attachment that cross my 75% limit and also moved quota-warning script from root to /usr/local/bin and give vmail ownership. Nothing to do for me :( Is there something wrong in my config? Thanks.
Re: [Dovecot] quota warning issue
Timo Sirainen wrote: On Mon, 2009-02-16 at 00:13 +0100, Alex wrote: Are you testing it correctly? Like http://wiki.dovecot.org/Quota/1.1 says: .. Yes I do. I leave my mailbox quota to 70% and I sent an email with an attachment that cross my 75% limit and also moved quota-warning script from root to /usr/local/bin and give vmail ownership. Nothing to do for me :( Is there something wrong in my config? Your debug output was from imap, but you're crossing the quota from deliver. What does deliver log with mail_debug=yes when crossing the quota? this from dovocot-deliver.log with mail_debug=yes: deliver(a...@foo.org): Feb 16 00:10:31 Info: Loading modules from directory: /usr/lib64/dovecot/lda deliver(a...@foo.org): Feb 16 00:10:31 Info: Module loaded: /usr/lib64/dovecot/lda/lib10_quota_plugin.so deliver(a...@foo.org): Feb 16 00:10:31 Info: Module loaded: /usr/lib64/dovecot/lda/lib90_cmusieve_plugin.so deliver(a...@foo.org): Feb 16 00:10:31 Info: auth input: home=/var/vmail/foo.org/alex/ deliver(a...@foo.org): Feb 16 00:10:31 Info: auth input: mail=maildir:/var/vmail/foo.org/alex/ deliver(a...@foo.org): Feb 16 00:10:31 Info: auth input: uid=1000 deliver(a...@foo.org): Feb 16 00:10:31 Info: auth input: gid=12 deliver(a...@foo.org): Feb 16 00:10:31 Info: auth input: quota_rule=*:storage=9216 deliver(a...@foo.org): Feb 16 00:14:10 Info: Quota root: name=a...@foo.org backend=maildir args= deliver(a...@foo.org): Feb 16 00:14:10 Info: Quota rule: root=a...@foo.org mailbox=* bytes=9437184 messages=0 deliver(a...@foo.org): Feb 16 00:14:10 Info: Quota warning: bytes=6606028 (70%) messages=0 command=/usr/local/bin/quota-warning.sh 70 a...@foo.org deliver(a...@foo.org): Feb 16 00:14:10 Info: maildir: data=/var/vmail/foo.org/alex/ deliver(a...@foo.org): Feb 16 00:14:10 Info: maildir++: root=/var/vmail/foo.org/alex, index=, control=, inbox=/var/vmail/foo.org/alex
Re: [Dovecot] quota warning issue
On Mon, 2009-02-16 at 00:24 +0100, Alex wrote: Your debug output was from imap, but you're crossing the quota from deliver. What does deliver log with mail_debug=yes when crossing the quota? this from dovocot-deliver.log with mail_debug=yes: And that was all the output from a run that crossed the quota warning limit? It should have logged quota: Executing warning: in that case. If it didn't, the problem is that Dovecot didn't think the limit was crossed.. I guess there could be some more debug information logged here. signature.asc Description: This is a digitally signed message part