November 2008 Archives

Fedora 10Fedora 10 was released 25 November (earlier this week), a mere six months after Fedora 9 made its debut. The Fedora community has been hard at work improving the distribution which is the descendant of Fedora Core and Red Hat Linux.


Looking over the release notes, it's obvious a lot of changes have been in the works. To name a few:

  • A new graphical boot system named Plymoth displays a simple, but effective boot progress screen that leaves old-school hackers like me feeling left out on the details.
  • PulseAudio has been rewritten to be "glitch-free." Makes you wonder why they didn't think of that in the first place. Having played (tried to play) Quake III with Fedora 9, I sincerely hope the experience under Fedora 10 is indeed, glitch-free.
  • As a KDE user, I am excited to see a more improved KDE4 platform. The kdepim package has been upgraded to 4.x so I hope to be enjoying a new kontact experience.
  • There's a new desktop alternative called LXDE. I'll have to try that out. It's a lightweight desktop which makes it perfect for those VNC sessions that come in handy from time to time.
  • My kids are already enjoying the new, improved versions of Extreme Tux Racer, Super Tux Kart, and other Fedora-bundled games.

But, unfortunately, I suck

About six weeks ago, I got involved with the Fedora Documentation Project with the aim of making a contribution to my prefered Linux distribution. After a handful of false-starts, I never did get acclimated to the contribution process, which involves learning about git (distributed version control), Fedora's docbook XML, the documentation project trac system, and Fedora's wiki-based stuff. I probably got about 80% through the process of learning how it all works but never got over the hump and actually started doing it.

My goal is to do that and be an active contributor for Fedora 11 and beyond. At the same time, I hope the documentation project leaders make an effort to decrease the "pain of entry" for those who may have lots to contribute but lack the experience working with the required tools.

Installing Fedora 10

I've installed Fedora 10 on four systems so far: three desktops and a laptop. On two of those, I did a network install by burning a bootable CD with the images/boot.iso image provided on the DVD.

One thing I noticed that is different doing network installs with Fedora 10 is that the network source can't just be a path to the ISO file. Instead, it needs to be the "exploded" ISO file directory structure. That's a little inconvenient as I don't like having to store the ISO and its exploded filesystem on my server resulting in about 9GB of used space instead of the normal 4.5GB.

Anaconda, the Fedora installer, has seen some subtle changes over the last couple of releases. One significant change is that the installer writes partition changes and formats filesystems much earlier in the installation process instead of waiting until package selection is finished.

Another change is the introduction of encrypted filesystem options. I haven't played with that yet.

One thing that is glaringly absent from Fedora 10 is the images/diskboot.img file which I have used in the past to create small bootable installation media using a USB flash drive.

It seems there is a way to do it still but you have to download a Live CD image (about 700MB) and use some commands to turn the Live CD ISO image into a bootable image you can write to a USB drive. There's lots of room for improvement here!

The systems I've installed on are as follows:

  • HP desktop, Intel P4 2.8Ghz, 512MB RAM, integrate i82865G graphics, 160GB SATA drive
  • Generic desktop, AMD Athlon 64 3800+, 1GB RAM, GeForce 6150LE integrated graphics, 80GB drive
  • Generic desktop, AMD Athlon XP 2500+, 1.3GB RAM, GeForce FX 5500 video, 2x 80GB drives
  • Dell Latitude D830N laptop, 2.6Ghz Core-Duo, 2GB RAM, NVidia Quadro graphics, 160GB SATA

Running Fedora 10

The only real problem I've encountered is on the HP desktop with games that required OpenGL accelerated graphics. Those games worked well on Fedora 8, but do not run accelerated on Fedora 10. Running glxinfo indicates direct rendering support is enabled, so I'm not sure what I need to do to get it working. If anyone has ideas, I'd love to hear them. Plus, my kids will enjoy playing SuperTuxKart on that computer again.

This weekend, I installed Scalix on a client's mail server. I had installed Scalix before, but it was a clean install with no old e-mail to migrate. This time, however, I had a lot of old e-mail to migrate.

