Fixing cyrus

Yeah, I did something stupid and had to reinstall my server OS — again. I thought I’d be OK but my mail backup was about a day old. I’ve used mailbfr before and it worked great but this time I kept getting errors. It seemed that mailbfr wasn’t copying over the skipstamp file.

What I did was to copy this file manually then run some of the commands that system.log reported as not being run properly.

sudo cp /mailbfrBackups/mailbackup/cyrus_config_DIR/imap/db/skipstamp /var/imap/db
sudo /usr/bin/cyrus/bin/reconstruct -p default -i
sudo su _cyrus /usr/bin/cyrus/bin/reconstruct -i
sudo -u _cyrus /usr/bin/cyrus/bin/cyrus-quota -f

So far I think I’ve got all my users and mailboxes back. Of course all the email is now listed as unread, but I expected that.

Of course Alex came back with the real answer which was the following in mailbfr.

sudo mailbfr -f
sudo mailbfr -o

And all is well. I think.

Of course, it didn’t work as expected. I ended up reinstalling the OS and then fixing only specific users mailstores. Once everything was working I then updated the OS to 10.5.2 and now everything works.

Unforeseen Circumstances

Due to unforeseen circumstances I accidentally trashed my server installation. Don’t ask me for details but I think I accidentally unloaded all my launch daemons. I figured no big deal just restart the machine and everything’s fine. Not so fine.

I restart and my mail server doesn’t seem to be working correctly.

Several reinstalls later and I would still have a wonky mail server. It only got screwy after I tried to restore my mail stores. I was using mailbfr so it should have gone smoothly.

After several attempts I decided to change my plan. I reinstalled the OS, and didn’t update the software to 10.5.2. I then copied over calendars, files, etc. after setting up the server software.

Then I hand edited the SpamAssassin local.cf file to it’s previous settings and used mailbfr to selectively restore only specific users. Everything’s working. So I let it chug along checking my logs and finally decide to do the Software Update.

Everything’s still working. My wife thinks I should not run my own server as the aggravation is so great. I told her that it only continues to demonstrate how little comparative aggravation I receive from her. :-)

Webmail Authentication

OK, my problem with my webmail and my Thunderbird user are fixed. Here’s what happened. When I was setting up my server install with the AppleCare rep on the phone he said to check CRAM-MD5 and Plain for authentication. This inside of Server Admin.

It turns out that the default authentication method for SquirrelMail is login so out of the box it needs to be checked. I think, though I cannot confirm, that it might also be the default authentication method for Thunderbird.

You can change the preferences in SquirrelMail using the following command.

/usr/share/squirrelmail/config/conf.pl

Apple USB Ethernet Adapter - solution

Peter Sichel of Sustainable Softworks is a genius. Seriously. He’s not only just updated his USB to Ethernet Adapters for Mac OS X to work with the recently released Apple-branded USB Ethernet adapter, but he sent me a comment letting me know.

I’ve just installed the USBAx8817x 1.0.3b10 release and it seems to be working.

Peter emailed me to let me know his sources inside Apple report that the driver in 10.5.2 should correctly with Apple’s adapter. You will have to remove Peter’s driver to see if this works. I’ll try it when I get the server back from repair as I’ll have to re-install the OS anyway.

In for repairs

Well, I’m going to try and clone my server and run it off the booted external firewire drive until I get my server’s ethernet port fixed.

I can only hope it goes well. Wish me luck. And yes I’m backing up.

Apple USB Ethernet part 2

Well, after spending several hours on the phone with AppleCare is seems that my mini’s ethernet port went belly up at the exact same time I tried to install the Apple USB Ethernet adapter.

It seems my ethernet port recognizes a connection but just doesn’t transfer data. I did boot from an external firewire drive and confirmed this. Crap, now I have to take my server in for repairs.

Out of curiosity I created a bootable backup of the drive and was able to boot it from G5 mini where the install is on an Intel mini. Curious, but lucky.

Now I have to figure out and try to document all the extras that I put into my server install to replicate. I was told by AppleCare that I should re-install the server OS after.

Apple USB Ethernet adapter

Don’t use this adapter on any Mac except the MacBook Air

At least not yet. Here’s why. The Apple USB Ethernet adapter loads just fine but it identifies itself with a BSD Device Name of en0. The problem with this is that your Mac’s built-in ethernet adapter also is identified as en0.

I bought this to be an extra ethernet adapter to use with a Mac mini I’m using as a server. What’s happened is my built-in ethernet is now non-functional. It seems to reset for about a minute then ceases to work. I think what’s happened is my Mac mini now only wants to see en0 as the USB Ethernet adapter and no longer associates en0 with my built-in ethernet. No amount of restarting seems to fix this.

I need to call AppleCare. Hopefully they can fix it and still figure out how to make the Apple USB Ethernet adapter assign a non-utilized BSD Device Name when it’s added in the Network Pref pane.

Forwarding Email in Leopard Server

OK, to put it mildly the Workgroup Manager and Email in Leopard Server has some quirks and problems.

I and others noted that a user whose email was set to forward would give a 550 error about not being able to access the users mailbox or the mailbox wasn’t set up. Well, since the mail is only forwarded the user really shouldn’t require a mailbox. It seemed to work in 10.5 but seems more broken in 10.5.1.

I think I found a fix, though I’m sure it’s not elegant. The problem seems to revolve around virtual mail hosting. I have 6 virtual mail hosts. It seems you need to add the virtual domains to the /etc/postfix/main.cf file.

The fix centers around the following line in /etc/postfix/main.cf.

mydestination = $myhostname,localhost.$mydomain,localhost

It seems that adding your virtual domain to the end of that list fixes the problem. It seems to work. Or at least it’s worked here for me. YMMV. Here’s what I did. I added $virtual_mailbox_domains to the end of mydestination so that in now reads..

mydestination = $myhostname,localhost.$mydomain,localhost,$virtual_mailbox_domains

I really hope the next update fixes some of these things. I also get the following error in the mail.log…

Feb 6 16:26:01 xxxxxx postfix/trivial-rewrite[34363]: warning: do not list domain vdomain1.com in BOTH mydestination and virtual_mailbox_domains

It doesn’t seem to cause any problems and it does forward without giving the sender an error. If anyone has a better solution let me know. BTW, this is not a recommended solution.

Don’t forget to sudo postfix reload

WordPress SVN

OK, since I’ve switched over to WordPress I have to admit it’s been pretty painless. I decided to go with the SVN update process since I know it’s much easier. But the monkey wrench in the process is having to switch to the new checkout for every stable release.

So instead of

$ cd ./blog
$ svn up

I have to do the following.

$ cd ./blog
$ svn sw http://svn.automattic.com/wordpress/tags/2.3.2/
$ svn up

Why isn’t there a symlink for the latest stable release? Then I could set up..

$ svn sw http://svn.automattic.com/wordpress/tags/current

and be done with it.

iPhone post

I’m just testing the iPhone posting with the new 1Password integration. I can only say one thing. Awesome.