Saturday, November 6, 2010

The big move

Today my goal is to move all of the email services off of pal and onto cloudy/posty.  Cloudy will host the email webapps, and posty will be the IMAP server.  Servy is still the main email gateway and SMTP server, since he's the only computer in the DMZ (directly connected to the internet).

Last weekend I installed squirrel mail and ox6 onto cloudy and set up posty as the IMAP server and final distination for email on the LAN.  Today, I need to:

  1. Configure ox6 with the real context and users
  2. Disable on pal and posty so no new mail is delivered
  3. Move the Maildir directories from pal to posty
  4. Change the mail gateway on servy to point to posty as the final delivery point for kamradtfamily.net
  5. Change apache on servy to point to cloudy for the email webapps.
  6. Re-enable the mail on posty.

Configuring ox6 with a real context and users, is through a CLI, and I've read through several install guides to get a feel for exactly what's needed.  First of all, I deleted the test context I created last weekend.  Then I created the main context and users to match what is on Pal.  (I'm sure I could have imported the database from pal, but I wanted to go through the motions, so I knew what I was doing).  Then I can test it all out via a web browser pointed at cloudy.  So the login screen came up, but the login failed.  Time to debug.  The ox6 logs say they couldn't log on to IMAP, so I look in posty's mail log, and find this from wednesday:  Fatal: Time just moved backwards by 11 seconds. This might cause a lot of problems, so I'll just kill myself now.  So note to self, set up an IMAP ping in nagios which I use to monitor the network.  That clears up one error, but now I have another error in the ox6 log HTTP_JSON failed.  I had this all working, what could be different?  Apache's log shows access to /ajax/login, all with OK status, no errors in the error logs.  All /ajax requests are forwarded to tomcat via port 8009.  All services seem to be up and running now, but still no login.  There must be something different about how I created the context/users, since that all that is different between now and the previous setup.  So I found the exact same install guide that I used previously here, and lo-and-behold there were two options that I missed when creating the context according to the official install guide.  Deleting the context once again and creating it with the -L defaultcontext and --access-combination-name=all options now allows me to log on.

Time to shutdown the email on pal and posty and transfer the Maildir directories.  The Maildir directories hold your mail box, and any folders that you have created or that have been created for you.  Transferring them from on machine to another should be a simple scp, but we shall see...

So much for simple, on to plan b.  Pal has courier IMAP and posty has dovecot, and apparently they have different Maildir folders structures. I could see all mail in the INBOX, but no folders.  I will probably have to install courier IMAP on posty, but for now I'm going to restore the mail on pal, and take a break and think about it.

No comments:

Post a Comment