Re: segfault in dict_transaction_rollback() on doveadm quota recalc -u
Bump > Hi, > > We have a dovecot cluster with nfs storage, 2 directors and 3 > imap/pop3/lmtp backends. > > Redis is used as a dict backend with a dict proxy. > > dict { > quota = redis:host=127.0.0.1:prefix=user/ > } > > plugin { > > quota = dict:User quota::proxy::quota > > } > > Redis server is behind haproxy working in tcp mode. > > doveadm quota recalc -u user always couses dict process segfault (called > from imap backend or director host), otherwise quota is working correctly. > > > #0 dict_transaction_rollback (_ctx=_ctx@entry=0xea5fd0) at dict.c:194 > 194 ctx->dict->v.transaction_rollback(ctx); > (gdb) bt > #0 dict_transaction_rollback (_ctx=_ctx@entry=0xea5fd0) at dict.c:194 > #1 0x00404d4d in dict_connection_destroy (conn=conn@entry=0xea5af0) > at dict-connection.c:166 > #2 0x00405098 in dict_connection_input (conn=) at > dict-connection.c:127 > #3 dict_connection_input (conn=0xea5af0) at dict-connection.c:96 > #4 0x7fbf886fe4fb in io_loop_call_io (io=0xeab550) at ioloop.c:501 > #5 0x7fbf886ff54b in io_loop_handler_run_internal > (ioloop=ioloop@entry=0xe9f730) > at ioloop-epoll.c:220 > #6 0x7fbf886fe589 in io_loop_handler_run (ioloop=ioloop@entry=0xe9f730) > at ioloop.c:548 > #7 0x7fbf886fe608 in io_loop_run (ioloop=0xe9f730) at ioloop.c:525 > #8 0x7fbf8869fbc3 in master_service_run (service=0xe9f5c0, > callback=callback@entry=0x4059c0 ) at > master-service.c:581 > #9 0x00404ad8 in main (argc=1, argv=0xe9f390) at main.c:105 > (gdb) p ctx > $1 = (struct dict_transaction_context *) 0x0 > > > dovecot 2.2.18, redis server 2.8 > > > > Regards Michal >
Re: Authcache and user changing
2015-01-09 9:16 GMT+01:00 Steffen Kaiser : > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > On Mon, 29 Dec 2014, Lazy wrote: > >> >> I have noticed that during auth cache hits usernames are not updated. >> (We use ldap backend >> and change username with >> user_attrs = uid=user, mailMessageStore=home, >> mailQuotaSize=quota_rule=*:bytes=%$ >> >> cold cache >> >> lmtp(14414): Debug: auth input: testmon_testmon >> home=/vmail/te/testmon_testmon quota_rule=*:bytes=104857600 >> lmtp(14414): Debug: changed username to testmon_testmon >> lmtp(14414): Debug: Added userdb setting: >> plugin/quota_rule=*:bytes=104857600 >> >> >> hot cache >> >> lmtp(14715): Debug: auth input: iq...@mon.test.pl >> home=/vmail/iq/testmon_testmon quota_rule=*:bytes=104857600 >> lmtp(14715): Debug: Added userdb setting: >> plugin/quota_rule=*:bytes=104857600 >> >> this kills our dictionary based quota (users have multiple quota >> instances depending on >> timing and alias the email was delivered to. >> >> Is there a way to force addition of user to the auth cache ? > > > Did you posted your doveconf -n and ldap settings somewhere? I have atached a dirty hack that fixes the issue for me (username changes are cached in userdb auth cache). config follows dovecot -n passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } userdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } dovecot-ldap.conf.ext debug_level = 32 auth_bind = no ldap_version = 3 base = ou=accounts,o=test,c=pl user_attrs = uid=user, mailMessageStore=home, mailQuotaSize=quota_rule=*:bytes=%$ user_filter = (&(&(!(accountStatus=deleted))(objectClass=qMailUser))(|(mail=%u)(uid=%u)(mailAlternateAddress=%u))) pass_attrs = uid=user, userPassword=password pass_filter = (&(objectClass=qMailUser)(|(mail=%u)(uid=%u)(mailAlternateAddress=%u))) iterate_attrs = uid=user iterate_filter = (&(&(objectClass=qmailUser)(!(accountStatus=deleted full doveconf -n # 2.2.15: /etc/dovecot/dovecot.conf # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.7 auth_cache_negative_ttl = 5 mins auth_cache_size = 10 M auth_cache_ttl = 5 mins auth_debug = yes auth_master_user_separator = * auth_mechanisms = plain login auth_username_format = %u auth_verbose = yes base_dir = /var/run/dovecot/ deliver_log_format = msgid=%m f:%f s:%s %$ disable_plaintext_auth = no import_environment = TZ lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes lda_original_recipient_header = Delivered-To listen = 10.0.55.22 login_greeting = Imap ready. login_trusted_networks = 10.0.55.2/32 10.0.55.3/32 mail_debug = yes mail_gid = 300 mail_location = maildir:~/Maildir:INDEX=/var/dovecot_indexes%h mail_plugins = quota expire notify mail_log mail_uid = 300 maildir_very_dirty_syncs = yes 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 duplicate namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox SPAM { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { args = /etc/dovecot/master-users driver = passwd-file master = yes pass = yes } passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { expire = SPAM expire_dict = redis:host=127.0.0.1:prefix=expire/ last_login_key = %u mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename mail_log_fields = uid box msgid from subject size quota = dict:User quota::redis:host=127.0.0.1:prefix=user/ quota_warning = storage=95%% quota-warning 95 %u quota_warning2 = storage=80%% quota-warning 80 %u sieve_global_dir = /etc/sieve_global sieve_max_redirects = 20 } postmaster_address = postmas...@test.pl protocols = imap pop3 lmtp sieve recipient_delimiter = service auth { unix_listener auth-userdb { mode = 0777 } } service dict { unix_listener dict { group = vmail user = vmail } } service doveadm { inet_listener { port = 4567 } } service imap-login { process_min_avail = 8 service_count = 0 } service imap { process_limit = 14000 } service lmtp { inet_listener lmtp { address = dovecot2 port = 24 } process_min_avail = 5 user = vmail } service pop3-login { process_min_avail = 8 service_count = 0 } service pop3 { process_limit = 1 } service quota-warning { executable = script /usr/local/bin/quota_warning.sh unix_listener quota-warning { user = vmail }
Re: Authcache and user changing
2014-12-30 15:04 GMT+01:00 Lazy : > 2014-12-29 12:47 GMT+01:00 Lazy : >> Hi, >> >> >> I have noticed that during auth cache hits usernames are not updated. >> (We use ldap backend >> and change username with >> user_attrs = uid=user, mailMessageStore=home, >> mailQuotaSize=quota_rule=*:bytes=%$ >> >> cold cache >> >> lmtp(14414): Debug: auth input: testmon_testmon >> home=/vmail/te/testmon_testmon quota_rule=*:bytes=104857600 >> lmtp(14414): Debug: changed username to testmon_testmon >> lmtp(14414): Debug: Added userdb setting: plugin/quota_rule=*:bytes=104857600 >> >> >> hot cache >> >> lmtp(14715): Debug: auth input: iq...@mon.test.pl >> home=/vmail/iq/testmon_testmon quota_rule=*:bytes=104857600 >> lmtp(14715): Debug: Added userdb setting: plugin/quota_rule=*:bytes=104857600 > > auth replays are > > > USER\t2\ttestmon_testmon\thome=/vmail/te/testmon_testmon\tquota_rule=*:bytes=104857600\n > on a cache miss > > and > > USER\t3\ttest...@mon.test.pl\thome=/vmail/te/testmon_testmon\tquota_rule=*:bytes=104857600\n > with a cache hit > > > without cache user is rewriten as expected, with cache it isn't requests made by imap or pop3 are always rewriting the usernames is it a bug or is it intentional ? -- Michal Grzedzicki
Re: Authcache and user changing
2014-12-29 12:47 GMT+01:00 Lazy : > Hi, > > > I have noticed that during auth cache hits usernames are not updated. > (We use ldap backend > and change username with > user_attrs = uid=user, mailMessageStore=home, > mailQuotaSize=quota_rule=*:bytes=%$ > > cold cache > > lmtp(14414): Debug: auth input: testmon_testmon > home=/vmail/te/testmon_testmon quota_rule=*:bytes=104857600 > lmtp(14414): Debug: changed username to testmon_testmon > lmtp(14414): Debug: Added userdb setting: plugin/quota_rule=*:bytes=104857600 > > > hot cache > > lmtp(14715): Debug: auth input: iq...@mon.test.pl > home=/vmail/iq/testmon_testmon quota_rule=*:bytes=104857600 > lmtp(14715): Debug: Added userdb setting: plugin/quota_rule=*:bytes=104857600 auth replays are USER\t2\ttestmon_testmon\thome=/vmail/te/testmon_testmon\tquota_rule=*:bytes=104857600\n on a cache miss and USER\t3\ttest...@mon.test.pl\thome=/vmail/te/testmon_testmon\tquota_rule=*:bytes=104857600\n with a cache hit without cache user is rewriten as expected, with cache it isn't -- Michal Grzedzicki
Authcache and user changing
Hi, I have noticed that during auth cache hits usernames are not updated. (We use ldap backend and change username with user_attrs = uid=user, mailMessageStore=home, mailQuotaSize=quota_rule=*:bytes=%$ cold cache lmtp(14414): Debug: auth input: testmon_testmon home=/vmail/te/testmon_testmon quota_rule=*:bytes=104857600 lmtp(14414): Debug: changed username to testmon_testmon lmtp(14414): Debug: Added userdb setting: plugin/quota_rule=*:bytes=104857600 hot cache lmtp(14715): Debug: auth input: iq...@mon.test.pl home=/vmail/iq/testmon_testmon quota_rule=*:bytes=104857600 lmtp(14715): Debug: Added userdb setting: plugin/quota_rule=*:bytes=104857600 this kills our dictionary based quota (users have multiple quota instances depending on timing and alias the email was delivered to. Is there a way to force addition of user to the auth cache ? -- Michal Grzedzicki
director + lmtp + ldap user
Hi, recently I have migrated our prevoius dovecot-lda to 2.2 with director + lmtp. And we are having some issues. When lmtp delivers to ldap uid names everything works except sieve vacation (login is not found in headers so reply is not sent). When using full email addresses in rcpt to vacation works but usernames are inconsistent (one user can login using his email address, or aliases, or uid). To fix that in ldap settings a have added uid=user which should be setting the username to approperate values. Most of the times it works but some deliveries are using email addresses not ldap uid's which seems to break dict quota's. It's must be related to auth cache (flushing the cache fixes the issue temporarly for given account). I think that the cache can be "polluted" by some other dovecot service. Does anyone have an idea where this can be comming from ? doveadm auth lookup -f user m...@test.com returns expected ldap uid no email address Thanks in advance for any help. Michal Grzedzicki from dovecot-ldap.conf.ext from backends user_attrs = uid=user, mailMessageStore=home, mailQuotaSize=quota_rule=*:bytes=%$ user_filter = (&(&(!(accountStatus=deleted))(objectClass=qMailUser))(|(mail=%u)(uid=%u)(mailAlternateAddress=%u))) pass_attrs = uid=user,userPassword=password pass_filter = (&(objectClass=qMailUser)(|(mail=%u)(uid=%u)(mailAlternateAddress=%u))) iterate_attrs = uid=user iterate_filter = (&(&(objectClass=qmailUser)(!(accountStatus=deleted director is doing the authorization and passing it to the backend using a master user protocol lmtp { passdb { args = proxy=y nopassword=y port=24 } } backend doveconf -n # 2.2.15: /etc/dovecot/dovecot.conf # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.7 auth_cache_negative_ttl = 5 mins auth_cache_size = 10 M auth_cache_ttl = 5 mins auth_debug = yes auth_master_user_separator = * auth_mechanisms = plain login auth_username_format = %u auth_verbose = yes base_dir = /var/run/dovecot/ deliver_log_format = msgid=%m f:%f s:%s %$ disable_plaintext_auth = no first_valid_gid = 300 first_valid_uid = 300 import_environment = TZ last_valid_gid = 300 last_valid_uid = 300 lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes lda_original_recipient_header = Delivered-To login_greeting = Imap ready. mail_debug = yes mail_gid = 300 mail_location = maildir:~/Maildir:INDEX=/var/dovecot_indexes%h mail_plugins = quota expire notify mail_log mail_uid = 300 maildir_very_dirty_syncs = yes 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 duplicate namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox SPAM { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { args = /etc/dovecot/master-users driver = passwd-file master = yes pass = yes } passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { expire = SPAM expire_dict = redis:host=127.0.0.1:prefix=expire/ mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename mail_log_fields = uid box msgid from subject size quota = dict:User quota::redis:host=127.0.0.1:prefix=user/ quota_warning = storage=95%% quota-warning 95 %u quota_warning2 = storage=80%% quota-warning 80 %u sieve_global_dir = /etc/sieve_global sieve_max_redirects = 20 } postmaster_address = postmas...@iq.pl protocols = imap pop3 lmtp sieve recipient_delimiter = service auth { unix_listener auth-userdb { mode = 0777 } } service dict { unix_listener dict { group = vmail user = vmail } } service doveadm { inet_listener { port = 2424 } } service imap-login { process_min_avail = 8 service_count = 0 } service imap { process_limit = 14000 } service lmtp { inet_listener lmtp { address = dovecot1 port = 24 } process_min_avail = 5 user = vmail } service managesieve-login { inet_listener sieve { address = 0.0.0.0 port = 4090 } protocol = sieve } service pop3-login { process_min_avail = 8 service_count = 0 } service pop3 { process_limit = 1 } service quota-warning { executable = script /usr/local/bin/quota_warning.sh unix_listener quota-warning { user = vmail } user = vmail } ssl = no syslog_facility = local2 userdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } verbose_proctitle = yes protocol lmtp { auth_username_format = %u info_log_path = /var/log/dovecot-lmtp mail_plugins = quota expire notify mail_log sieve
Re: lmtp usernames with -
2014-12-19 9:22 GMT+01:00 Steffen Kaiser : > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Fri, 19 Dec 2014, Lazy wrote: > >> I have a problem with lmtp delivery to usernames with '-' char. >> Everythong after - is ignored. thank You his was it
Re: lmtp usernames with -
2014-12-19 8:27 GMT+01:00 Lazy : > Hello > > I have a problem with lmtp delivery to usernames with '-' char. > Everythong after - is ignored. > > when delivering to test-test2 the error message is. > > User doesn't exist: test > > I suspect this is a sideefect of auth_username_format = %Lu > I have tried %Ln without success. > > Imap works without problems for those users. > > How can I disable this mapping for lmtp and use verbatim username for lookup. > > Thanks in advance for any answers. We are using lmtp proxing but the username is passed verbatim to backend by the director. the recipient was test_user-test2 on director Dec 19 09:03:36 thebe2b dovecot: lmtp(12272): Debug: auth input: user=test_user proxy=y nopassword= port=24 host=10.0.100.21 proxy_refresh=450 on backend Dec 19 09:03:36 dovecot1 dovecot: auth: Debug: master in: USER#0111#011test_user#011service=lmtp#011lip=10.0.100.21#011lport=24#011rip=10.0.100.3#011rport=40001 but in the director sends full login to lmtp backend RCPT TO: auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@ so it contains the - char Michal Grzedzicki
lmtp usernames with -
Hello I have a problem with lmtp delivery to usernames with '-' char. Everythong after - is ignored. when delivering to test-test2 the error message is. User doesn't exist: test I suspect this is a sideefect of auth_username_format = %Lu I have tried %Ln without success. Imap works without problems for those users. How can I disable this mapping for lmtp and use verbatim username for lookup. Thanks in advance for any answers.
Re: [PATH] expire plugins segfault with misconfigured dict
2014-07-07 15:18 GMT+02:00 Lazy : > dovecot 2.2.13 > > With configuration like > > plugin { > > expire_dict = blblbla > } > > expiere plugins segfaults during deinit. It might also segfault if the > dict service was unavaiable. > > attached bellow is a diff against 2.2.13 > > Jul 7 14:51:11 dovecot1 dovecot: lmtp(10548, lazy): Error: expire > plugin: dict_init(blblbla) failed: Dictionary URI is missing ':': > blblbla > > Jul 7 14:51:11 dovecot1 dovecot: lmtp(10548, lazy): Fatal: master: > service(lmtp): child 10548 killed with signal 11 (core dumps disabled) > > > Program received signal SIGSEGV, Segmentation fault. > > 0x7f337d8af8ae in dict_deinit (_dict=0x8) at dict.c:87 > > 87 struct dict *dict = *_dict; > > (gdb) bt > > #0 0x7f337d8af8ae in dict_deinit (_dict=0x8) at dict.c:87 > > #1 0x7f337c88f647 in expire_mail_user_deinit (user=0x1b60e80) at > expire-plugin.c:299 > > #2 0x7f337cca3e7f in quota_user_deinit (user=0x1b60e80) at > quota-storage.c:491 > > #3 0x7f337dbcb0f1 in mail_user_unref (_user=0x1b2d070) at mail-user.c:163 > > #4 0x0040832b in client_input_data_write_local > (client=0x1b2cf60, input=0x1b43f10) at commands.c:830 > > #5 0x00408755 in client_input_data_write (client=0x1b2cf60) > at commands.c:939 > > #6 0x00408b18 in client_input_data_handle (client=0x1b2cf60) > at commands.c:1033 > > #7 0x00408b52 in client_input_data (client=0x1b2cf60) at > commands.c:1042 > > #8 0x7f337d8fc723 in io_loop_call_io (io=0x1b2c360) at ioloop.c:441 > > #9 0x7f337d8fe6e5 in io_loop_handler_run_internal > (ioloop=0x1b27740) at ioloop-epoll.c:220 > > #10 0x7f337d8fc8be in io_loop_handler_run (ioloop=0x1b27740) at > ioloop.c:488 > > #11 0x7f337d8fc817 in io_loop_run (ioloop=0x1b27740) at ioloop.c:465 > > #12 0x7f337d888d40 in master_service_run (service=0x1b275d0, > callback=0x404b5c ) at master-service.c:566 > > #13 0x00404db2 in main (argc=1, argv=0x1b27390) at main.c:122 > > (gdb) p _dict > > $1 = (struct dict **) 0x8 > > (gdb) bt full > > #0 0x7f337d8af8ae in dict_deinit (_dict=0x8) at dict.c:87 > > dict = 0x10 > > #1 0x7f337c88f647 in expire_mail_user_deinit (user=0x1b60e80) at > expire-plugin.c:299 > > euser = 0x0 > > #2 0x7f337cca3e7f in quota_user_deinit (user=0x1b60e80) at > quota-storage.c:491 > > quser = 0x1b62958 > > quota_set = 0x1b656a0 > > #3 0x7f337dbcb0f1 in mail_user_unref (_user=0x1b2d070) at mail-user.c:163 > > user = 0x1b60e80 > > __FUNCTION__ = "mail_user_unref" > > #4 0x0040832b in client_input_data_write_local > (client=0x1b2cf60, input=0x1b43f10) at commands.c:830 > > session = 0x1b60a70 > > src_mail = 0x1b5c250 > > old_uid = 300 > > first_uid = 4294967295 > > __FUNCTION__ = "client_input_data_write_local" > > #5 0x00408755 in client_input_data_write (client=0x1b2cf60) > at commands.c:939 > > input = 0x1b43f10 > > ret = true > > #6 0x00408b18 in client_input_data_handle (client=0x1b2cf60) > at commands.c:1033 > > data = 0x1b556b8 "\330\001" > > size = 2 > > ret = -1 > > #7 0x00408b52 in client_input_data (client=0x1b2cf60) at > commands.c:1042 > reposting -- Michal Grzedzicki --- src/plugins/expire/expire-plugin.c (wersja 1343) +++ src/plugins/expire/expire-plugin.c (kopia robocza) @@ -296,10 +296,12 @@ { struct expire_mail_user *euser = EXPIRE_USER_CONTEXT(user); - dict_deinit(&euser->db); - expire_set_deinit(&euser->set); + if (euser != NULL) { + dict_deinit(&euser->db); + expire_set_deinit(&euser->set); - euser->module_ctx.super.deinit(user); + euser->module_ctx.super.deinit(user); + } } static const char *const *expire_get_patterns(struct mail_user *user)
Re: fts solr database size
2014-07-15 13:05 GMT+02:00 Ricardo Branco : > We are no way as big as you but in terms users but our user vs mailbox size > is large. > > Dovecot: > 50 users > 425Gb (mdbox + zlib) > > Note solr only indexes folders within a mailbox when a search is done on > them so size can vary and most people dont realise that the default type of > search in Thunderbird is on Sender/Recipients/Subject which happens localy > and not on the server so you dont get solr indexing unless the user does a > custom search and forces remote. Webmail systems though will tend to do > server searches. > Solr: > Num Docs: 17m > Size: 4.5GB Thank You for the data, I also have noticed that most of the fat clients do their own search, so fts whould be limited mostly to webmail users. -- Michal
fts solr database size
Hi, Could anyone share any numbers about real life solr database size/cpu/memory usage for certain amounts of messages ? We have now over 5TB of maildirs (about 5 000-6 000 concurrent imap clients) and I'm trying to guess how much hardware might be needed. -- Michal
Redis sentinel support in dict
Redis sentinel ( http://redis.io/topics/sentinel ) is a service that monitors and manages redis master slave replication. Using sentinel you can easily create a redis ha cluster. You can connect to a sentiniel and subscribe to certain events then in case of an failover update the redis address to new master etc. I think this is better suited to be used with dict proxy. Do You think it can be implemented without changes to dovecot core ? -- Michal Grzedzicki
[PATH] expire plugins segfault with misconfigured dict
dovecot 2.2.13 With configuration like plugin { expire_dict = blblbla } expiere plugins segfaults during deinit. It might also segfault if the dict service was unavaiable. attached bellow is a diff against 2.2.13 Jul 7 14:51:11 dovecot1 dovecot: lmtp(10548, lazy): Error: expire plugin: dict_init(blblbla) failed: Dictionary URI is missing ':': blblbla Jul 7 14:51:11 dovecot1 dovecot: lmtp(10548, lazy): Fatal: master: service(lmtp): child 10548 killed with signal 11 (core dumps disabled) Program received signal SIGSEGV, Segmentation fault. 0x7f337d8af8ae in dict_deinit (_dict=0x8) at dict.c:87 87 struct dict *dict = *_dict; (gdb) bt #0 0x7f337d8af8ae in dict_deinit (_dict=0x8) at dict.c:87 #1 0x7f337c88f647 in expire_mail_user_deinit (user=0x1b60e80) at expire-plugin.c:299 #2 0x7f337cca3e7f in quota_user_deinit (user=0x1b60e80) at quota-storage.c:491 #3 0x7f337dbcb0f1 in mail_user_unref (_user=0x1b2d070) at mail-user.c:163 #4 0x0040832b in client_input_data_write_local (client=0x1b2cf60, input=0x1b43f10) at commands.c:830 #5 0x00408755 in client_input_data_write (client=0x1b2cf60) at commands.c:939 #6 0x00408b18 in client_input_data_handle (client=0x1b2cf60) at commands.c:1033 #7 0x00408b52 in client_input_data (client=0x1b2cf60) at commands.c:1042 #8 0x7f337d8fc723 in io_loop_call_io (io=0x1b2c360) at ioloop.c:441 #9 0x7f337d8fe6e5 in io_loop_handler_run_internal (ioloop=0x1b27740) at ioloop-epoll.c:220 #10 0x7f337d8fc8be in io_loop_handler_run (ioloop=0x1b27740) at ioloop.c:488 #11 0x7f337d8fc817 in io_loop_run (ioloop=0x1b27740) at ioloop.c:465 #12 0x7f337d888d40 in master_service_run (service=0x1b275d0, callback=0x404b5c ) at master-service.c:566 #13 0x00404db2 in main (argc=1, argv=0x1b27390) at main.c:122 (gdb) p _dict $1 = (struct dict **) 0x8 (gdb) bt full #0 0x7f337d8af8ae in dict_deinit (_dict=0x8) at dict.c:87 dict = 0x10 #1 0x7f337c88f647 in expire_mail_user_deinit (user=0x1b60e80) at expire-plugin.c:299 euser = 0x0 #2 0x7f337cca3e7f in quota_user_deinit (user=0x1b60e80) at quota-storage.c:491 quser = 0x1b62958 quota_set = 0x1b656a0 #3 0x7f337dbcb0f1 in mail_user_unref (_user=0x1b2d070) at mail-user.c:163 user = 0x1b60e80 __FUNCTION__ = "mail_user_unref" #4 0x0040832b in client_input_data_write_local (client=0x1b2cf60, input=0x1b43f10) at commands.c:830 session = 0x1b60a70 src_mail = 0x1b5c250 old_uid = 300 first_uid = 4294967295 __FUNCTION__ = "client_input_data_write_local" #5 0x00408755 in client_input_data_write (client=0x1b2cf60) at commands.c:939 input = 0x1b43f10 ret = true #6 0x00408b18 in client_input_data_handle (client=0x1b2cf60) at commands.c:1033 data = 0x1b556b8 "\330\001" size = 2 ret = -1 #7 0x00408b52 in client_input_data (client=0x1b2cf60) at commands.c:1042 -- Michal Grzedzicki expire.path Description: Binary data
Re: [Dovecot] header brakage on sieve redirect ?
2013/2/28 Lazy : > Hi all, > > In the sieve file > > require ["copy"]; > > redirect :copy "a...@asd.pl"; > > emails with headers containing \n in non terminated " field > > like > Cc: xxx , "asd, > Grzegorz " > Subject: RE: RF > > > after redirecting them > > Cc: xxx , "asd,\ > > \ > Grzegorz " > Subject: RE: RF > > mail delivered locally by dovecot-lda is unaltered > > > lack of space before second \ brakes the headers. > > I'm investigating if this isn't cosed by qmail-inject, but my first > suspect is sieve. > > dovecot 2.0.13, sieve 0.3.3, dovecot-delivery is used as an exclusive > lda for qmail > it turned out that qmail is adding those \ not sieve, sorry for the noise Regards, Michal Grzedzicki
[Dovecot] header brakage on sieve redirect ?
Hi all, In the sieve file require ["copy"]; redirect :copy "a...@asd.pl"; emails with headers containing \n in non terminated " field like Cc: xxx , "asd, Grzegorz " Subject: RE: RF after redirecting them Cc: xxx , "asd,\ \ Grzegorz " Subject: RE: RF mail delivered locally by dovecot-lda is unaltered lack of space before second \ brakes the headers. I'm investigating if this isn't cosed by qmail-inject, but my first suspect is sieve. dovecot 2.0.13, sieve 0.3.3, dovecot-delivery is used as an exclusive lda for qmail Regards, Michal Grzedzicki
Re: [Dovecot] 2 node dovecot
2013/1/4 Timo Sirainen : > On 26.12.2012, at 22.01, Lazy wrote: > >> We run dovecot 2.1 on 2 nodes with shared nfs storage. Index files are >> kept on local disk. >> Second node is usually used only for email snapshots access. If >> primary node fails it is configured to >> take place of the primary imap server. >> >> Snapshots are additional namespaces with mail from various points in >> time. We need a way to easly copy >> multiple messages from snapshots to current mailboxes. It would be >> best to make current mailbox available >> as another namespace so one would simply copy messages from one folder >> to another. >> >> Is it safe ? There will be times when given user is writing to the >> same nfs based Maildir mailbox from 2 nodes >> both of them having separate index files. What will happen if already >> present message gets copied back >> from the snapshot ? > > If the snapshots are entirely different files/directories, then there > shouldn't be any trouble. If the same message gets copied it's simply > duplicated. > > If the snapshots have one or more files shared with the non-snapshots, then I > don't really understand your setup. > > You can anyway use namespaces or doveadm import. hmm on netapp this is a non trivial question ;) they are in different directories, snapshots are read only copies of live mailbox, most of the files have same inode numbers but the size and content aren't the same so if I understand correctly same Maildir message file name in snapshot and live mailbox will not be a problem Regards, Michał Grzędzicki
Re: [Dovecot] namespace from snapshots
I managed to get it working using a litle change in sources an extra mailbox_list_subscription_fill_one(dest_list, src_list, "" ); in src/lib-storage/list/mailbox-list-subscriptions.c:mailbox_list_subscriptions_refresh() --- src/lib-storage/list/mailbox-list-subscriptions.c (wersja 494) +++ src/lib-storage/list/mailbox-list-subscriptions.c (kopia robocza) @@ -142,6 +142,9 @@ subsfile_ctx = subsfile_list_init(dest_list, path); if (subsfile_list_fstat(subsfile_ctx, &st) == 0) dest_list->subscriptions_mtime = st.st_mtime; + + mailbox_list_subscription_fill_one(dest_list, src_list, "" ); + while ((name = subsfile_list_next(subsfile_ctx)) != NULL) T_BEGIN { T_BEGIN { ret = mailbox_list_subscription_fill_one(dest_list, now lsub works as expected, namespace root which is an INBOX from a snapshot is subscribed, all the subfolders are also subscribed (from original subscriptions file). It whould be great if one could specify in the namespace mailboxes that whould get autosubscribed or just to autosubscribe root whitch is what You need if You have a copy of Maildir with INBOX. If You think this can be usefull I will try to produce more general patch automagicly subscribing root or any other mailbox in an namespace. Regards, Michal Grzedzicki 2012/8/21, Lazy : > 2012/8/19, Timo Sirainen : >> On 16.8.2012, at 14.58, Lazy wrote: >> >>> 2012/5/19 Timo Sirainen : >>>> On Wed, 2012-05-16 at 12:39 +0200, Lazy wrote: >>>>> May 16 12:11:36 thebe2 dovecot: imap(lazy): Error: >>>>> open(/snapshot/h1/vmail/la/lazy/Maildir/.SPAM/dovecot-uidlist.lock) >>>>> failed: Read-only file system >>>> >>>> Does the attached patch help? >>>> >>>>> maybe it will be easier to move all dovecot metadata to separate (non >>>>> snapshot) location ? >>>> >>>> It could also be a bit problematic. At least message keywords (=custom >>>> flags) wouldn't work because the dovecot-keywords file exists only in >>>> the snapshot dir. >>> >>> Moving metadata helped, but now archived inbox is unsubscribed. Is >>> there a way to make all folders in an namespace subscribed by default >>> ? >> >> Nope. I could try to get the snapshots fixed at some point when I have >> more >> time, but I'm not going to add a feature to subscribe everything by >> default. >> People might try to start using it. > > If I enable per snapshot subscriptions i see all folders except INBOX, > i have tried to subscribe it using > mailbox_list_subscription_fill_one() or using imap as bellow without > success > > http://dovecot.org/list/dovecot/2007-October/025965.html suggest that > it isn't possible > > ./imap/.libs/imap > * PREAUTH [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID > ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS > MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED > I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN > CONTEXT=SEARCH LIST-STATUS SPECIAL-USE] Logged in as root > a subscribe "test" > a OK Subscribe completed. > a lsub "" "*" > imap(root): Warning: Subscriptions file /root/Maildir/subscriptions: > Removing invalid entry: > * LSUB () "." "Drafts" > * LSUB () "." "Sent" > * LSUB () "." "Junk" > * LSUB () "." "Trash" > * LSUB () "." "Deleted Messages" > * LSUB () "." "test.Drafts" > * LSUB () "." "test.Sent" > * LSUB () "." "test.Junk" > * LSUB () "." "test.Trash" > * LSUB () "." "test.Deleted Messages" > a OK Lsub completed. > b list "" "*" > * LIST (\HasNoChildren) "." "DUpa" > * LIST (\HasNoChildren) "." "Deleted Messages" > * LIST (\HasNoChildren) "." "Junk" > * LIST (\HasNoChildren) "." "Trash" > * LIST (\HasNoChildren) "." "Sent" > * LIST (\HasNoChildren) "." "Drafts" > * LIST (\HasNoChildren) "." "INBOX" > * LIST (\HasChildren) "." "test" > * LIST (\HasNoChildren) "." "test.TEst" > * LIST (\HasNoChildren) "." "test.Deleted Messages" > * LIST (\HasNoChildren) "." "test.Junk" > * LIST (\HasNoChildren) "." "test.Trash" > * LIST (\HasNoChildren) "." "test.Sent" > * LIST (\HasNoChildren) "." "test.Drafts" > b OK List completed. >
Re: [Dovecot] segfault in mail_user_get_home()
it was shared namespace with empty location that produced the error so : namespace test { list = children location = prefix = test. subscriptions = yes type = shared } segfaults with location is fine 2012/8/21, Lazy : > gdb ./src/imap/.libs/imap > > Reading symbols from /usr/src/dovecot-2.1.9/src/imap/.libs/imap...done. > (gdb) run > Starting program: /usr/src/dovecot-2.1.9/src/imap/.libs/imap > warning: no loadable sections found in added symbol-file > system-supplied DSO at 0x77ffa000 > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". > process 1104 is executing new program: /usr/local/dovecot/bin/doveconf > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". > process 1104 is executing new program: > /usr/src/dovecot-2.1.9/src/imap/.libs/imap > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". > > Program received signal SIGSEGV, Segmentation fault. > 0x77b2a0ff in mail_user_get_home (user=0x0, > home_r=0x7fffe308) at mail-user.c:310 > 310 if (user->home_looked_up) { > (gdb) bt > #0 0x77b2a0ff in mail_user_get_home (user=0x0, > home_r=0x7fffe308) at mail-user.c:310 > #1 0x77ad172e in mdbox_storage_find_root_dir (ns=0x648610) at > mdbox-storage.c:90 > #2 0x77ad180c in mdbox_storage_autodetect (ns=0x648610, > set=0x7fffe4d0) at mdbox-storage.c:113 > #3 0x77b2345d in mail_storage_autodetect (ns=0x648610, > set=0x7fffe4d0) at mail-storage.c:105 > #4 0x77b2369d in mail_storage_get_class (ns=0x648610, > driver=0x0, list_set=0x7fffe4d0, flags=0, error_r=0x7fffe5b8) > at mail-storage.c:180 > #5 0x77b23c90 in mail_storage_create (ns=0x648610, > driver=0x0, flags=0, error_r=0x7fffe5b8) at mail-storage.c:342 > #6 0x77b1c62a in namespace_add (user=0x649be0, > ns_set=0x64a8c8, unexpanded_ns_set=0x64a1c0, mail_set=0x64a440, > ns_p=0x645380, > error_r=0x7fffe6e8) at mail-namespace.c:126 > #7 0x77b1ccbb in mail_namespaces_init (user=0x649be0, > error_r=0x7fffe6e8) at mail-namespace.c:289 > #8 0x77b34a64 in mail_storage_service_init_post > (ctx=0x633460, user=0x633e08, priv=0x7fffe6f0, > mail_user_r=0x7fffe7b8, > error_r=0x7fffe6e8) at mail-storage-service.c:641 > #9 0x77b35dd6 in mail_storage_service_next (ctx=0x633460, > user=0x633e08, mail_user_r=0x7fffe7b8) at > mail-storage-service.c:1114 > #10 0x77b35efa in mail_storage_service_lookup_next > (ctx=0x633460, input=0x7fffe810, user_r=0x7fffe7c0, > mail_user_r=0x7fffe7b8, > error_r=0x7fffe808) at mail-storage-service.c:1149 > #11 0x0041f61c in client_create_from_input > (input=0x7fffe810, login_client=0x7fffe880, fd_in=0, fd_out=1, > input_buf=0x0, > error_r=0x7fffe808) at main.c:202 > #12 0x0041f859 in main_stdio_run (username=0x0) at main.c:247 > #13 0x0041fd0a in main (argc=1, argv=0x631370) at main.c:381 > > /usr/local/dovecot/bin/doveconf -n > # 2.1.9: /usr/local/dovecot/etc/dovecot/dovecot.conf > # OS: Linux 2.6.32 x86_64 Debian wheezy/sid > namespace test { > list = children > location = maildir:/root/test > prefix = test. > subscriptions = yes > type = shared > } > namespace inbox { > inbox = yes > list = yes > location = > mailbox Drafts { > special_use = \Drafts > } > mailbox Junk { > special_use = \Junk > } > mailbox Sent { > special_use = \Sent > } > mailbox "Sent Messages" { > special_use = \Sent > } > mailbox Trash { > special_use = \Trash > } > prefix = > subscriptions = yes > } > passdb { > driver = pam > } > ssl = no > userdb { > driver = passwd > } > > without type = shared there is no segfault, > > I understand this config might not work (invoking imap directly) but > it should't segfault. > > Regards, > > Michal Grzedzicki >
[Dovecot] segfault in mail_user_get_home()
gdb ./src/imap/.libs/imap Reading symbols from /usr/src/dovecot-2.1.9/src/imap/.libs/imap...done. (gdb) run Starting program: /usr/src/dovecot-2.1.9/src/imap/.libs/imap warning: no loadable sections found in added symbol-file system-supplied DSO at 0x77ffa000 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". process 1104 is executing new program: /usr/local/dovecot/bin/doveconf [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". process 1104 is executing new program: /usr/src/dovecot-2.1.9/src/imap/.libs/imap [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x77b2a0ff in mail_user_get_home (user=0x0, home_r=0x7fffe308) at mail-user.c:310 310 if (user->home_looked_up) { (gdb) bt #0 0x77b2a0ff in mail_user_get_home (user=0x0, home_r=0x7fffe308) at mail-user.c:310 #1 0x77ad172e in mdbox_storage_find_root_dir (ns=0x648610) at mdbox-storage.c:90 #2 0x77ad180c in mdbox_storage_autodetect (ns=0x648610, set=0x7fffe4d0) at mdbox-storage.c:113 #3 0x77b2345d in mail_storage_autodetect (ns=0x648610, set=0x7fffe4d0) at mail-storage.c:105 #4 0x77b2369d in mail_storage_get_class (ns=0x648610, driver=0x0, list_set=0x7fffe4d0, flags=0, error_r=0x7fffe5b8) at mail-storage.c:180 #5 0x77b23c90 in mail_storage_create (ns=0x648610, driver=0x0, flags=0, error_r=0x7fffe5b8) at mail-storage.c:342 #6 0x77b1c62a in namespace_add (user=0x649be0, ns_set=0x64a8c8, unexpanded_ns_set=0x64a1c0, mail_set=0x64a440, ns_p=0x645380, error_r=0x7fffe6e8) at mail-namespace.c:126 #7 0x77b1ccbb in mail_namespaces_init (user=0x649be0, error_r=0x7fffe6e8) at mail-namespace.c:289 #8 0x77b34a64 in mail_storage_service_init_post (ctx=0x633460, user=0x633e08, priv=0x7fffe6f0, mail_user_r=0x7fffe7b8, error_r=0x7fffe6e8) at mail-storage-service.c:641 #9 0x77b35dd6 in mail_storage_service_next (ctx=0x633460, user=0x633e08, mail_user_r=0x7fffe7b8) at mail-storage-service.c:1114 #10 0x77b35efa in mail_storage_service_lookup_next (ctx=0x633460, input=0x7fffe810, user_r=0x7fffe7c0, mail_user_r=0x7fffe7b8, error_r=0x7fffe808) at mail-storage-service.c:1149 #11 0x0041f61c in client_create_from_input (input=0x7fffe810, login_client=0x7fffe880, fd_in=0, fd_out=1, input_buf=0x0, error_r=0x7fffe808) at main.c:202 #12 0x0041f859 in main_stdio_run (username=0x0) at main.c:247 #13 0x0041fd0a in main (argc=1, argv=0x631370) at main.c:381 /usr/local/dovecot/bin/doveconf -n # 2.1.9: /usr/local/dovecot/etc/dovecot/dovecot.conf # OS: Linux 2.6.32 x86_64 Debian wheezy/sid namespace test { list = children location = maildir:/root/test prefix = test. subscriptions = yes type = shared } namespace inbox { inbox = yes list = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = subscriptions = yes } passdb { driver = pam } ssl = no userdb { driver = passwd } without type = shared there is no segfault, I understand this config might not work (invoking imap directly) but it should't segfault. Regards, Michal Grzedzicki
Re: [Dovecot] namespace from snapshots
2012/8/19, Timo Sirainen : > On 16.8.2012, at 14.58, Lazy wrote: > >> 2012/5/19 Timo Sirainen : >>> On Wed, 2012-05-16 at 12:39 +0200, Lazy wrote: >>>> May 16 12:11:36 thebe2 dovecot: imap(lazy): Error: >>>> open(/snapshot/h1/vmail/la/lazy/Maildir/.SPAM/dovecot-uidlist.lock) >>>> failed: Read-only file system >>> >>> Does the attached patch help? >>> >>>> maybe it will be easier to move all dovecot metadata to separate (non >>>> snapshot) location ? >>> >>> It could also be a bit problematic. At least message keywords (=custom >>> flags) wouldn't work because the dovecot-keywords file exists only in >>> the snapshot dir. >> >> Moving metadata helped, but now archived inbox is unsubscribed. Is >> there a way to make all folders in an namespace subscribed by default >> ? > > Nope. I could try to get the snapshots fixed at some point when I have more > time, but I'm not going to add a feature to subscribe everything by default. > People might try to start using it. If I enable per snapshot subscriptions i see all folders except INBOX, i have tried to subscribe it using mailbox_list_subscription_fill_one() or using imap as bellow without success http://dovecot.org/list/dovecot/2007-October/025965.html suggest that it isn't possible ./imap/.libs/imap * PREAUTH [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS SPECIAL-USE] Logged in as root a subscribe "test" a OK Subscribe completed. a lsub "" "*" imap(root): Warning: Subscriptions file /root/Maildir/subscriptions: Removing invalid entry: * LSUB () "." "Drafts" * LSUB () "." "Sent" * LSUB () "." "Junk" * LSUB () "." "Trash" * LSUB () "." "Deleted Messages" * LSUB () "." "test.Drafts" * LSUB () "." "test.Sent" * LSUB () "." "test.Junk" * LSUB () "." "test.Trash" * LSUB () "." "test.Deleted Messages" a OK Lsub completed. b list "" "*" * LIST (\HasNoChildren) "." "DUpa" * LIST (\HasNoChildren) "." "Deleted Messages" * LIST (\HasNoChildren) "." "Junk" * LIST (\HasNoChildren) "." "Trash" * LIST (\HasNoChildren) "." "Sent" * LIST (\HasNoChildren) "." "Drafts" * LIST (\HasNoChildren) "." "INBOX" * LIST (\HasChildren) "." "test" * LIST (\HasNoChildren) "." "test.TEst" * LIST (\HasNoChildren) "." "test.Deleted Messages" * LIST (\HasNoChildren) "." "test.Junk" * LIST (\HasNoChildren) "." "test.Trash" * LIST (\HasNoChildren) "." "test.Sent" * LIST (\HasNoChildren) "." "test.Drafts" b OK List completed.
Re: [Dovecot] namespace from snapshots
2012/5/19 Timo Sirainen : > On Wed, 2012-05-16 at 12:39 +0200, Lazy wrote: >> May 16 12:11:36 thebe2 dovecot: imap(lazy): Error: >> open(/snapshot/h1/vmail/la/lazy/Maildir/.SPAM/dovecot-uidlist.lock) >> failed: Read-only file system > > Does the attached patch help? > >> maybe it will be easier to move all dovecot metadata to separate (non >> snapshot) location ? > > It could also be a bit problematic. At least message keywords (=custom > flags) wouldn't work because the dovecot-keywords file exists only in > the snapshot dir. Moving metadata helped, but now archived inbox is unsubscribed. Is there a way to make all folders in an namespace subscribed by default ? Regards, Michal Grzedzicki
Re: [Dovecot] dovecot-lda setting quota rules
it works great. thank You again Regards, Michal Grzedzicki 2012/8/3, Timo Sirainen : > On 3.8.2012, at 2.13, Lazy wrote: > >>> dovecot-lda -o plugin/quota_rule=*:storage=1G >>> >> >> thank You ! >> >> This is simple and elegant. >> >> Sill I need this to be taken from environment, I produced a simple >> patch adding one '-o' from an environment variable. > > You can also set environment: > > PLUGIN/QUOTA_RULE=*:storage=1G > > and then use dovecot-lda -k parameter. > > And if even that doesn't work, you could simply create a wrapper script. > >> If You consider this useful I can try and make it more generic, enable >> multiple option overriding. > > You can also give -o parameter multiple times. >
Re: [Dovecot] dovecot-lda setting quota rules
2012/7/31 Timo Sirainen : > On 18.7.2012, at 4.33, Lazy wrote: > >> I wan't it to stay that way. The problem is that it dosn't update the >> quota rules in Maildir when quota is changed in userdb. >> I have the rules avaiable in qmail-lda's environment, but I need an >> idea on how to feed the quota rule string to quota plugin without >> doing userdb lookup. >> >> What whould be the best way to do this, maybe in >> plugins/quota/quota.c:quota_root_add_rules() ? > > dovecot-lda -o plugin/quota_rule=*:storage=1G > thank You ! This is simple and elegant. Sill I need this to be taken from environment, I produced a simple patch adding one '-o' from an environment variable. If You consider this useful I can try and make it more generic, enable multiple option overriding. Regards, Michal Grzedzicki
[Dovecot] dovecot-lda setting quota rules
Hi, in my setup dovecot-lda reads user and home from environment, and dosn't perform userdb lookup Jul 18 03:09:47 thebe2 dovecot: lda(lazytest_test): Debug: Effective uid=300, gid=300, home=/vmail/la/lazytest_test Jul 18 03:09:47 thebe2 dovecot: lda(lazytest_test): Debug: Quota root: name=User quota backend=maildir args= Jul 18 03:09:47 thebe2 dovecot: lda(lazytest_test): Debug: Quota warning: bytes=0 (95%) messages=0 reverse=no command=quota-warning 95 lazytest_test Jul 18 03:09:47 thebe2 dovecot: lda(lazytest_test): Debug: Quota warning: bytes=0 (80%) messages=0 reverse=no command=quota-warning 80 lazytest_test Jul 18 03:09:47 thebe2 dovecot: lda(lazytest_test): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes l ocation=maildir:~/Maildir:INDEX=/var/dovecot_indexes/vmail/la/lazytest_test Jul 18 03:09:47 thebe2 dovecot: lda(lazytest_test): Debug: maildir++: root=/vmail/la/lazytest_test/Maildir, index=/var/dovecot_indexes/vmail/la/lazytest_tes t, control=, inbox=/vmail/la/lazytest_test/Maildir, alt= Jul 18 03:09:47 thebe2 dovecot: lda(lazytest_test): Debug: userdb lookup skipped, username taken from USER environment Jul 18 03:09:47 thebe2 dovecot: lda(lazytest_test): Debug: Quota root: name=User quota backend=maildir args= I wan't it to stay that way. The problem is that it dosn't update the quota rules in Maildir when quota is changed in userdb. I have the rules avaiable in qmail-lda's environment, but I need an idea on how to feed the quota rule string to quota plugin without doing userdb lookup. What whould be the best way to do this, maybe in plugins/quota/quota.c:quota_root_add_rules() ? Regards, Michal Grzedzicki
Re: [Dovecot] outlook and redirect sieve
2012/7/16 Stephan Bosch : > On 7/16/2012 5:00 PM, Lazy wrote: >> >> 2012/7/16 Lazy : >> >> >> i have got it >> >> if ( recipient != NULL ) >> rfc2822_header_field_write(f, >> "X-Sieve-Redirected-From", recipient); >> >> was adding crlf in the headers, and it made whole email inconsistent >> (when I have removed crlf filter before) > > > Could you explain this a little further? Is this a bug? it turned out it was a qmail issue, there is a patch for it already, http://opensource.sf-tec.de/qmail/qmail-remote-CRLF.diff sorry for the noise Regards, Michal Grzedzicki
Re: [Dovecot] outlook and redirect sieve
2012/7/16 Lazy : > Hi Aall, > > we are having issues with outlook clients, running exchange or lotus > being unable to parse the email messages redirected by > > dovecot's sieve 0.3.1, the command is plain redirect "em...@lotusmail.xxx"; > redirects from mta also work correctly > > > exchange was fixed by removing this commit > http://hg.rename-it.nl/dovecot-2.1-pigeonhole/raw-diff/082216ad12d6/src/lib-sieve/cmd-redirect.c > > are there any other modifications to the email body or headers that > can make those mesages not parsable for outlook ? > > looking at > http://hg.rename-it.nl/dovecot-2.1-pigeonhole/raw-diff/082216ad12d6/src/lib-sieve/cmd-redirect.c > > maybe removing HEADER_FILTER_NO_CR fromi_stream_create_header_filter() > will make redirected messages more in tact ? > > what can I do to make redirect more verbatim ? > > Thanks in advance for any information. i have got it if ( recipient != NULL ) rfc2822_header_field_write(f, "X-Sieve-Redirected-From", recipient); was adding crlf in the headers, and it made whole email inconsistent (when I have removed crlf filter before) Regards, Michal Grzedzicki
[Dovecot] outlook and redirect sieve
Hi Aall, we are having issues with outlook clients, running exchange or lotus being unable to parse the email messages redirected by dovecot's sieve 0.3.1, the command is plain redirect "em...@lotusmail.xxx"; redirects from mta also work correctly exchange was fixed by removing this commit http://hg.rename-it.nl/dovecot-2.1-pigeonhole/raw-diff/082216ad12d6/src/lib-sieve/cmd-redirect.c are there any other modifications to the email body or headers that can make those mesages not parsable for outlook ? looking at http://hg.rename-it.nl/dovecot-2.1-pigeonhole/raw-diff/082216ad12d6/src/lib-sieve/cmd-redirect.c maybe removing HEADER_FILTER_NO_CR fromi_stream_create_header_filter() will make redirected messages more in tact ? what can I do to make redirect more verbatim ? Thanks in advance for any information. Regards, Michal Grzedzicki
Re: [Dovecot] namespace from snapshots
Hi, With same config as Kerl and Your patch I'm still getting thiese errors May 16 12:11:36 thebe2 dovecot: imap(lazy): Debug: Namespace backup_h1: type=private, prefix=backup-h1., sep=, inbox=no, hidden=no, list=yes, subscriptions=yes location=maildir:/snapshot/h1/vmail/la/lazy/Maildir:INDEX=MEMORY May 16 12:11:36 thebe2 dovecot: imap(lazy): Debug: maildir++: root=/snapshot/h1/vmail/la/lazy/Maildir, index=, control=, inbox=, alt= May 16 12:11:36 thebe2 dovecot: imap(lazy): Error: open(/snapshot/h1/vmail/la/lazy/Maildir/.SPAM/dovecot-uidlist.lock) failed: Read-only file system May 16 12:11:36 thebe2 dovecot: imap(lazy): Error: file_dotlock_create(/snapshot/h1/vmail/la/lazy/Maildir/.SPAM/dovecot-uidlist) failed: Read-only file system May 16 12:11:36 thebe2 dovecot: imap(lazy): Error: open(/snapshot/h1/vmail/la/lazy/Maildir/.SPAM/dovecot-uidlist.lock) failed: Read-only file system May 16 12:11:36 thebe2 dovecot: imap(lazy): Error: file_dotlock_create(/snapshot/h1/vmail/la/lazy/Maildir/.SPAM/dovecot-uidlist) failed: Read-only file system May 16 12:11:36 thebe2 dovecot: imap(lazy): Error: open(/snapshot/h1/vmail/la/lazy/Maildir/.SPAM/dovecot-uidlist.lock) failed: Read-only file system May 16 12:11:36 thebe2 dovecot: imap(lazy): Error: file_dotlock_create(/snapshot/h1/vmail/la/lazy/Maildir/.SPAM/dovecot-uidlist) failed: Read-only file system May 16 12:11:36 thebe2 dovecot: imap(lazy): Disconnected: Internal error occurred. Refer to server log for more information. [2012-05-16 12:11:36] in=259 out= 100540 maybe it will be easier to move all dovecot metadata to separate (non snapshot) location ? Regards, Michal Grzedzicki 2012/5/14, Timo Sirainen : > On Fri, 2012-05-11 at 16:33 +0200, Karl Oulmi wrote: > >> namespace da1 { >> prefix = INBOX.backup.da1. >> hidden = no >> list = yes >> inbox = no >> location = maildir:/da1/%u/Maildir >> type = private >> } >> >> >> I have two problems : >> - In my log, dovecot complain about the fact that my snapshot filsystem >> is read only >> Error: open(/da1/te...@toto.com/Maildir/.Trash/dovecot-uidlist) failed: >> Read-only file system > > See if http://hg.dovecot.org/dovecot-2.1/rev/7f238016db81 helps. If > you're not saving mails via dovecot-lda it might still complain if there > are new files. > > Also if it complains about indexes add :INDEX=MEMORY to location. > > Alternative to the patch is to add :CONTROL=~/Maildir/snapshot-control/% > u or something to location, but that could get problematic also. > >> The second problem is that through my thunderbird I can't see the Inbox >> saved in the snapshot (whereas I see Sent and Trash folders) > > It should be accessible as "INBOX.backup.da", although some older > Dovecot versions don't handle that properly. > >
[Dovecot] [PATCH] dovecot-lda with expire plugin segfaults if dict failed
Program received signal SIGSEGV, Segmentation fault. 0x7f1975cccdee in expire_mailbox_transaction_commit (t=, changes_r=) at expire-plugin.c:169 169 } else if (strcmp(value, "0") == 0) { (gdb) bt #0 0x7f1975cccdee in expire_mailbox_transaction_commit (t=, changes_r=) at expire-plugin.c:169 #1 0x7f1975ed9bdf in quota_mailbox_transaction_commit (ctx=0x659ce0, changes_r=0x7fff94908070) at quota-storage.c:94 #2 0x7f197775dafd in mailbox_transaction_commit_get_changes (_t=, changes_r=0x7fff94908070) at mail-storage.c:1491 #3 0x7f197775db3e in mailbox_transaction_commit (t=0x60d330) at mail-storage.c:1474 #4 0x7f1975885ff7 in act_store_commit (action=, aenv=0x6523f0, tr_context=0x652588, keep=0x7fff9490812f) at sieve-actions.c:665 #5 0x7f197587d79b in sieve_result_execute (result=, keep=) at sieve-result.c:1156 #6 0x7f197588dca6 in sieve_execute (sbin=, msgdata=, senv=, ehandler=, flags=, keep=0x0) at sieve.c:475 #7 0x7f1975ac9a43 in lda_sieve_singlescript_execute (mdctx=0x7fff949085a0, storage_r=) at lda-sieve-plugin.c:433 #8 lda_sieve_run (mdctx=0x7fff949085a0, storage_r=) at lda-sieve-plugin.c:657 #9 lda_sieve_deliver_mail (mdctx=0x7fff949085a0, storage_r=) at lda-sieve-plugin.c:796 #10 0x7f19779df685 in mail_deliver (ctx=0x7fff949085a0, storage_r=0x7fff94908518) at mail-deliver.c:389 #11 0x0040349c in main (argc=5, argv=0x60ca30) at main.c:454 this makes the error go away --- dovecot-2.1.5.orig/src/plugins/expire/expire-plugin.c 2012-05-15 14:52:24.004189104 +0200 +++ dovecot-2.1.5/src/plugins/expire/expire-plugin.c2012-05-15 14:53:03.472187894 +0200 @@ -166,7 +166,7 @@ /* first time saving here with expire enabled */ first_save_timestamp(box, &new_stamp); update_dict = TRUE; - } else if (strcmp(value, "0") == 0) { + } else if (ret > 0 && strcmp(value, "0") == 0) { /* we're saving the first mail to this mailbox. ioloop_time may not be exactly the first message's save time, but a few seconds -- Michal Grzedzicki dovecot-2.1.5-expire.diff Description: Binary data
Re: [Dovecot] dovecot-sieve vacation vs qmail-ldap
2010/2/15 Lazy : > Helloo, > > We are using dovectot lda with qmail-ldap, > > dovecot 1.2.10, sieve 0.1.15 > > lda is executed as > exec /var/qmail/bin/preline -f /usr/local/dovecot/libexec/dovecot/deliver -s > > preline adds Delivered-To: header, > > everything works fine except vacation > > Feb 9 16:07:16 thebe dovecot: deliver(lazy): sieve: > msgid=unspecified: discarding vacation response for message implicitly > delivered to > Feb 9 16:07:16 thebe dovecot: deliver(lazy): sieve: > msgid=unspecified: stored mail into mailbox 'INBOX' now I have figured it out, when proper To: header is present in email body ewerything works (wit the following patch) > > thebe.org is the hostname of the machine, oryginal recipient address > has other domain > > .dovecot.sieve file looks like this > require ["vacation"]; > > #autoresponder > vacation > :days 1 > :subject "Auto Reply / Odpowiedz automatyczna" > "a"; > > I did experiments with :addresses ["*"] without any luck. > > > deliver only gets user and HOME directory form env variables provided > by qmail, so it's unaware of the target email address. > > How to fix it ? > > I was thinking about deliver extracting target address from > Delivered-To: header added by qmail's preline, or use DTLINE env > variable, > whitch qmail populates with Delivered-To header. patch bellow fills destaddr from qmail's DTLINE env, --- src/deliver/deliver.c 2010-01-25 00:14:17.0 +0100 +++ src/deliver/deliver.c 2010-02-16 12:12:18.0 +0100 @@ -1031,6 +1031,16 @@ if (user == NULL) user = getenv("USER"); + /* if DTLINE (qmail Delivered-To: header) is not null use it as a destination address */ + if (destaddr == NULL) { + destaddr = getenv("DTLINE"); + if (destaddr != NULL) { + if (strlen(destaddr) > 18 ) + destaddr = i_strdup(address_sanitize(destaddr+14)); + else + destaddr = NULL; + } + } if (!keep_environment) deliver_env_clean(!user_auth); -- Lazy
[Dovecot] dovecot-sieve vacation vs qmail-ldap
Helloo, We are using dovectot lda with qmail-ldap, dovecot 1.2.10, sieve 0.1.15 lda is executed as exec /var/qmail/bin/preline -f /usr/local/dovecot/libexec/dovecot/deliver -s preline adds Delivered-To: header, everything works fine except vacation Feb 9 16:07:16 thebe dovecot: deliver(lazy): sieve: msgid=unspecified: discarding vacation response for message implicitly delivered to Feb 9 16:07:16 thebe dovecot: deliver(lazy): sieve: msgid=unspecified: stored mail into mailbox 'INBOX' thebe.org is the hostname of the machine, oryginal recipient address has other domain .dovecot.sieve file looks like this require ["vacation"]; #autoresponder vacation :days 1 :subject "Auto Reply / Odpowiedz automatyczna" "a"; I did experiments with :addresses ["*"] without any luck. deliver only gets user and HOME directory form env variables provided by qmail, so it's unaware of the target email address. How to fix it ? I was thinking about deliver extracting target address from Delivered-To: header added by qmail's preline, or use DTLINE env variable, whitch qmail populates with Delivered-To header.