Various Tools

FTP Synchronisation

This script written in Python allows to synchronize a distant FTP site with a local directory. Only modified files are uploaded.

Dynamic DNS update

The following script can be used to update an entry in a DNS server. It must be fed with a mail message containing specific data in the subject:

Subject: set www as 172.24.0.1 in mydomain.net

This subject will update the address www.mydomain.net to 172.24.0.1. This isn't a really robust script but it used to work for me ©.

MX Checking

This Perl script will check every SMTP server registered as MX server for a particular domain. Example:

[seb@meryllon] % ./mxtest.pl caramail.com
6 / 17

This means that for the domaine “caramail.com”, 6 servers are up when 17 are announced.

In the first version, SMTP connection is done sequentially, so it could be made faster. The second version uses a pool of threads to check the SMTP servers; this is not really faster but at least it was a funny thing to write in a boring moment... It requires a threads-enabled Perl version and has been tested on a Debian Sid with Perl 5.8.

Now, we even have a C version using (this time) non blocking sockets. Note that this requires djbdns library and glib. Compile with:

gcc -g -Wall djbmx.c `pkg-config --cflags glib-2.0` \
    -o djbmx `pkg-config --libs glib-2.0` -ldjbdns