The Mac Mini external SATA hack

So, finally as promised, here is my short picture walkthrough on how to do the Mac Mini external SATA hack.
I’ve added quite a few comments to the images.
And before you start complaining about the bad picture quality, I’ve shot the whole procedure with my non-HD DV cam, sorry. The pictures are from several takes, so they might differ at some stage.
Anyways, just click on the first image below to start the slide show – navigate by clicking the left or right side of the photo.
I hope you like it and please leave me a comment afterwards. Thanks!
Continue reading “The Mac Mini external SATA hack”

qmail greylisting patch

As a follow-up to my previous entry about greylisting, here is what I used for the setup: the greylisting patch at Bill Shupp’s wonderful qmail related site.

I’ve made some modifications to his patch to allow for sender address and sender domain based whitelisting.
You can get my patch here:

large-qmail-patch_greylisting-katastrophos.net-20061023.patch

The dbdef.sql file includes an example of how to set up a whitelist filter for a specific sender domain or sender address.

The patch is against Bill’s Large Qmail Patch 0.8.3.

qmail greylisting

Three weeks ago I’ve set up greylisting on our little qmail toaster. The technique works amazingly well on our setup:
The server used to get hit by round about 1600 mails each day. Roughly 70% of those were spam mails. Now, with greylisting activated, this amount has been reduced to just a dozen spam mails and around 350 – 400 legit emails:

qmail AWstats - snapshot taken on October 23rd, 2006.

The server load is also reduced because SpamAssassin and ClamAV are less busy filtering mails:

Average server load - snapshot taken October, 3rd 2006 - four days after setting up greylisting. Peaks are running backups.Average server load for the year. One can pretty clearly see the difference the qmail greylisting makes on the server load.Average server load for the month - snapshot taken October, 23rd 2006. Again, peaks are running backups. The big peak in week 39 was the time of compilation and deployment. Thereafter you can clearly see the drop of server load compared to beginning of week 39.

So, speaking for us, this experiment has been very successful. Exactly no real mails got lost, tons of spam was blocked at the SMTP level. Excellent. Now, let’s see how long the effects of this technique will last…

See http://projects.puremagic.com/greylisting/ to learn more about greylisting.

WD Raptor + Mac Mini Intel = external 10k rpm SATA madness

Alright, I had this crazy idea last week: Let’s see if I can somehow route the internal SATA interface of the Mac Mini to the outside of the case so I could attach a bigger and faster external (e)SATA drive. Well, guess I wasn’t the only person with such ideas:
Perle over at 123Macmini.com already has brief instructions on how he did the internal to external mod.
I’ve made some refinements to his process which I will post shortly – along with a few pictures and links where to get the parts. Update: It’s here.

So, after doing the science (finding the right adapters and cables etc.) and tearing apart the Mac Mini with a pizza cutter (yes, you read right!), I finally have my fast drive (Wester Digital Raptor WD1500ADFD 150 GB @ 10k rpm) and the Mac Mini is still as energy efficient as previously – mostly due to the fact that another FireWire drive is now in standby mode most of the time.

That should make me the first person with a WD Raptor in use on a Mac Mini. W00t! ;)

Obligatory XBench results that mean absolutely nothing:
Madness
Comparison with modded 7200 rpm Mac Mini

I’m using the Pleiades Super S-Combo external enclosure with the WD Raptor. The enclosure is made of aluminium. No cheap plastic parts here. It’s pretty solid and the aluminium functions as passive heatsink. That way, even under load the Raptor won’t cross the upper 55°C specification limit. My initial thought was that given the S-Combos universal FW400/FW800/USB2.0/eSATA-bridge it may perform worse than when connecting the cable directly to the drive. This is not the case. Actually, some benchmarks performed slightly better. I can only assume this being due to some sort of caching going on inside the bridge.
Also, if you think the drive is loud with its 10000 rpms, I can assure you it isn’t. Actually, in idle mode it is very much on par with the latest Seagate Barracuda drives which have a reputation for being very silent. The only thing that’s loud are the access noises, but in my opinion it’s not annoying.

vpopmail – maildrop – SqWebMail mailfilter patch

On our production mail server we’re using a so called qmail toaster setup. It’s essentially the same setup as described by shupp.org. However, instead of using SquirrelMail for webmail, we opted for SqWebMail and maildrop. The nice thing about SqWebMail is that it offers a web interface for configuring the maildrop mailfilters. That way, every user can configure their filtering rules individually.

The problem here is that vdelivermail (of vpopmail) doesn’t support those mailfilter files. For that to work we need vdelivermail to call maildrop to process those files on an individual basis. However, this requires to setup the processing instructions for every mail account manually. Of course, this is unbearable on a large setup.

We came up with a patch for vdelivermail that automatically chain-calls maildrop if it finds a mailfilter file in the domain’s account directory. Some parts are based on another patch which source I forgot. I mainly extended it to be less strict and to publish certain internal vpopmail/vdelivermail variables as environment variables that could be used inside the mailfilter – namely username, userdir, domainname, domaindir.

If it finds the file in the domain’s directory, it will delegate the mail to the domain-wide mailfilter.
The domain-wide mailfilter will delegate the mail to the users mailfilter if it exists. If not, it will simply do a standard mail delivery to the account’s INBOX.

If vdelivermail can’t find any domain-wide mailfilter it will simply default to standard mail delivery to the account’s INBOX.

Here is the patch against vpopmail 5.4.17:

vpopmail-5.4.17-vdelivermail.c-maildrop.patch

If you’re too lazy to patch the vpopmail sourcecode yourself, here is the already patched vdelivermail.c:

vdelivermail-5.4.17-maildrop.c

(Rename it to vdelivermail.c and place it in the vpopmail source directory and compile.)

Continue reading “vpopmail – maildrop – SqWebMail mailfilter patch”

C3200 Tweak #2: Improving Samba performance

The preinstalled Samba server on both Cacko and standard Sharp ROM proves to be notoriously slow. This is mostly due to the strict syncing that’s enforced in the smb.conf – probably to avoid data loss. IMHO, it’s rather safe to disable this behavior and in turn get a nice speed bump. Here is how to do that:
On Cacko first delete the default link to the ROM copy of smb.conf:

sudo rm /etc/samba/smb.conf

Now, copy over from ROM and modify the copy:

sudo cp /usr/lib.rom/samba/smb.conf /etc/samba/smb.conf
sudo mcedit /etc/samba/smb.conf

Comment out lines

strict sync = yes
sync always = yes

Change the socket options line to

socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=131072 SO_SNDBUF=131072

Please remember to reconnect the mounted samba share on your desktop system.
In my case the transfer rate on my Buffalo 10Base-T CF-Card jumped from 350 KB/s to over 820 KB/s.