OpenBSD Email support

Posted on July 29th, 2004 in Unfiled by stickyc || No Comment

So begins a long series of posts/logs of my attempts to get a complete email solution up and running on an OpenBSD box.

Alas, I should have started blogging this from the beginning, but I didn’t really think of it until now. I’ll try and fill in the gaps and clean this all up as I go. the intent is to document my hurdles and gotchas and provide some “this is what works/doesn’t work” guidance for others who are attempting the same thing.

The goal - A one-stop e-mail solution that:

  • Funnels in all of the emails from my various accounts (Yahoo!, a few scattered POP accounts, HotMail, .Mac, etc.)
  • Stores them on a central server, rather than a mailbox on one of my clients.
  • Supports IMAP, and secure communications (so I can read mail from anywhere without fear of someone sniffing my packets).
  • Gives me constant feedback on what’s going on with the server.
  • Has some sort of backup/mirror/raid solution so if the server does crash, I’m not FUBAR.

The plan looks like this: Fetchmail accesses my accounts on other servers and forwards emails from them to Postfix. Postfix also handles email coming directly to my home server. Postfix then hands off the emails to Amavis. Amavis washes the mails through SpamAssassin (checks for Spam using a variety of statistical comparisons), DCC, and Razor (which both check the emails against known spam emails), and then ClamAV (an Open Source virus scanner). Depending on the results of the scanners, Amavis passes the emails through, tags them as spam, or cleans/trashes the infected ones. Passed/tagged emails are then filed by Procmail into their correct IMAP Mailbox folders (Inbox, Junk, etc.). Using an IMAP mail client, I connect to the mailserver using SSL (encryption) and Dovecot handles the IMAP interface between the client and my Mailbox folders. Alternatively, I can make a secure connection via a web browser to the webmail application (IMP or Squirrelmail) which can access my Mailbox folders through Dovecot. A clone of the entire server is backed up on a regular basis to an external machine/drive so even if the power supply detonates and takes out the whole system, the other drive won’t get eaten.

At this point, I’ve got The Email side of things more or less working. I followed the excellent tutorial by Scott Vintinner: Fairly-Secure Anti-SPAM Gateway Using OpenBSD, Postfix, Amavisd-new, SpamAssassin, Razor and DCC and the follow up tutorial: Adding ClamAV Anti-Virus to an Anti-SPAM Gateway. Spam is filtered, I can read email with an IMAP client (using Thunderbird for now), reports are generated. No viruses have been trapped as of yet. I also set up some basic Procmail rules to automagically file some of my mailing list emails.

Using the docs here: Generating a Whitelist from Maildir for A-S-K, I pumped all of my good email boxes through Andy Blyler’s Perl script to create a whitelist (you’d be suprised how often my friends send me mis-categorized emails about mortgages and viagra).

I can’t find the URL for it, but I found a good page that documents how to install Dovecot, a fast, secure, open source IMAP server on OpenBSD, so I did that.

More or less following the instructions here: Automatic Backups with rsync and Anacron, I set up another OpenBSD box with a spare HD that the email box rsyncs to. At this point, I’m firing off the rsync manually as I’m trying to minimize the number of computers left on 24/7 in this place.

So, I have an IMAP server that’s only accessible via SSL. I’ve run it past the ORBS Open Relay tests with no insecurities found, and I have fetchmail grabbing mails from my other POP/IMAP accounts and dumping it onto the home server. There are plugins out there for HotMail, I’ll research them later.

Bugs: Several recipient based rules in Amavis are failing. I’m thinking this has something to do with Fetchmail’s grab-and-SMTP-Forward system. I have a feeling it’s Postfix’s issue, not Fetchmail’s. If so, the only solution is to tweak the rulesets in Amavis. An example of one of the rules that fails is the one attached to localdomainsacl, which specifies which hosts Amavis should scan incoming mail for. Typically, this would just be $mydomain, but after Fetchmail passes the emails to Postfix, they’re all for “recipient@localhost” instead of the real $mydomain.

