Pingdom Notifier for Mac Update

Published: 30 mars 2012 | Category: Development | Labels: , , , | Short url » | Be the first to comment! »

Todays update of Pingdom Notifier for Mac comes with some interesting stuff. First of all, most of the code has been rewritten to fix one memory leak and one bug that made the application crash on some systems. Also some new features has been added like a Pause button to pause the application, which is good if you already working to fix the servers. The frameworks has been updated and the Growl 1.3 framework made the application 60% lighter.

If you do not already have a Pingdom account, get one here and then download Pingdom Notifier for Mac! For those of you who is already using Pingdom Notifier for Mac you will automatically be asked to update thanks too Sparkle.

OpenBSD and smtpd

Published: 30 januari 2012 | Category: General, Hints, Security | Labels: , , | Short url » | Be the first to comment! »

Finally there is a secure and easy-to-configurate substitute for ”Sendmail”, ”OpenSMTPD”!

OpenSMTPD (smtpd) first appeared in OpenBSD 4.6 and will probably replace sendmail as the default mail daemon in OpenBSD 5.1. With this in mind, I replased sendmail with smtpd when I upgraded my OpenBSD (4.8 to 5.0) routers/gateways a few weeks ago. Since they only send ”cron” emails there are not much traffic to talk about but it still feels great to finally replace the old dusty Sendmail.

Here are the steps I went through to get started with smtpd. For a reference see the maual pages at

smtpd is not enabled by default. In order to use it as the system
mailer, ensure the mail queue is empty, then stop sendmail(8):

# pkill sendmail

Modify the current mailwrapper(8) settings by editing /etc/mailer.conf:

# cat /etc/mailer.conf
sendmail /usr/sbin/smtpctl
send-mail /usr/sbin/smtpctl
mailq /usr/sbin/smtpctl
makemap /usr/libexec/smtpd/makemap
newaliases /usr/libexec/smtpd/makemap

Rebuild the aliases database, and enable the daemon to run at boot:

# newaliases

# echo ”sendmail_flags=NO” >> /etc/rc.conf.local
# echo ”smtpd_flags=” >> /etc/rc.conf.local

The above parts was all taken from the manuals so here comes the parts that differs depending on the purpose with smtpd. My purpose is to accept outgoing mail from localhost (lo0) only and relay them through my Loopia email account using TLS authentication on port 587. More examples and informations can be found at

# cat /etc/mail/smtpd.conf
listen on port 25
expire 4h
hostname my.local.domain
map ”aliases” { source db ”/etc/mail/aliases.db” }
map ”secrets” { source db ”/etc/mail/secrets.db” }
accept from local for local alias aliases deliver to mbox
accept from local for all relay via port 587 tls auth ”secrets”

Since the mailserver uses authentication the username and password is saved in a separate file with restricted permissions.

# cat /etc/mail/secrets LOOPIA_USERNAME@mydomain.tld:LOOPIA_PASSWORD

# chmod 640 /etc/mail/secrets
# chown root:_smtpd /etc/mail/secrets

# cd /etc/mail
# makemap /etc/mail/secrets

Check the config for errors and start smtpd in the background.

# smtpd -n
configuration OK

# smtpd

See so it is working by sending an email to a local user or root depending on your  /etc/mail/aliases setup.

# smtpctl show stats | grep ‘mta.sessions=’

# echo ”A test message” | mail -s ”Subject” root

# smtpctl show stats | grep ‘mta.sessions=’

Email on successful login

Published: 17 december 2011 | Category: Hints, Security | Labels: , , | Short url » | Be the first to comment! »

If you have a server that you know nobody really should login to, it can be a good idea to track the few logins the server gets. I have done this on my OpenBSD router by telling /etc/profile (who runs on every login) to send me an email about every successful login. The line I added to /etc/profile looks like this:

echo -e ”Login on `hostname` `date` \n\n# w $(whoami)\n`w $(whoami)` \n\n# who -HTu\n`who -HTu`” | mail -s ”Login on `hostname` as (`whoami`)” root

What this do is that it collect some useful information about the user that has just logged in and sends an email to the root user. If you do not have set up an alias for the user it is possible to change ”root” in the command above to an email address. The email will look like:

Subject: Login on gw.localdomain as (username)

Login on gw.localdomain Sat Dec 17 12:04:17 CET 2011

# w username
12:04PM  up  2:37, 1 user, load averages: 0.40, 0.77, 0.90
username   p0    12:04PM     0 w username

# who -HTu
USER     S LINE     WHEN         IDLE    FROM
username   + ttyp0    Dec 17 12:04   .     (

Unboxing: white iPhone 4S

Published: 31 oktober 2011 | Category: General | Labels: , | Short url » | Be the first to comment! »

Here is my version of iPhone 4S unboxing! All images are taken with a iPhone 3G, hope the new images will be better!?

Image 1

Image 1

Image 2

Image 2

Image 3

Image 3

Image 4

Image 4

In English, please!

Published: 16 augusti 2011 | Category: General | Labels: | Short url » | Be the first to comment! »

From now on I will write the articles in English. This is based on the visitors statistics and also requests from some visitors.

First out will be some articles about OpenBSD and how to use it to create a fully functional router or gateway. If everything goes as planned the first article will be publiced this week.