Professional » Miscellaneous


exim: select smarthost according to sender address

When sending mails from my systems, I usually want to use different smarthosts according to the sender address. If I use the sender address vwegert@web.de, I want the mail to be delivered via smtp.web.de, if I use one of my @volker-wegert.de addresses, I want to use the smarthost at Manitu and so on. With exim, this is possible with a few configuration adaptions.

First create a file named /etc/exim/smarthosts that will contain the routing information. The contents look like this:

Laptop Maintenance Mode for Gentoo Linux

I run Gentoo Linux on a variety of laptops, and while I'm generally happy with it, there are some places where the default system just doesn't fit my needs. Sometimes you can just feel how parts of the software were designed for 24/7 servers and not for mobile devices. For example, there are some processes that need to be run frequently, but that you really don't want to kick in when you're out in the field and running on battery power - updatedb, makewhatis or Leafnode's texpire for example. And there are some other maintenance actions that should be performed on a regular basis, too - emerge --sync and backup for example. And most of the time, I just don't feel inclined to manually perform all these tasks when retuning home after a working day. This is why I added a "maintenance mode" to my laptop installations. Usage of this maintenance mode is very straight forward - plug the laptop into the local network, power it on, select "maintenance mode" in the boot loader menu and go away. The system will automatically perform all actions and then power down.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer