Thought I would post this in case it helps anyone else who has the same problem. The error is due to not being able to resolve a domain name into an IP address and so could be due to a whole host of resolver configuration problems.
On my install it was due to Apache being chrooted so that it couldn't find /etc/resolv.conf. This was simply solved by copying the file into the chrooted directory (in my case creating /var/www/etc/resolv.conf).
For the less technical running OpenBSD, you need to run the commands:
mkdir /var/www/etc
cp /etc/resolv.conf /var/www/etc/resolv.conf
On my install it was due to Apache being chrooted so that it couldn't find /etc/resolv.conf. This was simply solved by copying the file into the chrooted directory (in my case creating /var/www/etc/resolv.conf).
For the less technical running OpenBSD, you need to run the commands:
mkdir /var/www/etc
cp /etc/resolv.conf /var/www/etc/resolv.conf

Charles Darke | 4 September 2006