Multiple relay configuration based on sender address with sendmail

One of the needs that came up was to be able to use separate relay configurations based on the sender email address, using sendmail. The problem is that sendmail is missing support for most parts of that sentence. At the end the solution involved a combination of sendmail, smarttable, procmail and msmtp The idea is …

Continue reading ‘Multiple relay configuration based on sender address with sendmail’ »

IPsec, Racoon, setkey, Linux, Mikrotik, tunnel, transport and everything

It took me more than 6 months in order to sort all issues, so here are the experiences. Most of the trouble was because I didn’t knew or I didn’t had things clear in my mind. I wanted to have IPsec communication between a bunch of servers and a home network. I believe that this …

Continue reading ‘IPsec, Racoon, setkey, Linux, Mikrotik, tunnel, transport and everything’ »

rsync as root with rrsync and sudo

Here’s how to rsync something to a remote host as root without allowing root logins and with directory restriction. I did that because I wanted to sync /srv across servers. In general it will use rsync over ssh, sudo, rrsync and a remote non-root user. I assume that rsync will run from srv1 to srv2. …

Continue reading ‘rsync as root with rrsync and sudo’ »

Linux Containers: Easy LXC

Linux containers (a.k.a. LXC) rock. It’s the ultimate way of having multiple Linux boxes with minimal requirements. Here’s how I do it under Debian (and the script I’m using): Requirements This guide is for Debian  testing as of 25 March 2012. However it should work for other cases as well. The procedure creates a minimal …

Continue reading ‘Linux Containers: Easy LXC’ »

Big nfs_inode_cache

The story Boxes with various kernel versions have weird free memory problems. After examining the memory usage it seems that processes don’t add up to the actual memory that is being used. Taking a look at /proc/meminfo we see something like this: Notice that Slab is about 7.5GB, almost the whole memory (8GB) (!). Slab …

Continue reading ‘Big nfs_inode_cache’ »

pyzor problem after debian squeeze upgrade

After upgrading some servers to Debian squeeze, the following log was filling the logs: The problem was caused by wrong pyzor servers. Unfortunately, pyzor keeps a servers list in each home directory in file ~/.pyzor/servers. This is what this file used to have: This file is created automatically (with a proper value) so it is …

Continue reading ‘pyzor problem after debian squeeze upgrade’ »