Transferred domains; mail gone

I have just switched from CentOS 4.8 to Ubuntu 10.04.2. I backed up all domains before and restored into ubuntu. That went ok except for the email and php.

Email: all email disappeared. Its still in the /home/domain/homes/xxx/mail dirs but doesn't show up in the email programs and imap folders seem to be gone as well. How do we get access to all of our old mail the way it was?

The problem with php is just a version issue (5.3). I'm looking at trying to go back to 5.2 until the sites can be made to work in 5.3. For this I was going to try something like this: http://ubuntuforums.org/showthread.php?t=1447401

As far as I can tell everything else went very well.

Thanks, Steve

Status: 
Closed (fixed)

Comments

Could you do an "ls" on one of the "/home/domain/homes/xxx/mail" directories?

I'd like to see the configuration of the email within it.

Normally, email is stored in a directory called "Maildir". So, it's possible it was using Maildir, but with a different directory name. Or, it's possible the mail format isn't in a maildir-style, meaning some other things would need to be tweaked.

I believe the mail issue is fixed. Changed the maildir from "Maildir" to "mail". All imap folders reappeared with old mail in email clients.

I do really need to get the php issue resolved. I started following this guide: http://ubuntuforums.org/showthread.php?t=1447401

but when I try to remove php packages with

dpkg --remove php5 php5-cgi php5-cli php5-common
dpkg: dependency problems prevent removal of php5:
 virtualmin-base depends on php5; however:
  Package php5 is to be removed.
dpkg: error processing php5 (--remove):
 dependency problems - not removing
dpkg: dependency problems prevent removal of php5-cgi:
 virtualmin-base depends on php5-cgi; however:
  Package php5-cgi is to be removed.
dpkg: error processing php5-cgi (--remove):
 dependency problems - not removing
dpkg: dependency problems prevent removal of php5-cli:
 php-pear depends on php5-cli.
dpkg: error processing php5-cli (--remove):
 dependency problems - not removing
dpkg: dependency problems prevent removal of php5-common:
 php5-mysql depends on php5-common (= 5.3.2-1ubuntu4.7); however:
  Package php5-common is to be removed.
 php5 depends on php5-common (>= 5.3.2-1ubuntu4.7).
 libapache2-mod-php5 depends on php5-common (= 5.3.2-1ubuntu4.7).
 php5-cli depends on php5-common (= 5.3.2-1ubuntu4.7).
 php-pear depends on php5-common (>= 5.3.2-1ubuntu4.7).
 php5-gd depends on php5-common (= 5.3.2-1ubuntu4.7); however:
  Package php5-common is to be removed.
 php5-cgi depends on php5-common (= 5.3.2-1ubuntu4.7).