Most of the users used Eudora for Windows. Others used the openwebmail web mail client. As a result, I had e-mail from three different sources to populate with:

  • Eudora locally-saved mailboxes (an almost mbox-format)
  • IMAP folders on the server, in mbox format
  • Standard mbox mailspool boxes (inboxes).

In preparation, I had read on a page on the Scalix site there were scripts to import mbox files into Scalix, but as it turned out, these scripts were for restoring a proprietary-to-Scalix backup mailbox format. Bleh.

The next best solution was to use an e-mail client that could import mbox mailboxes and move the messages to an IMAP folder. Thunderbird only imports a few formats on Windows and only imports Netscape Communicator on Linux. Bleh.

So, I tried kmail. It worked beautifully. At one point, I had three instances of kmail running in three different VNC sessions on the server funneling messages into Scalix. The only problem with kmail is that it required constant babysitting as I moved from mailbox to mailbox and user to user.

So, while kmail was cranking along on a large mailbox, I looked at CPAN to see what modules were available for dealing with IMAP and mbox file formats. It didn't take long before I had a script that would upload a user's messages. That worked great for the mbox mailspool files- there was one file per user.

Next were the IMAP/webmail mailboxes. I had copied them all into separate folders for each user, so to automate it, I needed a script that could go into each user folder and upload the messages from each of the mailboxes it found there. However, there were some mailboxes I didn't want to upload (e.g. Spam, Virus, Trash boxes). Others, I needed to rename to go into Scalix equivalents.

The following Perl script is what I came up with.


#!/usr/bin/perl

use Smart::Comments;
use Mail::IMAPClient;
use Mail::Box::Mbox;

my $users = [
    {   username   =>  'user1',
        password   =>  'password1', },
    {   username   =>  'user2',
        password   =>  'password2', }, ];

my $folder_translation = {
    'sent-mail'     =>  'Sent Items',
    'sentmail'      =>  'Sent Items',
    'saved-drafts'  =>  'Drafts',
    'saved-messages'=>  'Drafts',
};

my $ignore_folders = [ 
    'spam-mail', 
    'virus-mail', 
    'mail-trash', 
    'Junk',
    'Junk E-mail', 
    'Trash', ];

foreach my $user (@$users) { 
    if( -d "/export/imap/$user->{'username'}") {

        warn "Looking at $user->{'username'}\n";
        my $imap = Mail::IMAPClient->new(  
            Server => 'mail.example.com',
            User    => $user->{'username'} . '@example.com',
            Password=> $user->{'password'},) or 
            die "Could not log in as $user->{'username'}";

       
        opendir DH, "/export/imap/$user->{'username'}";
        my @files = readdir DH;

        FILELOOP:
        foreach my $file (@files) {
            if($file !~ m/^\./) {   # Skip hidden
                foreach my $ign (@$ignore_folders) {
                    if($file eq $ign) {
                        warn "Ignoring $file\n";
                        next FILELOOP;
                    }
                }
                my $translated_name = $file;
                foreach my $tr_key (keys %$folder_translation) {
                    if($tr_key eq $file) {
                        $translated_name = $folder_translation->{$tr_key};
                    }
                }

                # Ready to upload messages
                warn "Uploading $file to $translated_name\n";

                my $folder = Mail::Box::Mbox->new(
                    folder => '/export/imap/' . $user->{'username'} .  '/' . $file);

                my @folders = $imap->folders();
                if(! grep /^$translated_name$/, @folders) {
                    $imap->create($translated_name);
                }

                foreach my $msg ($folder->messages) { ### Uploading msgs |===[%]           |
                    my $uid = $imap->append($translated_name, $msg->string);
                    if(! $uid) {
                        warn "Could not append message\n";
                    }
                }

                $folder->close() or warn "Could not close Mbox connection $@\n";
            }
        }
        closedir DH;

        $imap->disconnect() or warn "Could not close IMAP connection $@\n";
    }
    else {
        next;
    }

}

About this Archive

This page is an archive of entries from November 2008 listed from newest to oldest.

August 2008 is the previous archive.

December 2008 is the next archive.

Find recent content on the main index or look in the archives to find all content.