Applications CSV

CSV Utility Package V1.0.2 released

I made some fixes and enhancements to the CSV Utility Package:

  • Bug #9: Spaces before and after a value are treated correctly now
  • Enhancement #10: CSVReader forwards comment lines to callback objects
  • Enhancement #11: A test script was integrated to check major features
  • New Class: CSVUtils offers methods for copying JDBC results and JTable data to CSVWriters

You can download the latest release here.

Applications CSV

CSV Utility Package V1.0.1 released

A new update of my CSV Utility Package was released. It contains some fixes and enhancements:

  • Build system creates tar archive
  • Fixed Bug #2: NullPointerException in CSVReader class
  • Fixed Bug #4: Multiline values fail when a line looks like a comment
  • Enhancement #7: Excel Fix: first column of first row must not start with “ID”
  • Enhancement #8: Add row and column count

You can download the latest release here.

Apache Perl

Installing Bugzilla

This was weird. I lately tried to install Bugzilla on one of my virtual hosts but it’s script failed with:

Use of uninitialized value in pattern match (m//) at ./ line 110.
Use of uninitialized value in pattern match (m//) at ./ line 110.
TEST-FAILED Webserver is not executing CGI files.

The Apache error log told nothing more than

Premature end of script headers: testagent.cgi

All Google lookups failed to solve my problem. Although I had the impression that my CGI setup was somehow wrong, I couldn’t find the reason. Then I intensively checked the VirtualHost directive. The server uses a Plesk 8.0 installation for setting up hosts. The default configuration for virtual hosts with CGI there is to include a “SuexecUserGroup” directive. After removing it, the Bugzilla installation succeeded.

So you might wanna give it a try 😉

Update May 6, 2012: You might also want to try these commands when experiencing “Access Denied” problems in a virtual host environment:

find . -type f -exec chmod o+r {} \;
find . -type d -exec chmod o+rx {} \;

Do not forget to revert this change for localconfig file!!!

Applications Linux

Integrating SpamAssassin with qmail: Part 2

This is a series of articles covering integration of SpamAssassin with qmail on a Linux box.

Part 1: Installing and Configuring SpamAssassin
Part 2: Marking email as spam

Part 2: Marking email as spam

Now, that we setup SpamAssassin to run as a continous process, we are able to change the qmail system to feed all emails into the server daemon. We need the root folder of qmail first. This is usually at /var/qmail. However, you better check with your installation first.

Create a file “qmail-queue.spamd” in subfolder bin that contains a single line:

/usr/bin/spamc -U /tmp/spamd_full.sock| /var/qmail/bin/qmail-queue.orig

Adapt the paths if necessary. Next step is to rename the existing qmail-queue program in subfolder bin. Name it “qmail-queue.orig”, as we have already used that pathname in our script. Make sure that all file permissions of qmail-queue.orig and qmail-queue.spamd match exactly the original qmail-queue binary.

Last step is to replace the existing qmail-queue binary by a link to our qmail-queue.spamd script. That’s it. All your emails do now pass the SpamAssassin daemon. You can check this by viewing all headers of emails passing your system. They should now contain additional SpamAssassin lines.

This is not the end of the story. We just marked email so far as spam or not. The will not get filtered out of the boxes, yet. This however is the topic of part 3 of this series.

Applications Linux

Integrating SpamAssassin with qmail: Part 1

This is a series of articles covering integration of SpamAssassin with qmail on a Linux box.

Part 1: Installing and Configuring SpamAssassin
Part 2: Marking email as spam

Part 1: Installing and Configuring SpamAssassin

There are quite a few numbers of HOWTOs at the internet about installing the software itself. So I won’t go very much into details but rather point you to some locations where you can find sufficient information.

You’ll find the latest software package at Apache’s SpamAssassin Homepage. Unpack the archive, preferrably at /usr/local/src. It will produce a directory Mail-SpamAssassin-XXXX. Change into that directory and read the INSTALL file to learn about special features when building the spam recognition tool. Usually you need to issue three commands:

perl Makefile.PL
make install

That’s it. Be aware that you might need to enhance your Perl distribution by additional modules from CPAN.

The last step to perform is to make a tool called spamd running continously on your box. We will first configure the daemon according to your Linux distribution. On latest SuSE editions this is done by a file /etc/sysconfig/spamd:

## Path:           Network/Mail/Spamassassin
## Description:    Arguments for the spam daemon
## Type:           string
## Default:        "-d -c -L"
## ServiceRestart: spamd
# The arguments passed to spamd.
# See spamd(1) man page.
# Default is "-d -c -L"
SPAMD_ARGS="-d -c -u spamd -g spamd --socketpath=/tmp/spamd_full.sock"

We introduced a user and group called “spamd” here. You might need to configure them first on your system.

Finally, you can add according startup commands in your /etc/rc.d directory to make spamd starting at system boot. Here is a script that I use.

Part 2 of this series will concentrate on the issue how to pass each mail into SpamAssassin.

Applications Miscellaneous

Reset Firefox’ Zoom Settings

You propably got already used to Firefox’ zoom feature. Firefox 3 introduced a new setting that enables it to remember the zoom value when you visit a website. Whenever you re-visit the domain, the previously used zoom level will be re-applied.

If you don’t like this feature, open the about:config page and toggle the boolean setting browser.zoom.siteSpecific to false.

Of course, you can always use Strg-0 to reset the zoom to the default value.


Firefox 3

It is finally there. You can download the browser’s latest version at Mozilla Homepage. There is also a very good introduction to the new features of Firefox 3.


TYPO3: Getting content from another page

This is a TYPO3 code snippet that will replace a marker with content from a specific page. I use this for common content on footers and outer columns.

page.10.marks.FOOTER < styles.content.get
page.10.marks.FOOTER {
      select.where = colPos=3
      select.pidInList = 2

colPos=3 will get the content from the border column (0 is center, 1 is left, 2 is right column). pidInList identifies the page (or pages) that you want to fetch the content from.


Replacing TYPO3 Marker by Page Title

This short TYPO3 script snippet will replace a marker in your template by the current page’s title:

page.10.marks.MYMARKER = TEXT
page.10.marks.MYMARKER.field = title

WordPress Bad Behaviour blocking wp-cron

I noticed that Bad Behaviour did block my WordPress’ wp-cron requests. There is a solution: Add your server’s IP address to the variable $bb2_whitelist_ip_ranges:

$bb2_whitelist_ip_ranges = array(