修正 bind 出現 max open file (1024) 的錯誤

While I upgrading my gentoo box, the BIND had been recomplied. After I re-steup my configurations there exists an error on the log.

max open files (1024) is smaller than max sockets (4096)

This is a bug introduced from kernel and I found a solution from Bombcar Heavy Blog.

1
2
# cd /etc/security/limits.d
# vim named.conf

And fillout the settings:

named        soft    nofile        4096

Then modify the named.conf settings:

# vim /etc/bind/named.conf

In the Options section, filling it:

files 4096;

Finally, restart the named and the error disappear. 😀

升級 gentoo 的 perl 到 5.12.2 後 openwebmail 不能使用的問題

After upgrading my gentoo box’s perl to 5.12.2, the openwebmail dead. The basic result is in the 5.12 version there is no suidperl program.

To solve this, after reading related materiel, the step listing:

1
2
3
# cd {http root}/cgi-bin/openwebmail
# perl misc/tools/wrapsuid/wrapsuid.pl {http root}/cgi-bin/openwebmail
# grep "suidperl" ./.*.* | awk -F ':#' '{print $1}' | xargs sed -i 's/suidperl/perl/'

The step 2 will first change all the .pl files into hidden file and then make a wrapper written in C language. And the step 3 is for changing all the suidperl corresponding interpreter line to perl.

But after this I encounter another problem that there shown I must setuid to root in webpage while using it. The solution is to change owner to root again because the wrapper program broken it.

# chmod 4555 *.pl

And it works! All the material is from Openwebmail.

升級 gentoo 的 spamd

After upgrading the spamassassin of my gentoo box to 3.3.1-r3 I encounter two problems while starting it.

First, Uninitialized value $opt{“syslog-socket”} in lc at spamd

The solution is:

– my $log_socket = lc($opt{‘syslog-socket’});
+my $log_socket = $opt{‘syslog-socket’};

if (!defined $log_socket || $log_socket eq ”) {
$log_socket = am_running_on_windows() ? ‘none’ : ‘unix’;
+} else {
+  $log_socket = lc $log_socket;
}

From Gentoo Forum where it is filed as a bug and may be fix recently.

Second, child process exited or timed out without signaling production of a PID file: exit 255

Solution is by running:

# sa-update -D

From Virtualmin. And everything is fine while restarting.