qmail-chkuser is one of the most useful qmail patches available out there. It helps reduce bandwidth usage for spam emails directed to non-existant users by rejecting them at SMTP level. Previous versions of chkuser was named chkusr, I used to use chkuser-0.6 from Bill Shupp‘s website due to its simplicity. The newer version (chkuser — notice the ‘e’) combines several other patches and provides configurable settings. Some people may like this but some (including me) may not. I use many qmail patches and prefer to keep only the patches that I use. I used chkuser for the latest qmail installation I installed and disabled other patches chkuser comes with including logging. Its logging function presented problem with stunnel. Somehow output of the log goes to stunnel instead of the log files causing problem. I looked for a fix on Google and found a similar problem including a fix. My stunnel installation doesn’t have ‘-f’ parameter as suggested by patch author, Antonio Nati, so I decided to disable logging and solved the problem.
Category Archives: Technical
PowerAdmin
I have been using PowerDNS plus PowerAdmin everytime I’m asked to build a web-frontend-enabled DNS system. Unfortunately the developers of PowerAdmin abandoned the project a while ago (last update was in 2004).
Wim Mostrey made an update to the 2 years old out-of-date PowerAdmin in March 2006. His patch introduces two new features for PowerAdmin.
When installing PowerAdmin, make sure that PEAR-DB and MySQL extension for PHP are installed. Otherwise it would produce an error message that’s not helpful (Oops! An error occured!). If those two are installed, then PowerAdmin should work properly.
Multiplexing — FDM/(A)synchronous TDM
Useful page to show how FDM/(a)synchronous TDM works..
http://williams.comp.ncat.edu/Networks/multiplexing.htm
Active/Passive FTP Explanation
I keep forgetting the key differences between passive and active FTP.
Here’s a good link.. http://slacksite.com/other/ftp.html
Negative UNIX Timestamp Problem
When I used PHP’s mktime() on FreeBSD for dates prior to Jan 1, 1970, it was fine. Used the same code on RHEL 3, it gave me an incorrect value (-14462).
This is due to glibc library in some OS not allowing negative timestamps: http://bugs.php.net/bug.php?id=20048.
Read http://phplens.com/phpeverywhere/adodb_date_library for a solution to this issue.
phpWiki on cPanel
cPanel sucks.. Poorly coded, worded, packaged. Almost-decent documentation, but looks messy and unprofessional. Plesk is much better!
phpWiki won’t run properly when installed from cPanel.
It will print out this error message:
lib/Request.php:299: Warning: ob_start(): output handler ‘ob_gzhandler’ cannot be used after ‘URL-Rewriter’ or something
This can be fixed by uncommenting 1 line in index.php:
define(‘COMPRESS_OUTPUT’, false);
UPDATE: Not sure if this is still valid, since I found this issue in March 2005.
Internet Statistics (ASN, BGP, etc)
FixedOrbit provides comprehensive information regarding ASs. Very useful to determine/verify an ISP’s uplinks/peers.
Shows some statistics on IP assignment/allocation as well as the major ISPs with best uplinks.
UPDATE: I believe FixedOrbit does not serve up-to-date information, but cidr-report does.
RHEL Apache (Plesk) rebuild
By default, Apache distribution shipped with RHEL is compiled with a hard limit of 300 FDs. A busy server requires a lot more..This is how I increased the FD hard limit based on SW-Soft’s FAQ: http://faq.sw-soft.com/index.php?ToDo=view&questId=172&catId=42
A bit outdated, but that’ll do! 🙂
Add the following line to /etc/sysctl.conf:
fs.file-max = 131072
Run the following shell command:
# sysctl -w fs.file-max=131072
Edit __FD_SETSIZE value in /usr/include/bits/typesizes.h to:
#define __FD_SETSIZE 32768
(before, it is 1024)
Find httpd’s source rpm (try rpmfind or Google) and rebuild the package.
xmlto and pcre-devel are required, install both with up2date.
Other craps will be installed too:
pcre-devel xmlto docbook-dtds docbook-style-xsl passivetex sgml-common tetex xml-common xmltex tetex-fonts tetex-latex
Feel free to remove them once package has been rebuilt.
To rebuild the httpd rpm from the source rpm:
rpmbuild –rebuild sourcerpmfilehere.src.rpm
Once the custom binary rpm is ready, install it with -Uvh –force
Although the rebuild process produces 4 rpm files, I think only the httpd rpm is required.
Restart apache with the following commands:
/usr/local/psa/admin/sbin/websrvmng -a -v (not sure why this is needed)
service httpd restart
Valid for Plesk 7.5.
PowerDNS with Plesk servers
Having separate secondary NS for Plesk servers will be difficult to manage. To ease the process, I came up with an idea of using PowerDNS’ supermasters feature.
Just shove in the IP of the Plesk server, the name of the secondary NS and the server name to the supermasters table.
During initial touch-up of the Plesk server, make sure while modifying the DNS zone template to use THAT Plesk server as the first NS record. Otherwise it would cause problem with wrong SOA name causing PowerDNS not recognizing AXFR sent by the Plesk server.
Also make sure PowerDNS IP is included in the allowed list of AXFR on Plesk!
Some useful queries for PowerDNS’ SQL:
delete records.* from records, domains where records.domain_id = domains.id and domains.account = ‘SERVERNAME’;
delete from domains where account = ‘SERVERNAME’;
Valid for Plesk 7.5.
updatedb Problem
While executing updatedb, if it comes up with an error message:
updatedb: create_db(): chdir: No such file or directory
Make sure the directory, in which the shell is currently in, exists.