1

Hi I am trying to figure out how to use the xfermailbox command correctly in cyrus

I created a temp mail box called test@domain1.com and I want to move it to test@domain2.com

so I used the following command

xfermailbox user.test smtp.domain2.com

The only errors I got when running this where

Jul  7 11:32:10 domain imap[4344]: IOERROR: open on /var/spool/imap/domain/domain1.com/user/test/cyrus.expunge: No such file or directory
Jul  7 11:32:10 domain imap[4344]: IOERROR: open on /var/imap/domain/r/domain1.com/user/t/test.sub: No such file or directory
Jul  7 11:32:10 domain imap[4344]: IOERROR: open on /var/imap/domain/r/domain1.com/user/t/test.mboxkey: No such file or directory
Jul  7 11:32:10 domain imap[4344]: could not dump sieve scripts in /var/imap/sieve/domain/r/domain1.com/t/test: No such file or directory)
Jul  7 11:32:10 domain imap[4766]: skiplist: recovered /var/imap/user/t/test.seen.4766 (1 record, 380 bytes) in 0 seconds
Jul  7 11:32:10 domain imap[4344]: Could not set remote acl on domain1.com!user.test
Jul  7 11:32:10 domain imap[4766]: Deleted mailbox user.test

The only one that looks worrying to me is

Jul  7 11:32:10 domain imap[4344]: Could not set remote acl on domain1.com!user.test

but still not sure if it is actually a problem and weather cyrus just sets some defaults on domain2.com

Now that I have run this command I get this message when I try and access the test@domain1.com mailbox. I get it if I try to access the mailbox from a mail client or if I try do something like "lam user.test" from within cyradm

[REFERRAL imap://;AUTH=*@smtp.domain2.com/user.test] Remote mailbox.

This still is not the real problem this I guess is just telling me the mailbox no longer exists here. The real problem is that the mailbox does not appear at domain2.com.

so 2 questions

1) Have I used the xfermailbox command in the wrong way? or could this be a bug?
2) How can I now delete the mailbox from domain1.com so I can recreate it and start again? ("dm user.test" produces the same referral message as above)

UPDATE:

I managed to "fix" the test@domain1.com mail box I had to dump the mailbox.db and edit the offending line and then insert the new mailbox list with the following commands

su - cyrus -c "/usr/local/cyrus/bin/ctl_mboxlist -d" > ~/mailbox
su - cyrus -c "/usr/local/cyrus/bin/ctl_mboxlist -u" 

I still have the problem that I cannot xfer the mailbox every time I try I get the following errors

from cyradm

localhost> xfer user.test smtp.domain2.com
xfermailbox: The remote Server(s) denied the operation
localhost> xfer user.test smtp.domain2.com
xfermailbox: [REFERRAL imap://;AUTH=*@smtp.domain2.com/user.test] Remote mailbox.
localhost> 

and from /var/log/messages

Jul 8 12:25:08 domain imap[19557]: login: smtp.domain2.com [???.???.???.???] cyrus DIGEST-MD5 User logged in Jul 8 12:25:08 domain imap[18848]: IOERROR: open on /var/spool/imap/domain/domain1.com/user/test/cyrus.expunge: No such file or directory Jul 8 12:25:08 domain imap[18848]: IOERROR: open on /var/imap/domain/r/domain1.com/user/t/test.sub: No such file or directory Jul 8 12:25:08 domain imap[18848]: IOERROR: open on /var/imap/domain/r/domain1.com/user/t/test.mboxkey: No such file or directory Jul 8 12:25:08 domain imap[18848]: could not dump sieve scripts in /var/imap/sieve/domain/r/realtsp.com/t/test: No such file or directory) Jul 8 12:25:09 domain imap[18848]: Could not set remote acl on realtsp.com!user.test Jul 8 12:25:09 domain imap[19557]: Deleted mailbox user.test

any and all help welcome

Alistair Prestidge
  • 806
  • 1
  • 7
  • 19

1 Answers1

1

In the end I am using "rename" instead of "xfer" as technically I am not moving servers I am just moving the mailbox from one virtual cyrus domain to another so I can access them all from the global cyrus user, but I would still expect xfer to have worked.

Alistair Prestidge
  • 806
  • 1
  • 7
  • 19