ASRock E3C226D2I Mini ITX motherboard and “Host is powered OFF or is in Sleep Mode.”

The ASRock E3C226D2I motherboard has great features for a nice Mini ITX SOHO server or NAS (more details to follow in a later post), but it also has its quirks when it comes to the two RAM slots.

So, if you encounter the following error message when accessing the remote console (using the Java applet):

Host is powered OFF or is in Sleep Mode.

Or if you see no output (a blank screen) at boot-time on a display connected to the VGA port, check that the RAM DIMMs are sitting correctly in the RAM slots. This is a bit tricky as first, there’s usually not a lot of maneuvering space in a Mini ITX case,  so applying pressure is difficult, second this motherboard’s RAM slots are particularly tricky to handle.

My advice is to unplug the device, unlock a RAM slot, then try inserting the DIMM (in correct orientation, check the notch!) smoothly with low and equal pressure on both sides. Once it’s more or less equally placed in the slot, apply firm pressure on the top of the DIMM at the side opposite of the slot’s open lock until you hear a click sound of the DIMM snapping in. Then apply firm pressure on the other side of the DIMM till that part snaps in with an audible click too (the lock will close).

Sounds pretty standard? It actually is, with the exception that this board’s RAM slots require a lot more pressure for the DIMMs to snap in than with most other motherboards out there.

Turn off drop shadows on Mac OS X screenshots

Philip’s post about More OS X Leopard Tips & Tricks is quite dated, but basically, all the valuable tips there are still valid.

Among them also the tip how to get rid of the (usually annoying) drop shadows that Mac OS X adds to screenshots (enter the commands in a terminal window):

defaults write com.apple.screencapture disable-shadow -bool true
killall SystemUIServer

Adding shadows again:

defaults delete com.apple.screencapture disable-shadow

Mac OS X Server: Prevent “missing Bluetooth keyboard” startup interruption

Sometimes, it may seem convenient to quickly connect a Bluetooth keyboard and a Bluetooth mouse to a Mac OS X Server machine for administration. The not so intuitive consequence of this however is, that at future startups, if there’s no keyboard or mouse connected to the machine (which is the common case with servers), Mac OS X will by default fall back to searching for that once connected Bluetooth keyboard or mouse and even stops booting when it doesn’t find them.

In order to prevent this, do the following on your Mac OS X Server:

  1. Open Bluetooth Preferences
  2. Disconnect and remove any associated Bluetooth devices
  3. Click the “Advanced…” button
  4. In the advanced Bluetooth settings, deselect both “Open Bluetooth Setup Assistant at startup if no keyboard is detected” and “Open Bluetooth Setup Assistant at startup if no mouse or trackpad is detected”
  5. Unless really needed, disable Bluetooth on a server. So, better grab a USB keyboard and mouse next time you need to do some admin ;)

Screen Shot 2014-06-24 at 13.43.52

Screen Shot 2014-06-24 at 13.44.40

macvim – Vim for the Mac

When using Mac OS X, I used to use the CLI vim by the excellent Homebrew package manager.

Now I’ve just stumbled over macvim, which is kind of a “deluxe vim” for Mac OS X, including adjusted key bindings for the Mac and a GUI menu, supporting Cocoa file dialogs, among others.

It’s highly recommended if you want to have the best of both the CLI and GUI editor worlds.

Download

Using IRC on the go

Running the console IRC client weechat (not to confuse with the wechat messenger) in a screen or tmux session on a Linux (or Mac OS X) server and accessing it trough mosh is a great way to use IRC on the go, i.e. with a unsteady Internet connection.

P.S. Thanks to Devaux and rmeyer for the hints

Zimbra ZCS: OpenDKIM not running

After upgrading Debian, OpenDKIM sometimes stops running or fails to properly restart. If you don’t actively monitor your ZCS server, the only way to detect this is either through a growing mail queue of unsent messages or through a note in the ZCS server admin panel.

Usually, manually restarting either OpenDKIM itself or the whole ZCS server once “fixes” the problem:

# service zimbra restart

or

# /etc/init.d/zimbra restart

In other cases, fixing the permissions may help:

# /opt/zimbra/libexec/zmfixperms -verbose -extended

(source)

System information on Mac OS X

Mac OS X comes with a pretty useful tool to list all the details about your system:

# system_profiler

E.g. to find out whether your RAM supports ECC:

# system_profiler|grep ECC
          ECC: Disabled

Or wether your SSD supports TRIM:

# system_profiler|grep TRIM
          TRIM Support: Yes

Some helpful Git resources

A friend recently told the following joke:

“The idea that git can be used offline is an illusion – you still need connectivity for googling which arguments to pass to what command.”

That’s an exaggeration, of course, but as always, there’s a grain of truth in it. So here we go:

Delete duplicate e-mail messages

If you need to delete duplicate e-mail messages on an IMAP server, take a look at this useful IMAP de-duplicator script:

IMAP de-duplicator – IMAPdedup

As IMAPdedup is a command line interface tool (a python script), it’s particularly useful for:

  • automated deletion of duplicates (as it can be called from other scripts)
  • extraordinarily big mailboxes or if you have many subfolders (as there’s no intervention by the user required)
  • if you have console/shell access to the IMAP server (as you can then run the script on the server itself, speeding the de-duplication process further up)

I also found that it deals relatively well with failures (e.g. when a folder is read-only and hence messages can’t be deleted): It simply reports them on the screen and carries on.

Here’s a quick’n’dirty bash script to de-dup the inbox and all subfolders of the specified account:

#!/bin/sh
# Delete all duplicate messages in all folders of said account.
# Note that we connect through SSL (-x) to the default port.

SERVER="my.server.com"
USER="mylogin"
PASS="mypass"

for folder in `imapdedup.py -s $SERVER -x -u $USER -w $PASS -l`;
do
 imapdedup.py -s $SERVER -x -u $USER -w $PASS $folder
done

If you only have to de-duplicate messages in a small folder, you could also use the following de-duplication add-on for Mozilla Thunderbird:

Remove Duplicate Messages Add-on for Thunderbird

Note however that the ‘Remove Duplicate Messages’ add-on is intended for interactive use only, not for batch processing. I also noticed that it fails at cleaning big mail folders (e.g. containing 50’000 messages).