[Dovecot] Altmove doesn't working after a dsync.

Timo Sirainen tss at iki.fi
Fri Mar 22 16:43:33 EET 2013


On Fri, 2013-03-22 at 11:36 -0300, Breno Moreira wrote:

> The most strange thing is that even if I use the filter ALL, the emails are
> not moved.

Sounds like a bug. Before wondering about it further, try upgrading to
v2.1.15. I remember some versions having bugs related to altmoving.

> Just for example, using my test user I get the following logs:
> 
> root at mail0:~/# doveadm -Dv altmove -u teste at supramail.com.br all
> doveadm(root): Debug: Loading modules from directory:
> /usr/lib/dovecot/modules
> doveadm(root): Debug: Module loaded:
> /usr/lib/dovecot/modules/lib10_quota_plugin.so
> doveadm(root): Debug: Loading modules from directory:
> /usr/lib/dovecot/modules/doveadm
> doveadm(root): Debug: Skipping module doveadm_acl_plugin, because dlopen()
> failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_acl_plugin.so:
> undefined symbol: acl_user_module (this is usually intentional, so just
> ignore this message)
> doveadm(root): Debug: Skipping module doveadm_expire_plugin, because
> dlopen() failed:
> /usr/lib/dovecot/modules/doveadm/lib10_doveadm_expire_plugin.so: undefined
> symbol: expire_set_deinit (this is usually intentional, so just ignore this
> message)
> doveadm(root): Debug: Module loaded:
> /usr/lib/dovecot/modules/doveadm/lib10_doveadm_quota_plugin.so
> doveadm(root): Debug: Skipping module doveadm_zlib_plugin, because dlopen()
> failed: /usr/lib/dovecot/modules/doveadm/lib10_doveadm_zlib_plugin.so:
> undefined symbol: i_stream_create_deflate (this is usually intentional, so
> just ignore this message)
> doveadm(root): Debug: Skipping module doveadm_fts_plugin, because dlopen()
> failed: /usr/lib/dovecot/modules/doveadm/lib20_doveadm_fts_plugin.so:
> undefined symbol: fts_backend_rescan (this is usually intentional, so just
> ignore this message)
> doveadm(teste at supramail.com.br): Debug: Added userdb setting:
> mail=sdbox:~/:ALT=/mnt/hd/dovecot/supramail.com.br/teste
> doveadm(teste at supramail.com.br): Debug: Effective uid=5000, gid=5000,
> home=/mnt/ssd/dovecot/supramail.com.br/teste
> doveadm(teste at supramail.com.br): Debug: Quota root: name=Quota
> backend=maildir args=
> doveadm(teste at supramail.com.br): Debug: fs: root=/mnt/ssd/dovecot/
> supramail.com.br/teste, index=, control=, inbox=, alt=/mnt/hd/dovecot/
> supramail.com.br/teste
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=1
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=2
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=3
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=4
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=5
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=6
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=7
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=8
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=9
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=10
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=11
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=12
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=13
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=14
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=15
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=16
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=17
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=18
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=19
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=20
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=21
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=22
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=23
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=24
> doveadm(teste at supramail.com.br): Debug: altmove: box=INBOX uid=25
> doveadm(teste at supramail.com.br): Debug: altmove: box=Sent uid=1
> 
> And the fetch of the saved date is:
> 
> root at mail0:~/# doveadm -Dv fetch -u teste at supramail.com.br date.saved
> mailbox inbox all
> date.saved: 2012-10-31 23:53:35
> date.saved: 2012-10-31 23:53:35
> date.saved: 2012-10-31 23:53:35
> date.saved: 2012-10-31 23:53:35
> date.saved: 2012-10-31 23:53:35
> date.saved: 2012-10-31 23:53:35
> date.saved: 2012-10-31 23:53:35
> date.saved: 2012-10-31 23:53:35
> date.saved: 2012-10-31 23:53:35
> date.saved: 2012-10-31 23:53:36
> date.saved: 2012-10-31 23:53:37
> date.saved: 2012-10-31 23:53:37
> date.saved: 2012-10-31 23:53:38
> date.saved: 2012-10-31 23:53:39
> date.saved: 2012-10-31 23:53:39
> date.saved: 2012-10-31 23:53:39
> date.saved: 2012-10-31 23:53:39
> date.saved: 2012-10-31 23:53:40
> date.saved: 2012-10-31 23:53:40
> date.saved: 2012-10-31 23:53:40
> date.saved: 2012-10-31 23:53:40
> date.saved: 2012-10-31 23:53:41
> date.saved: 2013-01-04 11:28:02
> date.saved: 2013-01-17 15:38:39
> date.saved: 2013-03-07 11:44:18
> 
> Thanks for your help,
> Breno Moreira
> 
> 
> On Thu, Mar 21, 2013 at 6:41 PM, Timo Sirainen <tss at iki.fi> wrote:
> 
> > I guess the save date gets reset. You can verify that with e.g.:
> >
> > doveadm fetch date.saved mailbox inbox all
> >
> > dsync is supposed to preserve the save date though. Might be broken in
> > your version.
> >
> > On 21.3.2013, at 22.59, Breno Moreira <brenoavm at gmail.com> wrote:
> >
> > > My email was sent before I finish it.
> > >
> > > The other command I'm using is for move the old mails to the alternate
> > > storage, and it is:
> > >  - doveadm -Dv altmove -u user seen savedbefore 2w
> > >
> > > In the logs all seems to be ok, without errors or warnings.
> > > I'm really thinking in test the new version to find out if the problem
> > > still occurs.
> > >
> > > Thanks to all.
> > >
> > > Breno Moreira
> > >
> > >
> > > On Thu, Mar 21, 2013 at 5:53 PM, Breno Moreira <brenoavm at gmail.com>
> > wrote:
> > >
> > >> Hi Charles,
> > >>
> > >> Sorry for not providing this kind of info.
> > >>
> > >> I'm using Dovecot 2.1.7 in a Debian Wheezy. The dovecot -n output is
> > below:
> > >>
> > >> # 2.1.7: /etc/dovecot/dovecot.conf
> > >> # OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.0
> > >> auth_mechanisms = plain login
> > >> auth_socket_path = /var/run/dovecot/auth-userdb
> > >> disable_plaintext_auth = no
> > >> lmtp_proxy = yes
> > >> mail_fsync = always
> > >> mail_gid = vmail
> > >> mail_location = maildir:~/.maildir
> > >> mail_plugins = " quota"
> > >> mail_uid = vmail
> > >> mmap_disable = yes
> > >> passdb {
> > >>  driver = pam
> > >> }
> > >> passdb {
> > >>  args = /etc/dovecot/dovecot-sql.conf.ext
> > >>  driver = sql
> > >> }
> > >> plugin {
> > >>  quota = maildir:Quota
> > >>  sieve = ~/.dovecot.sieve
> > >>  sieve_dir = ~/sieve
> > >> }
> > >> protocols = imap pop3 lmtp
> > >> service auth {
> > >>  unix_listener /var/spool/postfix/private/auth {
> > >>    mode = 0666
> > >>  }
> > >>  unix_listener auth-userdb {
> > >>    group = vmail
> > >>    mode = 0666
> > >>    user = vmail
> > >>  }
> > >>  user = root
> > >> }
> > >> service imap-login {
> > >>  service_count = 0
> > >> }
> > >> service lmtp {
> > >>  inet_listener lmtp {
> > >>    address = localhost mail0.supramail.com.br
> > >>    port = 7025
> > >>  }
> > >> }
> > >> service pop3-login {
> > >>  service_count = 0
> > >> }
> > >> ssl_cert = </etc/dovecot/dovecot.pem
> > >> ssl_key = </etc/dovecot/dovecot.pem
> > >> userdb {
> > >>  driver = passwd
> > >> }
> > >> userdb {
> > >>  args = /etc/dovecot/dovecot-sql.conf.ext
> > >>  driver = sql
> > >> }
> > >> protocol lmtp {
> > >>  mail_plugins = " quota sieve"
> > >>  postmaster_address = postmaster at mail0.supramail.com.br
> > >> }
> > >> protocol imap {
> > >>  mail_plugins = " quota imap_quota"
> > >> }
> > >> protocol pop3 {
> > >>  pop3_uidl_format = %v-%u
> > >> }
> > >>
> > >> The commands that I'm using are:
> > >>
> > >> - dsync -Dv -u user mirror sdbox:~/sdbox:ALT=alternatestoragepath
> > >>
> > >> -
> > >>
> > >>
> > >> On Thu, Mar 21, 2013 at 5:33 PM, Charles Marcus <
> > CMarcus at media-brokers.com
> > >>> wrote:
> > >>
> > >>> Please always try to provide some basic system info when asking for
> > help.
> > >>>
> > >>> dovecot version? doveconf -n output? actual commands you are typing?
> > logs
> > >>> of the events?
> > >>>
> > >>> Also remember, dsync has been completely rewritten for the upcoming 2.2
> > >>> (at rc3 now), and has always been a little problematic in earlier
> > versions
> > >>> (which I guess was the reason for the rewrite)...
> > >>>
> > >>>
> > >>> On 2013-03-21 3:58 PM, Breno Moreira <brenoavm at gmail.com> wrote:
> > >>>
> > >>>> Hi guys,
> > >>>>
> > >>>> I'm having a problem with the altmove command after a mailbox
> > migration
> > >>>> using dsync.
> > >>>>
> > >>>> What I'm trying to do is move some users from a datacenter to another
> > >>>> and,
> > >>>> for that, I'm using the dsync feature. First thing I do is run the
> > dsync
> > >>>> mirror command, and this is working properly, but all mails are moved
> > to
> > >>>> the main path, ignoring the ALT statement in the mail location.
> > >>>>
> > >>>> So, what I tried to do was run the doveadm altmove to move the old
> > mails
> > >>>> to
> > >>>> the new alternate storage, but it simply doesn't work or sometimes
> > moves
> > >>>> only few messages.
> > >>>>
> > >>>> After the user receives new messages, these new files are correctly
> > >>>> moved.
> > >>>>
> > >>>> It can be problem with my search parameter in the altmove command? Or
> > >>>> this
> > >>>> is a normal result?
> > >>>>
> > >>>> Best Regards,
> > >>>> Breno Moreira
> > >>>>
> > >>>>
> > >>>
> > >>> --
> > >>>
> > >>> Best regards,
> > >>>
> > >>> Charles Marcus
> > >>> I.T. Director
> > >>> Media Brokers International, Inc.
> > >>> 678.514.6224 | 678.514.6299 fax
> > >>>
> > >>>
> > >>>
> > >>
> > >>
> > >> --
> > >> ---------------------------------------------------------------------
> > >> Breno Moreira
> > >>
> > >> “O êxito na vida não se mede pelo que você conquistou,
> > >>
> > >> mas sim pelas dificuldades que superou no caminho.”
> > >>
> > >> *                    Abraham Lincoln*
> > >>
> > >>
> > >
> > >
> > > --
> > > ---------------------------------------------------------------------
> > > Breno Moreira
> > >
> > > “O êxito na vida não se mede pelo que você conquistou,
> > >
> > > mas sim pelas dificuldades que superou no caminho.”
> > >
> > > *                    Abraham Lincoln*
> >
> >
> 
> 




More information about the dovecot mailing list