<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 2014-01-01 2:02 PM, Wayne Davison
      <a class="moz-txt-link-rfc2396E" href="mailto:wayned@samba.org"><wayned@samba.org></a> wrote:<br>
    </div>
    <blockquote
cite="mid:CAHSx_SvCLVcCmLBsc=C81DsY1AmsdYEgDZfYwAQh9=f9PCN2zg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Tue, Dec 31, 2013 at 3:59 AM,
            Charles Marcus <span dir="ltr"><<a
                moz-do-not-send="true"
                href="mailto:CMarcus@media-brokers.com" target="_blank">CMarcus@media-brokers.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000">On the old server,
                dovecot is configured to just use .../<a
                  moz-do-not-send="true" href="http://example.com/user"
                  target="_blank">example.com/user</a> for the maildirs.<br>
                <br>
                On the target server, I want to change this to .../<a
                  moz-do-not-send="true"
                  href="http://example.com/user/Maildir" target="_blank">example.com/user/Maildir</a></div>
            </blockquote>
          </div>
          <br>
          One thing you can do is to add a symlink on the sending side
          to point the Maildir to '.', and then run rsync with -R
          --no-implied-dirs and both the normal top-level dir and a path
          down to the Maildir/ (with the trailing slash) plus an exclude
          of the files in the user dir and the symlink itself.  For
          instance:</div>
        <div class="gmail_extra"><br>
        </div>
        <div class="gmail_extra">
          <pre style="color:rgb(0,0,0)">mkdir -p /tmp/src/user
touch /tmp/src/user/{one,two,three}
ln -s . /tmp/src/user/Maildir
rsync -aivR --no-implied-dirs \
     --include='/src/user/Maildir/' --exclude='/src/user/Maildir/Maildir' \
     --exclude='/src/user/*' \
     /tmp/./src /tmp/./src/user/Maildir/ /tmp/dest/
</pre>
        </div>
      </div>
    </blockquote>
    <br>
    Thanks Wayne... I've filed this (in my 'tips-n-tricks' folder) for
    future reference.<br>
    <br>
    However, since this won't be an ongoing thing forever, I'll just
    keep things the way they are now (same layout on both), then when
    I'm ready to flip the switch, stop dovecot on the new server, do the
    transformation, change the dovecot config and start it back up.<br>
    <br>
    Then all I have to do is deal with the users complaining about all
    of their folders showing up as subfolders of the Inbox, and explain
    to them how to remove the INBOX. namespace prefix in their mail
    client (this is a system that was converted some time ago from an
    old courier-imap setup)...<br>
    <br>
    <div class="moz-signature">-- <br>
      <br>
      Best regards,<br>
      <br>
      <b><i>Charles</i></b><br>
    </div>
  </body>
</html>