Archive for May, 2008

Update (2008-06-04): This patch also works with the latest (1.3.1) version of wsf/php.

WSO is a web services framework I’ve been recently playing with. There are versions of it for C, php, ruby, perl, and some other languages… The php version comes as a php module that needs to be compiled from source (or installed as a package if you’re running a linux distribution that has it) and added to your php configuration.

The source code compiles under windows, linux and OS X but needs some patching to work under FreeBSD.

you’ll need libxml2, libiconv, zlib and sqlite (or mysql) libraries installed from ports.

Here is how to do it:

# fetch http://dist.wso2.org/products/wsf/php/1.2.1/wso2-wsf-php-src-1.2.1.tar.gz
# fetch http://bsd.dischaos.com/files/wso2-1.2.1-freebsd.patch
# tar xvfz wso2-wsf-php-src-1.2.1.tar.gz
# patch -p0 < wso2-1.2.1-freebsd.patch
# setenv CPATH /usr/local/include
# setenv LD_LIBRARY_PATH /usr/local/lib
# cd wso2-wsf-php-src-1.2.1
# ./configure LDFLAGS="-lcompat" && make && make install

now just add wo.so extension to your /usr/local/etc/php/extensions. You’ll probably also need xml and xsl php extensions to have everything in wo working. Also, I copied the scripts directory from the wso2 package to /usr/local/share/wso2 and added this directory to include_path.

One of my servers has recently died. When I installed the server around 7 years ago, qmail was a very trendy alternative to the “bad and insecure” sendmail, FreeBSD’s default MTA. Now, after a few years have passed, qmail is no longer so trendy and chicks don’t dig it as they used to… So while reinstalling the server I knew I had to choose something different than qmail. It’s not that I don’t like qmail anymore but after spending some time with postfix, especially after integrating it with things like clamav, dspam and other different extensions I think it’s just easier to manage. So the real reason was – i wanted all these nice toys I had with other postfix installations and I wanted them quickly and without all that hacking around and patching patches I would have to do with qmail.

Moving email accounts between qmail and postfix is not a hard task. They both support Maildir format so getting this part working was quick and painless. The only problem I had with moving this mail installation was what to do with my ezmlm based mailing list. So this is how to make qmail and postfix live happily under one roof.

Install all required ports

I installed these ports (my local versions in brackets, note that it’s a bit old installation now):

  • mail/qmail (1.03_6)
  • mail/qmail-contrib (0.1_1)
  • mail/ezmlm-idx (0.40_4)
  • mail/postfix (2.4.6,1)

Configure postfix

add qmail transport to master.cf:

qmail unix - n n - - pipe flags=R user=qmailq argv=/var/qmail/bin/sendmail ${recipient}

and in main.cf define transport configuration file with perl regex syntax:

transport_maps = pcre:/usr/local/etc/postfix/pcre_transport

now, add all your mailing lists to pcre_transport file so they get delivered via the qmail transport. An example for lists eztest@server.com and otherlist@server.com would look like this:

/eztest(-[a-z]+)?@server.com/ qmail:
/otherlist(-[a-z]+)?@server.com/ qmail:

Set up qmail

Just make a standard port installation but do not enable qmail as your default MTA, after all, you want it to be postfix, right?

After starting everything you can test it

create a new mailing list:

# ezmlm-make ~alias/eztest ~alias/.qmail-eztest eztest server.com
# chown -R alias ~alias/eztest

add a test user:

# ezmlm-sub ~alias/eztest user@example.com

And that’s it. :) Of course your list probably needs some changes in the configuration files (~alias/eztest/) but this is all well documented in ezmlm(5)

OpenBSD 4.3 has just been released. I’ve just tested installing it on a net 5501. The installation procedure is exactly the same asĀ  for OpenBSD 4.2 described here. The only exception is that I couldn’t find pxeboot on the install43.iso file downloaded from ftp.openbsd.org (I’ll check if it’s on the original CDs when they arrive). It’s not a problem as one from a previous release works fine.

Currently I can’t really find any improvements in 4.3 that would be especially useful on net 5501 as it was the case with 4.2 and net 4501 (performance improvements to pf and many updates to sis(4)). However one nice thing is a new snmp daemon in the base system. This could we quite useful when tracking usage statistics on routers with, for example network weathermap