<!--/*SC*/DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"/*EC*/-->
<html><head><title></title><style type="text/css"><!-- body{padding:1ex;margin:0;font-family:sans-serif;font-size:small}a[href]{color:-moz-hyperlinktext!important;text-decoration:-moz-anchor-decoration}blockquote{margin:0;border-left:2px solid #144fae;padding-left:1em}blockquote blockquote{border-color:#006312}blockquote blockquote blockquote{border-color:#540000} --></style></head><body><div style="font-family: Arial; font-size: medium;" dir="ltr"><div>
        remote_cyrus# ctl_mboxlist -d &gt; file<br />
        local_cyrus# clt_mboxlist -u &lt; file</div>
<div class="defangedMessage">
        <div id="me29232">
                <div>
                        &nbsp;</div>
                <div>
                        In between these steps, do this:</div>
                <div>
                        &nbsp;</div>
                <div>
                        sed &#39;s/\t0 spool[12] /\t0 default /&#39; &lt; file &gt; file2 &amp;&amp; mv file2 file</div>
                <div>
                        <br />
                        &nbsp;</div>
                <div>
                        (tested on a dumb sample here)</div>
                <div>
                        &nbsp;</div>
                <div>
                        basically you want to replace the &quot;partition&quot; field in the dump with default in all cases.</div>
                <div>
                        &nbsp;</div>
                <div>
                        Alternatively, you could create partition-spool1 and partition-spool2 pointing to symlinks to the real data, but I would advise being careful about that and moving mailboxes between them - I&#39;m not sure Cyrus is totally sane about resolving the real path in all cases.</div>
                <div>
                        &nbsp;</div>
                <div>
                        Bron.</div>
                <div>
                        &nbsp;</div>
                <div>
                        On Fri, Feb 10, 2012, at 02:35 PM, Manel Gimeno Zaragozá wrote:</div>
                <blockquote class="me29232QuoteMessage" type="cite">
                        <style type="text/css"><!--  --></style>
                        <div dir="ltr">
                                Hello Bron,<br />
                                <br />
                                Thanks for your quick response. I paste the config from remote server:<br />
                                <br />
                                Remote server#<br />
                                &nbsp;&nbsp; configdirectory: /uc01-cyr1/shared/config<br />
                                &nbsp;&nbsp; defaultpartition: spool1<br />
                                &nbsp;&nbsp; partition-spool1: /uc01-cyr1/shared/spool1<br />
                                &nbsp;&nbsp; partition-spool2: /uc01-cyr1/shared/spool2<br />
                                <br />
                                Local server#<br />
                                &nbsp;&nbsp; partition-default: /var/spool/imap<br />
                                &nbsp;&nbsp; configdirectory: /var/lib/imap<br />
                                <br />
                                But, before ask by mail I made a softlink in the local server to simulate the same &quot;partition-spool&quot; hoping that this could happend when importing mailboxes...but It has not solve the problem. Maybe a softlink is not the correct solution.<br />
                                <br />
                                Local server#<br />
                                &nbsp;&nbsp; ls -la /uc01-cyr1/shared/spool1<br />
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lrwxrwxrwx 1 cyrus mail 16 Feb 10 13:18 /uc01-cyr1/shared/spool1 -&gt; /var/spool/imap/<br />
                                <br />
                                Regarding copying spool files, I guess this is a workaround, but I cannot do this in production migration as I should rsync 600GB.<br />
                                <br />
                                Thanks!<br />
                                <br />
                                Regards.<br />
                                <br />
                                Manel Gimeno Zaragoza<br />
                                magiza83@hotmail.com<br />
                                <br />
                                <br />
                                <div>
                                        <hr id="me29232stopSpelling" />
                                        From: brong@fastmail.fm<br />
                                        To: magiza83@hotmail.com; info-cyrus@lists.andrew.cmu.edu<br />
                                        Subject: Re: Reconstruct: IOERROR: Mailbox name too long<br />
                                        Date: Fri, 10 Feb 2012 14:21:18 +0100<br />
                                        <br />
                                        <style type="text/css"><!--  --></style>
                                        <div dir="ltr" style="font-family:Arial;font-size:medium">
                                                <div>
                                                        Bogus message is probably totally bogus.&nbsp; I suspect the real error is that</div>
                                                <div>
                                                        your partition layout doesn&#39;t match.&nbsp; What were the partitions on the remote</div>
                                                <div>
                                                        cyrus?</div>
                                                <div>
                                                        &nbsp;</div>
                                                <div>
                                                        Also - recommend you don&#39;t do this - just copy the spool files AND the</div>
                                                <div>
                                                        config files (/var/lib/imap/) to the new machine and it should</div>
                                                <div>
                                                        upgrade in place.</div>
                                                <div>
                                                        &nbsp;</div>
                                                <div>
                                                        Bron.</div>
                                                <div class="me29232ecxdefangedMessage">
                                                        <div id="me29232ecxme36012">
                                                                <div>
                                                                        &nbsp;</div>
                                                                <div>
                                                                        &nbsp;</div>
                                                                <div>
                                                                        On Fri, Feb 10, 2012, at 02:07 PM, Manel Gimeno Zaragozá wrote:</div>
                                                                <blockquote class="me29232ecxme36012QuoteMessage">
                                                                        <style type="text/css"><!--  --></style>
                                                                        <div dir="ltr">
                                                                                Hello,<br />
                                                                                <br />
                                                                                I&#39;ve installed &quot;cyrus-imapd-2.4.13-1.el6.x86_64&quot; and i&#39;m trying to migrate a mailbox from a remote cyrus server to a new one. The steps I follow are:<br />
                                                                                <br />
                                                                                remote_cyrus# ctl_mboxlist -d &gt; file<br />
                                                                                local_cyrus# clt_mboxlist -u &lt; file<br />
                                                                                local_cyrus# reconstruct -rxf user.test_user<br />
                                                                                &nbsp;&nbsp; &nbsp;user.test_user: failed to read index header<br />
                                                                                &nbsp;&nbsp; &nbsp;user.test_user: Invalid mailbox name (null)<br />
                                                                                &nbsp;&nbsp; &nbsp;user.test_user.Borrador: failed to read index header<br />
                                                                                &nbsp;&nbsp; &nbsp;user.test_user.Borrador: Invalid mailbox name (null)<br />
                                                                                &nbsp;&nbsp; &nbsp;user.test_user.Elementos eliminados: failed to read index header<br />
                                                                                &nbsp;&nbsp; &nbsp;user.test_user.Elementos eliminados: Invalid mailbox name (null)<br />
                                                                                &nbsp;&nbsp; &nbsp;user.test_user.Elementos enviados: failed to read index header<br />
                                                                                &nbsp;&nbsp; &nbsp;user.test_user.Elementos enviados: Invalid mailbox name (null)<br />
                                                                                &nbsp;&nbsp; &nbsp;user.test_user.SPAM: failed to read index header<br />
                                                                                &nbsp;&nbsp; &nbsp;user.test_user.SPAM: Invalid mailbox name (null)<br />
                                                                                <br />
                                                                                <br />
                                                                                Also the log file shows:<br />
                                                                                local_cyrus# cat /var/log/maillog<br />
                                                                                &nbsp;&nbsp;&nbsp; ...<br />
                                                                                &nbsp;&nbsp;&nbsp; ...<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: create new mailbox user.test_user<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: failed to read index header for user.test_user<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: IOERROR: Mailbox name too long (user.test_user)<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: reconstructing user.test_user.Borrador<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: IOERROR: opening index user.test_user.Borrador: Invalid mailbox name<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: create new mailbox user.test_user.Borrador<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: failed to read index header for user.test_user.Borrador<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: IOERROR: Mailbox name too long (user.test_user.Borrador)<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: reconstructing user.test_user.Elementos eliminados<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: IOERROR: opening index user.test_user.Elementos eliminados: Invalid mailbox name<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: create new mailbox user.test_user.Elementos eliminados<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: failed to read index header for user.test_user.Elementos eliminados<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: IOERROR: Mailbox name too long (user.test_user.Elementos eliminados)<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: reconstructing user.test_user.Elementos enviados<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: IOERROR: opening index user.test_user.Elementos enviados: Invalid mailbox name<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: create new mailbox user.test_user.Elementos enviados<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: failed to read index header for user.test_user.Elementos enviados<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: IOERROR: Mailbox name too long (user.test_user.Elementos enviados)<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: reconstructing user.test_user.SPAM<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: IOERROR: opening index user.test_user.SPAM: Invalid mailbox name<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: create new mailbox user.test_user.SPAM<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: failed to read index header for user.test_user.SPAM<br />
                                                                                &nbsp;&nbsp;&nbsp; Feb 10 13:48:30 cyrus1-test reconstruct[21520]: IOERROR: Mailbox name too long (user.test_user.SPAM)<br />
                                                                                &nbsp;&nbsp;&nbsp; ...<br />
                                                                                &nbsp;&nbsp;&nbsp; ...<br />
                                                                                <br />
                                                                                It looks like I&#39;m not able to reconstruct the mailbox due to &quot;name too long&quot;.<br />
                                                                                <br />
                                                                                Is it possible to avoid this problem without modify the mbox name? as I have more that 10.000 account and all of them have the same type of folders with spaces and &quot;long names&quot;, even some of them have longer name folders.<br />
                                                                                <br />
                                                                                Anyway, I think in some cases the name is not too long (f.e. user.test_user) but I get the same error, I&#39;m guessing that maybe the problem is not there, but I&#39;m not able to find it.<br />
                                                                                <br />
                                                                                I post also my config files:<br />
                                                                                =========================imapd.conf=========================<br />
                                                                                &nbsp;&nbsp; &nbsp;admins: cyrus<br />
                                                                                &nbsp;&nbsp; &nbsp;allowplaintext: yes<br />
                                                                                &nbsp;&nbsp; &nbsp;allowapop: no<br />
                                                                                &nbsp;&nbsp; &nbsp;configdirectory: /var/lib/imap<br />
                                                                                &nbsp;&nbsp; &nbsp;partition-default: /var/spool/imap<br />
                                                                                &nbsp;&nbsp; &nbsp;imapidresponse: no<br />
                                                                                &nbsp;&nbsp; &nbsp;sasl_pwcheck_method: saslauthd<br />
                                                                                &nbsp;&nbsp; &nbsp;sasl_mech_list: PLAIN LOGIN<br />
                                                                                &nbsp;&nbsp; &nbsp;sievedir: /var/lib/imap/sieve<br />
                                                                                &nbsp;&nbsp; &nbsp;altnamespace: yes<br />
                                                                                &nbsp;&nbsp; &nbsp;hashimapspool: true<br />
                                                                                &nbsp;&nbsp; &nbsp;unixhierarchysep: no<br />
                                                                                &nbsp;&nbsp; &nbsp;lmtp_downcase_rcpt: no<br />
                                                                                &nbsp;&nbsp; &nbsp;allowanonymouslogin: no<br />
                                                                                &nbsp;&nbsp; &nbsp;popminpoll: 1<br />
                                                                                &nbsp;&nbsp; &nbsp;autocreatequota: 0<br />
                                                                                &nbsp;&nbsp; &nbsp;umask: 027<br />
                                                                                &nbsp;&nbsp; &nbsp;sieveusehomedir: false<br />
                                                                                &nbsp;&nbsp; &nbsp;sasl_ldap_servers: ldap://******.com:1389/<br />
                                                                                &nbsp;&nbsp; &nbsp;sasl_ldap_basedn: ou=*******,dc=org<br />
                                                                                &nbsp;&nbsp; &nbsp;tls_ca_path: /etc/ssl/certs<br />
                                                                                &nbsp;&nbsp; &nbsp;tls_session_timeout: 1440<br />
                                                                                &nbsp;&nbsp; &nbsp;tls_cipher_list: TLSv1:SSLv3:SSLv2:!NULL:!EXPORT:!DES:!LOW:@STRENGTH<br />
                                                                                &nbsp;&nbsp; &nbsp;lmtpsocket: /var/run/cyrus/socket/lmtp<br />
                                                                                &nbsp;&nbsp; &nbsp;idlesocket: /var/run/cyrus/socket/idle<br />
                                                                                &nbsp;&nbsp; &nbsp;notifysocket: /var/run/cyrus/socket/notify<br />
                                                                                &nbsp;&nbsp; &nbsp;delete_mode: immediate<br />
                                                                                &nbsp;&nbsp; &nbsp;expunge_mode: immediate<br />
                                                                                <br />
                                                                                &nbsp;&nbsp; &nbsp;#Replica config<br />
                                                                                &nbsp;&nbsp; &nbsp;sync_host: 192.168.**.**<br />
                                                                                &nbsp;&nbsp; &nbsp;sync_authname: ******<br />
                                                                                &nbsp;&nbsp; &nbsp;sync_password: ******<br />
                                                                                <br />
                                                                                &nbsp;&nbsp; &nbsp;#Configuracion para el rolling<br />
                                                                                &nbsp;&nbsp; &nbsp;sync_log: 1<br />
                                                                                &nbsp;&nbsp; &nbsp;sync_repeat_interval: 1<br />
                                                                                &nbsp;&nbsp; &nbsp;sync_machineid: 1<br />
                                                                                ============================================================<br />
                                                                                <br />
                                                                                =========================cyrus.conf=========================<br />
                                                                                &nbsp;&nbsp; &nbsp;START {<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; # do not delete this entry!<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; recover&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd=&quot;ctl_cyrusdb -r&quot;<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; # this is only necessary if using idled for IMAP IDLE<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; idled&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd=&quot;idled&quot;<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; #Si queremos que sea MASTER tenemos que arrancar el sync_client<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; syncclient&nbsp;&nbsp;&nbsp; cmd=&quot;/usr/lib/cyrus-imapd/sync_client -r&quot;<br />
                                                                                &nbsp;&nbsp; &nbsp;}<br />
                                                                                &nbsp;&nbsp; &nbsp;SERVICES {<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; # add or remove based on preferences<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; imap&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd=&quot;imapd&quot; listen=&quot;imap&quot; prefork=5<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; #imaps&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd=&quot;imapd -s&quot; listen=&quot;imaps&quot; prefork=1<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; pop3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd=&quot;pop3d&quot; listen=&quot;pop3&quot; prefork=3<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; #pop3s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd=&quot;pop3d -s&quot; listen=&quot;pop3s&quot; prefork=1<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; sieve&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd=&quot;timsieved&quot; listen=&quot;sieve&quot; prefork=0<br />
                                                                                <br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; lmtpunix&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd=&quot;lmtpd&quot; listen=&quot;/var/lib/imap/socket/lmtp&quot; prefork=1<br />
                                                                                <br />
                                                                                &nbsp;&nbsp; &nbsp;}<br />
                                                                                &nbsp;&nbsp; &nbsp;EVENTS {<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; # this is required<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; checkpoint&nbsp;&nbsp;&nbsp; cmd=&quot;ctl_cyrusdb -c&quot; period=30<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; # this is only necessary if using duplicate delivery suppression,<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; # Sieve or NNTP<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; delprune&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd=&quot;cyr_expire -D 7 -E 3 -X 7&quot; at=0400<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; # this is only necessary if caching TLS sessions<br />
                                                                                &nbsp;&nbsp; &nbsp;&nbsp; tlsprune&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cmd=&quot;tls_prune&quot; at=0400<br />
                                                                                &nbsp;&nbsp; &nbsp;}<br />
                                                                                ============================================================<br />
                                                                                <br />
                                                                                Thanks &amp; Regards.</div>
                                                                        <pre>
----
Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
</pre>
                                                                </blockquote>
                                                        </div>
                                                </div>
                                                <div>
                                                        &nbsp;</div>
                                                <div>
                                                        --</div>
                                                <div>
                                                        Bron Gondwana</div>
                                                <div>
                                                        <a href="mailto:brong@fastmail.fm">brong@fastmail.fm</a></div>
                                        </div>
                                </div>
                        </div>
                </blockquote>
        </div>
</div>
<div>
        &nbsp;</div>
</div><div>-- </div>
<div>  Bron Gondwana</div>
<div>  <a href="mailto:brong@fastmail.fm">brong@fastmail.fm</a></div>
</body></html>