dpkg: error processing php5-common (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 php5
 php5-cgi
 php5-cli
 php5-common

How can I remove php5.3 so I can switch to php 5.2 from "karmic" repos without breaking vm? Thanks, Steve

Well, you have to be careful with the email -- I'd recommend making sure that they can also send and receive new emails. If you change the directory name, that may leave several config files pointing to the wrong directory.

damnit mail isn't working. Can see old mail, can't send or receive. I did add support login priv.

What happens when you try to send email? What error do you get in your mail client?

You can also take a peek in /var/log/mail.log to see if there's any error messages in there.

no error in mail client.

Here is a

tail /var/log/mail.err
Mar 26 07:53:58 onyx dovecot: IMAP(steveh.evisualwww): fchown(/home/evisualwww/homes/steveh/mail/.imap/INBOX/dovecot.index.tmp, -1, 8(mail)) failed: Operation not permitted (egid=1002(evisualwww), group based on /var/mail/steveh.evisualwww)
Mar 26 07:53:58 onyx dovecot: IMAP(steveh.evisualwww): fchown(/home/evisualwww/homes/steveh/mail/.imap/INBOX/dovecot.index.log.newlock, -1, 8(mail)) failed: Operation not permitted (egid=1002(evisualwww), group based on /var/mail/steveh.evisualwww)
Mar 26 07:53:58 onyx dovecot: IMAP(steveh.evisualwww): fchown(/home/evisualwww/homes/steveh/mail/.imap/INBOX/dovecot.index.cache.lock, -1, 8(mail)) failed: Operation not permitted (egid=1002(evisualwww), group based on /var/mail/steveh.evisualwww)
Mar 26 07:53:58 onyx dovecot: IMAP(steveh.evisualwww): fchown(/home/evisualwww/homes/steveh/mail/.imap/INBOX/dovecot.index.tmp, -1, 8(mail)) failed: Operation not permitted (egid=1002(evisualwww), group based on /var/mail/steveh.evisualwww)
Mar 26 07:55:55 onyx dovecot: POP3(ebonat.evisualwww): fchown(/home/evisualwww/homes/ebonat/mail/.imap/INBOX/dovecot.index.tmp, -1, 8(mail)) failed: Operation not permitted (egid=1002(evisualwww), group based on /var/mail/ebonat.evisualwww)
Mar 26 07:55:55 onyx dovecot: POP3(ebonat.evisualwww): fchown(/home/evisualwww/homes/ebonat/mail/.imap/INBOX/dovecot.index.log.newlock, -1, 8(mail)) failed: Operation not permitted (egid=1002(evisualwww), group based on /var/mail/ebonat.evisualwww)
Mar 26 07:55:55 onyx dovecot: POP3(ebonat.evisualwww): fchown(/home/evisualwww/homes/ebonat/mail/.imap/INBOX/dovecot.index.tmp, -1, 8(mail)) failed: Operation not permitted (egid=1002(evisualwww), group based on /var/mail/ebonat.evisualwww)
root@onyx:/var/log# tail mail.err
Mar 26 07:53:58 onyx dovecot: IMAP(steveh.evisualwww): fchown(/home/evisualwww/homes/steveh/mail/.imap/INBOX/dovecot.index.tmp, -1, 8(mail)) failed: Operation not permitted (egid=1002(evisualwww), group based on /var/mail/steveh.evisualwww)
Mar 26 07:53:58 onyx dovecot: IMAP(steveh.evisualwww): fchown(/home/evisualwww/homes/steveh/mail/.imap/INBOX/dovecot.index.log.newlock, -1, 8(mail)) failed: Operation not permitted (egid=1002(evisualwww), group based on /var/mail/steveh.evisualwww)
Mar 26 07:53:58 onyx dovecot: IMAP(steveh.evisualwww): fchown(/home/evisualwww/homes/steveh/mail/.imap/INBOX/dovecot.index.cache.lock, -1, 8(mail)) failed: Operation not permitted (egid=1002(evisualwww), group based on /var/mail/steveh.evisualwww)
Mar 26 07:53:58 onyx dovecot: IMAP(steveh.evisualwww): fchown(/home/evisualwww/homes/steveh/mail/.imap/INBOX/dovecot.index.tmp, -1, 8(mail)) failed: Operation not permitted (egid=1002(evisualwww), group based on /var/mail/steveh.evisualwww)
Mar 26 07:55:55 onyx dovecot: POP3(ebonat.evisualwww): fchown(/home/evisualwww/homes/ebonat/mail/.imap/INBOX/dovecot.index.tmp, -1, 8(mail)) failed: Operation not permitted (egid=1002(evisualwww), group based on /var/mail/ebonat.evisualwww)
Mar 26 07:55:55 onyx dovecot: POP3(ebonat.evisualwww): fchown(/home/evisualwww/homes/ebonat/mail/.imap/INBOX/dovecot.index.log.newlock, -1, 8(mail)) failed: Operation not permitted (egid=1002(evisualwww), group based on /var/mail/ebonat.evisualwww)
Mar 26 07:55:55 onyx dovecot: POP3(ebonat.evisualwww): fchown(/home/evisualwww/homes/ebonat/mail/.imap/INBOX/dovecot.index.tmp, -1, 8(mail)) failed: Operation not permitted (egid=1002(evisualwww), group based on /var/mail/ebonat.evisualwww)

Sorry for slow responses...have to keep checking this webpage.

It looks like the email was in mbox format. We went over how to use the mb2md program to convert mbox email to maildir (also, Virtualmin's "copy-mailbox" command line option can provide similar functionality).

Although this isn't officially supported by Virtualmin, we also discussed how to install PHP 5.2 on Ubuntu 10.04, which can indeed by done using the instructions found in the Ubuntu forums. PHP would need to be removed using the --force-depends option, which turns dependency errors into warnings. This again isn't something the Virtualmin staff can support, but for anyone eager to see PHP 5.2 on Ubuntu 10.04, with a little tinkering it should be capable of working :-)

Thank you for all of the excellent help, Eric :)

Automatically closed -- issue fixed for 2 weeks with no activity.