Re: [Dovecot] Expire plugin - empty expires table
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, 8 Dec 2013, Peter Šori wrote: Dovecot does not fill expires table when moving messages to Trash or Junk folder. I don't use expire, but: http://wiki2.dovecot.org/Plugins/Expire disagrees with # 2.2.6: /etc/dovecot/dovecot.conf [...] plugin { expire = Trash 1 Trash.* 1 Junk 2 looks like this is Dovecot v1 syntax. - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUqV6ZF3r2wJMiz2NAQJNPwgAmNBMiNmeyTCn5BjB44dLqq3M3vJLHkji YTSKhYTd5twiskFI06CeDql5l+uBcGc5vfH5SKTIg/2zjvUJwpR/vIfBmM3U+ZNq YphEfT/V6+oVWUeEERBjw7v7eT3IgG8do7cZ4/EHGNScRB8bBTHTUzNbpPWVSo+U RlER9OqspBD7hLJCc1P8jZ7vCNV0LT8/T1hdx1HGRFJnrvH8FsXiwKTekxs2868B HYNy6iF+zLtZJDoOUUVvZ3w8CkU96T5njZC8YxosOBiAanykadoLCdnwOq+h91VG qgpaFRz6m4oABgIuENHntNjGL9PhPB5eebR4YDdMStpKBsi0UDHG8Q== =VDz7 -END PGP SIGNATURE-
Re: [Dovecot] Expire plugin - empty expires table
Embarrassment at its best :) Working conf: plugin { expire = Trash expire2 = Trash/* expire3 = Spam } First testing was done with 2.x syntax and it seems I had something else wrong then -- later on I just assumed the wiki syntax must be wrong, as I struggled for whole day with combinations. Thanks for help Steffen. -Original Message- From: Steffen Kaiser [mailto:skdove...@smail.inf.fh-brs.de] Sent: Monday, December 9, 2013 9:08 AM To: Peter Šori Cc: dovecot@dovecot.org Subject: Re: [Dovecot] Expire plugin - empty expires table -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, 8 Dec 2013, Peter Šori wrote: Dovecot does not fill expires table when moving messages to Trash or Junk folder. I don't use expire, but: http://wiki2.dovecot.org/Plugins/Expire disagrees with # 2.2.6: /etc/dovecot/dovecot.conf [...] plugin { expire = Trash 1 Trash.* 1 Junk 2 looks like this is Dovecot v1 syntax. - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUqV6ZF3r2wJMiz2NAQJNPwgAmNBMiNmeyTCn5BjB44dLqq3M3vJLHkji YTSKhYTd5twiskFI06CeDql5l+uBcGc5vfH5SKTIg/2zjvUJwpR/vIfBmM3U+ZNq YphEfT/V6+oVWUeEERBjw7v7eT3IgG8do7cZ4/EHGNScRB8bBTHTUzNbpPWVSo+U RlER9OqspBD7hLJCc1P8jZ7vCNV0LT8/T1hdx1HGRFJnrvH8FsXiwKTekxs2868B HYNy6iF+zLtZJDoOUUVvZ3w8CkU96T5njZC8YxosOBiAanykadoLCdnwOq+h91VG qgpaFRz6m4oABgIuENHntNjGL9PhPB5eebR4YDdMStpKBsi0UDHG8Q== =VDz7 -END PGP SIGNATURE- smime.p7s Description: S/MIME cryptographic signature
[Dovecot] Expire plugin - empty expires table
Hello, Dovecot does not fill expires table when moving messages to Trash or Junk folder. I looked all over mailing list and googled around and cannot find what could be wrong - pleas help :) Dict works for quota, so I presume connection to mysql is not a problem - mailuser has Select,Insert,Update,Delete privileges over quota and expires table (log below for deleting message) dovecot log does not show any problems, not even with mail_debug. doveadm -A works dovecot -n # 2.2.6: /etc/dovecot/dovecot.conf # OS: Linux 3.10.17-gentoo x86_64 Gentoo Base System release 2.2 xfs auth_mechanisms = plain login dict { expire = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext } hostname = @. listen = * login_greeting = * ready. mail_access_groups = vmail mail_attachment_dir = /data/vmail/attachments mail_attachment_fs = sis-queue /data/vmail/attachments/queue:posix mail_attachment_hash = %{sha256} mail_location = mdbox:/data/vmail/storage/%d/%n/:ALT=/data/vmail/altstorage/%d/%n/:INDEX=/da ta/vmail/indexes/%d/%n/ mail_plugins = expire quota zlib mail_log notify managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave mdbox_preallocate_space = yes mdbox_rotate_interval = 1 days namespace Unwanted { hidden = no inbox = no list = yes location = maildir:/data/vmail/unwanted/%d/%n/ mailbox Ham { auto = subscribe } mailbox Spam { auto = subscribe } prefix = Unwanted. separator = . subscriptions = yes type = private } namespace inbox { hidden = no inbox = yes list = yes location = mdbox:/data/vmail/storage/%d/%n/:ALT=/data/vmail/altstorage/%d/%n/:INDEX=/da ta/vmail/indexes/%d/%n/ mailbox Archives { auto = subscribe special_use = \Archive } mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Folders { auto = subscribe } mailbox Junk { auto = subscribe special_use = \Junk } mailbox Sent { auto = subscribe special_use = \Sent } mailbox Trash { auto = subscribe special_use = \Trash } prefix = separator = . subscriptions = yes type = private } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { expire = Trash 1 Trash.* 1 Junk 2 expire_dict = proxy::expire mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename mail_log_fields = uid box msgid from subject, size, vsize, flags quota = dict:User quota::proxy::quota quota_exceeded_message = Quota exceeded (mailbox is full) quota_grace = 10%% quota_rule = *:storage=1G quota_rule2 = Trash:storage=+100M quota_rule3 = Junk:ignore quota_status_nouser = DUNNO quota_status_overquota = 552 5.2.2 Mailbox is full quota_status_success = DUNNO quota_warning = storage=95%% quota-warning 95 %u quota_warning2 = storage=85%% quota-warning 85 %u quota_warning3 = storage=70%% quota-warning 70 %u sieve = /data/vmail/sieve/%d/%n/.dovecot.sieve sieve_before = /data/vmail/sieve/before.sieve sieve_default = /data/vmail/sieve/default.sieve sieve_dir = /data/vmail/sieve/%d/%n/sieve sieve_global_dir = /data/vmail/sieve/ zlib_save = bz2 zlib_save_level = 9 } postmaster_address = postmas...@fingerprints.si protocols = imap sieve service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } } service dict { unix_listener dict { group = vmail mode = 0660 } } service managesieve-login { inet_listener sieve { port = 4190 } } service quota-status { client_limit = 1 executable = quota-status -p postfix inet_listener { port = 12340 } } service quota-warning { executable = script /usr/bin/dovecot-quota-warning.sh unix_listener quota-warning { mode = 0666 user = vmail } user = vmail } ssl_cert = /etc/ssl/certs/san_*.-2048.crt ssl_key = /etc/ssl/private/san_*.-2048.key userdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } protocol lda { mail_plugins = expire sieve zlib } protocol imap { mail_plugins = expire quota zlib mail_log notify expire imap_quota quota } protocol sieve { managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date }
[Dovecot] Expire plugin and databases
Dumb question: do I need to have a database to run the expire plugin?
Re: [Dovecot] Expire plugin and databases
You need something, sqlite is perhaps your lightest option. You need to store the expire data somewhere.. http://wiki2.dovecot.org/Plugins/Expire On 12/05/2013 04:51 PM, Mauricio Tavares wrote: Dumb question: do I need to have a database to run the expire plugin?
Re: [Dovecot] expire plugin doesn't work?
Hi!Thanks for your suggestion, that moved me in to right direction.It was double permission issue, that I was able to debug since changed format, and now timestaps are added into the mysql table. As far as I understand expire plugin only adds timestamps to mysql table, and thats it, isn't it?I mean I want to understand how to configure mails to be removed...Do I need to add to cron doveadm expunge -A mailbox Trash savedbefore 30d ? Thanks a lot! Date: Fri, 23 Aug 2013 21:17:34 -0400 From: geda...@gedalya.net To: dovecot@dovecot.org; anton.chi...@live.com Subject: Re: [Dovecot] expire plugin doesn't work? On 08/23/2013 09:05 PM, Anton Chigin wrote: plugin { expire = Trash 7 expire_dict = proxy::expire You're using Dovecot 2.1, that configuration syntax is for 1.2. Please follow documentation at http://wiki2.dovecot.org/Plugins/Expire
Re: [Dovecot] expire plugin doesn't work?
Yes, you add that cron job, and it would work with or without the expire plugin. The thing is that if the expire plugin is enabled, the doveadm expunge command will look at the expires table in mysql and only process users who are in the database with a timestamp older than your specified message age. The timestamp is supposed to designate age of oldest message in folder. Without the expires plugin, the command would have to process every user in the system (as per the result of the iterate query, if you're using SQL authentication) and actually open every Trash folder and look inside, which would normally be a lot more work and take more time. On 08/24/2013 06:16 AM, Anton Chigin wrote: Hi! Thanks for your suggestion, that moved me in to right direction. It was double permission issue, that I was able to debug since changed format, and now timestaps are added into the mysql table. As far as I understand expire plugin only adds timestamps to mysql table, and thats it, isn't it? I mean I want to understand how to configure mails to be removed... Do I need to add to cron doveadm expunge -A mailbox Trash savedbefore 30d ? Thanks a lot! Date: Fri, 23 Aug 2013 21:17:34 -0400 From: geda...@gedalya.net To: dovecot@dovecot.org; anton.chi...@live.com Subject: Re: [Dovecot] expire plugin doesn't work? On 08/23/2013 09:05 PM, Anton Chigin wrote: plugin { expire = Trash 7 expire_dict = proxy::expire You're using Dovecot 2.1, that configuration syntax is for 1.2. Please follow documentation at http://wiki2.dovecot.org/Plugins/Expire
Re: [Dovecot] expire plugin doesn't work?
So,is enabling expire plugin the only way doveadm expunge to work with static userdb, because of lack iterate_query option? If I test it now doveadm search I see:Aug 24 13:28:22 piscola dovecot: auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/authAug 24 13:28:22 piscola dovecot: auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_mysql.soAug 24 13:28:22 piscola dovecot: auth: Debug: master in: LIST#0111Aug 24 13:28:22 piscola dovecot: auth: Error: Trying to iterate users, but userdbs don't support it userdb I have:userdb { args = uid=vmail gid=vmail home=/home/mail/vhosts/%d/%n driver = static} Is it OK and doveadm will not have to iterate users since expire plugin is enabled?Or should I still fix it to get it works properly? Thanks a lot for your help! Date: Sat, 24 Aug 2013 06:22:32 -0400 From: geda...@gedalya.net To: anton.chi...@live.com CC: dovecot@dovecot.org Subject: Re: [Dovecot] expire plugin doesn't work? Yes, you add that cron job, and it would work with or without the expire plugin. The thing is that if the expire plugin is enabled, the doveadm expunge command will look at the expires table in mysql and only process users who are in the database with a timestamp older than your specified message age. The timestamp is supposed to designate age of oldest message in folder. Without the expires plugin, the command would have to process every user in the system (as per the result of the iterate query, if you're using SQL authentication) and actually open every Trash folder and look inside, which would normally be a lot more work and take more time. On 08/24/2013 06:16 AM, Anton Chigin wrote: Hi! Thanks for your suggestion, that moved me in to right direction. It was double permission issue, that I was able to debug since changed format, and now timestaps are added into the mysql table. As far as I understand expire plugin only adds timestamps to mysql table, and thats it, isn't it? I mean I want to understand how to configure mails to be removed... Do I need to add to cron doveadm expunge -A mailbox Trash savedbefore 30d ? Thanks a lot! Date: Fri, 23 Aug 2013 21:17:34 -0400 From: geda...@gedalya.net To: dovecot@dovecot.org; anton.chi...@live.com Subject: Re: [Dovecot] expire plugin doesn't work? On 08/23/2013 09:05 PM, Anton Chigin wrote: plugin { expire = Trash 7 expire_dict = proxy::expire You're using Dovecot 2.1, that configuration syntax is for 1.2. Please follow documentation at http://wiki2.dovecot.org/Plugins/Expire
Re: [Dovecot] expire plugin doesn't work?
I don't know, why don't you just try? If you run the exact same command but with search instead of expunge, it should also use the expire plugin in the same way, so that should be an easy test. Are you using sql for passdb? If so I wonder if you could define an sql userdb in addition to the static userdb with only an iterate_query defined..? On 08/24/2013 06:46 AM, Anton Chigin wrote: So, is enabling expire plugin the only way doveadm expunge to work with static userdb, because of lack iterate_query option? If I test it now doveadm search I see: Aug 24 13:28:22 piscola dovecot: auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth Aug 24 13:28:22 piscola dovecot: auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_mysql.so Aug 24 13:28:22 piscola dovecot: auth: Debug: master in: LIST#0111 Aug 24 13:28:22 piscola dovecot: auth: Error: Trying to iterate users, but userdbs don't support it userdb I have: userdb { args = uid=vmail gid=vmail home=/home/mail/vhosts/%d/%n driver = static } Is it OK and doveadm will not have to iterate users since expire plugin is enabled? Or should I still fix it to get it works properly? Thanks a lot for your help! Date: Sat, 24 Aug 2013 06:22:32 -0400 From: geda...@gedalya.net To: anton.chi...@live.com CC: dovecot@dovecot.org Subject: Re: [Dovecot] expire plugin doesn't work? Yes, you add that cron job, and it would work with or without the expire plugin. The thing is that if the expire plugin is enabled, the doveadm expunge command will look at the expires table in mysql and only process users who are in the database with a timestamp older than your specified message age. The timestamp is supposed to designate age of oldest message in folder. Without the expires plugin, the command would have to process every user in the system (as per the result of the iterate query, if you're using SQL authentication) and actually open every Trash folder and look inside, which would normally be a lot more work and take more time. On 08/24/2013 06:16 AM, Anton Chigin wrote: Hi! Thanks for your suggestion, that moved me in to right direction. It was double permission issue, that I was able to debug since changed format, and now timestaps are added into the mysql table. As far as I understand expire plugin only adds timestamps to mysql table, and thats it, isn't it? I mean I want to understand how to configure mails to be removed... Do I need to add to cron doveadm expunge -A mailbox Trash savedbefore 30d ? Thanks a lot! Date: Fri, 23 Aug 2013 21:17:34 -0400 From: geda...@gedalya.net mailto:geda...@gedalya.net To: dovecot@dovecot.org mailto:dovecot@dovecot.org; anton.chi...@live.com mailto:anton.chi...@live.com Subject: Re: [Dovecot] expire plugin doesn't work? On 08/23/2013 09:05 PM, Anton Chigin wrote: plugin { expire = Trash 7 expire_dict = proxy::expire You're using Dovecot 2.1, that configuration syntax is for 1.2. Please follow documentation at http://wiki2.dovecot.org/Plugins/Expire
Re: [Dovecot] expire plugin doesn't work?
I've set up both static userdb and mysql userdb and according to mysql logs it works as you described!Will move from static to sql usersdb anyway. Thanks! Date: Sat, 24 Aug 2013 06:57:05 -0400 From: geda...@gedalya.net To: anton.chi...@live.com CC: dovecot@dovecot.org Subject: Re: [Dovecot] expire plugin doesn't work? I don't know, why don't you just try? If you run the exact same command but with search instead of expunge, it should also use the expire plugin in the same way, so that should be an easy test. Are you using sql for passdb? If so I wonder if you could define an sql userdb in addition to the static userdb with only an iterate_query defined..? On 08/24/2013 06:46 AM, Anton Chigin wrote: So, is enabling expire plugin the only way doveadm expunge to work with static userdb, because of lack iterate_query option? If I test it now doveadm search I see: Aug 24 13:28:22 piscola dovecot: auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth Aug 24 13:28:22 piscola dovecot: auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_mysql.so Aug 24 13:28:22 piscola dovecot: auth: Debug: master in: LIST#0111 Aug 24 13:28:22 piscola dovecot: auth: Error: Trying to iterate users, but userdbs don't support it userdb I have: userdb { args = uid=vmail gid=vmail home=/home/mail/vhosts/%d/%n driver = static } Is it OK and doveadm will not have to iterate users since expire plugin is enabled? Or should I still fix it to get it works properly? Thanks a lot for your help! Date: Sat, 24 Aug 2013 06:22:32 -0400 From: geda...@gedalya.net To: anton.chi...@live.com CC: dovecot@dovecot.org Subject: Re: [Dovecot] expire plugin doesn't work? Yes, you add that cron job, and it would work with or without the expire plugin. The thing is that if the expire plugin is enabled, the doveadm expunge command will look at the expires table in mysql and only process users who are in the database with a timestamp older than your specified message age. The timestamp is supposed to designate age of oldest message in folder. Without the expires plugin, the command would have to process every user in the system (as per the result of the iterate query, if you're using SQL authentication) and actually open every Trash folder and look inside, which would normally be a lot more work and take more time. On 08/24/2013 06:16 AM, Anton Chigin wrote: Hi! Thanks for your suggestion, that moved me in to right direction. It was double permission issue, that I was able to debug since changed format, and now timestaps are added into the mysql table. As far as I understand expire plugin only adds timestamps to mysql table, and thats it, isn't it? I mean I want to understand how to configure mails to be removed... Do I need to add to cron doveadm expunge -A mailbox Trash savedbefore 30d ? Thanks a lot! Date: Fri, 23 Aug 2013 21:17:34 -0400 From: geda...@gedalya.net To: dovecot@dovecot.org; anton.chi...@live.com Subject: Re: [Dovecot] expire plugin doesn't work? On 08/23/2013 09:05 PM, Anton Chigin wrote: plugin { expire = Trash 7 expire_dict = proxy::expire You're using Dovecot 2.1, that configuration syntax is for 1.2. Please follow documentation at http://wiki2.dovecot.org/Plugins/Expire
Re: [Dovecot] expire plugin doesn't work?
Oh cool. Nice to hear. Remember to take a look at the prefetch http://wiki2.dovecot.org/UserDatabase/Prefetch , it saves you an extra query in cases where authentication took place before userdb lookup. On 08/24/2013 07:19 AM, Anton Chigin wrote: I've set up both static userdb and mysql userdb and according to mysql logs it works as you described! Will move from static to sql usersdb anyway. Thanks! Date: Sat, 24 Aug 2013 06:57:05 -0400 From: geda...@gedalya.net To: anton.chi...@live.com CC: dovecot@dovecot.org Subject: Re: [Dovecot] expire plugin doesn't work? I don't know, why don't you just try? If you run the exact same command but with search instead of expunge, it should also use the expire plugin in the same way, so that should be an easy test. Are you using sql for passdb? If so I wonder if you could define an sql userdb in addition to the static userdb with only an iterate_query defined..? On 08/24/2013 06:46 AM, Anton Chigin wrote: So, is enabling expire plugin the only way doveadm expunge to work with static userdb, because of lack iterate_query option? If I test it now doveadm search I see: Aug 24 13:28:22 piscola dovecot: auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth Aug 24 13:28:22 piscola dovecot: auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_mysql.so Aug 24 13:28:22 piscola dovecot: auth: Debug: master in: LIST#0111 Aug 24 13:28:22 piscola dovecot: auth: Error: Trying to iterate users, but userdbs don't support it userdb I have: userdb { args = uid=vmail gid=vmail home=/home/mail/vhosts/%d/%n driver = static } Is it OK and doveadm will not have to iterate users since expire plugin is enabled? Or should I still fix it to get it works properly? Thanks a lot for your help! Date: Sat, 24 Aug 2013 06:22:32 -0400 From: geda...@gedalya.net mailto:geda...@gedalya.net To: anton.chi...@live.com mailto:anton.chi...@live.com CC: dovecot@dovecot.org mailto:dovecot@dovecot.org Subject: Re: [Dovecot] expire plugin doesn't work? Yes, you add that cron job, and it would work with or without the expire plugin. The thing is that if the expire plugin is enabled, the doveadm expunge command will look at the expires table in mysql and only process users who are in the database with a timestamp older than your specified message age. The timestamp is supposed to designate age of oldest message in folder. Without the expires plugin, the command would have to process every user in the system (as per the result of the iterate query, if you're using SQL authentication) and actually open every Trash folder and look inside, which would normally be a lot more work and take more time. On 08/24/2013 06:16 AM, Anton Chigin wrote: Hi! Thanks for your suggestion, that moved me in to right direction. It was double permission issue, that I was able to debug since changed format, and now timestaps are added into the mysql table. As far as I understand expire plugin only adds timestamps to mysql table, and thats it, isn't it? I mean I want to understand how to configure mails to be removed... Do I need to add to cron doveadm expunge -A mailbox Trash savedbefore 30d ? Thanks a lot! Date: Fri, 23 Aug 2013 21:17:34 -0400 From: geda...@gedalya.net mailto:geda...@gedalya.net To: dovecot@dovecot.org mailto:dovecot@dovecot.org; anton.chi...@live.com mailto:anton.chi...@live.com Subject: Re: [Dovecot] expire plugin doesn't work? On 08/23/2013 09:05 PM, Anton Chigin wrote: plugin { expire = Trash 7 expire_dict = proxy::expire You're using Dovecot 2.1, that configuration syntax is for 1.2. Please follow documentation at http://wiki2.dovecot.org/Plugins/Expire
[Dovecot] expire plugin doesn't work?
Hello, I've configured dovecot to use expire plugin: heres my dovecot -n: - # 2.1.7: /etc/dovecot/dovecot.conf # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.1 ext4 auth_mechanisms = plain login dict { expire = mysql:/etc/dovecot/dovecot-dict-expire-sql.conf.ext } mail_location = maildir:/home/mail/vhosts/%d/%n mail_plugins = expire mail_privileged_group = vmail managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave namespace inbox { inbox = yes location = mailbox Drafts { auto = no special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { auto = subscribe special_use = \Sent } mailbox Sent Messages { special_use = \Sent } mailbox Spam { auto = subscribe special_use = \Junk } mailbox Trash { auto = subscribe special_use = \Trash } prefix = } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { expire = Trash 7 expire_dict = proxy::expire sieve = ~/dovecot.sieve sieve_dir = ~/sieve sieve_max_actions = 32 sieve_max_redirects = 4 sieve_max_script_size = 1M sieve_quota_max_scripts = 32 } protocols = imap pop3 lmtp sieve service auth-worker { user = vmail } service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } unix_listener auth-userdb { mode = 0600 user = vmail } user = dovecot } service imap-login { inet_listener imap { port = 0 } inet_listener imaps { port = 993 ssl = yes } } service lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0600 user = postfix } } service managesieve-login { inet_listener sieve { port = 4190 } service_count = 1 vsz_limit = 128 M } service pop3-login { inet_listener pop3 { port = 0 } inet_listener pop3s { port = 995 ssl = yes } } ssl = required ssl_ca = /etc/ssl/my_certs/sub.class1.server.ca.pem ssl_cert = /etc/ssl/private/chig.in/mail/mail.chig.in.crt ssl_key = /etc/ssl/private/chig.in/mail/mail.chig.in.key userdb { args = uid=vmail gid=vmail home=/home/mail/vhosts/%d/%n driver = static } protocol lmtp { mail_plugins = expire sieve } protocol sieve { mail_max_userip_connections = 10 managesieve_implementation_string = Cyrus timsieved v2.2.13 managesieve_logout_format = bytes=%i/%o managesieve_max_compile_errors = 5 } - What exactly I did 1) dovecot.conf dict { expire = mysql:/etc/dovecot/dovecot-dict-expire-sql.conf.ext } 2) /etc/dovecot/dovecot-dict-expire-sql.conf.ext connect = host=127.0.0.1 dbname=mailserver user=mail password=SOMEPASS map { pattern = shared/expire/$user/$mailbox table = expires value_field = expire_stamp fields { username = $user mailbox = $mailbox } } 3) conf.d/10-mail.conf mail_plugins = expire 4) conf.d/90-plugin.conf plugin { #setting_name = value expire = Trash 7 expire_dict = proxy::expire } 5) Created table in mysql server mysql show create table expires; +-+-+ | Table | Create Table | +-+-+ | expires | CREATE TABLE `expires` ( `username` varchar(75) NOT NULL, `mailbox` varchar(255) NOT NULL, `expire_stamp` int(11) NOT NULL, PRIMARY KEY (`username`,`mailbox`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 | +-+-+ 1 row in set (0.00 sec) And nothing works dovecot debug shows nothing: only one string related to expire plugin Aug 24 04:21:37 piscola dovecot: lmtp(16927): Debug: Module loaded: /usr/lib/dovecot/modules/lib20_expire_plugin.so mysql general query log show nothing also... Can anyone help me please? Thanks a lot!
Re: [Dovecot] expire plugin doesn't work?
On 08/23/2013 09:05 PM, Anton Chigin wrote: plugin { expire = Trash 7 expire_dict = proxy::expire You're using Dovecot 2.1, that configuration syntax is for 1.2. Please follow documentation at http://wiki2.dovecot.org/Plugins/Expire
Re: [Dovecot] Expire plugin with multiple mail servers
Hello, I have configured mysql on one server and each mail server use this database for expire plugin. I have configured each mail server as explains on:http://wiki2.dovecot.org/Plugins/Expire But now I have a question; How i configure director server to use the database? I need to configure expire plugin on the director server? thanks in advance. -- Ramon Frontera Gallardo Universitat de les Illes Balears El 11/09/2012, a las 15:34, Timo Sirainen escribió: On 11.9.2012, at 12.41, Ramón Frontera wrote: Hello we are running Dovecot 2.1.9 and I want to configure expire plugin. We have 2 proxies with director and 4 mail servers. I have configured expire plugin on a single mail server and it works Ok. I don't konw how to configure with 4 mail servers and 2 proxies. My first idea is create on each mailserver one sqlite database and configure the expire plugin on proxy, but I don't know if this is a good idea. The backend servers need to be the ones actually doing the expunges. Director servers are the only ones that know which backend server to run each expunge on. Expire plugin works by limiting the users iterated by doveadm expunge -A, which is run on director. So the director server where you run this command needs to have access to the full expire database. This pretty much means one shared SQL server between all servers.
[Dovecot] Expire plugin with multiple mail servers
Hello we are running Dovecot 2.1.9 and I want to configure expire plugin. We have 2 proxies with director and 4 mail servers. I have configured expire plugin on a single mail server and it works Ok. I don't konw how to configure with 4 mail servers and 2 proxies. My first idea is create on each mailserver one sqlite database and configure the expire plugin on proxy, but I don't know if this is a good idea. I don't know if the database should be in one proxy, and I don't know which server has to do the doveadm expunge command Do you have any idea how is the best way to configure expire plugin on this scenario? Thanks in advance. -- Ramon Frontera Gallardo Universitat de les Illes Balears
Re: [Dovecot] Expire plugin with multiple mail servers
Am 11.09.2012 11:41, schrieb Ramón Frontera: Hello we are running Dovecot 2.1.9 and I want to configure expire plugin. We have 2 proxies with director and 4 mail servers. I have configured expire plugin on a single mail server and it works Ok. I don't konw how to configure with 4 mail servers and 2 proxies. My first idea is create on each mailserver one sqlite database and configure the expire plugin on proxy, but I don't know if this is a good idea. I don't know if the database should be in one proxy, and I don't know which server has to do the doveadm expunge command Do you have any idea how is the best way to configure expire plugin on this scenario? Thanks in advance. -- Ramon Frontera Gallardo Universitat de les Illes Balears i use one mysql setup for all servers http://wiki2.dovecot.org/Plugins/Expire and doing cron jobs on every server i.e doveadm expunge -A mailbox Trash savedbefore 30d fit the cron times and expunge times and folders to your needs prepare for cron mail messages what got expunged if you have lots off acounts there may be better ways -- Best Regards MfG Robert Schetterer
Re: [Dovecot] Expire plugin with multiple mail servers
On 11.9.2012, at 12.41, Ramón Frontera wrote: Hello we are running Dovecot 2.1.9 and I want to configure expire plugin. We have 2 proxies with director and 4 mail servers. I have configured expire plugin on a single mail server and it works Ok. I don't konw how to configure with 4 mail servers and 2 proxies. My first idea is create on each mailserver one sqlite database and configure the expire plugin on proxy, but I don't know if this is a good idea. The backend servers need to be the ones actually doing the expunges. Director servers are the only ones that know which backend server to run each expunge on. Expire plugin works by limiting the users iterated by doveadm expunge -A, which is run on director. So the director server where you run this command needs to have access to the full expire database. This pretty much means one shared SQL server between all servers.
Re: [Dovecot] Expire plugin not executing for sieve plugin?
No ideas? I googled some more and eventually turned up this posting: http://www.mailinglistarchive.com/html/dovecot@dovecot.org/2011-01/msg00716.html guy seems to be having the exact problem I am, unfortunately, no-one replied to his post either :(
Re: [Dovecot] Expire plugin not executing for sieve plugin?
On 10/24/2011 7:52 PM, Dan Swartzendruber wrote: No ideas? I googled some more and eventually turned up this posting: http://www.mailinglistarchive.com/html/dovecot@dovecot.org/2011-01/msg00716.html guy seems to be having the exact problem I am, unfortunately, no-one replied to his post either :( Hmm, wonder why no one answered that one. In theory, those plugins should interact gracefully. However, if something is wrong, I cannot test this right now, since I've not installed expire so far. I'll ask Timo if he can take a look at this. Otherwise, I'll have to build a small test setup first, which may take some time. Regards, Stephan.
[Dovecot] Expire plugin not executing for sieve plugin?
Running dovecot 1.2.12 on ubuntu 10.10. Here is the problem: I have mysql backend for expire. I am using the dovecot-postfix package which creates /etc/dovecot/conf.d/01-mail-stack-delivery.conf which looks like this: # Some general options protocols = imap imaps managesieve disable_plaintext_auth = no ssl = yes ssl_cert_file = /etc/ssl/certs/ssl-mail.pem ssl_key_file = /etc/ssl/private/ssl-mail.key ssl_cipher_list = ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM mail_location = maildir:~/Maildir auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@ # IMAP configuration protocol imap { mail_max_userip_connections = 10 imap_client_workarounds = outlook-idle delay-newmail mail_plugins = expire } # LDA configuration protocol lda { postmaster_address = postmaster mail_plugins = sieve expire quota_full_tempfail = yes deliver_log_format = msgid=%m: %$ rejection_reason = Your message to %t was automatically rejected:%n%r } # Plugins configuration plugin { sieve=~/.dovecot.sieve sieve_dir=~/sieve # If the user has no personal active script (i.e. if the file # indicated in sieve= does not exist), use this one: sieve_global_path = /var/lib/dovecot/sieve/default.sieve } The sieve is: require fileinto; require imap4flags; if header :contains X-Spam-Flag YES { setflag \\Seen; fileinto SPAM; stop; } Originally, this did not have the setflag or stop - I added them hoping to fix the problem, but no luck. The problem is this: when spam assassin has flagged a message as spam, the sieve runs and the message is in fact filed into the SPAM folder, but no expire entry is added to the database. If I move such a message from the SPAM folder to the Inbox and then back to SPAM, voila, I *do* get the entry created. Here is the mysql table before and after I did the move/move: mysql select * from expires; +--+---+--+ | username | mailbox | expire_stamp | +--+---+--+ | dswartz | Deleted Items | 1319720163 | | dswartz | Sent | 1319120165 | | denise | Trash | 1319139920 | | samantha | Trash | 1319136146 | | denise | Sent | 1319655872 | | danielle | Sent | 1319192230 | | samantha | Sent | 1319268855 | | dswartz | Trash | 1319725884 | | samantha | SPAM | 1321504531 | +--+---+--+ 9 rows in set (0.00 sec) mysql select * from expires; +--+---+--+ | username | mailbox | expire_stamp | +--+---+--+ | dswartz | Deleted Items | 1319720163 | | dswartz | Sent | 1319120165 | | denise | Trash | 1319139920 | | samantha | Trash | 1319136146 | | denise | Sent | 1319655872 | | danielle | Sent | 1319192230 | | samantha | Sent | 1319268855 | | dswartz | Trash | 1319725884 | | samantha | SPAM | 1321504531 | | dswartz | SPAM | 1321714666 | +--+---+--+ 10 rows in set (0.00 sec) It's almost like the fileinto stuff is not running the plugin code at all, or am I totally on drugs? If I can't get a fix for this, I at least now can think of a hack to fix it. e.g. every night, run a script that adds a now timestamp for everyone's SPAM folder to trick the periodic expire tool code into checking that folder, but obviously I'd rather have a real fix :) If this is just 'how it works', is it better in 2.0?
[Dovecot] Expire plugin not executing for sieve plugin?
Running dovecot 1.2.12 on ubuntu 10.10. Here is the problem: I have mysql backend for expire. I am using the dovecot-postfix package which creates /etc/dovecot/conf.d/01-mail-stack-delivery.conf which looks like this: # Some general options protocols = imap imaps managesieve disable_plaintext_auth = no ssl = yes ssl_cert_file = /etc/ssl/certs/ssl-mail.pem ssl_key_file = /etc/ssl/private/ssl-mail.key ssl_cipher_list = ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM mail_location = maildir:~/Maildir auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@ # IMAP configuration protocol imap { mail_max_userip_connections = 10 imap_client_workarounds = outlook-idle delay-newmail mail_plugins = expire } # LDA configuration protocol lda { postmaster_address = postmaster mail_plugins = sieve expire quota_full_tempfail = yes deliver_log_format = msgid=%m: %$ rejection_reason = Your message to %t was automatically rejected:%n%r } # Plugins configuration plugin { sieve=~/.dovecot.sieve sieve_dir=~/sieve # If the user has no personal active script (i.e. if the file # indicated in sieve= does not exist), use this one: sieve_global_path = /var/lib/dovecot/sieve/default.sieve } The sieve is: require fileinto; require imap4flags; if header :contains X-Spam-Flag YES { setflag \\Seen; fileinto SPAM; stop; } Originally, this did not have the setflag or stop - I added them hoping to fix the problem, but no luck. The problem is this: when spam assassin has flagged a message as spam, the sieve runs and the message is in fact filed into the SPAM folder, but no expire entry is added to the database. If I move such a message from the SPAM folder to the Inbox and then back to SPAM, voila, I *do* get the entry created. Here is the mysql table before and after I did the move/move: mysql select * from expires; +--+---+--+ | username | mailbox | expire_stamp | +--+---+--+ | dswartz | Deleted Items | 1319720163 | | dswartz | Sent | 1319120165 | | denise | Trash | 1319139920 | | samantha | Trash | 1319136146 | | denise | Sent | 1319655872 | | danielle | Sent | 1319192230 | | samantha | Sent | 1319268855 | | dswartz | Trash | 1319725884 | | samantha | SPAM | 1321504531 | +--+---+--+ 9 rows in set (0.00 sec) mysql select * from expires; +--+---+--+ | username | mailbox | expire_stamp | +--+---+--+ | dswartz | Deleted Items | 1319720163 | | dswartz | Sent | 1319120165 | | denise | Trash | 1319139920 | | samantha | Trash | 1319136146 | | denise | Sent | 1319655872 | | danielle | Sent | 1319192230 | | samantha | Sent | 1319268855 | | dswartz | Trash | 1319725884 | | samantha | SPAM | 1321504531 | | dswartz | SPAM | 1321714666 | +--+---+--+ 10 rows in set (0.00 sec) It's almost like the fileinto stuff is not running the plugin code at all, or am I totally on drugs? If I can't get a fix for this, I at least now can think of a hack to fix it. e.g. every night, run a script that adds a now timestamp for everyone's SPAM folder to trick the periodic expire tool code into checking that folder, but obviously I'd rather have a real fix :) If this is just 'how it works', is it better in 2.0?
Re: [Dovecot] expire plugin and sieve
On Thu, 10 Feb 2011 02:07:38 +0200, Timo Sirainen t...@iki.fi wrote: However, the combination of sieve and expire does not seem to be working: When sieve moves messages into a folder, no entry is created in the database. Don't these plugins work together, or did I misconfigure something? If you didn't yet find out: lda: mail_plugins: expire mail_plugins: sieve The second mail_plugins setting overrides the first one. Use: mail_plugins = expire sieve Thanks, this works to the extent that dates are now written into the database when mails are moved by sieve filters. What doesn't work (and I spent the last weeks testing and googling, hence my late reply) is the deletion of expired mails. When an expiration date occurs, the database is updated, but nothing is deleted. I have implemented a test with a 1 day expiry. Dates get updated, nothing is deleted. Output of expire tool: Info: Loading modules from directory: /usr/lib/dovecot/modules/imap Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_expire_plugin.so Info: expire: pattern=INBOX.Trash type=expunge secs=604800 Info: expire: pattern=INBOX.Mailing-Lists.test type=expunge secs=86400 Info: expire: pattern=INBOX.Spam type=expunge secs=2592000 Info: auth input: uid=5000 Info: auth input: gid=5000 Info: auth input: home=/home/vmail/example.com/user1 Info: Namespace: type=private, prefix=INBOX., sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=/home/vmail//:INDEX=/var/indexes/ Info: maildir++: root=/home/vmail/, index=/var/indexes, control=, inbox=/home/vmail/ Info: auth input: uid=5000 Info: auth input: gid=5000 Info: auth input: home=/home/vmail/example.com/user2 Info: Namespace: type=private, prefix=INBOX., sep=., inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=/home/vmail//:INDEX=/var/indexes/ Info: maildir++: root=/home/vmail/, index=/var/indexes, control=, inbox=/home/vmail/ Is this an issue with the mail_location setting? I know the wiki says something about a userdb lookup returning the mail location, but, frankly, I'm not sure what that's supposed to say... Thanks.
Re: [Dovecot] expire plugin and sieve
On Sat, 2011-01-22 at 08:27 +0100, c...@kruemel.org wrote: However, the combination of sieve and expire does not seem to be working: When sieve moves messages into a folder, no entry is created in the database. Don't these plugins work together, or did I misconfigure something? If you didn't yet find out: lda: mail_plugins: expire mail_plugins: sieve The second mail_plugins setting overrides the first one. Use: mail_plugins = expire sieve
[Dovecot] expire plugin and sieve
Hi. I am running dovecot 1.2.9 here, allowing users to filter their mails with the sieve plugin, and am using sieve to move mail tagged as probably spam into the spam folder. I'm now looking to get the expire plugin working as well. It does work as described in the wiki: Once I manually move messages into other folders, the mysql database is filled with entries. However, the combination of sieve and expire does not seem to be working: When sieve moves messages into a folder, no entry is created in the database. Don't these plugins work together, or did I misconfigure something? # dovecot -n # 1.2.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-27-server x86_64 Ubuntu 10.04.1 LTS fuse.glusterfs log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps pop3 pop3s managesieve ssl_cert_file: /etc/dovecot/imapd.pem ssl_key_file: /etc/dovecot/imapd.pem disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login login_executable(managesieve): /usr/lib/dovecot/managesieve-login login_user: postfix login_process_per_connection: no login_process_size: 128 first_valid_uid: 113 mail_privileged_group: mail mail_location: maildir:/home/vmail/%Ld/%Ln:INDEX=/var/indexes/%u mail_debug: yes mail_nfs_storage: yes mbox_write_locks: fcntl dotlock mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_executable(managesieve): /usr/lib/dovecot/managesieve mail_plugins(default): expire mail_plugins(imap): expire mail_plugins(pop3): expire mail_plugins(managesieve): mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve imap_client_workarounds(default): outlook-idle delay-newmail imap_client_workarounds(imap): outlook-idle delay-newmail imap_client_workarounds(pop3): imap_client_workarounds(managesieve): pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh pop3_client_workarounds(managesieve): managesieve_logout_format(default): bytes=%i/%o managesieve_logout_format(imap): bytes=%i/%o managesieve_logout_format(pop3): bytes=%i/%o managesieve_logout_format(managesieve): bytes ( in=%i : out=%o ) namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes lda: postmaster_address: postmas...@example.com mail_plugins: expire mail_plugins: sieve auth default: mechanisms: plain login user: nobody verbose: yes passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: static args: uid=5000 gid=5000 home=/home/vmail/%Ld/%Ln allow_all_users=yes socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: root master: path: /var/run/dovecot/auth-master mode: 438 user: vmail group: vmail plugin: sieve: /home/vmail/%Ld/%Ln/.dovecot.sieve sieve_global_path: /home/vmail/globalsieverc sieve_dir: ~/sieve sieve_global_dir: /var/lib/dovecot/sieve/global/ expire: INBOX.Trash 7 INBOX.Mailing-Lists.* 30 INBOX.Spam 14 expire_dict: proxy::expire dict: expire: mysql:/etc/dovecot/dovecot-dict-expire.conf Thanks, Christian
Re: [Dovecot] Expire plugin does not work
On Thu, 2010-12-16 at 20:55 +0100, Christoph Pleger wrote: dovecot: dict: Error: sqlite: exec(INSERT INTO expires (expire_stamp,username,mailbox) VALUES ('1292525469','christoph','Trash')) failed: unable to open database file (14) So SQLite can't open its database. I don't know what 14 error would mean, maybe SQLite docs can tell you. connect = /etc/dovecot/dovecot-dict.sqlite Databases shouldn't really be put under /etc.. Rather maybe /var/lib/dovecot/ I have attached a dovecot -n-generated dovecot.conf, the configuration file for the expire dict service, and my sqlite3 database file. In my filesystem, dovecot-dict.sqlite currently has permissions 666. But if it's 0666, I'm not really sure what the problem could be. You could try if dict can access it as root: service dict { user = root }
Re: [Dovecot] Expire plugin does not work
Hello, But if it's 0666, I'm not really sure what the problem could be. You could try if dict can access it as root: service dict { user = root } I have found the solution: The directory where the sqlite3 database resides must be writable by the dovecot user. Regards Christoph
[Dovecot] Expire plugin does not work
Hello, I followed the instructions on http://wiki2.dovecot.org/Plugins/Expire to configure the expire plugin, but when I move a message to the Trash folder, I get the following error messages in my logfile: dovecot: dict: Error: sqlite: exec(INSERT INTO expires (expire_stamp,username,mailbox) VALUES ('1292525469','christoph','Trash')) failed: unable to open database file (14) dovecot: dict: Error: sql dict: commit failed: I have attached a dovecot -n-generated dovecot.conf, the configuration file for the expire dict service, and my sqlite3 database file. In my filesystem, dovecot-dict.sqlite currently has permissions 666. Regards Christoph # 2.0.7: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-bpo.5-amd64 x86_64 Debian 5.0.7 auth_mechanisms = plain login dict { expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext } disable_plaintext_auth = no first_valid_uid = 122 last_valid_uid = 122 mail_gid = vmail mail_location = mdbox:~/mdbox mail_plugins = expire mail_uid = vmail managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date passdb { args = scheme=PLAIN-MD5 username_format=%Ln /etc/dovecot/databases/users driver = passwd-file } plugin { antispam_backend = SPOOL2DIR antispam_spam = Spam antispam_spool2dir_notspam = %h/ham/%%020lu-%%05lu antispam_spool2dir_spam = %h/spam/%%020lu-%%05lu antispam_trash = Trash expire = Spam expire2 = Trash expire_dict = proxy::expire sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } protocols = imap lmtp sieve service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } } service dict { unix_listener dict { group = vmail mode = 0660 user = vmail } } service imap-login { inet_listener imap { port = 0 } inet_listener imaps { port = 993 ssl = yes } } service lmtp { unix_listener lmtp { group = dspam mode = 0660 user = root } } service managesieve-login { inet_listener sieve { port = 4190 } inet_listener sieve_deprecated { port = 2000 } } service pop3-login { inet_listener pop3 { port = 0 } inet_listener pop3s { port = 0 ssl = yes } } ssl_cert = /etc/ssl/certs/dovecot.pem ssl_key = /etc/ssl/private/dovecot.pem userdb { args = username_format=%Ln /etc/dovecot/databases/users driver = passwd-file } protocol lmtp { mail_plugins = expire sieve } protocol imap { imap_client_workarounds = delay-newmail mail_plugins = expire antispam } connect = /etc/dovecot/dovecot-dict.sqlite # CREATE TABLE quota ( # username varchar(100) not null, # bytes bigint not null default 0, # messages integer not null default 0, # primary key (username) # ); map { pattern = priv/quota/storage table = quota username_field = username value_field = bytes } map { pattern = priv/quota/messages table = quota username_field = username value_field = messages } # CREATE TABLE expires ( # username varchar(100) not null, # mailbox varchar(255) not null, # expire_stamp integer not null, # primary key (username, mailbox) # ); map { pattern = shared/expire/$user/$mailbox table = expires value_field = expire_stamp fields { username = $user mailbox = $mailbox } } dovecot-dict.sqlite Description: application/sqlite3
Re: [Dovecot] Expire plugin does not work
Hello, I forgot to mention the dovecot version number. It is version 2.0.7. Regards Christoph
Re: [Dovecot] expire plugin
Timo Sirainen wrote: On Tue, 2010-08-03 at 10:59 +0200, Arnaud2 bali wrote: expire: .Trash 1 .Trash/* 1 .Spam 2 Remove '.' before the mailbox names. That good Thank you very much # 1.2.11: /etc/dovecot/dovecot.conf # OS: Linux 2.6.26-2-amd64 x86_64 Debian 5.0.5 log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps pop3s managesieve disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login login_executable(managesieve): /usr/lib/dovecot/managesieve-login mail_privileged_group: mail *mail_location: maildir:~ *mbox_write_locks: fcntl dotlock mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_executable(managesieve): /usr/lib/dovecot/managesieve mail_plugins(default): quota expire imap_quota autocreate mail_plugins(imap): quota expire imap_quota autocreate mail_plugins(pop3): quota expire autocreate mail_plugins(managesieve): mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve lda: postmaster_address: arn...@ungi.net mail_plugins: quota expire sieve autocreate auth_socket_path: /var/run/dovecot/auth-master auth default: mechanisms: plain login verbose: yes debug: yes debug_passwords: yes passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 384 user: vmail plugin: quota: maildir expire: Trash 1 Trash/* 1 Spam 2 expire_dict: proxy::expire sieve: ~/.dovecot.sieve sieve_after: /home/vmail/sieve/default.sieve autocreate: Trash autocreate2: Spam autocreate3: Sent autocreate4: Inbox autocreate5: Drafts autocreate6: Templates autosubscribe: Trash autosubscribe2: Spam autosubscribe3: Sent autosubscribe4: Inbox autosubscribe5: Drafts autosubscribe6: Templates dict: expire: mysql:/etc/dovecot/dovecot-dict-expire.conf # cat /etc/dovecot/dovecot-dict-expire.conf connect = host=localhost user=xx password=x dbname=postfixadmin map { pattern = /home/vmail/homes/$user/$mailbox #shared/expire/$user/$mailbox table = dovecot_expires value_field = expire_stamp fields { username = $user mailbox = $mailbox } } mysql desc dovecot_expires; +--+--+--+-+-+---+ | Field| Type | Null | Key | Default | Extra | +--+--+--+-+-+---+ | username | varchar(255) | NO | PRI | NULL| | | mailbox | varchar(255) | NO | PRI | NULL| | | expire_stamp | int(11) | NO | | NULL| | +--+--+--+-+-+---+ # cat /etc/dovecot/dovecot-sql.conf driver = mysql connect = host=localhost user=xxx password=xxx dbname=postfixadmin user_query = SELECT CONCAT('/home/vmail/homes/',maildir) AS *home,* 65500 AS uid, 65500 AS gid, \ CONCAT('*:bytes=', CAST(quota AS CHAR)) AS quota_rule \ FROM mailbox WHERE username = %u AND active=1 password_query = SELECT username as user, password, maildir as userdb_home, 65500 as userdb_uid, 65500 as userdb_gid FROM mailbox WHERE username = '%u' AND active=1
[Dovecot] expire plugin
Hi I try to use expire plugin with mysql When i use my thunderbird client to delete a message, nothing is write in the mysql database. My maildir is look like /home/vmail/homes/arna...@xxx..xxx/ and /etc/dovecot/dovecot-dict-expire.conf : connect = host=localhost user=xx password=x dbname=postfixadmin map { pattern = /home/vmail/homes/$user/$mailbox #shared/expire/$user/$mailbox table = dovecot_expires value_field = expire_stamp fields { username = $user mailbox = $mailbox } } Is pattern ok ? My detail configuration : # dovecot --version 1.2.11 # dovecot -n # 1.2.11: /etc/dovecot/dovecot.conf # OS: Linux 2.6.26-2-amd64 x86_64 Debian 5.0.5 log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps pop3s managesieve disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login login_executable(managesieve): /usr/lib/dovecot/managesieve-login mail_privileged_group: mail mail_location: maildir:/%h mbox_write_locks: fcntl dotlock mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_executable(managesieve): /usr/lib/dovecot/managesieve mail_plugins(default): quota expire imap_quota autocreate mail_plugins(imap): quota expire imap_quota autocreate mail_plugins(pop3): quota expire autocreate mail_plugins(managesieve): mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve lda: postmaster_address: x...@.xx mail_plugins: quota expire sieve autocreate auth_socket_path: /var/run/dovecot/auth-master auth default: mechanisms: plain login verbose: yes debug: yes debug_passwords: yes passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 384 user: vmail plugin: quota: maildir expire: .Trash 1 .Trash/* 1 .Spam 2 expire_dict: proxy::expire sieve: ~/.dovecot.sieve sieve_after: /home/vmail/sieve/default.sieve autocreate: Trash autocreate2: Spam autocreate3: Sent autocreate4: Inbox autocreate5: Drafts autocreate6: Templates autosubscribe: Trash autosubscribe2: Spam autosubscribe3: Sent autosubscribe4: Inbox autosubscribe5: Drafts autosubscribe6: Templates dict: expire: mysql:/etc/dovecot/dovecot-dict-expire.conf # cat /etc/dovecot/dovecot-dict-expire.conf connect = host=localhost user=xx password=x dbname=postfixadmin map { pattern = /home/vmail/homes/$user/$mailbox #shared/expire/$user/$mailbox table = dovecot_expires value_field = expire_stamp fields { username = $user mailbox = $mailbox } } mysql desc dovecot_expires; +--+--+--+-+-+---+ | Field| Type | Null | Key | Default | Extra | +--+--+--+-+-+---+ | username | varchar(255) | NO | PRI | NULL| | | mailbox | varchar(255) | NO | PRI | NULL| | | expire_stamp | int(11) | NO | | NULL| | +--+--+--+-+-+---+ # cat /etc/dovecot/dovecot-sql.conf driver = mysql connect = host=localhost user=xxx password=xxx dbname=postfixadmin user_query = SELECT CONCAT('/home/vmail/homes/',maildir) AS home, 65500 AS uid, 65500 AS gid, \ CONCAT('*:bytes=', CAST(quota AS CHAR)) AS quota_rule \ FROM mailbox WHERE username = %u AND active=1 password_query = SELECT username as user, password, maildir as userdb_home, 65500 as userdb_uid, 65500 as userdb_gid FROM mailbox WHERE username = '%u' AND active=1 Thank you
Re: [Dovecot] expire plugin
On Tue, 2010-08-03 at 10:59 +0200, Arnaud2 bali wrote: connect = host=localhost user=xx password=x dbname=postfixadmin map { pattern = /home/vmail/homes/$user/$mailbox #shared/expire/$user/$mailbox .. Is pattern ok ? No, it always must be shared/expire/$user/$mailbox.
Re: [Dovecot] expire plugin
Timo Sirainen wrote: On Tue, 2010-08-03 at 10:59 +0200, Arnaud2 bali wrote: connect = host=localhost user=xx password=x dbname=postfixadmin map { pattern = /home/vmail/homes/$user/$mailbox #shared/expire/$user/$mailbox .. Is pattern ok ? No, it always must be shared/expire/$user/$mailbox. Hi Timo I'have changed, but i always have nothing in the database. An idea ? # cat /etc/dovecot/dovecot-dict-expire.conf connect = host=localhost user=xx password=xxx dbname=postfixadmin map { pattern = shared/expire/$user/$mailbox table = dovecot_expires value_field = expire_stamp fields { username = $user mailbox = $mailbox } }
Re: [Dovecot] expire plugin
On Tue, 2010-08-03 at 10:59 +0200, Arnaud2 bali wrote: expire: .Trash 1 .Trash/* 1 .Spam 2 Remove '.' before the mailbox names.
Re: [Dovecot] expire plugin
2010/6/22 Timo Sirainen t...@iki.fi: I am testing expire plugin, with quota plugin enabled. When I execute expire-tool, maildirsize is not updated. Is there any solution to update maildirsize when executing expire-tool? # /usr/local/dovecot/sbin/dovecot --version 1.1.18 You could try if setting MAIL_PLUGINS=quota before executing expire-tool works. If not, you'll need v1.2. Setting MAIL_PLUGINS=quota did not work. I tried v1.2, it worked. Thanks
Re: [Dovecot] expire plugin
On Mon, 2010-06-21 at 12:25 +0900, suzuki wrote: Hello, I am testing expire plugin, with quota plugin enabled. When I execute expire-tool, maildirsize is not updated. Is there any solution to update maildirsize when executing expire-tool? # /usr/local/dovecot/sbin/dovecot --version 1.1.18 You could try if setting MAIL_PLUGINS=quota before executing expire-tool works. If not, you'll need v1.2.
[Dovecot] expire plugin
Hello, I am testing expire plugin, with quota plugin enabled. When I execute expire-tool, maildirsize is not updated. Is there any solution to update maildirsize when executing expire-tool? # /usr/local/dovecot/sbin/dovecot --version 1.1.18 # /usr/local/dovecot/sbin/dovecot -n # 1.1.18: /usr/local/dovecot/etc/dovecot.conf # OS: FreeBSD 7.2-STABLE i386 base_dir: /var/run/dovecot/ syslog_facility: local4 protocols: pop3 ssl_disable: yes disable_plaintext_auth: no login_dir: /var/run/dovecot//login login_executable: /usr/local/dovecot/libexec/dovecot/pop3-login login_greeting: ready mail_max_userip_connections: 1 verbose_proctitle: yes first_valid_uid: 10026 last_valid_uid: 10026 first_valid_gid: 10026 last_valid_gid: 10026 mail_privileged_group: vmail mail_uid: 10026 mail_gid: 10026 mail_location: maildir:~/Maildir mail_debug: yes maildir_copy_preserve_filename: yes mail_executable: /usr/local/dovecot/libexec/dovecot/pop3 mail_plugins: quota expire mail_plugin_dir: /usr/local/dovecot/lib/dovecot/pop3 mail_log_max_lines_per_sec: 30 pop3_enable_last: yes pop3_reuse_xuidl: yes pop3_lock_session: yes pop3_client_workarounds: outlook-no-nuls,oe-ns-eoh lda: postmaster_address: postmaster mail_plugins: quota expire sendmail_path: /usr/local/sbin/sendmail auth_socket_path: /var/run/dovecot/auth-master auth default: verbose: yes passdb: driver: sql args: /usr/local/dovecot/etc/dovecot-sql.conf userdb: driver: sql args: /usr/local/dovecot/etc/dovecot-sql.conf socket: type: listen master: path: /var/run/dovecot/auth-master mode: 384 user: vmail plugin: quota: maildir expire: Spam 7 expire_dict: proxy:/var/run/dovecot/dict-server:expire auth_socket_path: /var/run/dovecot/auth-master dict: expire: mysql:/usr/local/dovecot/etc/dovecot-dict-expire.conf
Re: [Dovecot] Expire plugin
Hi, We've resolved the issues that started this thread off. We needed to recompile our version of Dovecot (1.1.6) with the inclusion of the mySQL libraries. With this done, we were able to connect Dovecot to the mySQL db, and got the expire plugin to save times to the db. This works great, and we're very excited to get this to work. We're now trying to actually expunge the messages, using the expire tool, and are running into some questions that we need answered. I saw the notice about the expire tool and mail_location that use %u in the path. This is the mail_location that we're using in our configuration: mail_location = mbox:~:INBOX=/var/mail/%u:INDEX=/var/mail/.dovecot-index/%1u/%u/ The documentation refers to pulling values from the userdb to set a HOME or MAIL variable so that dovecot can see the proper location with the 1.1.x series. What userdb is this referring to? We haven't used a userdb with any of our implementations of dovecot to this point, and setting one up at this point really isn't an option. The documentation seems to indicate that you can use a passwd file to set these variables, but that to do so means manipulating each user's entry, which again, really isn't an option. Is there anyone that is getting around this somehow? Seems pretty common to use %u within the mail_location, so I'm wondering how people have dealt with this. Is there any other way to get around this problem? We were looking at the expire tool source to see if we could manipulate how the user is being passed there. This would be an option we would pursue, if we could know what changes would need to be made. Seems like the expire tool utilizes much of the dovecot code itself to do its job. Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of Minnesota Email: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet ServicesOffice: 626J WBOB* * * * On Fri, 23 Apr 2010, Thomas M Goerger wrote: Actually, this is where the problem is coming in. We'd switched the server from using IMAPS to IMAP, and I'd neglected to change the folder location. So, now using the mail/Trash folder, I'm again seeing the permission denied. We'd determined that the dict-server socket that was being used was a stale one. So, we removed it, and are now getting a No such file or directory error. How is this socket created? I'd have thought it would be created upon Dovecot starting up, but it is not doing so. Is it something in the plugin settings that causes this to be created? Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of MinnesotaEmail: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet Services Office: 626J WBOB* * * * On Fri, 23 Apr 2010, Thomas M Goerger wrote: I do now see on the console: Apr 22 16:56:14 mars.tc.umn.edu imap(testg019): : net_connect_unix(/var/opt/dovecot/run/dovecot/dict-server) failed: Connection refused I owned this file to mysql:mysql now, and the error has gone away on subsequent logins, but I still don't see anything in the db. Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of Minnesota Email: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet ServicesOffice: 626J WBOB* * * * On Fri, 23 Apr 2010, Thomas M Goerger wrote: Yes, the plugin is loading. The libraries associated are being touched upon user login, so it looks like expire is running. Just that nothing is being added to the database upon a user putting something into the Trash. We do have our mail not in root of a user folder, but in mail/. So, I added mail/Trash to the plugin settings thinking that that was the problem, but there was no difference. I
Re: [Dovecot] Expire plugin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 23 Apr 2010, Thomas M Goerger wrote: How is this socket created? I'd have thought it would be created upon I would say on the start of Dovecot. Dovecot starting up, but it is not doing so. Is it something in the plugin settings that causes this to be created? No, the plugin just uses the dict server. You need something like this in your conf: dict { quotadict = mysql:/etc/dovecot-dict-sql.conf } Regarding the socket: Connection refused typically means, IMHO, that there is no listener on the socket. So I guess that there is no dict server running. Regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBS9aQob+Vh58GPL/cAQJvoQf+ON20D1UXIuK76RH4dvqatRVKmFxJwiro ppJ8uLCg8eIz9qudA9H8or18uOZXfRbFc6dxwLIr6FyC91LrqylcaAH+xOQxpSYF 7jmnbAvf+xLjF9hhX3XddBEL3oJNN4EPw6lw02XXLN7/ZrZ7oAaMYRfB1maHQnHs yCqj4bk/NhKfXGfnWpkbQv4afR9N6evWKpTIlMzuWnBYh18SP6FwEegpWVyEmTar a71EjTrIGwXp+rcZJclnj2JWbov+xwFB0STx1LDM4+Ejo+zjpUOSbqiwuyaE10Sj OSbr5BgvB6hGyev/plGOrYgy+YhAw0g76L8KT+Gpj3kTl5MFgtuLUA== =j9Zz -END PGP SIGNATURE-
Re: [Dovecot] Expire plugin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 22 Apr 2010, Thomas M Goerger wrote: expires table when I look. Is there anywhere that expire can log to so I can see what might be happening? It doesn't look like it logs to the Did you checked that the plugin is loaded at all? Regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBS9FRQr+Vh58GPL/cAQIBVgf6AnYmZqePcumF1g1tmz+TxMlInf3T44Rk anYKFYRY0SfF/pDyyJLAYzQHDK1/57qT6H1CND4MdYlPHW2uGXAdwd+7HH4XuA/v bCSqWX+MreDFkxb6TXutMJ+4ymyJNK+y1Hs8vyPS1Pq76Lg1V2TkpuebKp6NfUim 7d1yVFT2LmFh6MIkRUQygCD9wZcSGoeQbeheumrLO2r3p0yhnCRi/WhiPY40G31v OCbHj6VXq10NRU8dr0z8Wpdq9JrIT3WEe/XoMHXz5CPKow9Kbj737zK5AT/5b/Gq IlvyJb3j6YQ2QwF3G4KZvFkkC3GcdCB/QtpiciYMiEY92kSX9p/ggw== =9l2w -END PGP SIGNATURE-
Re: [Dovecot] Expire plugin
Yes, the plugin is loading. The libraries associated are being touched upon user login, so it looks like expire is running. Just that nothing is being added to the database upon a user putting something into the Trash. We do have our mail not in root of a user folder, but in mail/. So, I added mail/Trash to the plugin settings thinking that that was the problem, but there was no difference. I checked to make sure that the user that I'd set up in the db had the correct permissions to be able to talk to the right db and tables. Does it need to have any global permissions set? Most importantly though, is there any logging being done anywhere? Anything I can check to see what interaction might be happening between dovecot and the db? Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of Minnesota Email: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet ServicesOffice: 626J WBOB* * * * On Fri, 23 Apr 2010, Steffen Kaiser wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 22 Apr 2010, Thomas M Goerger wrote: expires table when I look. Is there anywhere that expire can log to so I can see what might be happening? It doesn't look like it logs to the Did you checked that the plugin is loaded at all? Regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBS9FRQr+Vh58GPL/cAQIBVgf6AnYmZqePcumF1g1tmz+TxMlInf3T44Rk anYKFYRY0SfF/pDyyJLAYzQHDK1/57qT6H1CND4MdYlPHW2uGXAdwd+7HH4XuA/v bCSqWX+MreDFkxb6TXutMJ+4ymyJNK+y1Hs8vyPS1Pq76Lg1V2TkpuebKp6NfUim 7d1yVFT2LmFh6MIkRUQygCD9wZcSGoeQbeheumrLO2r3p0yhnCRi/WhiPY40G31v OCbHj6VXq10NRU8dr0z8Wpdq9JrIT3WEe/XoMHXz5CPKow9Kbj737zK5AT/5b/Gq IlvyJb3j6YQ2QwF3G4KZvFkkC3GcdCB/QtpiciYMiEY92kSX9p/ggw== =9l2w -END PGP SIGNATURE-
Re: [Dovecot] Expire plugin
I do now see on the console: Apr 22 16:56:14 mars.tc.umn.edu imap(testg019): : net_connect_unix(/var/opt/dovecot/run/dovecot/dict-server) failed: Connection refused I owned this file to mysql:mysql now, and the error has gone away on subsequent logins, but I still don't see anything in the db. Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of Minnesota Email: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet ServicesOffice: 626J WBOB* * * * On Fri, 23 Apr 2010, Thomas M Goerger wrote: Yes, the plugin is loading. The libraries associated are being touched upon user login, so it looks like expire is running. Just that nothing is being added to the database upon a user putting something into the Trash. We do have our mail not in root of a user folder, but in mail/. So, I added mail/Trash to the plugin settings thinking that that was the problem, but there was no difference. I checked to make sure that the user that I'd set up in the db had the correct permissions to be able to talk to the right db and tables. Does it need to have any global permissions set? Most importantly though, is there any logging being done anywhere? Anything I can check to see what interaction might be happening between dovecot and the db? Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of MinnesotaEmail: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet Services Office: 626J WBOB* * * * On Fri, 23 Apr 2010, Steffen Kaiser wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 22 Apr 2010, Thomas M Goerger wrote: expires table when I look. Is there anywhere that expire can log to so I can see what might be happening? It doesn't look like it logs to the Did you checked that the plugin is loaded at all? Regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBS9FRQr+Vh58GPL/cAQIBVgf6AnYmZqePcumF1g1tmz+TxMlInf3T44Rk anYKFYRY0SfF/pDyyJLAYzQHDK1/57qT6H1CND4MdYlPHW2uGXAdwd+7HH4XuA/v bCSqWX+MreDFkxb6TXutMJ+4ymyJNK+y1Hs8vyPS1Pq76Lg1V2TkpuebKp6NfUim 7d1yVFT2LmFh6MIkRUQygCD9wZcSGoeQbeheumrLO2r3p0yhnCRi/WhiPY40G31v OCbHj6VXq10NRU8dr0z8Wpdq9JrIT3WEe/XoMHXz5CPKow9Kbj737zK5AT/5b/Gq IlvyJb3j6YQ2QwF3G4KZvFkkC3GcdCB/QtpiciYMiEY92kSX9p/ggw== =9l2w -END PGP SIGNATURE-
Re: [Dovecot] Expire plugin
Actually, this is where the problem is coming in. We'd switched the server from using IMAPS to IMAP, and I'd neglected to change the folder location. So, now using the mail/Trash folder, I'm again seeing the permission denied. We'd determined that the dict-server socket that was being used was a stale one. So, we removed it, and are now getting a No such file or directory error. How is this socket created? I'd have thought it would be created upon Dovecot starting up, but it is not doing so. Is it something in the plugin settings that causes this to be created? Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of Minnesota Email: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet ServicesOffice: 626J WBOB* * * * On Fri, 23 Apr 2010, Thomas M Goerger wrote: I do now see on the console: Apr 22 16:56:14 mars.tc.umn.edu imap(testg019): : net_connect_unix(/var/opt/dovecot/run/dovecot/dict-server) failed: Connection refused I owned this file to mysql:mysql now, and the error has gone away on subsequent logins, but I still don't see anything in the db. Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of MinnesotaEmail: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet Services Office: 626J WBOB* * * * On Fri, 23 Apr 2010, Thomas M Goerger wrote: Yes, the plugin is loading. The libraries associated are being touched upon user login, so it looks like expire is running. Just that nothing is being added to the database upon a user putting something into the Trash. We do have our mail not in root of a user folder, but in mail/. So, I added mail/Trash to the plugin settings thinking that that was the problem, but there was no difference. I checked to make sure that the user that I'd set up in the db had the correct permissions to be able to talk to the right db and tables. Does it need to have any global permissions set? Most importantly though, is there any logging being done anywhere? Anything I can check to see what interaction might be happening between dovecot and the db? Thanks! * * Tom Goerger - Email/Unix System Administrator * * * * University of Minnesota Email: t...@umn.edu * * Operations, Infrastructure and Architecture Phone: 4-5804 * * Internet ServicesOffice: 626J WBOB* * * * On Fri, 23 Apr 2010, Steffen Kaiser wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 22 Apr 2010, Thomas M Goerger wrote: expires table when I look. Is there anywhere that expire can log to so I can see what might be happening? It doesn't look like it logs to the Did you checked that the plugin is loaded at all? Regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBS9FRQr+Vh58GPL/cAQIBVgf6AnYmZqePcumF1g1tmz+TxMlInf3T44Rk anYKFYRY0SfF/pDyyJLAYzQHDK1/57qT6H1CND4MdYlPHW2uGXAdwd+7HH4XuA/v bCSqWX+MreDFkxb6TXutMJ+4ymyJNK+y1Hs8vyPS1Pq76Lg1V2TkpuebKp6NfUim 7d1yVFT2LmFh6MIkRUQygCD9wZcSGoeQbeheumrLO2r3p0yhnCRi/WhiPY40G31v OCbHj6VXq10NRU8dr0z8Wpdq9JrIT3WEe/XoMHXz5CPKow9Kbj737zK5AT/5b/Gq IlvyJb3j6YQ2QwF3G4KZvFkkC3GcdCB/QtpiciYMiEY92kSX9p/ggw== =9l2w -END PGP SIGNATURE-
Re: [Dovecot] Expire plugin / expire-tool redesign for doveadm
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 13 Apr 2010, Timo Sirainen wrote: The expire plugin keeps track of the oldest message in configured mailboxes. Its only configuration is the list of tracked mailboxes. There's no configuration like what the expire timeouts are or anything. My first idea, that hit me after reading through the whole post, was to keep track of all mailboxes of all users and issue the commands later. The plugin saves just one value per physical mailbox, when a) the first message arrives an empty mailbox or messages are expunged? Or each time a message is received. What would be the impact of monitoring all mailboxes? There will be a new doveadm command: doveadm expunge [-u user | -A] mailbox search query What about shared mailboxes and namespaces? Can mailbox be a phyiscal path rather than a IMAP mailbox name? So when you want to expunge all mails from Trash older than 1 week for all users, you say: doveadm expunge -A Trash savedbefore 1w TODO: - When using multiple mailboxes it would be more optimal to handle all mailboxes for a user at once, rather than using separate doveadm commands. Maybe the command syntax needs some more thinking to support this. Different mailboxes could have different rules though.. Hmm, does doveadm support to read commands from stdin / file? If I imagine such scenario with some hundreds of users having configured expire for some folders, that leads to plenty of process creations etc.pp. doveadm EOT expunge -A Trash savedbefore 1w expunge -u user1 INBOX savedbefore 1y expunge -u user2 INBOX savedbefore 1m EOT Regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBS8V2/b+Vh58GPL/cAQJloggAwxk85Y3pCeu6u6timuP25JJ1tRy/mlfr L2sgMooKtQOjz5VJZeLQnQEwDfbFItdRMMbwSg60R740h+yIVhNiJ+sQZ8FdUohj hlUpvMJzdY2XG1R3/dBqEhhHx2YXYfxszyPykvjPOXFz7v/TXqvGJUHdZG13uqRL /qVuhlstR/DBot9xlcqDWiJ/v2hiE53BQxfMn1Umfm05le8C/i9ELHCHC2NKIo6a zCURknf0ORwxoL8E2whRVpUXUCeaJHjDYcKTnGtAsZPlpFRylMiaGN/cDSTrqqpw kMpUtQ8cQbdgkaLgvpRhwxNZm5OjUaa6LyEsTSBTEHTSLa1SM6GSPw== =Yfvd -END PGP SIGNATURE-
Re: [Dovecot] Expire plugin / expire-tool redesign for doveadm
On 14.4.2010, at 11.04, Steffen Kaiser wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 13 Apr 2010, Timo Sirainen wrote: The expire plugin keeps track of the oldest message in configured mailboxes. Its only configuration is the list of tracked mailboxes. There's no configuration like what the expire timeouts are or anything. My first idea, that hit me after reading through the whole post, was to keep track of all mailboxes of all users and issue the commands later. The plugin saves just one value per physical mailbox, when a) the first message arrives an empty mailbox or messages are expunged? Or each time a message is received. What would be the impact of monitoring all mailboxes? Looks like the current code does a dict lookup every time messages are saved. I guess this is mainly to fix the situation when expire plugin is enabled after messages already exist in mailbox. But this check could be moved to doveadm I think.. So the dict would only be updated when: 1) message arrives on empty mailbox 2) first message is expunged But I don't think it's useful to do this for all mailboxes. Even if it doesn't impact normal performance, it wastes disk space on the database for no reason. But expire plugin already supports wildcards, so just telling it to monitor * mailboxes would get what you want. There will be a new doveadm command: doveadm expunge [-u user | -A] mailbox search query What about shared mailboxes and namespaces? Can mailbox be a phyiscal path rather than a IMAP mailbox name? No. By shared mailboxes I guess you mean public (i.e. not another user's mailboxes)? You can expunge them using some user that has rights to do that, and using e.g. public/blah as the mailbox name. - When using multiple mailboxes it would be more optimal to handle all mailboxes for a user at once, rather than using separate doveadm commands. Maybe the command syntax needs some more thinking to support this. Different mailboxes could have different rules though.. Hmm, does doveadm support to read commands from stdin / file? I was actually thinking about that myself today too. If I imagine such scenario with some hundreds of users having configured expire for some folders, that leads to plenty of process creations etc.pp. doveadm EOT expunge -A Trash savedbefore 1w expunge -u user1 INBOX savedbefore 1y expunge -u user2 INBOX savedbefore 1m EOT I don't think the process creation is much of an issue. But something like this could work: doveadm expunge -A EOT Trash savedbefore 1w Trash/* savedbefore 1w Spam savedbefore 2mon EOT Another problem I had been thinking about was how to do the search query parsing. For example with fetch: doveadm fetch (unseen or unanswered) subject hello world That won't work, because shell compains about () characters. But they could be escaped with \( and \). The next problem is the quotes. If I know that a string is supposed to follow after subject, it't not really a problem. But I'd rather not build separate parsers for command line parsing and stdin parsing (because in stdin I need to handle internally). But without knowing the context, I don't know if: doveadm fetch subject (foo) should be translated to string (foo) or if there should be a list with foo as its only element. So maybe the whole thing should be instead: doveadm fetch '(unseen or unanswered) subject hello world' but that makes it more difficult to add variables, because if you do: doveadm fetch 'subject $foo' you need to make sure $foo escapes and \ characters. .. difficult..
[Dovecot] Expire plugin / expire-tool redesign for doveadm
Expire plugin / expire-tool seems annoyingly inflexible currently, so I was thinking about a more generic redesign: The expire plugin keeps track of the oldest message in configured mailboxes. Its only configuration is the list of tracked mailboxes. There's no configuration like what the expire timeouts are or anything. There will be a new doveadm command: doveadm expunge [-u user | -A] mailbox search query So when you want to expunge all mails from Trash older than 1 week for all users, you say: doveadm expunge -A Trash savedbefore 1w This command works even without expire plugin. To optimize it to avoid looking into all users' Trash mailbox, there's a new expire doveadm plugin, which can use the expire dict to filter out users who don't have anything to expunge. This also supports another feature that the plugin can optimize: doveadm move -A INBOX Archive/2009/INBOX since 2009-01-01 before 2010-01-01 And since people have had problems waiting for expire dict to fill, there could be also a new parameter that does the filling immediately. TODO: - dbox altmove feature will be removed from expire plugin. it may need another plugin, or some other way to configure expire plugin for it. it's anyway a special case. - When using multiple mailboxes it would be more optimal to handle all mailboxes for a user at once, rather than using separate doveadm commands. Maybe the command syntax needs some more thinking to support this. Different mailboxes could have different rules though.. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] expire plugin doesn't find mail location
On Tue, 2010-01-12 at 17:02 +0100, Roland Rosenfeld wrote: But the 'mail' attribute from userdb is still ignored by expire. Well, I'm getting a bit tired of fixing all the issues with expire-tool. Since you found a working solution for yourself, I won't do anything about this for now. v2.0 fixes this properly. signature.asc Description: This is a digitally signed message part
[Dovecot] expire plugin doesn't find mail location
Hi! After searching for hours now, I give up and have to ask here. I try to use the expire plugin but it always tries to expire my mails instead of the mails of the user. I read about the Mail location setting problem (v1.1-v1.2) and configured a mail extra field in the userdb, but that doesn't have the effect I want. I have not idea, what I could try out more, so I ask here. My setup is the following: # 1.2.9: /usr/local/dovecot/etc/dovecot.conf # OS: SunOS 5.10 sun4v zfs syslog_facility: local6 protocols: imap pop3 managesieve listen(default): * listen(imap): * listen(pop3): * listen(managesieve): *:2000, *:4190 ssl: no disable_plaintext_auth: no login_dir: /usr/local/dovecot/var/run/dovecot/login login_executable(default): /usr/local/dovecot/libexec/dovecot/imap-login login_executable(imap): /usr/local/dovecot/libexec/dovecot/imap-login login_executable(pop3): /usr/local/dovecot/libexec/dovecot/pop3-login login_executable(managesieve): /usr/local/dovecot/libexec/dovecot/managesieve-login mail_uid: 2001 mail_gid: 2001 mail_location: maildir:/var/mailstore/%2Mn/%n/mail mail_debug: yes mail_executable(default): /usr/local/dovecot/libexec/dovecot/imap mail_executable(imap): /usr/local/dovecot/libexec/dovecot/imap mail_executable(pop3): /usr/local/dovecot/libexec/dovecot/pop3 mail_executable(managesieve): /usr/local/dovecot/libexec/dovecot/managesieve mail_plugins(default): quota imap_quota expire mail_plugins(imap): quota imap_quota expire mail_plugins(pop3): quota expire mail_plugins(managesieve): mail_plugin_dir(default): /usr/local/dovecot/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/dovecot/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/dovecot/lib/dovecot/pop3 mail_plugin_dir(managesieve): /usr/local/dovecot/lib/dovecot/managesieve pop3_uidl_format(default): %08Xu%08Xv pop3_uidl_format(imap): %08Xu%08Xv pop3_uidl_format(pop3): %v.%u pop3_uidl_format(managesieve): %08Xu%08Xv namespace: type: private separator: / inbox: yes list: yes subscriptions: yes lda: postmaster_address: postmas...@netcologne.de hostname: mailstore20.netcologne.de mail_plugins: sieve quota expire auth_socket_path: /usr/local/dovecot/var/run/dovecot/auth-master auth default: master_user_separator: * verbose: yes debug: yes passdb: driver: passwd-file args: /usr/local/dovecot/etc/passwd.master pass: yes master: yes passdb: driver: sql args: /usr/local/dovecot/etc/dovecot-sql.conf userdb: driver: prefetch userdb: driver: sql args: /usr/local/dovecot/etc/dovecot-sql.conf socket: type: listen master: path: /usr/local/dovecot/var/run/dovecot/auth-master mode: 384 user: vmail plugin: quota: maildir expire: INBOX 60 Spam 60 Papierkorb 60 Trash 1 expire_dict: proxy::expire dict: expire: mysql:/usr/local/dovecot/etc/dovecot-dict-expire.conf With the following dovecot-sql.conf: driver = mysql connect = host=localhost dbname=cyrus user=cyrus password= default_pass_scheme = CRYPT password_query = \ SELECT username, password, concat('*:storage=', quota) AS userdb_quota_rule, '/var/mailstore/%2Mn/%n' as userdb_home, 'maildir:/var/mailstore/%2Mn/%n/mail' as userdb_mail \ FROM passwd WHERE username='%n' user_query = \ SELECT concat('*:storage=', quota) AS quota_rule, '/var/mailstore/%2Mn/%n' as home, 'maildir:/var/mailstore/%2Mn/%n/mail' as mail \ FROM passwd WHERE username='%n' And this is dovecot-dict-expire.conf: connect = host=localhost dbname=dovecot user=dovecot password=XX map { pattern = shared/expire/$user/$mailbox table = expires value_field = expire_stamp fields { username = $user mailbox = $mailbox } } In user test's Trash folder there are mails that are older than 1 day and in dovecot.expires there is +--+-+--+ | username | mailbox | expire_stamp | +--+-+--+ | test | Trash | 1262779049 | +--+-+--+ But if I run /usr/local/dovecot/sbin/dovecot --exec-mail ext /usr/local/dovecot/libexec/dovecot/expire-tool.sh --test I get the following output: Info: Loading modules from directory: /usr/local/dovecot/lib/dovecot/imap Info: Module loaded: /usr/local/dovecot/lib/dovecot/imap/lib10_quota_plugin.so Info: Module loaded: /usr/local/dovecot/lib/dovecot/imap/lib20_expire_plugin.so Info: Quota root: name= backend=maildir args= Info: expire: pattern=INBOX type=expunge secs=5184000 Info: expire: pattern=Spam type=expunge secs=5184000 Info: expire: pattern=Papierkorb type=expunge secs=5184000 Info: expire: pattern=Trash type=expunge secs=86400 Info: auth input: quota_rule=*:storage=1 Info: auth input: home=/var/mailstore/09/test Info: auth input: mail=maildir:/var/mailstore/09/test/mail Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=/var/mailstore/df/rrosenfeld/mail Info: maildir++:
Re: [Dovecot] expire plugin doesn't find mail location
On Tue, 12 Jan 2010, I wrote: After searching for hours now, I give up and have to ask here. I try to use the expire plugin but it always tries to expire my mails instead of the mails of the user. So my main problem seems to be, that the mail attribute from the userdb is completely ignored in expire calls. But how do I fix this? The problem still persists, but I found a workaround: I configured mail_location=~/mail and set 'home' via userdb. With this setup expire seems to work correct. But the 'mail' attribute from userdb is still ignored by expire. Tscho Roland -- Roland Rosenfeld - Content Delivery - NED - Technik NetCologne Gesellschaft für Telekommunikation mbH - HRB 25580, AG Köln Am Coloneum 9 50829 Köln Tel.: +49-221--373 Fax: +49-221--7373 Geschäftsführer: Werner Hanf, Karl-Heinz Zankel
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Mon, 23 Nov 2009 12:01:53 -0500 Timo Sirainen t...@iki.fi wrote: On Mon, 2009-11-23 at 18:01 +0200, Nikita Koshikov wrote: On Fri, 06 Nov 2009 18:42:49 -0500 Timo Sirainen t...@iki.fi wrote: On Fri, 2009-11-06 at 10:27 +0200, Nikita Koshikov wrote: I don't understand why gdb says no debugging symbols found for some dovecot's executables, all binaries under /usr/libexec/dovecot have not stripped .. (gdb) bt full #0 0xb7f88749 in ?? () from /lib/libc.so.6 No symbol table info available. Cannot access memory at address 0xbf690ff8 Yeah, something in your system has broken gdb.. Makes the debugging annoyingly difficult. You managed to get backtraces from the other bug. What did you do differently? Maybe you can get backtrace from this bug now too? I think gdb can't access memory due to gentoo kernel patches, so attaching to process is not working. Also, I can't change kernel on production server for testing purposes. As I wrote above, core files not present in users's homedir, even with patch you provided. I have wrote simple wrapper that removes maildirsize if the messages were expunged from user's mailbox and if user has non-default quota value. Is there any more convenient way to force dovecot recalculate quota size ? I have overview IMAP-QOUTA rfc, but seemed that it lacks such imap command, maybe some internal dovecot command exist? No, there's no other way. Clear, thanks.
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Fri, 06 Nov 2009 18:42:49 -0500 Timo Sirainen t...@iki.fi wrote: On Fri, 2009-11-06 at 10:27 +0200, Nikita Koshikov wrote: I don't understand why gdb says no debugging symbols found for some dovecot's executables, all binaries under /usr/libexec/dovecot have not stripped .. (gdb) bt full #0 0xb7f88749 in ?? () from /lib/libc.so.6 No symbol table info available. Cannot access memory at address 0xbf690ff8 Yeah, something in your system has broken gdb.. Makes the debugging annoyingly difficult. I have wrote simple wrapper that removes maildirsize if the messages were expunged from user's mailbox and if user has non-default quota value. Is there any more convenient way to force dovecot recalculate quota size ? I have overview IMAP-QOUTA rfc, but seemed that it lacks such imap command, maybe some internal dovecot command exist?
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Mon, 2009-11-23 at 18:01 +0200, Nikita Koshikov wrote: On Fri, 06 Nov 2009 18:42:49 -0500 Timo Sirainen t...@iki.fi wrote: On Fri, 2009-11-06 at 10:27 +0200, Nikita Koshikov wrote: I don't understand why gdb says no debugging symbols found for some dovecot's executables, all binaries under /usr/libexec/dovecot have not stripped .. (gdb) bt full #0 0xb7f88749 in ?? () from /lib/libc.so.6 No symbol table info available. Cannot access memory at address 0xbf690ff8 Yeah, something in your system has broken gdb.. Makes the debugging annoyingly difficult. You managed to get backtraces from the other bug. What did you do differently? Maybe you can get backtrace from this bug now too? I have wrote simple wrapper that removes maildirsize if the messages were expunged from user's mailbox and if user has non-default quota value. Is there any more convenient way to force dovecot recalculate quota size ? I have overview IMAP-QOUTA rfc, but seemed that it lacks such imap command, maybe some internal dovecot command exist? No, there's no other way. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Thu, 05 Nov 2009 12:52:08 -0500 Timo Sirainen t...@iki.fi wrote: On Sat, 2009-10-31 at 10:42 +0200, Nikita Koshikov wrote: The patch helped with quotas, but it raises new error - segmentation error gdb backtrace would be helpful. But how to actually get it could be a bit difficult, since I guess kernel thinks expire-tool is a setuid program. There are two ways I guess: a) Apply attached diff1 and see if core dump gets written. Once you get a core, use gdb expire-tool core, bt full. This didn't create core file. b) If not, apply diff2 and start expire-tool. Then look up its pid and run gdb -p pid, cont, wait for crash, bt full. I don't understand why gdb says no debugging symbols found for some dovecot's executables, all binaries under /usr/libexec/dovecot have not stripped GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as i686-pc-linux-gnu. Attaching to process 26407 Reading symbols from /usr/libexec/dovecot/expire-tool...(no debugging symbols found)...done. Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/librt.so.1 Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /lib/libpthread.so.0... (no debugging symbols found)...done. [Thread debugging using libthread_db enabled] [New Thread 0xb7f02ac0 (LWP 26407)] Loaded symbols for /lib/libpthread.so.0 (no debugging symbols found) 0xe424 in __kernel_vsyscall () (gdb) cont Continuing. (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb7f02ac0 (LWP 26407)] 0xb7f88749 in ?? () from /lib/libc.so.6 (gdb) bt full #0 0xb7f88749 in ?? () from /lib/libc.so.6 No symbol table info available. Cannot access memory at address 0xbf690ff8 (gdb) quit The program is running. Quit anyway (and detach it)? (y or n) y Detaching from program: /usr/libexec/dovecot/expire-tool, process 26407
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Fri, 30 Oct 2009 13:16:47 -0400 Timo Sirainen t...@iki.fi wrote: On Fri, 2009-10-30 at 14:03 +0200, Nikita Koshikov wrote: The problem that some users have their own quotas stored in ldap. See if the attached patch helps? I'm a bit afraid that it could also break something. If it does, there's really no easy way to get this fixed before v2.0. The patch helped with quotas, but it raises new error - segmentation error Here details: # /usr/sbin/dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool.sh Info: Loading modules from directory: /usr/lib/dovecot/imap Info: Module loaded: /usr/lib/dovecot/imap/lib10_quota_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib11_trash_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_autocreate_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_expire_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_virtual_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_zlib_plugin.so --koshiko...@domain.com - have own quota in ldap, expire-tool is working fine: Info: expire: pattern=Trash type=expunge secs=2592000 Info: expire: pattern=Spam type=expunge secs=2592000 Info: auth input: quota_rule=*:bytes=629145600 Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/koshikov.n Info: auth input: mail=maildir:~/data Info: Quota root: name=Mailbox quota backend=maildir args= Info: Quota rule: root=Mailbox quota mailbox=* bytes=629145600 messages=0 Info: Quota rule: root=Mailbox quota mailbox=Trash bytes=62914560 (10%) messages=0 Info: Quota warning: bytes=566231040 (90%) messages=0 command=/etc/dovecot/plugins/quota_warning.sh 90 Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=~/data Info: maildir++: root=/data/mail/domain.com/koshikov.n/data, index=, control=, inbox=/data/mail/domain.com/koshikov.n/data Info: Namespace: type=private, prefix=Company/, sep=/, inbox=no, hidden=no, list=yes, subscriptions=no Info: virtual: data=/var/mail/virtual:INDEX=MEMORY:LAYOUT=maildir++ Info: maildir++: root=/var/mail/virtual, index=, control=, inbox= Info: Namespace : Using permissions from /data/mail/domain.com/koshikov.n/data: mode=0700 gid=-1 Info: trash plugin: Added 'Trash' with priority 1 Info: trash plugin: Added 'Spam' with priority 2 -- bunkin...@domain.com have default quota value, expire-tool is working fine: Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/bunkina.l Info: auth input: mail=maildir:~/data Info: Quota root: name=Mailbox quota backend=maildir args= Info: Quota rule: root=Mailbox quota mailbox=* bytes=524288000 messages=0 Info: Quota rule: root=Mailbox quota mailbox=Trash bytes=52428800 (10%) messages=0 Info: Quota warning: bytes=471859200 (90%) messages=0 command=/etc/dovecot/plugins/quota_warning.sh 90 Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=~/data Info: maildir++: root=/data/mail/domain.com/bunkina.l/data, index=, control=, inbox=/data/mail/domain.com/bunkina.l/data Info: Namespace: type=private, prefix=Company/, sep=/, inbox=no, hidden=no, list=yes, subscriptions=no Info: virtual: data=/var/mail/virtual:INDEX=MEMORY:LAYOUT=maildir++ Info: maildir++: root=/var/mail/virtual, index=, control=, inbox= Info: Namespace : Using permissions from /data/mail/domain.com/bunkina.l/data: mode=0700 gid=-1 Info: trash plugin: Added 'Trash' with priority 1 Info: trash plugin: Added 'Spam' with priority 2 -- podburt...@domain.com - have default quota, this account cause segmentation error, while running expire-tool: Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/podburtniy Info: auth input: mail=maildir:~/data Info: Quota root: name=Mailbox quota backend=maildir args= Info: Quota rule: root=Mailbox quota mailbox=* bytes=524288000 messages=0 Info: Quota rule: root=Mailbox quota mailbox=Trash bytes=52428800 (10%) messages=0 Info: Quota warning: bytes=471859200 (90%) messages=0 command=/etc/dovecot/plugins/quota_warning.sh 90 Ошибка сегментирования The only difference with mailbox podburt...@domain.com that it's ldap mail field is different from samaccountname: podburt...@domain.com mail: podburt...@domain.com sAMAccountName: podburtn koshiko...@domain.com mail: koshiko...@domain.com sAMAccountName: koshikov.n But, I'm using only mail/maxstorage/useraccountcontrol attributes for mail staff. Users login to their accounts using full e-mail address and AD password.
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Fri, 30 Oct 2009 13:16:47 -0400 Timo Sirainen t...@iki.fi wrote: On Fri, 2009-10-30 at 14:03 +0200, Nikita Koshikov wrote: The problem that some users have their own quotas stored in ldap. See if the attached patch helps? I'm a bit afraid that it could also break something. If it does, there's really no easy way to get this fixed before v2.0. Note: I rechecked expire-tool behavior with version 1.2.4 and it's working the same way as 1.2.6, so my problem have more long history, than I thought.
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
The patch helped with quotas, but it raises new error - segmentation error After some more tests, I find out that crash happens, while trying to proceed the third user, and the user's quota and other settings not important.
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Thu, 29 Oct 2009 13:10:37 -0400 Timo Sirainen t...@iki.fi wrote: On Wed, 2009-10-28 at 10:30 +0200, Nikita Koshikov wrote: The problem that some users have their own quotas stored in ldap. So the quota_rule should be returned by userdb lookup from ldap, right? Yes, and it's working fine with deliver and general imap process, it only failed(reset to general quota_rule) after expire-rool.sh script finished his duties. Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/koshikov.n Info: auth input: mail=maildir:~/data This should have listed quota_rule. The problematic user is sr, and it has quota_rule option(running with --test) (Thu Oct 29 07:45:18 2009) Info: auth input: quota_rule=*:bytes=1048576 ^ returned from ldap Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/sr Info: auth input: mail=maildir:~/data Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=~/data Info: maildir++: root=/data/mail/domain.com/sr/data, index=, control=, inbox=/data/mail/domain.com/sr/data Info: Namespace: type=private, prefix=Agromat/, sep=/, inbox=no, hidden=no, list=yes, subscriptions=no Info: virtual: data=/var/mail/virtual:INDEX=MEMORY:LAYOUT=maildir++ Info: maildir++: root=/var/mail/virtual, index=, control=, inbox= Info: Namespace : Using permissions from /data/mail/domain.com/sr/data: mode=0700 gid=-1 Info: trash plugin: Added 'Trash' with priority 1 Info: trash plugin: Added 'Spam' with priority 2 Info: s...@domain.com/Spam: seq=1 uid=405: Expunge Info: s...@domain.com/Spam: seq=2 uid=406: Expunge Info: s...@domain.com/Spam: seq=3 uid=407: Expunge Info: s...@domain.com/Spam: timestamp 1256710764 (Wed Oct 28 08:19:24 2009) - 125698 (Sat Oct 31 11:06:40 2009) If dovecot -n output is needed, please let me know. If the above doesn't help, then yeah, dovecot -n and dovecot-ldap.conf contents. dovecot -n: # 1.2.6: /etc/dovecot/dovecot.conf # OS: Linux 2.6.26-gentoo-r4 i686 Gentoo Base System release 1.12.11.1 log_path: /var/log/dovecot/dovecot-error.log info_log_path: /var/log/dovecot/dovecot.log protocols: imaps managesieve ssl_cert_file: /etc/ssl/dovecot/imaps.crt ssl_key_file: /etc/ssl/dovecot/imaps.key login_dir: /var/run/dovecot/login login_executable(default): /usr/libexec/dovecot/imap-login login_executable(imap): /usr/libexec/dovecot/imap-login login_executable(managesieve): /usr/libexec/dovecot/managesieve-login login_greeting: Server ready. login_processes_count: 20 login_max_processes_count: 512 mail_max_userip_connections(default): 20 mail_max_userip_connections(imap): 20 mail_max_userip_connections(managesieve): 10 first_valid_uid: 8 last_valid_uid: 8 first_valid_gid: 12 last_valid_gid: 12 mail_drop_priv_before_exec: yes mail_executable(default): /usr/libexec/dovecot/imap mail_executable(imap): /usr/libexec/dovecot/imap mail_executable(managesieve): /usr/libexec/dovecot/managesieve mail_plugins(default): quota imap_quota trash expire zlib autocreate virtual mail_plugins(imap): quota imap_quota trash expire zlib autocreate virtual mail_plugins(managesieve): mail_plugin_dir(default): /usr/lib/dovecot/imap mail_plugin_dir(imap): /usr/lib/dovecot/imap mail_plugin_dir(managesieve): /usr/lib/dovecot/managesieve imap_client_workarounds(default): delay-newmail imap_client_workarounds(imap): delay-newmail imap_client_workarounds(managesieve): namespace: type: private separator: / location: maildir:~/data inbox: yes list: yes subscriptions: yes namespace: type: private separator: / prefix: Company/ location: virtual:/var/mail/virtual:INDEX=MEMORY:LAYOUT=maildir++ list: yes lda: postmaster_address: postmas...@domain.com hostname: mail.domain.com mail_plugins: quota trash expire sieve virtual quota_full_tempfail: yes sendmail_path: /usr/sbin/sendmail auth_socket_path: /var/run/dovecot/auth-master log_path: /var/log/dovecot/dovecot-deliver.log info_log_path: /var/log/dovecot/dovecot-deliver.log global_script_path: /etc/dovecot/sieve/default.sieve sieve_global_dir: /etc/dovecot/sieve auth default: mechanisms: plain login default_realm: domain.com cache_size: 10240 cache_negative_ttl: 0 user: dovecot_auth master_user_separator: * worker_max_count: 50 passdb: driver: passwd-file args: /etc/dovecot/passdb/master.pwd master: yes passdb: driver: passwd-file args: /etc/dovecot/passdb/users.pwd passdb: driver: ldap args: /etc/dovecot/dovecot-ldap.conf userdb: driver: prefetch userdb: driver: ldap args: /etc/dovecot/dovecot-userdb-ldap.conf userdb: driver: passwd-file args: /etc/dovecot/passdb/users.pwd socket: type: listen client: path: /var/run/dovecot/auth-client mode: 432 user: mail group: dovecot_auth master:
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Thu, 29 Oct 2009 13:10:37 -0400 Timo Sirainen t...@iki.fi wrote: On Wed, 2009-10-28 at 10:30 +0200, Nikita Koshikov wrote: The problem that some users have their own quotas stored in ldap. So the quota_rule should be returned by userdb lookup from ldap, right? One more clean example. For user koshiko...@domain.com I change quota in AD to 600M(default user quota is 512M,). After successful login to imap account, maildirsize is(first 2 lines): 629145600S 260658345 5484 So, quota value read from ldap database and applied to user's mailbox. Then I run /usr/sbin/dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool.sh --test: Info: Loading modules from directory: /usr/lib/dovecot/imap Info: Module loaded: /usr/lib/dovecot/imap/lib10_quota_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib11_trash_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_autocreate_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_expire_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_virtual_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_zlib_plugin.so Info: Quota root: name=Mailbox quota backend=maildir args= Info: Quota rule: root=Mailbox quota mailbox=* bytes=524288000 messages=0 Info: Quota rule: root=Mailbox quota mailbox=Trash bytes=52428800 (10%) messages=0 Info: Quota warning: bytes=471859200 (90%) messages=0 command=/etc/dovecot/plugins/quota_warning.sh 90 Info: expire: pattern=Trash type=expunge secs=2592000 Info: expire: pattern=Spam type=expunge secs=2592000 Info: auth input: quota_rule=*:bytes=629145600 Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/koshikov.n Info: auth input: mail=maildir:~/data Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=~/data Info: maildir++: root=/data/mail/domain.com/koshikov.n/data, index=, control=, inbox=/data/mail/domain.com/koshikov.n/data Info: Namespace: type=private, prefix=Agromat/, sep=/, inbox=no, hidden=no, list=yes, subscriptions=no Info: virtual: data=/var/mail/virtual:INDEX=MEMORY:LAYOUT=maildir++ Info: maildir++: root=/var/mail/virtual, index=, control=, inbox= Info: Namespace : Using permissions from /data/mail/domain.com/koshikov.n/data: mode=0700 gid=-1 Info: trash plugin: Added 'Trash' with priority 1 Info: trash plugin: Added 'Spam' with priority 2 Info: koshiko...@domain.com/Spam: seq=1 uid=1933: Expunge Info: koshiko...@domain.com/Spam: timestamp 1256902423 (Fri Oct 30 13:33:43 2009) - 1256903611 (Fri Oct 30 13:53:31 2009) Quota_rule are different from auth section and quota root\rule section. After expire-tool expunges e-mails, the maildirsize file become: 524288000S 260686038 5487 Which is default quota_rule value, not from ldap database.
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Fri, 2009-10-30 at 14:03 +0200, Nikita Koshikov wrote: The problem that some users have their own quotas stored in ldap. See if the attached patch helps? I'm a bit afraid that it could also break something. If it does, there's really no easy way to get this fixed before v2.0. diff -r a0d72e0d88dd src/plugins/expire/expire-tool.c --- a/src/plugins/expire/expire-tool.c Thu Oct 29 17:40:33 2009 -0400 +++ b/src/plugins/expire/expire-tool.c Fri Oct 30 13:15:45 2009 -0400 @@ -52,6 +52,7 @@ /* user no longer exists */ return 0; } + module_dir_init(modules); ctx-mail_user = mail_user_init(user); mail_user_set_home(ctx-mail_user, getenv(HOME)); @@ -64,6 +65,7 @@ { mail_user_unref(ctx-mail_user); i_free_and_null(ctx-user); + module_dir_deinit(modules); } static int @@ -265,8 +267,6 @@ mail_storage_register_all(); mailbox_list_register_all(); - module_dir_init(modules); - expire_get_global_mail_ids(); base_dir = getenv(BASE_DIR); signature.asc Description: This is a digitally signed message part
Re: [Dovecot] expire plugin + --exec-mail in 1.2.6 version
On Wed, 2009-10-28 at 10:30 +0200, Nikita Koshikov wrote: The problem that some users have their own quotas stored in ldap. So the quota_rule should be returned by userdb lookup from ldap, right? Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/koshikov.n Info: auth input: mail=maildir:~/data This should have listed quota_rule. If dovecot -n output is needed, please let me know. If the above doesn't help, then yeah, dovecot -n and dovecot-ldap.conf contents. signature.asc Description: This is a digitally signed message part
[Dovecot] expire plugin + --exec-mail in 1.2.6 version
Hello list, After upgrade to dovecot version 1.2.6 I have noticed some quota malfunctions(users become often overquota). Looking at logs closely I have found that quota value resets to general dovecot-config( quota = maildir:Mailbox quota quota_rule = *:storage=500M quota_rule2 = Trash:storage=10%% ), after dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool.sh command. The problem that some users have their own quotas stored in ldap. For example, user s...@domain.com have maildirsize before running expire-tool(1G value from ldap): # head -2 /data/mail/domain.com/sr/data/maildirsize 1048576S 836423205 8285 Then I run expire-tool with mail_debug enabled: # /usr/sbin/dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool.sh Info: Loading modules from directory: /usr/lib/dovecot/imap Info: Module loaded: /usr/lib/dovecot/imap/lib10_quota_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib11_trash_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_autocreate_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_expire_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_virtual_plugin.so Info: Module loaded: /usr/lib/dovecot/imap/lib20_zlib_plugin.so Info: Quota root: name=Mailbox quota backend=maildir args= Info: Quota rule: root=Mailbox quota mailbox=* bytes=524288000 messages=0 Info: Quota rule: root=Mailbox quota mailbox=Trash bytes=52428800 (10%) messages=0 Info: Quota warning: bytes=471859200 (90%) messages=0 command=/etc/dovecot/plugins/quota_warning.sh 90 Info: expire: pattern=Trash type=expunge secs=2592000 Info: expire: pattern=Spam type=expunge secs=2592000 Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/koshikov.n Info: auth input: mail=maildir:~/data Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=~/data Info: maildir++: root=/data/mail/domain.com/koshikov.n/data, index=, control=, inbox=/data/mail/domain.com/koshikov.n/data Info: Namespace: type=private, prefix=Agromat/, sep=/, inbox=no, hidden=no, list=yes, subscriptions=no Info: virtual: data=/var/mail/virtual:INDEX=MEMORY:LAYOUT=maildir++ Info: maildir++: root=/var/mail/virtual, index=, control=, inbox= Info: Namespace : Using permissions from /data/mail/domain.com/koshikov.n/data: mode=0700 gid=-1 Info: trash plugin: Added 'Trash' with priority 1 Info: trash plugin: Added 'Spam' with priority 2 Info: koshiko...@domain.com/Spam: seq=1 uid=1869: Expunge Info: koshiko...@domain.com/Spam: seq=2 uid=1870: Expunge Info: koshiko...@domain.com/Spam: seq=3 uid=1871: Expunge Info: koshiko...@domain.com/Spam: seq=4 uid=1872: Expunge Info: koshiko...@domain.com/Spam: seq=5 uid=1873: Expunge Info: koshiko...@domain.com/Spam: seq=6 uid=1874: Expunge Info: koshiko...@domain.com/Spam: seq=7 uid=1875: Expunge Info: koshiko...@domain.com/Spam: seq=8 uid=1876: Expunge Info: koshiko...@domain.com/Spam: seq=9 uid=1877: Expunge Info: koshiko...@domain.com/Spam: seq=10 uid=1878: Expunge Info: koshiko...@domain.com/Spam: seq=11 uid=1879: Expunge Info: koshiko...@domain.com/Spam: seq=12 uid=1880: Expunge Info: koshiko...@domain.com/Spam: timestamp 1256618680 (Tue Oct 27 06:44:40 2009) - 1256716674 (Wed Oct 28 09:57:54 2009) Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/fsb Info: auth input: mail=maildir:~/data Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=~/data Info: maildir++: root=/data/mail/domain.com/fsb/data, index=, control=, inbox=/data/mail/domain.com/fsb/data Info: Namespace: type=private, prefix=Agromat/, sep=/, inbox=no, hidden=no, list=yes, subscriptions=no Info: virtual: data=/var/mail/virtual:INDEX=MEMORY:LAYOUT=maildir++ Info: maildir++: root=/var/mail/virtual, index=, control=, inbox= Info: Namespace : Using permissions from /data/mail/domain.com/fsb/data: mode=0700 gid=-1 Info: trash plugin: Added 'Trash' with priority 1 Info: trash plugin: Added 'Spam' with priority 2 Info: f...@domain.com/Trash: seq=1 uid=578: Expunge Info: f...@domain.com/Trash: seq=2 uid=579: Expunge Info: f...@domain.com/Trash: seq=3 uid=580: Expunge Info: f...@domain.com/Trash: seq=4 uid=581: Expunge Info: f...@domain.com/Trash: seq=5 uid=582: Expunge Info: f...@domain.com/Trash: seq=6 uid=583: Expunge Info: f...@domain.com/Trash: seq=7 uid=584: Expunge Info: f...@domain.com/Trash: seq=8 uid=585: Expunge Info: f...@domain.com/Trash: seq=9 uid=586: Expunge Info: f...@domain.com/Trash: seq=10 uid=587: Expunge Info: f...@domain.com/Trash: seq=11 uid=588: Expunge Info: f...@domain.com/Trash: seq=12 uid=589: Expunge Info: f...@domain.com/Trash: seq=13 uid=590: Expunge Info: f...@domain.com/Trash: timestamp 1256627284 (Tue Oct 27 09:08:04 2009) - 1256732991 (Wed Oct 28 14:29:51 2009) Info: auth input: uid=8 Info: auth input: gid=12 Info: auth input: home=/data/mail/domain.com/arsen Info: auth
[Dovecot] Expire plugin per domain
Dear Timo thank you for the help your giving me these. I want to set expire plugin only for some domains in the same way I set autocreate plugin. vchkpw-wrapper.sh #!/bin/bash DOMAIN=`echo $VPOPUSER|sed s/^.*@//` echo $USER /tmp/autocreate echo $DOMAIN /tmp/autocreate if [ $DOMAIN = operaciones.qnet.com.pe ]; then export USERDB_AUTOCREATE=INBOX.Spam export USERDB_AUTOSUBSCRIBE=INBOX.Spam export USERDB_EXPIRE=INBOX.Spam 1 INBOX.Spam.* 1 export USERDB_EXPIRE_DICT=proxy::expire export EXTRA=USERDB_AUTOCREATE USERDB_AUTOSUBSCRIBE USERDB_EXPIRE USERDB_EXPIRE_DICT set /tmp/environment fi unset USER exec $* Record the right information in the database but when you run /usr/local/sbin/dovecot --exec-mail ext /usr/local/libexec/dovecot/expire-tool --test Displays the following message Fatal: expire and expire_altmove settings not set You told me it was to migrate to Dovecot 1.2.6 with support for userdb chkpassword to use the following configuration: userdb: driver: prefetch userdb: driver: checkpassword args: /usr/local/bin/userdb.sh My problem is that I have no idea how to create the userdb.sh Please could help in the creation of this script? Thanks Jose Luis _ Explore the seven wonders of the world http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE
Re: [Dovecot] Expire plugin per domain
On Tue, 2009-10-20 at 10:00 -0500, Jose Luis Marin Perez wrote: My problem is that I have no idea how to create the userdb.sh From my previous mail: Then create /usr/local/bin/userdb.sh which does more or less what the vchkpw-wrapper.sh does, except since it doesn't call vchkpw itself, it'll need to get the username from $USER instead of $VPOPUSER. http://wiki.dovecot.org/AuthDatabase/CheckPassword#Checkpassword_as_userdb explains this extension. So start with copypasting your vchkpw-wrapper.sh. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire plugin per domain
Hi Timo, I copied vchkpw-wrapper.sh as userdb.sh, being as follows: userdb.sh #!/bin/bash DOMAIN=`echo $VPOPUSER|sed s/^.*@//` if [ $DOMAIN = operaciones.qnet.com.pe ]; then export USERDB_AUTOCREATE=INBOX.Spam export USERDB_AUTOSUBSCRIBE=INBOX.Spam export USERDB_EXPIRE=INBOX.Spam 1 INBOX.Spam.* 1 export USERDB_EXPIRE_DICT=proxy::expire export EXTRA=USERDB_AUTOCREATE USERDB_AUTOSUBSCRIBE USERDB_EXPIRE USERDB_EXPIRE_DICT fi unset USER exec $* When I run the command /usr/local/sbin/dovecot --exec-mail ext /usr/local/bin/expire-tool.sh --test I get the same error message Fatal: expire and expire_altmove settings not set expire-tool.sh #!/bin/bash MAIL_PLUGINS=${MAIL_PLUGINS//imap_quota/} MAIL_PLUGINS=${MAIL_PLUGINS//mail_log/} /usr/local/libexec/dovecot/expire-tool $1 dovecot --build-options Build options: ioloop=epoll notify=dnotify ipv6 openssl Mail storages: cydir dbox maildir mbox raw shared SQL drivers: mysql Passdb: checkpassword pam passwd passwd-file shadow sql Userdb: nss passwd passwd-file prefetch sql static What's wrong? Thanks Jose Luis dovecot -n # 1.2.6: /usr/local/etc/dovecot.conf # OS: Linux 2.6.9-67.0.15.plus.c4smp i686 CentOS release 4.6 (Final) log_path: /var/log/dovecot.log listen: *:10143 ssl_listen: *:10943 disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login first_valid_uid: 89 last_valid_uid: 89 first_valid_gid: 89 last_valid_gid: 89 mail_uid: 89 mail_gid: 89 mail_location: maildir:~/Maildir mail_debug: yes mail_plugins: quota imap_quota expire mail_log autocreate namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes lda: postmaster_address: postmas...@example.com auth default: debug: yes passdb: driver: checkpassword args: /usr/vpopmail/bin/vchkpw /usr/local/bin/vchkpw-wrapper.sh userdb: driver: prefetch userdb: driver: checkpassword args: /usr/local/bin/userdb.sh socket: type: listen master: path: /usr/local/var/run/dovecot/auth-master mode: 384 user: vpopmail group: vchkpw plugin: quota: maildir quota_rule: ?:storage=0 quota_rule2: Trash:ignore mail_log_events: delete undelete expunge copy mailbox_delete mail_log_group_events: mail_log_fields: uid box msgid size dict: expire: mysql:/usr/local/etc/dovecot-dict-expire.conf Subject: Re: [Dovecot] Expire plugin per domain From: t...@iki.fi To: jolumape...@hotmail.com CC: dovecot@dovecot.org Date: Tue, 20 Oct 2009 16:25:29 -0400 On Tue, 2009-10-20 at 10:00 -0500, Jose Luis Marin Perez wrote: My problem is that I have no idea how to create the userdb.sh From my previous mail: Then create /usr/local/bin/userdb.sh which does more or less what the vchkpw-wrapper.sh does, except since it doesn't call vchkpw itself, it'll need to get the username from $USER instead of $VPOPUSER. http://wiki.dovecot.org/AuthDatabase/CheckPassword#Checkpassword_as_userdb explains this extension. So start with copypasting your vchkpw-wrapper.sh. _ Connect to the next generation of MSN Messenger http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=wlmailtagline
Re: [Dovecot] Expire plugin per domain
On Tue, 2009-10-20 at 15:43 -0500, Jose Luis Marin Perez wrote: DOMAIN=`echo $VPOPUSER|sed s/^.*@//` .. vchkpw-wrapper.sh does, except since it doesn't call vchkpw itself, it'll need to get the username from $USER instead of $VPOPUSER. The above explains the first problem... Sorry, but I've spent already way too much time answering your questions. My previous email+wiki contains all the information necessary to write the script. If you can't do it yourself, find/pay someone else who isn't as busy as me. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire plugin per domain
Thanks Timo From: t...@iki.fi To: jolumape...@hotmail.com Date: Tue, 20 Oct 2009 16:46:52 -0400 CC: dovecot@dovecot.org Subject: Re: [Dovecot] Expire plugin per domain On Tue, 2009-10-20 at 15:43 -0500, Jose Luis Marin Perez wrote: DOMAIN=`echo $VPOPUSER|sed s/^.*@//` .. vchkpw-wrapper.sh does, except since it doesn't call vchkpw itself, it'll need to get the username from $USER instead of $VPOPUSER. The above explains the first problem... Sorry, but I've spent already way too much time answering your questions. My previous email+wiki contains all the information necessary to write the script. If you can't do it yourself, find/pay someone else who isn't as busy as me. _ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us
Re: [Dovecot] Expire plugin in chkpw-wrapper.sh script
Dear Timo Finally and thanks to you, I could install Dovecot 1.2.6 with support for userdb checkpassword How can I configure the script userdb.sh? Thanks Jose Luis dovecot -n # 1.2.6: /usr/local/etc/dovecot.conf # OS: Linux 2.6.9-67.0.15.plus.c4smp i686 CentOS release 4.6 (Final) log_path: /var/log/dovecot.log listen: *:10143 ssl_listen: *:10943 disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login first_valid_uid: 89 last_valid_uid: 89 first_valid_gid: 89 last_valid_gid: 89 mail_uid: 89 mail_gid: 89 mail_location: maildir:~/Maildir mail_debug: yes mail_plugins: quota imap_quota expire mail_log autocreate namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes lda: postmaster_address: postmas...@example.com auth default: debug: yes passdb: driver: checkpassword args: /usr/vpopmail/bin/vchkpw /usr/local/bin/vchkpw-wrapper.sh userdb: driver: prefetch userdb: driver: checkpassword args: /usr/local/bin/userdb.sh socket: type: listen master: path: /usr/local/var/run/dovecot/auth-master mode: 384 user: vpopmail group: vchkpw plugin: quota: maildir quota_rule: ?:storage=0 quota_rule2: Trash:ignore mail_log_events: delete undelete expunge copy mailbox_delete mail_log_group_events: mail_log_fields: uid box msgid size dict: expire: mysql:/usr/local/etc/dovecot-dict-expire.conf Subject: Re: [Dovecot] Expire plugin in chkpw-wrapper.sh script From: t...@iki.fi To: jolumape...@hotmail.com CC: dovecot@dovecot.org Date: Thu, 15 Oct 2009 21:21:02 -0400 On Thu, 2009-10-15 at 14:32 -0500, Jose Luis Marin Perez wrote: I'm trying to extend the configuration of vchkpw-wrapper.sh script by adding the expire plugin as follows: .. /usr/local/sbin/dovecot --exec-mail ext /usr/local/libexec/dovecot/expire-tool --test The problem is that vchkpw-wrapper.sh is now run only when user is authenticating. expire-tool doesn't authenticate, it only does userdb lookup. So you'll need to have the script run for userdb lookups too: passdb checkpassword { .. } userdb prefetch { } userdb checkpassword { args = /usr/local/bin/userdb.sh } Then create /usr/local/bin/userdb.sh which does more or less what the vchkpw-wrapper.sh does, except since it doesn't call vchkpw itself, it'll need to get the username from $USER instead of $VPOPUSER. http://wiki.dovecot.org/AuthDatabase/CheckPassword#Checkpassword_as_userdb explains this extension. _ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us
Re: [Dovecot] Expire plugin in chkpw-wrapper.sh script
Hi timo, This is the error that comes when adding userdb checkpassword dovecot: Oct 16 10:13:53 Fatal: auth(default): Unknown userdb driver 'checkpassword' (typo, or Dovecot was built without support for it? Check with dovecot --build-options) dovecot: Oct 16 10:13:53 Fatal: Auth process died too early - shutting down Running dovecot - build-options Build options: epoll ioloop = notify = dnotify ipv6 openssl Mail Storage: mbox maildir raw cydir dbox SQL drivers: mysql Passdb: vpopmail sql checkpassword Userdb: vpopmail sql prefetch Checkpassword not compiled for userdb. Excuse the dumb question, with that option adding to compile dovecot userdb checkpassword? No information found about this. Thanks Jose Luis From: t...@iki.fi To: jolumape...@hotmail.com Date: Thu, 15 Oct 2009 21:21:02 -0400 CC: dovecot@dovecot.org Subject: Re: [Dovecot] Expire plugin in chkpw-wrapper.sh script On Thu, 2009-10-15 at 14:32 -0500, Jose Luis Marin Perez wrote: I'm trying to extend the configuration of vchkpw-wrapper.sh script by adding the expire plugin as follows: .. /usr/local/sbin/dovecot --exec-mail ext /usr/local/libexec/dovecot/expire-tool --test The problem is that vchkpw-wrapper.sh is now run only when user is authenticating. expire-tool doesn't authenticate, it only does userdb lookup. So you'll need to have the script run for userdb lookups too: passdb checkpassword { .. } userdb prefetch { } userdb checkpassword { args = /usr/local/bin/userdb.sh } Then create /usr/local/bin/userdb.sh which does more or less what the vchkpw-wrapper.sh does, except since it doesn't call vchkpw itself, it'll need to get the username from $USER instead of $VPOPUSER. http://wiki.dovecot.org/AuthDatabase/CheckPassword#Checkpassword_as_userdb explains this extension. _ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us
Re: [Dovecot] Expire plugin in chkpw-wrapper.sh script
On Fri, 2009-10-16 at 10:37 -0500, Jose Luis Marin Perez wrote: Hi timo, This is the error that comes when adding userdb checkpassword dovecot: Oct 16 10:13:53 Fatal: auth(default): Unknown userdb driver 'checkpassword' (typo, or Dovecot was built without support for it? Check with dovecot --build-options) Oh. userdb checkpassword is only in Dovecot v1.2. signature.asc Description: This is a digitally signed message part
[Dovecot] Expire plugin in chkpw-wrapper.sh script
Dear Sirs, I'm trying to extend the configuration of vchkpw-wrapper.sh script by adding the expire plugin as follows: #!/bin/bash DOMAIN=`echo $VPOPUSER|sed s/^.*@//` if [ $DOMAIN = operaciones.qnet.com.pe ]; then export USERDB_AUTOCREATE=INBOX.Spam export USERDB_AUTOSUBSCRIBE=INBOX.Spam export USERDB_EXPIRE=INBOX.Spam 1 INBOX.Spam.* 1 export USERDB_EXPIRE_DICT=proxy::expire export EXTRA=USERDB_AUTOCREATE USERDB_AUTOSUBSCRIBE USERDB_EXPIRE USERDB_EXPIRE_DICT fi unset USER exec $* In the database no problem mysql select * from expires; +---+--+ | mailbox | expire_stamp | +---+--+ | jma...@operaciones.qnet.com.pe/INBOX.Spam | 1255701608 | +---+--+ 1 row in set (0.00 sec) But when you run the command /usr/local/sbin/dovecot --exec-mail ext /usr/local/libexec/dovecot/expire-tool --test Displays the following message Fatal: expire and expire_altmove settings not set That may be happening? Thanks Jose Luis _ Explore the seven wonders of the world http://search.msn.com/results.aspx?q=7+wonders+worldmkt=en-USform=QBRE
Re: [Dovecot] Expire plugin in chkpw-wrapper.sh script
Stop sending the same mail every few hours. On Thu, 2009-10-15 at 18:14 -0500, Jose Luis Marin Perez wrote: Dear Timo, I'm trying to extend the configuration of vchkpw-wrapper.sh script by adding the expire plugin as follows: #!/bin/bash DOMAIN=`echo $VPOPUSER|sed s/^.*@//` if [ $DOMAIN = operaciones.qnet.com.pe ]; then export USERDB_AUTOCREATE=INBOX.Spam export USERDB_AUTOSUBSCRIBE=INBOX.Spam export USERDB_EXPIRE=INBOX.Spam 1 INBOX.Spam.* 1 export USERDB_EXPIRE_DICT=proxy::expire export EXTRA=USERDB_AUTOCREATE USERDB_AUTOSUBSCRIBE USERDB_EXPIRE USERDB_EXPIRE_DICT fi unset USER exec $* In the database no problem mysql select * from expires; +---+--+ | mailbox | expire_stamp | +---+--+ | jma...@operaciones.qnet.com.pe/INBOX.Spam | 1255701608 | +---+--+ 1 row in set (0.00 sec) But when you run the command /usr/local/sbin/dovecot --exec-mail ext /usr/local/libexec/dovecot/expire-tool --test Displays the following message Fatal: expire and expire_altmove settings not set That may be happening? Thanks Jose Luis dovecot -n # 1.1.16: /usr/local/etc/dovecot.conf # OS: Linux 2.6.9-67.0.15.plus.c4smp i686 CentOS release 4.6 (Final) log_path: /var/log/dovecot.log listen: *:10143 ssl_listen: *:10943 disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login first_valid_uid: 89 last_valid_uid: 89 first_valid_gid: 89 last_valid_gid: 89 mail_uid: 89 mail_gid: 89 mail_location: maildir:~/Maildir mail_debug: yes mail_plugins: quota imap_quota expire mail_log autocreate namespace: type: private separator: . prefix: INBOX. inbox: yes list: yes subscriptions: yes auth default: debug: yes passdb: driver: checkpassword args: /usr/vpopmail/bin/vchkpw /usr/local/bin/vchkpw-wrapper.sh userdb: driver: prefetch args: uid=89 gid=89 home=/usr/vpopmail/domains/%d/%u userdb: driver: vpopmail socket: type: listen master: path: /usr/local/var/run/dovecot/auth-master mode: 384 user: vpopmail group: vchkpw plugin: quota: maildir quota_rule: ?:storage=0 quota_rule2: Trash:ignore expire_dict: proxy::expire mail_log_events: delete undelete expunge copy mailbox_delete mail_log_group_events: mail_log_fields: uid box msgid size dict: expire: mysql:/usr/local/etc/dovecot-dict-expire.conf _ Discover the new Windows Vista http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire plugin: wrong mailbox separators in database?
http://hg.dovecot.org/dovecot-1.2/rev/00757d350812 probably helps? signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire plugin in chkpw-wrapper.sh script
On Thu, 2009-10-15 at 14:32 -0500, Jose Luis Marin Perez wrote: I'm trying to extend the configuration of vchkpw-wrapper.sh script by adding the expire plugin as follows: .. /usr/local/sbin/dovecot --exec-mail ext /usr/local/libexec/dovecot/expire-tool --test The problem is that vchkpw-wrapper.sh is now run only when user is authenticating. expire-tool doesn't authenticate, it only does userdb lookup. So you'll need to have the script run for userdb lookups too: passdb checkpassword { .. } userdb prefetch { } userdb checkpassword { args = /usr/local/bin/userdb.sh } Then create /usr/local/bin/userdb.sh which does more or less what the vchkpw-wrapper.sh does, except since it doesn't call vchkpw itself, it'll need to get the username from $USER instead of $VPOPUSER. http://wiki.dovecot.org/AuthDatabase/CheckPassword#Checkpassword_as_userdb explains this extension. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Expire Plugin Configuration Question
On Oct 4, 2009, at 7:50 PM, Roland Roberts wrote: I am very confused looking at the expires plugin and its configuration. What is confusing me the most is that it appears that I have to configure expiration globally, meaning, for example, that the Trash mailbox expiration interval is the same regardless of the user. What I really am looking for is per-user configurable rules. Maybe for v2.0.
[Dovecot] Expire Plugin Configuration Question
I am very confused looking at the expires plugin and its configuration. What is confusing me the most is that it appears that I have to configure expiration globally, meaning, for example, that the Trash mailbox expiration interval is the same regardless of the user. What I really am looking for is per-user configurable rules. Those would obviously not be able to be in a file configuration but would have to be in some shared/sharable resource. Is such a thing possible? What I really want is the ability to move my expiration rules out of my email client and into dovecot. That would be very useful for me since I access my mail from more than one host and via more than one client. roland -- PGP Key ID: 66 BC 3B CD Roland B. Roberts, PhD RL Enterprises rol...@rlenter.com6818 Madeline Court rol...@astrofoto.org Brooklyn, NY 11220
Re: [Dovecot] Expire Plugin Configuration Question
Charles Marcus wrote: On 10/4/2009 7:50 PM, Roland Roberts wrote: I am very confused looking at the expires plugin and its configuration. What is confusing me the most is that it appears that I have to configure expiration globally, meaning, for example, that the Trash mailbox expiration interval is the same regardless of the user. What I really am looking for is per-user configurable rules. Hmmm... interesting. I don't think you can use extra fields for this now, but I wonder if it would be possible to modify expire plugin to do so? Well, it's a bit disappointing to hear that it can't be done, but I'm not surprised since that's what I was inferring from the documentation. I was hoping to be able to configure a uniform expiration policy, just like I currently use procmail to file my mail without having to have a separate config for each client. roland -- PGP Key ID: 66 BC 3B CD Roland B. Roberts, PhD RL Enterprises rol...@rlenter.com6818 Madeline Court rol...@astrofoto.org Brooklyn, NY 11220
Re: [Dovecot] Expire Plugin Configuration Question
On 10/4/2009, Roland Roberts (rol...@astrofoto.org) wrote: I was hoping to be able to configure a uniform expiration policy, just like I currently use procmail to file my mail without having to have a separate config for each client. What I had said was I don't think (maybe you can) that you can do it on a per user basis... If by 'uniform' you mean 'global', currently all you *can* do is set a global policy... -- Best regards, Charles
Re: [Dovecot] Expire Plugin Configuration Question
Charles Marcus wrote: On 10/4/2009, Roland Roberts (rol...@astrofoto.org) wrote: I was hoping to be able to configure a uniform expiration policy, just like I currently use procmail to file my mail without having to have a separate config for each client. What I had said was I don't think (maybe you can) that you can do it on a per user basis... If by 'uniform' you mean 'global', currently all you *can* do is set a global policy... The documentation doesn't say anything about per-user which implies it can't be done. I would very much like to be wrong on that. By uniform, I don't mean global. I mean that the policy is set (by me on each of my folders) once instead of once per mail client. roland -- PGP Key ID: 66 BC 3B CD Roland B. Roberts, PhD RL Enterprises rol...@rlenter.com6818 Madeline Court rol...@astrofoto.org Brooklyn, NY 11220
Re: [Dovecot] Expire plugin: wrong mailbox separators in database?
Hate to bump this, but is there nobody who uses the expire plugin and can confirm my observations? I'd love to use the expire plugin to delete old messages filed in spam folders but as it is now I can't get it to work with the wrong mailbox separators in the table entries. Andreas -- Andreas Ntaflos GPG Fingerprint: 6234 2E8E 5C81 C6CB E5EC 7E65 397C E2A8 090C A9B4 signature.asc Description: This is a digitally signed message part.
Re: [Dovecot] Expire plugin: wrong mailbox separators in database?
Andreas Ntaflos wrote: Hate to bump this, but is there nobody who uses the expire plugin and can confirm my observations? I'd love to use the expire plugin to delete old messages filed in spam folders but as it is now I can't get it to work with the wrong mailbox separators in the table entries. Andreas Your observations look reasonable to me. Looks like the expire plugin needs to be fixed so that other separator characters can be used. -- -Eric 'shubes'
[Dovecot] Expire plugin: wrong mailbox separators in database?
Hi all, I'm experimenting with the expire plugin and seem have run into a small problem. I am using Dovecot 1.2.4 on a test server. The config is taken mostly verbatim from the expire plugin wiki page [1], using MySQL as a database. See below for detailed output. Namespace private has / configured as mailbox separator: namespace private { separator = / prefix = inbox = yes } The expire = section from dovecot.conf thus looks like this: plugin { expire = Trash 7 INBOX/Spam 8 INBOX/Spam/To-Discard 3 ... } Three mailboxes/folders are kept track of: Trash, INBOX/Spam and INBOX/Spam/Spam-To-Discard (this one holds messages that scored high enough to very unlikely be legitimate and should be deleted soon). But when a message is put into one of these folders the mailbox attribute of the expires table uses . as mailbox separator: mysql select * from expires; +-++--+ | username| mailbox| expire_stamp | +-++--+ | f...@example.org | INBOX.Spam.Spam-To-Discard | 1253114526 | | f...@example.org | INBOX.Spam | 1253114528 | +-++--+ Consequently, expire-tool --test seems to choke on this: # dovecot --exec-mail ext /usr/local/libexec/dovecot/expire-tool --test Info: f...@example.org/INBOX.Spam.Spam-To-Discard: \ mailbox 'INBOX.Spam.Spam-To-Discard' removed from config Info: f...@example.org/INBOX.Spam: mailbox 'INBOX.Spam' \ removed from config When I manually update the mailbox attribute to use / as separator expire-tool seems to work correctly: # dovecot --exec-mail ext /usr/local/libexec/dovecot/expire-tool --test Info: f...@example.org/INBOX/Spam/Spam-To-Discard: stop, expire \ time in future: Wed Sep 16 17:22:06 2009 Using . as separator in the expire = line doesn't work either: the expires table isn't written to at all when a message is put in one of the specified folders. Presumably because INBOX/Spam is the real mailbox but INBOX.Spam is monitored by the expire plugin and there is no INBOX.Spam to put in messages. So I believe this is not the expected behaviour? Or am I doing anything wrong? I'd rather not change the separator from / to . in all the namespaces if that can be avoided. Thanks in advance, Andreas dovecot -n: == # 1.2.4: /usr/local/etc/dovecot.conf # OS: Linux 2.6.26-2-686 i686 Debian 5.0.2 log_timestamp: %Y-%m-%d %H:%M:%S protocols: managesieve imap imaps pop3 pop3s listen: 83.65.168.220 127.0.0.1 login_dir: /usr/local/var/run/dovecot/login login_executable(default): /usr/local/libexec/dovecot/imap-login login_executable(imap): /usr/local/libexec/dovecot/imap-login login_executable(pop3): /usr/local/libexec/dovecot/pop3-login login_executable(managesieve): /usr/local/libexec/dovecot/managesieve-login mail_access_groups: mail mail_privileged_group: mail mail_location: maildir:~/Maildir mail_drop_priv_before_exec: yes mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(pop3): /usr/local/libexec/dovecot/pop3 mail_executable(managesieve): /usr/local/libexec/dovecot/managesieve mail_plugins(default): autocreate acl expire mail_plugins(imap): autocreate acl expire mail_plugins(pop3): 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(pop3): /usr/local/lib/dovecot/pop3 mail_plugin_dir(managesieve): /usr/local/lib/dovecot/managesieve namespace: type: public separator: / prefix: Public/ location: maildir:/var/mail/public:CONTROL=~/Maildir/control/public:INDEX=~/Maildir/index/public list: yes namespace: type: private separator: / prefix: Backup/ location: maildir:~/Maildir-backup hidden: yes list: no namespace: type: private separator: / inbox: yes list: yes subscriptions: yes lda: log_path: info_log_path: auth_socket_path: /var/run/dovecot/auth-master postmaster_address: postmas...@mailtest0.rise-s.com mail_plugins: sieve acl expire auth default: mechanisms: plain login passdb: driver: pam passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: passwd userdb: driver: static args: uid=vmail gid=vmail home=/var/vmail/%Ld/%Ln allow_all_users=yes socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix master: path: /var/run/dovecot/auth-master mode: 384 user: vmail plugin: expire: Trash 7 INBOX/Spam 5 INBOX/Spam/Spam-To-Discard 3 expire_dict: proxy::expire sieve: ~/.dovecot.sieve sieve_dir: ~/sieve sieve_global_path: /etc/dovecot/sieve/default.sieve sieve_global_dir: /etc/dovecot/sieve/global/ sieve_before: /etc/dovecot/sieve/before/
Re: [Dovecot] expire plugin: columns not uniq
On Mon, 24 Aug 2009 13:33:15 -0400 Timo Sirainen t...@iki.fi wrote: On Mon, 2009-08-24 at 13:27 -0400, Timo Sirainen wrote: CREATE TRIGGER mergeexpire BEFORE INSERT ON expires FOR EACH ROW BEGIN UPDATE expires SET expire_stamp=NEW.expire_stamp WHERE username = NEW.username AND mailbox = NEW.mailbox; SELECT raise(ignore) WHERE (SELECT 1 FROM expires WHERE username = NEW.username AND mailbox = NEW.mailbox) IS NOT NULL; END; This seem some kind crudely to me, but it's working. That looks correct to me. Sorry for such lately response, I have just returned from vacation. Oh, except there's a small race condition if the first row is being added at the same time by two processes. That's why the PostgreSQL trigger is so much more complex. But it should be somewhat rare I guess.. Unless SQLite has some locks that prevent that? Anyway I was thinking that two processes run the UPDATE part of the trigger and then both try to INSERT. One of them succeeds and the other one fails. But the row gets added anyway and the timestamp is the same anyway, so it probably doesn't matter all that much, just logs an error. As far as I know, sqlite permits to write database changes(INSERT,UPDATE or DELETE) to only 1 process at the same time and when process is updating data - sqlite table is locking. This might be OS queue processing, because sqlite have no master process for handling such racing. In my understanding, if two identical INSERTs will be passed to database(and the record already exists) - trigger's UPDATE will be run twice, but consistently. My admissions can be faulty and sqlite experts should shed some light on this situation. The above trigger is working about a week in my setup - I have checked error log for this period - there is nothing related to database issues.
Re: [Dovecot] expire plugin: columns not uniq
On Fri, 2009-08-21 at 17:02 +0300, Nikita Koshikov wrote: Search the Wiki about Postgres and the requirement of a TRIGGER. I guess that sqlite requires something like this. Maybe someone family with sqlite will say how to make this trigger better and constrain check field existence before doing UPDATE CREATE TRIGGER mergeexpire BEFORE INSERT ON expires FOR EACH ROW BEGIN UPDATE expires SET expire_stamp=NEW.expire_stamp WHERE username = NEW.username AND mailbox = NEW.mailbox; SELECT raise(ignore) WHERE (SELECT 1 FROM expires WHERE username = NEW.username AND mailbox = NEW.mailbox) IS NOT NULL; END; This seem some kind crudely to me, but it's working. That looks correct to me. I'll add it to the wiki page. A similar trigger could be used for dict quota too. So now that SQLite is working, I'll just start deprecating Berkeley DB support even more strongly. Thanks. :) signature.asc Description: This is a digitally signed message part
Re: [Dovecot] expire plugin: columns not uniq
On Mon, 2009-08-24 at 13:27 -0400, Timo Sirainen wrote: CREATE TRIGGER mergeexpire BEFORE INSERT ON expires FOR EACH ROW BEGIN UPDATE expires SET expire_stamp=NEW.expire_stamp WHERE username = NEW.username AND mailbox = NEW.mailbox; SELECT raise(ignore) WHERE (SELECT 1 FROM expires WHERE username = NEW.username AND mailbox = NEW.mailbox) IS NOT NULL; END; This seem some kind crudely to me, but it's working. That looks correct to me. Oh, except there's a small race condition if the first row is being added at the same time by two processes. That's why the PostgreSQL trigger is so much more complex. But it should be somewhat rare I guess.. Unless SQLite has some locks that prevent that? Anyway I was thinking that two processes run the UPDATE part of the trigger and then both try to INSERT. One of them succeeds and the other one fails. But the row gets added anyway and the timestamp is the same anyway, so it probably doesn't matter all that much, just logs an error. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] expire plugin: columns not uniq
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 19 Aug 2009, Nikita Koshikov wrote: How can I solve this ? and why expire plugin is trying to use INSERT, instead of UPDATE ? Search the Wiki about Postgres and the requirement of a TRIGGER. I guess that sqlite requires something like this. Unfortunately, there is no UPDATE OR INSERT in SQL and it is hard to simulate. Bye, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBSo5fbnWSIuGy1ktrAQKQdQgAs1fioq/x86JNb9L7SvGnU9wPOUICilsI RcY+PrsMzGxdRShlnDhEIJGRlbzr7jHDhDhMfej+TGP9XqBFPqBphVxT8JIJmGXz Z4qEvwLoyuSKxWikLxVLaslDPYPu2tjmvKt+HWaLgev7ecwFF8NoKBHhWV6fR3x9 o/xVVcj6hM38SkiGc6+t27OC5ch6Tq5Vqmau4QIB7fkN8bA8IoBU17rM0eW4k80m 7nKTVsPqFcDKlmes2d5vJVlCYg+NCy69RVIZEFQwOJahBjveSvJsXWnhks9e0nEk PmtMPMUFHOvfe+4KfK2GFxAPCznOSrxfgMuUewXnENCgLtXrox+zPA== =8vpx -END PGP SIGNATURE-
Re: [Dovecot] expire plugin: columns not uniq
On Fri, 21 Aug 2009 10:48:42 +0200 (CEST) Steffen Kaiser skdove...@smail.inf.fh-brs.de wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 19 Aug 2009, Nikita Koshikov wrote: How can I solve this ? and why expire plugin is trying to use INSERT, instead of UPDATE ? Search the Wiki about Postgres and the requirement of a TRIGGER. I guess that sqlite requires something like this. Thank for your answer. I'll dig in this direction. Unfortunately, there is no UPDATE OR INSERT in SQL and it is hard to simulate. You mean in dovecot expire plugin or where ? Bye, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBSo5fbnWSIuGy1ktrAQKQdQgAs1fioq/x86JNb9L7SvGnU9wPOUICilsI RcY+PrsMzGxdRShlnDhEIJGRlbzr7jHDhDhMfej+TGP9XqBFPqBphVxT8JIJmGXz Z4qEvwLoyuSKxWikLxVLaslDPYPu2tjmvKt+HWaLgev7ecwFF8NoKBHhWV6fR3x9 o/xVVcj6hM38SkiGc6+t27OC5ch6Tq5Vqmau4QIB7fkN8bA8IoBU17rM0eW4k80m 7nKTVsPqFcDKlmes2d5vJVlCYg+NCy69RVIZEFQwOJahBjveSvJsXWnhks9e0nEk PmtMPMUFHOvfe+4KfK2GFxAPCznOSrxfgMuUewXnENCgLtXrox+zPA== =8vpx -END PGP SIGNATURE-
Re: [Dovecot] expire plugin: columns not uniq
Search the Wiki about Postgres and the requirement of a TRIGGER. I guess that sqlite requires something like this. Maybe someone family with sqlite will say how to make this trigger better and constrain check field existence before doing UPDATE CREATE TRIGGER mergeexpire BEFORE INSERT ON expires FOR EACH ROW BEGIN UPDATE expires SET expire_stamp=NEW.expire_stamp WHERE username = NEW.username AND mailbox = NEW.mailbox; SELECT raise(ignore) WHERE (SELECT 1 FROM expires WHERE username = NEW.username AND mailbox = NEW.mailbox) IS NOT NULL; END; This seem some kind crudely to me, but it's working.
Re: [Dovecot] expire plugin: columns not uniq
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 21 Aug 2009, Nikita Koshikov wrote: You mean in dovecot expire plugin or where ? No, in general. If one wants some data in a DB, but update if already present. If you re-programm the TRIGGER in the client, you need to lock the whole table, if you want to overcome all race conditions and also don't want any errors logged (at least with postgres). Bye, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBSo62cHWSIuGy1ktrAQLimQf/QYdrEX3y94bK1jmMk4T+bIIMcjmzESe5 0o+W0AFSOifWop8JOHZy1YJUXa5gkGnhg09ar0zC9UQ8T4J97xz0ORfe3UHmisKv xh2zJ8lhw1OviQ4qrPcSot1/D/SQ/xdPKbBaaD1S7k+E0zK44P74PHGAvRsx+tUZ 3BR0U73LFtAiAhvW/y2rseo/vIuXBBSPthBK/nExiiODN9P9Vq3iOczfZwVUkVmo cNwArCwjkBGk6dGRnfGEoPKWsa/qFVHqQPjwen7j0T2ak58Vfm9Vc3pGmMSequGh MIjcOHcmpcF6AAhsZQIoYewgVtQQ+aXY9T4zQo6JbLCEyF7RCs/yRg== =cinD -END PGP SIGNATURE-
Re: [Dovecot] expire plugin: columns not uniq
No, in general. If one wants some data in a DB, but update if already present. If you re-programm the TRIGGER in the client, you need to lock the whole table, if you want to overcome all race conditions and also don't want any errors logged (at least with postgres). Thanks for explanation. I'm not so aware in databases, but if trigger will be programmed on client side - this will make code more portable(in case of database choicing) and what is the less evil - locking or portability... In any case, thanks for reply, it helps me much.
[Dovecot] expire plugin: columns not uniq
Hello list, My dovecot setup have expire plugin enabled. It is working fine: new records added to database(sqlite), expire-tool successfully expunges old mail, but when expire-tool try to update database record for processed user, I get error in logs: r...@mail dovecot 0:0 # /usr/sbin/dovecot --exec-mail ext /usr/libexec/dovecot/expire-tool.sh --test Info: koshiko...@domain.com/Spam: timestamp 1250622406 (Tue Aug 18 22:06:46 2009) - 1250684287 (Wed Aug 19 15:18:07 2009) in logs: Aug 19 13:29:11 dict: Error: sqlite: exec(INSERT INTO expires (expire_stamp,username,mailbox) VALUES ('1250684287','koshiko...@domain.com','Spam')) failed: columns username, mailbox are not unique (19) Aug 19 13:29:11 dict: Error: sql dict: commit failed: 1҅�t+�]�Ћu�}��]Ð�t This is my expire dict config file: connect = /var/mail/expire.db #v1.2 map { pattern = shared/expire/$user/$mailbox table = expires value_field = expire_stamp fields { username = $user mailbox = $mailbox } } expire plugin related dovecot sections: dict { expire = sqlite:/etc/dovecot/plugins/expire.conf } plugin { expire = Trash 30 Spam 20 expire_dict = proxy::expire } Version of sqlite is 3.6.16, dovecot-1.2.3. How can I solve this ? and why expire plugin is trying to use INSERT, instead of UPDATE ?
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2 / 1.2.3 solved
Robert Schetterer schrieb: Timo Sirainen schrieb: On Mon, 2009-08-10 at 20:04 +0200, Robert Schetterer wrote: as far i remember there was root .. yes of course i am having variables in namespaces i think i need them for my setup expire-tool is currently incompatible with variables anywhere. v2.0 fixes this, but with v1.x you can't use them. namespace private { separator = / prefix = location = maildir:/usr/local/virtual/%d/%u/:CONTROL=/usr/local/virtual/%d/%u/:INDEX=/usr/local/virtual/%d/%u/:INBOX=/usr/local/virtual/$ location = maildir:~/ should work here just fine. All of your directories point to the same one, so there's no need to specify them separately. list = yes hidden = no subscriptions = yes } namespace private { prefix = virtual/ separator = / location = virtual:/etc/dovecot/virtual:LAYOUT=maildir++ This is ok as it is. hidden = yes list = no subscriptions= no } namespace private { prefix = RealMails/ separator = / list = no hidden = yes location = maildir:/usr/local/virtual/%d/%u/:CONTROL=/usr/local/virtual/%d/%u/:INDEX=/usr/local/virtual/%d/%u/:INBOX=/usr/local/virtual/$ } Here again it's the same. Actually you should just remove the location setting from both RealMails/ and namespaces, so it'll just default to mail_location setting. only in the first default namespace, changing others may crash with pop3 downloading special imap folders As long as home points to the right directory there shouldn't be any problems. ok i ll try, and report Hi Timo, this worked, mail was deleted ,so the thread is solved i didnt tested other functions deeply yet with new locations but on the first look it should be ok thx !!! -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2 / 1.2.3
Robert Schetterer schrieb: Timo Sirainen schrieb: On Tue, 2009-08-04 at 10:22 +0200, Robert Schetterer wrote: Info: maildir: data=/usr/local/virtual//root/:CONTROL=/usr/local/virtual//root/:INDEX=/usr/local/virtual//root/:INBOX=/usr/local/virtual//root/ Oh, right, this is the problem. You can't use %variables in mail_location setting. They get expanded too early. Since you're returning home anyway, use: mail_location = maildir:~/ HI Timo, ok i try this and report Hi, Timo sorry to say setting mail_location = maildir:~/ does not change anything mail is still not deleted, latest test were with 1.2.3 -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2 / 1.2.3
On Aug 10, 2009, at 11:17 AM, Robert Schetterer wrote: Info: maildir: data=/usr/local/virtual//root/:CONTROL=/usr/local/virtual// root/:INDEX=/usr/local/virtual//root/:INBOX=/usr/local/virtual// root/ .. setting mail_location = maildir:~/ does not change anything mail is still not deleted, latest test were with 1.2.3 What does it log now?
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2 / 1.2.3
Timo Sirainen schrieb: On Mon, 2009-08-10 at 20:04 +0200, Robert Schetterer wrote: as far i remember there was root .. yes of course i am having variables in namespaces i think i need them for my setup expire-tool is currently incompatible with variables anywhere. v2.0 fixes this, but with v1.x you can't use them. namespace private { separator = / prefix = location = maildir:/usr/local/virtual/%d/%u/:CONTROL=/usr/local/virtual/%d/%u/:INDEX=/usr/local/virtual/%d/%u/:INBOX=/usr/local/virtual/$ location = maildir:~/ should work here just fine. All of your directories point to the same one, so there's no need to specify them separately. list = yes hidden = no subscriptions = yes } namespace private { prefix = virtual/ separator = / location = virtual:/etc/dovecot/virtual:LAYOUT=maildir++ This is ok as it is. hidden = yes list = no subscriptions= no } namespace private { prefix = RealMails/ separator = / list = no hidden = yes location = maildir:/usr/local/virtual/%d/%u/:CONTROL=/usr/local/virtual/%d/%u/:INDEX=/usr/local/virtual/%d/%u/:INBOX=/usr/local/virtual/$ } Here again it's the same. Actually you should just remove the location setting from both RealMails/ and namespaces, so it'll just default to mail_location setting. only in the first default namespace, changing others may crash with pop3 downloading special imap folders As long as home points to the right directory there shouldn't be any problems. ok i ll try, and report -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2
On Tue, 2009-08-04 at 10:22 +0200, Robert Schetterer wrote: Info: maildir: data=/usr/local/virtual//root/:CONTROL=/usr/local/virtual//root/:INDEX=/usr/local/virtual//root/:INBOX=/usr/local/virtual//root/ Oh, right, this is the problem. You can't use %variables in mail_location setting. They get expanded too early. Since you're returning home anyway, use: mail_location = maildir:~/ signature.asc Description: This is a digitally signed message part
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2
Timo Sirainen schrieb: On Tue, 2009-08-04 at 10:22 +0200, Robert Schetterer wrote: Info: maildir: data=/usr/local/virtual//root/:CONTROL=/usr/local/virtual//root/:INDEX=/usr/local/virtual//root/:INBOX=/usr/local/virtual//root/ Oh, right, this is the problem. You can't use %variables in mail_location setting. They get expanded too early. Since you're returning home anyway, use: mail_location = maildir:~/ HI Timo, ok i try this and report -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2
Robert Schetterer schrieb: Timo Sirainen schrieb: On Aug 3, 2009, at 3:52 AM, Robert Schetterer wrote: /etc/crontab 45 9 * * * root /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh Disable this for now and tomorrow just run the --test first manually, save its output, then if it seemed ok run without --test. ok i will do /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh --test tommorow and then /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh savin the outputs and additional looking in sql and imap savedate manually after deletetion time Hi Timo, did that exactly in that row as you see the mail didnt get deleted ( stays in filesystem, and is shown to thunderbird ) but it expired in sql dict rightly but was not deleted /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh --test Info: Loading modules from directory: /usr/lib/dovecot/modules/imap Info: Module loaded: /usr/lib/dovecot/modules/imap/lib01_acl_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_autocreate_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_expire_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_fts_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_virtual_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib21_fts_squat_plugin.so Info: Quota root: name= backend=dict args=:proxy::quotadict Info: Quota warning: bytes=0 (95%) messages=0 command=/usr/local/bin/quota-warning.sh 95 Info: Quota warning: bytes=0 (80%) messages=0 command=/usr/local/bin/quota-warning.sh 80 Info: expire: pattern=Trash type=expunge secs=86400 Info: auth input: home=/usr/local/virtual/schetterer.com/rob...@schetterer.com/ Info: auth input: quota_rule=*:bytes=1024 Info: auth input: quota_rule2=Trash:storage=50240 Info: auth input: quota_rule3=Sent:storage=50240 Info: auth input: quota_rule4=Drafts:storage=50240 Info: auth input: quota_rule5=Templates:storage=50240 Info: auth input: quota_rule6=Junk:storage=50240 Info: auth input: mail=maildir:/usr/local/virtual/schetterer.com/rob...@schetterer.com/ Info: auth input: namespace_1_inbox=yes Info: auth input: uid=1001 Info: auth input: gid=1001 Info: dict quota: user=rob...@schetterer.com, uri=proxy::quotadict, noenforcing=0 Info: Namespace: type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes Info: maildir: data=/usr/local/virtual//root/:CONTROL=/usr/local/virtual//root/:INDEX=/usr/local/virtual//root/:INBOX=/usr/local/virtual//root/ Info: maildir++: root=/usr/local/virtual//root, index=, control=, inbox=/usr/local/virtual//root Info: acl: initializing backend with data: vfile Info: acl: acl username = rob...@schetterer.com Info: acl: owner = 1 Info: acl vfile: Global ACL directory: (null) Info: Namespace: type=private, prefix=virtual/, sep=/, inbox=no, hidden=yes, list=no, subscriptions=no Info: virtual: data=/etc/dovecot/virtual:LAYOUT=maildir++ Info: maildir++: root=/etc/dovecot/virtual, index=, control=, inbox= Info: acl: initializing backend with data: vfile Info: acl: acl username = rob...@schetterer.com Info: acl: owner = 1 Info: acl vfile: Global ACL directory: (null) Info: Namespace: type=private, prefix=RealMails/, sep=/, inbox=no, hidden=yes, list=no, subscriptions=yes Info: maildir: data=/usr/local/virtual//root/:CONTROL=/usr/local/virtual//root/:INDEX=/usr/local/virtual//root/:INBOX=/usr/local/virtual//root/ Info: maildir++: root=/usr/local/virtual//root, index=, control=, inbox=/usr/local/virtual//root Info: acl: initializing backend with data: vfile Info: acl: acl username = rob...@schetterer.com Info: acl: owner = 1 Info: acl vfile: Global ACL directory: (null) Info: Namespace: type=shared, prefix=shared/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=no Info: shared: root=, index=, control=, inbox= Info: Namespace : Using permissions from /usr/local/virtual//root: mode=0700 gid=-1 Info: acl vfile: file /usr/local/virtual//root/.Trash/dovecot-acl not found Info: rob...@schetterer.com/Trash: no messages left select mailbox, from_unixtime(expire_stamp), username from expireplugin; +-+-+---+ | mailbox | from_unixtime(expire_stamp) | username | +-+-+---+ | Trash | 2009-08-04 09:40:21 | rob...@schetterer.com | +-+-+---+ 1 row in set (0.00 sec) 3 select Trash * OK [CLOSED] * FLAGS (\Answered \Flagged \Deleted \Seen \Draft nonjunk Junk) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft nonjunk Junk \*)] Flags permitted. * 1 EXISTS * 0 RECENT * OK [UIDVALIDITY 1240758078] UIDs valid * OK [UIDNEXT 89]
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2
Robert Schetterer schrieb: Timo Sirainen schrieb: On Fri, 2009-07-31 at 17:21 +0200, Robert Schetterer wrote: Hi Timo, so now its clear, the mail did not got deleted if i now do Info: rob...@schetterer.com/Trash: no messages left So, it worked? no messages left means if you didn't give --test it would have deleted all messages from the mailbox. Hi Timo, no it didnt work i repeated the test since then twice the mail was not deleted Hi Timo, no it didnt work i repeated the test since then twice the mail was not deleted -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2
Timo Sirainen schrieb: On Aug 3, 2009, at 3:26 AM, Robert Schetterer wrote: Timo Sirainen schrieb: On Fri, 2009-07-31 at 17:21 +0200, Robert Schetterer wrote: Hi Timo, so now its clear, the mail did not got deleted if i now do Info: rob...@schetterer.com/Trash: no messages left So, it worked? no messages left means if you didn't give --test it would have deleted all messages from the mailbox. Hi Timo, no it didnt work i repeated the test since then twice the mail was not deleted Well, that message says that at the time there was no messages left in the Trash. Do you mean that there were? Show me now what it says with: - expire-tool --test - FETCH 1 X-SAVEDATE shows in a mailbox that should have expired messages - SELECT * FROM .. showing the database row for the mailbox that should have expired messages Ok Timo, i start a new test to make sure mysql select mailbox, from_unixtime(expire_stamp), username from expireplugin; +-+-+---+ | mailbox | from_unixtime(expire_stamp) | username | +-+-+---+ | Trash | 2009-08-04 09:40:21 | rob...@schetterer.com | +-+-+---+ 1 row in set (0.00 sec) 1 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH ACL RIGHTS=texk QUOTA] Logged in 2 select Trash * FLAGS (\Answered \Flagged \Deleted \Seen \Draft nonjunk Junk) * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft nonjunk Junk \*)] Flags permitted. * 1 EXISTS * 0 RECENT * OK [UIDVALIDITY 1240758078] UIDs valid * OK [UIDNEXT 89] Predicted next UID * OK [HIGHESTMODSEQ 123] 2 OK [READ-WRITE] Select completed. 3 fetch 1:* (internaldate x-savedate) * 1 FETCH (INTERNALDATE 03-Aug-2009 09:40:16 +0200 X-SAVEDATE 03-Aug-2009 09:40:21 +0200) 3 OK Fetch completed. /usr/lib/dovecot/expire-tool.sh #!/bin/bash MAIL_PLUGINS=${MAIL_PLUGINS//imap_quota/} MAIL_PLUGINS=${MAIL_PLUGINS//mail_log/} MAIL_PLUGINS=${MAIL_PLUGINS//imap_acl/} exec ${0%.sh} $@ /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh --test Info: Loading modules from directory: /usr/lib/dovecot/modules/imap Info: Module loaded: /usr/lib/dovecot/modules/imap/lib01_acl_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib10_quota_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_autocreate_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_expire_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_fts_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib20_virtual_plugin.so Info: Module loaded: /usr/lib/dovecot/modules/imap/lib21_fts_squat_plugin.so Info: Quota root: name= backend=dict args=:proxy::quotadict Info: Quota warning: bytes=0 (95%) messages=0 command=/usr/local/bin/quota-warning.sh 95 Info: Quota warning: bytes=0 (80%) messages=0 command=/usr/local/bin/quota-warning.sh 80 Info: expire: pattern=Trash type=expunge secs=86400 Info: rob...@schetterer.com/Trash: stop, expire time in future: Tue Aug 4 09:40:21 2009 /etc/crontab 45 9 * * * root /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh so lets see what happens tommorow and repeat the --test as well as the mysql test and internal savedate test after deletion time -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2
On Aug 3, 2009, at 3:52 AM, Robert Schetterer wrote: /etc/crontab 45 9 * * * root /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh Disable this for now and tomorrow just run the --test first manually, save its output, then if it seemed ok run without --test.
Re: [Dovecot] expire plugin no delete 1.2.1 / 1.2.2
Timo Sirainen schrieb: On Aug 3, 2009, at 3:52 AM, Robert Schetterer wrote: /etc/crontab 45 9 * * * root /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh Disable this for now and tomorrow just run the --test first manually, save its output, then if it seemed ok run without --test. ok i will do /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh --test tommorow and then /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf --exec-mail ext /usr/lib/dovecot/expire-tool.sh savin the outputs and additional looking in sql and imap savedate manually after deletetion time -- Best Regards MfG Robert Schetterer Germany/Munich/Bavaria