Re: Emails not visible after renaming folders
Are you copying/moving the emails with {cp|mv} or with "doveadm {copy|move}"? On 2019-06-25 12:00, Aleksandr via dovecot wrote: Hello, I have strange problem with "losing" emails after rename mail folder(s) (via imap client: thunderbird, roundcude, etc..) How to reproduce: 1. Create some folder name, like TEST 2. Create sub-folder under TEST (like SUBTEST) Structure: TEST |--SUBTEST # doveadm mailbox list -u postmaster@testmailbox Spam Trash Sent Drafts INBOX TEST TEST/SUBTEST 3. Move (or copy) mails from INBOX to SUBTEST (all looks fine, and mails visible under SUBTEST) 4. Rename TEST folder to any new name, NEWTEST Let`s try to view mails in mail client in NEWTEST-SUBTEST, folder have no emails :( mailsrv# doveadm -f table mailbox status -u postmaster@testmailbox "messages vsize" NEWTEST* mailbox messages vsize NEWTEST 00 NEWTEST/SUBTEST 00 If doveadm force-resync postmaster@testmailbox, mails will be visible in INBOX mailsrv# doveadm -f table mailbox status -u postmaster@testmailbox "messages vsize" INBOX* mailbox messages vsize INBOX 228 Dovecot installation: CentOS x86_64 Linux 7.5.1804 Storage: HDD Local Partition - XFS filesystem / multi-dbox (mdbox) as mail_storage (this problem is not reproduced with the settings as Maildir storage !) somthing wrong with mapping indices. [start] # dovecot -n # 2.2.36 (1f10bfa63): /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.21 (92477967) # OS: Linux 3.10.0-862.2.3.el7.x86_64 x86_64 CentOS Linux release 7.5.1804 (Core) # Hostname: auth_mechanisms = plain login digest-md5 cram-md5 base_dir = /var/run/dovecot/ default_client_limit = 2 default_login_user = dovecot default_process_limit = 1 dict { quota = redis:host=127.0.0.1:prefix=user/:timeout_msecs=1000 } disable_plaintext_auth = no first_valid_gid = 90 first_valid_uid = 90 imapc_features = rfc822.size fetch-headers imapc_host = imapc_user = %u lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes login_greeting = . login_log_format_elements = user=<%u> method=%m rip=%r lip=%l %c login_trusted_networks = 10.0.1.0/24 mail_access_groups = mail mail_debug = yes mail_fsync = never mail_gid = 97 mail_location = mdbox:~/mail/mailboxes:FULLDIRNAME=mBoX-MeSsAgEs:INDEX=~/mail/index:CONTROL=~/mail/control:INBOX=~/mail/mailboxes/inbox mail_log_prefix = "%{session} %Us(%u): " mail_max_lock_timeout = 30 secs mail_plugins = quota zlib mail_prefetch_count = 20 mail_privileged_group = mail mail_uid = 97 managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables enotify environment mailbox date index ihave duplicate mime foreverypart extracttext vacation-seconds editheader mbox_lock_timeout = 30 secs mbox_very_dirty_syncs = yes mbox_write_locks = fcntl namespace inbox { inbox = yes list = yes location = mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Sent { auto = subscribe special_use = \Sent } mailbox Spam { auto = subscribe } mailbox Trash { auto = subscribe special_use = \Trash } prefix = separator = / type = private } passdb { args = /etc/dovecot/dovecot-ldap.conf driver = ldap } plugin { cgroup_basedir = /usr/sys/cgroup hostingAccount = default quota = dict:User quota::proxy::quota quota_grace = 0%% quota_over_flag_value = TRUE quota_over_script = account-quota mismatch %u quota_rule = *:storage=4T quota_warning = storage=101%% account-quota block %u quota_warning1 = -storage=100%% account-quota unblock %u sieve = file:~/sieve;active=~/.dovecot.sieve sieve_before = /home/sieve/%d/ sieve_extensions = +editheader +vacation-seconds -body sieve_max_redirects = 200 sieve_vacation_min_period = 1s trash_folder = Trash zlib_save = lz4 zlib_save_level = 6 } pop3_delete_type = expunge protocols = imap pop3 sieve service account-quota { executable = script /usr/local/scripts/account-quota unix_listener account-quota { mode = 0666 user = dovecot } user = dovecot } service anvil { chroot = /var/empty client_limit = 0 drop_priv_before_exec = no executable = anvil extra_groups = group = $default_internal_user idle_kill = 4294967295 secs privileged_group = process_limit = 1 process_min_avail = 1 protocol = service_count = 0 type = anvil unix_listener anvil-auth-penalty { group = $default_internal_user mode = 0660 user = dovecot } unix_listener anvil { group = $default_internal_user mode = 0660 user = dovecot } user = $default_internal_user vsz_limit = 18446744073709551615 B } service auth-worker { chroot = /var/empty user = $default_internal_user } service auth { chroot = /var/empty executable = /usr/libexec/dovecot/auth unix_listener auth-client { mode = 0660 }
Re: Mail migration problem
I see, it seems it wasn't compiled with maildir storage engine. About running another dovecot instance on the same box, I never tried it myself, but I guess you could have your production version (which needs to support maildir, otherwise you won't be able to access the mailboxes after the migration) in /usr (as distros usually do), and install your customized version (with support for maildir and dbox for the migration) in /usr/local. If you go this way, you will have to reference the dovecot version you're addressing with the full path (/usr/bin/doveadm or /usr/local/bin/doveadm), or you'll have to rely on your $PATH environment variable. You also need to take into account to separate the /etc directories for both instances, because you'll probably need slightly different configurations. Cheers On 2019-06-24 10:34, Adam Raszkiewicz via dovecot wrote: Yeah, I think dovecot was a custom compiled build Version is 2.2.18 Config: # 2.2.18: /etc/dovecot/dovecot.conf # Pigeonhole version 0.4.8 # OS: Linux 2.6.32-754.14.2.el6.x86_64 x86_64 CentOS release 6.10 (Final) xfs auth_master_user_separator = * auth_mechanisms = plain login dict { acl = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext } disable_plaintext_auth = no lda_mailbox_autosubscribe = yes log_path = /var/log/dovecot.log mail_home = mdbox:/var/homedirs/%2Mu/%2.2Mu/%u mail_location = mdbox:/var/mailboxes/%2Mu/%2.2Mu/%u mail_plugins = acl mail_shared_explicit_inbox = 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 index ihave duplicate vnd.dovecot.pipe vnd.dovecot.filter vnd.dovecot.execute namespace { list = children location = mdbox:/var/mailboxes/%%2Mu/%%2.2Mu/%%u prefix = shared/%%u/ separator = / subscriptions = yes type = shared } namespace inbox { inbox = yes location = mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox INBOX { auto = subscribe } mailbox Junk { special_use = \Junk } mailbox Sent { auto = subscribe special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { auto = subscribe special_use = \Trash } prefix = subscriptions = yes } passdb { args = /etc/dovecot/mastership-sql.conf driver = sql master = yes pass = yes } passdb { args = /etc/dovecot/dovecot-sql.conf.ext driver = sql } plugin { acl = vfile acl_defaults_from_inbox = yes acl_shared_dict = proxy::acl sieve_after = /etc/dovecot/sieve/99-file-qvera-ccda.sieve sieve_after2 = /etc/dovecot/sieve/98-notify-biz-address.sieve sieve_after3 = /etc/dovecot/sieve/97-mdn-processed.sieve sieve_execute_bin_dir = /etc/dovecot/sieve-execute sieve_execute_socket_dir = sieve-execute sieve_extensions = +vnd.dovecot.execute +vnd.dovecot.filter +vnd.dovecot.pipe sieve_filter_bin_dir = /etc/dovecot/sieve-filter sieve_filter_socket_dir = sieve-filter sieve_pipe_bin_dir = /etc/dovecot/sieve-pipe sieve_pipe_socket_dir = sieve-pipe sieve_plugins = sieve_extprograms } postmaster_address = postmas...@test2.domain.com sendmail_path = /sbin/sendmail service dict { unix_listener dict { user = dovecot } } service imap-postlogin { executable = script-login /etc/dovecot/imappostlogin user = $default_internal_user } service imap { executable = imap imap-postlogin } ssl = no userdb { args = uid=dovecot gid=dovecot home=/var/mailboxes/%%2Mu/%%2.2Mu/%%u driver = static } protocol lmtp { mail_plugins = acl sieve } protocol lda { mail_plugins = acl sieve } protocol imap { mail_plugins = acl imap_acl } and --build-options: Build options: ioloop=epoll notify=inotify ipv6 openssl io_block_size=8192 Mail storages: shared mdbox raw fail SQL drivers: mysql Passdb: checkpassword pam passwd passwd-file shadow sql Userdb: checkpassword nss passwd prefetch passwd-file sql At that point my question is if I can run another dovecot build on the same box? I knew I can run the same instance but as is this a custom build I want to have something generic just to use for migration purposes. Thanks, Adam On 6/21/19, 4:45 PM, "dovecot on behalf of Germán Herrera via dovecot" wrote: Well, judging by the error message it appears like dovecot hasn't been compiled with support for maildir, which is strange because I don't see any way to disable in the compile-time options. Are you using the precompiled package from the distro or compiling dovecot by yourself? Could you share the output of "dovecot --build-options" and "dovecot --version"? Thanks! On 2019-06-21 17:17, Adam Raszkiewicz wrote: > Hi German, > > I have tried your way and getting the same error message: > > dsync(u...@domain.com): Debug: Namespac
Re: Mail migration problem
Well, judging by the error message it appears like dovecot hasn't been compiled with support for maildir, which is strange because I don't see any way to disable in the compile-time options. Are you using the precompiled package from the distro or compiling dovecot by yourself? Could you share the output of "dovecot --build-options" and "dovecot --version"? Thanks! On 2019-06-21 17:17, Adam Raszkiewicz wrote: Hi German, I have tried your way and getting the same error message: dsync(u...@domain.com): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:~/Maildir dsync(u...@domain.com): Error: User initialization failed: Namespace '': Unknown mail storage driver maildir Thoughts? Missing dovecot library, something in the configuration? Thanks, Adam FROM: dovecot on behalf of Germán Herrera via dovecot ORGANIZATION: SES Sistemas Electrónicos S.A. REPLY-TO: Germán Herrera DATE: Friday, June 21, 2019 at 3:10 PM TO: Adam Raszkiewicz CC: "dovecot@dovecot.org" SUBJECT: Re: Mail migration problem Hi Adam Can you try: "doveadm sync -u maildir:~/Maildir" My mailboxes are in sdbox (I have "mail_location = sdbox:~/sdbox:ALT=/mnt/archive/%u/sdbox") and after running that command I managed to successfully migrate the user mailbox to maildir. Also that is the command I used to migrate all my user's maildirs to sdbox some time ago. Regards --- Germán Herrera Responsable de IT Ingeniería SES Sistemas Electrónicos S.A.| Espinosa 1045 (C1405AMM) | Buenos Aires | Argentina W: +54 11 5453 | Email: g.herr...@ses.com.ar - Denos su opinión aquí On 2019-06-21 11:58, Adam Raszkiewicz via dovecot wrote: I'm trying to migrate mdbox to maildir based on https://wiki.dovecot.org/Migration/MailFormat * Modified dovecot.conf and set mail_location=maildir:/tmp/destination/mailboxes/ * Then I had run /mnt/testmail/bin/dsync -Dv -u u...@domain.com mirror mdbox:/source/mailboxes/u...@domain.com but that did nothing. Then I have * Modified dovecot.conf and set mail_location=mdbox:/source/mailboxes * Then I had run /mnt/testmail/bin/dsync -Dv -u u...@domain.com mirror mdbox:/tmp/destination/mailboxes/u...@domain.com that copied over u...@domain.com mailbox from the source to the destination location. As that was working I have tried to run /mnt/testmail/bin/dsync -Dv -u u...@domain.com mirror maildir:/tmp/destination/mailboxes/u...@domain.com but that got an error: dsync(u...@domain.com): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/mnt/testmail/mailboxes dsync(u...@domain.com): Error: User initialization failed: Namespace '': Unknown mail storage driver maildir First problem is that based on example #2 from above provided syntax in https://wiki.dovecot.org/Migration/MailFormat is incorrect or for some reason is not working for me as it should for example #1. Second issue is not recognizing maildir format - what about that? Docecot has some missing libraries? Thanks, Adam
Re: Mail migration problem
Hi Adam Can you try: "doveadm sync -u maildir:~/Maildir" My mailboxes are in sdbox (I have "mail_location = sdbox:~/sdbox:ALT=/mnt/archive/%u/sdbox") and after running that command I managed to successfully migrate the user mailbox to maildir. Also that is the command I used to migrate all my user's maildirs to sdbox some time ago. Regards --- Germán Herrera Responsable de IT Ingeniería SES Sistemas Electrónicos S.A. [1]| Espinosa 1045 (C1405AMM) | Buenos Aires | Argentina W: +54 11 5453 | Email: g.herr...@ses.com.ar [2] - Denos su opinión aquí [3] On 2019-06-21 11:58, Adam Raszkiewicz via dovecot wrote: > I'm trying to migrate mdbox to maildir based on > https://wiki.dovecot.org/Migration/MailFormat > > * Modified dovecot.conf and set > mail_location=maildir:/tmp/destination/mailboxes/ > * Then I had run > > /mnt/testmail/bin/dsync -Dv -u u...@domain.com mirror > mdbox:/source/mailboxes/u...@domain.com > > but that did nothing. Then I have > > * Modified dovecot.conf and set mail_location=mdbox:/source/mailboxes > * Then I had run > > /mnt/testmail/bin/dsync -Dv -u u...@domain.com mirror > mdbox:/tmp/destination/mailboxes/u...@domain.com > > that copied over u...@domain.com mailbox from the source to the destination > location. As that was working I have tried to run > > /mnt/testmail/bin/dsync -Dv -u u...@domain.com mirror > maildir:/tmp/destination/mailboxes/u...@domain.com > > but that got an error: > > dsync(u...@domain.com): Debug: Namespace inbox: type=private, prefix=, sep=, > inbox=yes, hidden=no, list=yes, subscriptions=yes > location=maildir:/mnt/testmail/mailboxes > > dsync(u...@domain.com): Error: User initialization failed: Namespace '': > Unknown mail storage driver maildir > > First problem is that based on example #2 from above provided syntax in > https://wiki.dovecot.org/Migration/MailFormat is incorrect or for some reason > is not working for me as it should for example #1. > > Second issue is not recognizing maildir format - what about that? Docecot has > some missing libraries? > > Thanks, > > Adam Links: -- [1] http://www.ses.com.ar [2] http://www.ses.com.ar/ [3] https://www.surveymonkey.com/r/VKTJL6K
Re: Submission service and SMTP AUTH capability
Hi Christian, first of all I appreciate your quick answer. You are correct, if I "openssl -starttls smtp -connect :" I notice the AUTH capability is published, so that explains why the clients that I configure with STARTTLS are able to find out the AUTH mechanisms and authenticate correctly. I also found out that the AUTH is shown before entering STARTTLS if I set "ssl = yes", but the capability is hidden from pre-starttls EHLO if I do enforce SSL with "ssl = required", which is my server configuration. That is an strange behavior for me, but I can deal with it now that I know how it works. Thanks for your help, and best regards!! German On 2019-06-21 11:05, Christian Kivalo via dovecot wrote: On June 21, 2019 3:13:59 PM GMT+02:00, "Germán Herrera via dovecot" wrote: Hi Everyone! I've setup dovecot 2.3.2.1 on a Gentoo server. I want to configure the submission service in order to replace the corresponding part in Postfix (which is my SMTP server). I configured submission it with just a few options different of the default ones: submission_client_workarounds = whitespace-before-path submission_relay_host = 127.0.0.1 submission_relay_port = 10026 submission_relay_trusted = yes The issue I'm having is that the SMTP AUTH is enforced and performed correctly, but it doesn't get published on the server capaabilities when the connection doesn't come from localhost. This causes issues with some smtp clients which authenticate (python smtpclient). When I telnet the submission service from localhost I get: 220 (protected hostname) Dovecot ready. EHLO L 250-(protected hostname) 250-8BITMIME 250-AUTH PLAIN LOGIN 250-BURL imap 250-CHUNKING 250-ENHANCEDSTATUSCODES 250-SIZE 250-STARTTLS 250 PIPELINING quit 221 2.0.0 Bye But when I do the same from another host other than the one running dovecot (telnetting the submission port): 220 (protected hostname) Dovecot ready. EHLO L 250-(protected hostname) 250-8BITMIME 250-BURL imap 250-CHUNKING 250-ENHANCEDSTATUSCODES 250-SIZE 250-STARTTLS 250 PIPELINING quit 221 2.0.0 Bye As you can see, the AUTH capability is not there. Do you know what could be causing this issue? Your help is much appreciated! German Maybe you need to start tls before auth will be offered as localhost most often is whitelisted from the need for auth. Have you tried with openssl s_client to start TLS and see if auth is offered then?
Submission service and SMTP AUTH capability
Hi Everyone! I've setup dovecot 2.3.2.1 on a Gentoo server. I want to configure the submission service in order to replace the corresponding part in Postfix (which is my SMTP server). I configured submission it with just a few options different of the default ones: submission_client_workarounds = whitespace-before-path submission_relay_host = 127.0.0.1 submission_relay_port = 10026 submission_relay_trusted = yes The issue I'm having is that the SMTP AUTH is enforced and performed correctly, but it doesn't get published on the server capaabilities when the connection doesn't come from localhost. This causes issues with some smtp clients which authenticate (python smtpclient). When I telnet the submission service from localhost I get: 220 (protected hostname) Dovecot ready. EHLO L 250-(protected hostname) 250-8BITMIME 250-AUTH PLAIN LOGIN 250-BURL imap 250-CHUNKING 250-ENHANCEDSTATUSCODES 250-SIZE 250-STARTTLS 250 PIPELINING quit 221 2.0.0 Bye But when I do the same from another host other than the one running dovecot (telnetting the submission port): 220 (protected hostname) Dovecot ready. EHLO L 250-(protected hostname) 250-8BITMIME 250-BURL imap 250-CHUNKING 250-ENHANCEDSTATUSCODES 250-SIZE 250-STARTTLS 250 PIPELINING quit 221 2.0.0 Bye As you can see, the AUTH capability is not there. Do you know what could be causing this issue? Your help is much appreciated! German