by R.I. Pienaar | Jun 10, 2004 | Code
UPDATE: There is now an Official Exim FAQ Entry for this, You should use this for best results as the method below does not work on all versions of authdaemon. If you were having issues with Debian and the solution below, look at the comments section for an update from Debian.
I have been meaning to get SMTP AUTH going on my server for a while, there are a few samples I saw that was looking very nasty for getting authdaemon and exim to talk to each other. Eventually Leon got one of my machines to work in a way that I quite liked, this is my current setup in exim 4. All it requires is that the user that exim runs as can read and write to the courier authdaemon socket.
# Unix clients
plain:
driver = plaintext
public_name = PLAIN
server_condition = \
${if eq {${readsocket{/usr/local/var/authdaemon/socket}\
{AUTH ${strlen:exim\nlogin\n$2\n$3\n}\nexim\nlogin\n$2\n$3\n}}}{FAIL\n} {no}{yes}}
server_set_id = $2
# Windows clients
login:
driver = plaintext
public_name = LOGIN
server_prompts = Username:: : Password::
server_condition = ${if eq {${readsocket{/usr/local/var/authdaemon/socket} \
{AUTH ${strlen:exim\nlogin\n$1\n$2\n}\nexim\nlogin\n$1\n$2\n}}}{FAIL\n} {no}{yes}}
server_set_id = $1
Very nice and simple, now I can SMTP auth against my SQL and PAM based auth that is in use on my machines. Works well with Outlook and Evolution.
by R.I. Pienaar | Jun 10, 2004 | Usefull Things
I am writing a lot of regex these days for a spam plugin I wrote and it seems I am a bit rusty or simply just blind. Remembered Barry mentioned some tool ages ago that visually test them a little bit of Googling on his site found it.
I can also recommend this as a very good tool for debugging complex regular expressions.
by R.I. Pienaar | Jun 9, 2004 | Front Page
Been looking into my spam situation again and noticed most of my spam come in from my secondary MX rather than primary. I imagine the spammers know that things like RBL’s and so forth will only be deployed on the primary servers. So I enabled some RBL checking and a hand made list of regex matches against hostnames on the machine and found the following:
Total Mail Handled by MX: 1221
Total Mail Marked as Spam: 861
Scary.
by R.I. Pienaar | May 30, 2004 | Front Page
With the recent release of FreeBSD 4.10 I decided to upgrade my machine this weekend since I was still running a RC of 4.9.
I got the source, build the world and upgraded all the jails, it went perfect since I could slowly do the jails one by one as they kept working on just fine on the old 4.9 kernel, all the usual things that break like ps and so forth worked just fine.
When it came to upgrading the main host, it started going bad from the word go. First my serial console got itself corrupted and I could not type anything at all to the server, this means I could not do the installworld in single user mode. I shut everything down that I could essentially keeping the machine in multi user mode with just sshd running. Did the installworld and installkernel and rebooted.
I hoped at this point that the serial port would reset and things would be fine, but it seems now that the serial port was actually producing garbage to the console and ended up preventing the bootloader from choosing the right harddrive for the bootup.
I power cycled the machine with my remote power management and that was it, dead, no response at all.
After getting hold of the ISP and gaining access to the co-location facility I discovered the BIOS battery died at some point and when I power cycled the machine it forgot its BIOS settings, including the fact that it has to turn back on once it gets power ๐
A quick replacement of the battery solved it and now its all fine again, I also turned off the motherboards console redirection relying on FreeBSD’s. This way future console corruption won’t prevent a bootup since the FreeBSD console stuff only kicks in after the bootloader.
by R.I. Pienaar | May 24, 2004 | Photography
I found via boingboing a link to this site with photos of a deserted island (click on ‘thumbnail’ for the actual photos) off the coast of Japan, this reminded me of the town near Chernobyl that has been deserted, I have been interested in visiting that for years. There are tour groups that will take you to it now, I am very seriously considering going in the summer.
Off the westernmost coast of Japan, is an island called “Gunkanjima” that is hardly known even to the Japanese. Long ago, the island was nothing more than a small reef. Then in 1810, the chance discovery of coal drastically changed the fate of this reef. As reclamation began, people came to live here, and through coal mining the reef started to expand continuously. Befor long, the reef had grown into an artificial island of one kilometer (three quarters of a mile) in perimeter, with a population of 5300. Looming above the ocean, it appeared a concrete labyrinth of many-storied apartment houses and mining structures built closely together.
Eventually, the mines faced an end, and in 1974 the world’s once most densely populated island become totally deserted. The island, after all its inhabitants departed leaving behind their belongings, became an empty shell of a city where all its peopl disappeared overnight, as if by some mysterious act of God.
Ten years later, I returned to the island, equipped with food and drinking water. The island was devastated, with the smell of people gone. Inside the buildings, however, evidence of people’s lives remained strongly. The strange atmosphere led me to wonder if island had remained in sleep ever since all its inhabitants left.