Dovecot has some bug in it that’s chewing up the mailbox index headers. Despite how bad it sounds, it doesn’t appear to be fatal. It just gives the mail clients fits sometimes. It’s apparently a known issue and is already fixed in the latest snapshot. There’s other bugs in the current snapshot, so I think I’ll wait for stable to upgrade.

My SSL certificate is expired/unofficial. I need to read up on how to get a “real” or at least unexpiring certificate.

Rsync wont copy a few files. Even with –archive. There’s probably some kind of exception files that rsync can never touch. As long as the major configuration files are backed up, it’s a back-burner issue for me.

To do:

  • Get firewire working in the OpenBSD kernel so I can plug in an external drive for backups, rather than using a whole other box.
  • Install a webmail solution - this is a big effort as most require MySQL, PHP, and a half-dozen other bits and pieces and OpenBSD is pretty bare-bones out of the box. The two big candidates are Squirrelmail and IMP/HORDE. IMP looks awesome but looks to be a pretty involved install. The Squirrelmail site is down, so I’ve no idea what that’s like.
  • Install some Dynamic DNS agent to update DynDNS.org when my IP changes. You’d think Linksys would have this feature working in their firewalls or remove it altogether, but it’s still there and it’s still broken.
Next up: Install a webmail solution!

Airport Express first impressions

Posted on July 19th, 2004 in Unfiled by stickyc || No Comment

Being the early adopter and music geek that I am, as soon as I found out our local Apple store had the Airport Express in stock, I picked up a pair of them with the intent that I’d replace the two Turtle Beach Audiotrons that I’d been wrestling with off and on for years. I’ll leave the detailed walk-throughs to the better authors out there and just bullet-point some first impressions: -Setup on the Mac side was amazingly easy. Plug the device in, install the software, and run the setup wizard. Why cant all network configuration be this easy? -Setting the 2nd AE to act as an extension of the existing network was just a matter of checking a box. Setting up a dual access-point network is something I’ve wanted to do for a long time (the house is just too big for 1 ap to cover all of it well), but couldn’t find any hints on how to go about it. One checkbox! -Getting the Windows boxen to work with it was far more difficult. I dont use iTunes on Windows, so my only goal was to get the wifi working. It turns out that when you input the passkey on the Mac, it’s taken as ASCII and not hex, so you need to jump to another window to find out what the actual WEP key being used is (see my earlier log entry for an excellent website covering this). -Over the course of my troubleshooting, I discovered that neither device seems to reset as described. Both the hard and soft-reset failed to return the AE’s to their default or factory states. Dang weird, that. Also, if you should set up two devices with the same SSID and different passwords, getting to a single device to change the settings becomes an excercise in frustration. -Apparently, iTunes broadcasting to the devices only works via wifi, this is a major concern for me as my iTunes is broadcast from a Cube with 802.11b only and the connection is just iffy enough to cause the stream to stutter. Not sure what to do about this - I see a home-brew antenna in my future. -Kudos to Apple for amazing industrial design. The combination standard headphone jack/digital audio TOSlink/optical jack is very slick. The only downside being if you want TOSlink or optical, you need a custom cable - $40 from Apple. Hopefully, some cheaper clones will show up on the shelves soon.

Problems connecting an XP PC to a WEP enabled Airport Extreme Base Station

Posted on July 19th, 2004 in Unfiled by stickyc || No Comment

Problems connecting an XP PC to a WEP enabled Airport Extreme Base Station Found this while setting up the Airport Express base stations - saved me from pulling out what little hair I had left.

Bikes Against Bush

Posted on July 16th, 2004 in Unfiled by stickyc || No Comment

