Using OpenBSD’s OpenSMTPd for Email

As many readers may be aware, the venerable Sendmail has been the default mail daemon in OpenBSD for years. This is largely because it is the only reasonable BSD-licensed mail server around. Personally, I have never trusted Sendmail enough to use it on any of my hosts – despite the fact that it has been [...]

Read a file line by line in C – secure fgets idiom

A pretty common thing to do in any program is read a file line-by-line. In other interpreted or managed languages this is trivial, the standard libraries will make it super easy for you. Just look at how simple it is to do this in Python or Perl or even Shell. In C its a little [...]

tmux, a BSD alternative to GNU Screen

I started using tmux today. Its a terminal multiplexer / task switcher for UNIX-likes, very much in the same vein as GNU Screen. However, its a from-scratch implementation, designed to be clean, sane and easy to configure. The more liberal 3-clause BSD license is a plus also, since it means that OpenBSD has been able [...]

Easy private DNS – authoritative and recursive – with Unbound

Lots of people have a small home network. Usually you have a combo box which acts as a router/firewall/file server. Then you have a couple of other machines hooked up, and you share the Internet using NAT. A private DNS server is helpful in this kind of scenario for two reasons: Recursive resolver cache can [...]

Mount remote filesystems via SSH on Windows with free software

I often use Windows as a terminal to my various UNIX systems. Sometimes its helpful to run proprietary software – and I don’t have time/inclination to mess around with half-baked emulators/ports/binary blobs/whatevers under Linux. I either run a completely open system like OpenBSD or I run Windows. Anyway, I never use Windows to do any [...]