s5h.net

“fresh linux news and advice.”


puce2007-09-30 swines

The internet would be a great place if it were not for all the scum that make it a scummy place. Today when I woke up (at around 11am) I found that my root partition was quickly running out of space due to back scatter spam directed at one of my domains.

So, none of these mail servers should be sending mail to this given domain, it never receives mail anyway. So I quickly made some changes to my mailsever config so that it no longer receives the mail, and then quickly went about logging this mail in a new RBL table, so that I only receive the mail a minimum number of times.

There is now a RBL server that you're free to use, I won't charge you.

rbl.g0og1e.co.uk

If you're running qmail yourselves, you can modify your run script to include the RBL program like this:

RBLLIST=""
RBLLIST=$RBLLIST" -r rbl.g0og1e.co.uk"
RBLLIST=$RBLLIST" -r bl.spamcop.net"
RBLLIST=$RBLLIST" -r sbl-xbl.spamhaus.org"

exec /usr/local/bin/softlimit -m 40000000 \
/usr/local/bin/tcpserver -v -R -H -l "$LOCAL" \
-x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
rblsmtpd -C $RBLLIST \
/var/qmail/bin/qmail-smtpd ednevitible.co.uk \
/home/vpopmail/bin/vchkpw /usr/bin/true 2>&1

puce2007-09-28 more time well spent

Lately I've been rambling on about how I'm working on this network monitor. It might seem a little bit silly right now as it's rather trivial, but I do have ideas for how it can be used as a common means of getting network data - and lets face it; just about everything on computer related these days is hooked up to the internet.

Last night was another lesson in just how incapable I am with the Russian language and my ass was handed to me. Although I relish new challenges, the language is so complex, it makes writing deep systems programming seem trivial by comparison. Like everything though I suspect I just need more practice, so if anyone out there has a LOT of time to donate please drop me a line.

puce2007-09-26 time well spent

Rebuilding applications...

Changing an application to use dlsym rather than just link to a shared library at compile time seems to be a metric effort of work greater than the former.

I hope the end justifies the means in this case.

I'll make a post soon with my opinions of how to do this as quickly as possible. I'm sure there are other guides out there that I've not seen yet which make a good job of this already.

puce2007-09-20 good ol' perl

Once again, I found a good album, but it's in mp3/cue format :-( great, someone encodes it in a lossy format. Regardless, using sox, converting to wav, then cutting the various sections (again with sox) using a previous cue script (on this page, use google search), I was able to put the files into track order for my ipod.

But .. I messed up with the id3 information, so things are easily corrected using another script:

#!/usr/bin/perl

use strict;
use warnings;

opendir(D, "." );
my @files = readdir(D);
closedir(D);

foreach( @files ) {
	next if( ! -f $_ );
	if( $_ =~ /^(\d+)_-_(.*)_-_(.*).mp3/ ) {
		my $command = "/usr/bin/id3v2 " .
			"--artist '$2' " .
			"--album 'hed kandi cd3' " .
			"--song '$3' " .
			"--track $1 " .
			"'$_'";
		print( "$command\n" );
		`$command`;
	}
}

I think from now on, if I get something encoded in wav, I'll work with it in FLAC format, and hopefully by that time I'll have an ipod that can be rewritten. The resulting sound quality after going from initial wav -> mp3 , then to wav, then to mp3 yields something rather "damp".

puce2007-09-11 recording

Tonight I was to make a recording of some speech for a friend. I spent a while looking through various recording programs to try and make a recording but there were various problems with each of the obvious GUI programs.

Eventually after a few minutes playing around with audacity and bplay etc, I looked again at the list in apt-cache and found alsa-utils.

No surprises here, alsa-utils provides some very helpful programs, arecord being one of them.

arecord -f cd -t wav | lame - recording.mp3

The above command takes the standard output from arecord into a mp3 encoded file. Brilliant, I should have gone with this right from the start and I'd have had the result I needed from the beginning. No messing around, no silly projects, no clicking around poky menu systems.

This brings me to another hated point with GUIs, it's almost impossible to save a sequence of clicks performing an operation. With text commands it's much easier to record some work to a notes file. (Although there are video recorders for desktops, but these don't replay well).

        puceall in one php function

Some while ago I was looking at a way to make a single page which creates page content, which I can reliably depend on no matter how I decide to reorganise my page.

What I came up with was something called new_pagestart:

function new_pagestart( $menu_t, $leftmenu_t, $rightmenu_t, 
$content = null, $smallcredit = "", $leftmenuprefix = null, 
$rightmenuprefix = null, $leftmenupostfix = null, 
$rightmenupostfix = null );

What I've done here is to make this function take a set of parameters and then render the page based on that. This kills several birds with one stone. The strings can be built up throughout the course of the script which is later given parameters. If the script should abort for some reason, it does not cut off half way through the rendering.

This single function call could be extended to later take a function pointer in addition, so the output of said function could be attached, but it might be better to do this in the caller.

One additional advantage here is that supplying null arguments will retrieve from other default functions the values to display.

puce2007-09-03 netmon

Many of you may recall that I've been working on some new features for the netmon. Well, it's nothing exciting but version 0.3 has support for two databses, mysql and sqlite. I'll add postgres support to version 0.4, not that it's much work, but I don't have postgres installed anywhere at the moment to make the few changes.

There's no configure script, I hate watching configure do it's work so things are done via `make`.

The code compiles cleanly with -Wall, and should compile on both Linux and BSD systems alike.

If you're interested in testing, the file can be downloaded here: netmon.

It would be of great use if someone with a Solaris/HPUX box could give me a shell so that I could have a poke around and see if there are any compatibility issues.

puce2007-09-02 netmon work

Still plodding away on the netmon project. This was almost abandon-ware until recently when I got a bug report. New features will be available soon, along with a better Makefile for those features.

It's not the most exciting of things to be working on, but at some level it might be helping others like myself.

I purchased a car late yesterday, pictures of it are available on my facebook page. Yes, I was press ganged into setting up an account from various directions. What's wrong with photo bucket I tell yas.

puce2007-09-01 what waste of a day

I can't believe that I have to spend today looking for a car. What a total waste of time this is. There are so many better things to do than look at things that end up costing me money, and that I have to spend money on in order to spend more money. What a sick world. Remember, vote Ed for prime minster and I'll put a bus stop outside your house!