Bikes Against Bush This gets my vote for most innovative use of technology I’ve seen this week. JK doesn’t like George Bush and is taking his message to the people. He’s created a bike-towed large-scale dot matrix printer that draws messages in chalk while being pulled along. But that’s not all there is. The printer is driven by a laptop that’s connected to a mobile phone via Bluetooth. People can send SMS messages to the mobile phone, which then get transmitted to the laptop and end up written on the street. Geez, and my best hack is upgrading the drive in my TiVo…

Humax, TiVo team on 300-hour recorder | CNET News.com

Posted on July 16th, 2004 in Unfiled by stickyc || No Comment

Humax, TiVo team on 300-hour recorder | CNET News.com Is 300 hours really neccessary for 1 television? This kind of storage seems better suited for a multi-display/multi-room media server, rather than a single-display appliance.

bitoogle :: the bit torrent file search engine (bittorrent)

Posted on July 14th, 2004 in Unfiled by stickyc || No Comment

bitoogle :: the bit torrent file search engine (bittorrent)

redemption in a blog: RSS feed integration in Firefox

Posted on July 14th, 2004 in Unfiled by stickyc || No Comment

redemption in a blog: RSS feed integration in Firefox

Livemarks allow you to bookmark an RSS feed and these appear as bookmark folders, with individual items in the feed appearing as bookmarks. Just click on the “bookmark” and you will be taken to the page the item in the RSS feed is pointing to.

Mozilla Firefox 1.0 Roadmap

Posted on July 14th, 2004 in Unfiled by stickyc || No Comment

Mozilla Firefox 1.0 Roadmap Looks like the Firefox team is looking to release the almighty version 1.0 around the mid-September time frame. Excellent! Firefox is already my browser of choice, there’s so much more to love here than with IE. It’s a non-intrusive install, so why not check it out? Mozilla.org

Media Center Extender for Xbox

Posted on July 14th, 2004 in Unfiled by stickyc || No Comment

Media Center Extender for Xbox Aha, so Microsoft IS working on an XBox Media Center clone. Too bad I didnt know about this sooner, I already ordered my mod chip…

Kempa.com: Vinyl Data

Posted on July 14th, 2004 in Unfiled by stickyc || No Comment

Kempa.com: Vinyl Data

One strategy that major record companies have been employing lately to deter downloading is adding bonus computer content to new CD releases. I recently discovered that this technique is not unique to CD’s, but had in fact been practiced in the vinyl era as well. That’s right: there were a handful of records released in the late 70’s and early 80’s that contained computer programs as part of the audio. This is totally insane, and totally great.

Jedi Archives Clones Long Room, Trinity Attacks [Archeire, Irish Architecture Online]

Posted on July 9th, 2004 in Unfiled by stickyc || No Comment

Jedi Archives Clones Long Room, Trinity Attacks [Archeire, Irish Architecture Online] Lest anyone still think that all of Lucas’ creations are original (whaddaya, stoopid??), check out this comparison between the Jedi Archives and the library at the Trinity College of Dublin.

LARGE SIMPLE HOVERCRAFT

Posted on July 9th, 2004 in Unfiled by stickyc || No Comment

LARGE SIMPLE HOVERCRAFT Ahh, my next weekend project. Seems a little easier than building a full sized Mech or Star Destroyer.

Toms Hardware Guide Graphics Cards: Performance Leap: NVIDIA GeForce 6800 Ultra

Posted on July 8th, 2004 in Unfiled by stickyc || No Comment

Toms Hardware Guide Graphics Cards: Performance Leap: NVIDIA GeForce 6800 Ultra

12.000 points in 3DMark 2003. A score of over 60.000 in AquaMark 3. Over 60fps in Halo at 1600×1200 and more than 50fps in FarCry with High FSAA and 4tap anisotropic filtering at 1024×768 - these are numbers that will bring tears of joy to PC enthusiasts everywhere.
Holy cow, the performance on this beast is insane! Granted, it costs almost as much as the system it’d be going into, is $600 really too much to pay for a nosebleed?