Overview of Exploits Block List - XBL (Spamhaus.org) in Comment Spam Protection

The Spamhaus Exploits Block List (XBL) is a realtime database of IP addresses of hijacked PCs infected by illegal 3rd party exploits, including open proxies (HTTP, socks, AnalogX, wingate, etc), worms/viruses with built-in spam engines, and other types of trojan-horse exploits. I was recently testing this list againt spam email. Here are few observations from our testing.

Full article (378 words) »

Are Most Link Extractors (Including WordPress Comment Link Extractor) Wrong?

Most link extractors I know, including the function in WordPress to linkify comments, incorrectly assumes that any text containing http:// is a hyperlink including obvious mistakes like the following:
I propose a new protocol starting with phttp://... What do you think?

Full article (74 words) »

How To Fix Postfix Warning: dict_nis_init: NIS domain name not set - NIS lookups disabled

First of I didn't ask postfix to do NIS lookups. These warning messages started showing up when I commented out alias_maps and decided to only use alias_database instead. The fix was simple.

Full article (82 words) »

How To Fix Buggy PHP strip_tags Function

strip_tags() in PHP has several problems. It doesn't recognize that css within the style tags are not document text. It will not remove HTML entities or content within script tags. strip_tags() fails for invalid HTML. In short strip_tags() is not advisable to use except for trivial cases. The best solution I have come across is by uersoy at tnn dot net: Full article (122 words) »

Solution: ntpdate[4933]: no server suitable for synchronization found

Our local setup consists of a single ntp server which synchronizes time from asia pool of ntp.org ([0-2].asia.pool.ntp.org) and several ntp servers in the intranet which synchronizes from the above server. This setup ensures identical clock on all the machines on the intranet as well as reduces load on ntp.org servers. However we faced with an infuriating problem in getting the clients to sysnchronize with the local server. In some machines we would get this error message in log ( /var/log/messages )during startup:
"ntpdate[4933]: no server suitable for synchronization found"

Restarting ntpd would give this error message:


[root@jaguar ntp]# /sbin/service ntpd start
ntpd: Synchronizing with time server:            [FAILED]
Starting ntpd:                                   [  OK  ]

The second problem was that ntp server was taking a long time to come up (with failure message as described above) thereby slowing down booting time. After much investigation and tinkering (not to mention futile searches with Google), I accidentally came across a simple solution.
Full article (271 words) »

6 Simple & Safe Postfix Changes for Over 95% Spam Reduction

I used to receive around 5,000-7,000 spams daily on angsuman [at] taragana [dot] com email which is publicly available on the internet. It was consuming too many productive hours daily to fight spam. I decided to fight back. To reduce the spams I first made changes to my postfix configuration with the aim to stop most spams upfront. With 6 simple changes to my postfix configuration my spams dropped from 5,000 - 7,000 to a manageable 5-20 spams daily, often less. Let's look at these 6 simple postfix changes in details to drastically reduce your spam count too. I am consistently getting over 99% spam reduction after implementing these changes.

The changes proved to be safe and without false positives. In several weeks of manual browsing through the log file, I couldn't spot a single false positive (a case where legitimate mail is rejected).

Note: This changes do not involve (nor do they conflict with) spamassasin or clamav, which I might add later.
Full article (826 words) »

Protected by Comment Guard Pro