Archive for January, 2008

Spamassassin rules, or why my important e-mails get stuck in my anti-spam?

January 28, 2008 Leave a comment

When using spamassassin, you might happen to realize that some important e-mail has been filtered out for some kind of wierd reason.

The e-mail will be classified as spam and get an introduction like this:

Content analysis details: (32.9 points, 5.0 required)

pts rule name description
---- ---------------------- --------------------------------------------------
3.5 BAYES_99 BODY: Bayesian spam probability is 99 to 100%
[score: 1.0000]
0.4 SARE_SUB_ENC_ISO2022JP Subject specifies display in non-English lang
1.0 GAPPY_SUBJECT Subject: contains G.a.p.p.y-T.e.x.t
1.4 PLING_QUERY Subject has exclamation mark and question mark
0.8 SARE_SUB_PCT_LETTER subject has random-text spamsign
0.7 SARE_SUB_CASH_CHAR Subject has letter then $ then letter
3.2 CHARSET_FARAWAY_HEADER A foreign language charset used in headers
2.8 UNWANTED_LANGUAGE_BODY BODY: Message written in an undesired language
1.5 RAZOR2_CF_RANGE_E8_51_100 Razor2 gives engine 8 confidence level
above 50%
[cf: 100]
0.5 RAZOR2_CHECK Listed in Razor2 (
1.5 RAZOR2_CF_RANGE_E4_51_100 Razor2 gives engine 4 confidence level
above 50%
[cf: 100]
0.5 RAZOR2_CF_RANGE_51_100 Razor2 gives confidence level above 50%
[cf: 100]
2.2 DCC_CHECK Listed in DCC (
1.5 URIBL_WS_SURBL Contains an URL listed in the WS SURBL blocklist
1.5 URIBL_JP_SURBL Contains an URL listed in the JP SURBL blocklist
1.5 URIBL_OB_SURBL Contains an URL listed in the OB SURBL blocklist
3.0 URIBL_BLACK Contains an URL listed in the URIBL blacklist
0.9 RCVD_IN_PBL RBL: Received via a relay in Spamhaus PBL
[ listed in]
2.0 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in
[Blocked - see <>]
0.2 SARE_TO_EMPTY To address is set to empty
0.0 DIGEST_MULTIPLE Message hits more than one network digest check
0.1 RDNS_NONE Delivered to trusted network by a host with no rDNS

In a case where the e-mail isn’t actually spam (the example above is really spam), you might want to know of a good place to get all these granted spam-points explained in order to help e-mail senders to fix their newsletters or account-renewal reminders, . Well, the way to go is the Spamassassin wiki, of course, but the page might not be so easy to find, so here it is:

Tips and tricks for using pseudo CSS in OpenLaszlo 4

January 28, 2008 Leave a comment

Having had to deal with this stuff lately with the Dokeos videoconference development, I thought it might be useful. The mainstream page is located on the Dokeos wiki, so in the following weeks, I recommend, looking at it over there. Here goes…

The new version of the videoconference tool (to be out at the same time as Dokeos 1.8.5) can be theme-modified via CSS. Here are some tips and tricks to do this, as it is not completely using the CSS standards, but is largely inspired by them. You will need the videoconference tool sources (downloadable from SVN) in order to modify the style, and then you will need to recompile the application with OpenLaszlo 4, as the CSS is statically bound.

Tips and tricks:

  • A CSS can be loaded from the main .lzx file by using the following syntax, right after the <canvas> tag opening:
	 <stylesheet src="resources/css/videoconf.css" />
  • The CSS cannot dictate the canvas dimensions. These have to be defined in the <canvas> tag attributes width and height.
  • When using a CSS, the property to be used has to be bound to the object by defining the object in t}e CSS with either:
    • in the case of an object having a specific tagname:
		   property: xx;
    • in the case of having an id attribute in the object:
		   property: xx;
    • in the case of having a name attribute in the object:
		   property: xx;
  • Underscores (_) cannot be used in object names or ids or name attributes because this will cause OpenLaszlo to break upon compilation
  • If you want do define a ‘visible’ attribute via CSS, you have to define this attribute last in the tag declaration, and you have to use a value of 0 or 1 (you cannot use true or false). The CSS property used could be ‘display’ (that sounds the closest to normal CSS)
  • Property values should be expressed without units (34 and not 34px). They will be considered as pixels.
  • If you want to load a specific resource (external image or something similar) through CSS, use the ‘source’ attribute in the OpenLaszlo object declaration, not the ‘resource’ attribute, which will want to load a previously-declared resource.
  • Resources “frame” tags do not appear to be an acceptable place where to put an “id” attribute…

Overall, the integration of CSS-style design is a very big improvements, as it provides an easy way for designers to contribute new styles without having to delve into the OpenLaszlo code.

Here is a link to the official documentation of OpenLaszlo 4 and CSS

Howto stop a MacBook from heating and being noisy

January 21, 2008 Leave a comment

My brother sent me a link this week-end to a blog article talking about a patch for the Radeon graphics card of my MacBook Pro. Well, I just tried it and I must say it is working *wonderfully well*. Since I activated the energy economy mode on my graphics card using the patched radeontool utility (read the manual first), I can barely hear my laptop, it is not heating as much (although it’s not *cold* either) and I haven’t tried it but they say it also improves battery time (which seems logical given that it heats less and ventilates less).

Once installed, you should use it using one of the three commands below:

sudo ./radeontool power status
sudo ./radeontool power low
sudo ./radeontool power full

I highly recommend it for MacBook Pro + Linux owners.

A few things about CakePHP, PostgreSQL and Xapian

January 18, 2008 20 comments

While on part-time holidays from Dokeos, I’m looking into some of the stuff I will need to be aware of when working on Dokeos for the next year. I think you can call that technology watch.

Anyway, I’m looking into CakePHP, PostgreSQL and most of all Xapian (although I did not yet reach that point).

CakePHP is the closest thing to a “PHP on Rails” (or so I though at the time of writing this article – turns out there are much closest matches – see comments to this post). You can develop ugly but functional web applications really fast, then start working on the things that really matter in terms of graphics. I’ve barely done a few pages but I have read a lot. Although the next version (1.2), integrating l10n and i18n is only in beta at the time of writing, it does look promising and I bet in a year or so it might be quite easy to do a simple e-learning system with that. However, we are going our way in the same direction too, with the preparation of Dokeos 2.0, which will bring object-oriented code which will (hopefully) speed up our developments.

I need a file upload feature (to index text files) and a users and permissions management for a small application I’m working on (to prepare for indexation in Dokeos) and I have found enough websites to get me going… (see references below)

About PostgreSQL now, I just realised there is no known way of retrieving PostgreSQL arrays directly from PHP. You have to fetch them as strings and then “parse” the string to get an array. That sounds quite bad to me. Apparently, there is a very recent version of Perl’s DBI that allows that, but I haven’t been able to confirm that just yet. One solution might be to develop a stored procedure in PostgreSQL to do that, but I don’t really fancy the idea of delving into DBMS-specific internals (although arrays are one specific internal of PostgreSQL).

Xapian seems nice. I’m getting more precise in my questions on the Xapian mailing-list, because I know what I want and need now, but I haven’t been able to put it in practice just yet. That’s going to have to wait for next week, probably. Xapian is comparable in many ways to Lucene, a Java-based indexing and search engine. I’m working on this small app’ with my father, who’s spear-heading the Lucene alternative while I’m trying to get my hands deep into Xapian+PHP

The good thing in all this is that all these tools are easily (all things being equal) combined to provide a powerful application for document indexing, storage and retrieval. CakePHP has a fully-functional PostgreSQL mode (which apparently cannot be said about its ADODB mode). Xapian works well with PHP and has a Debian package (php5-xapian) which eases its integration. Let’s see where that leads us…



File upload with CakePHP (although not exactly what I’m looking for)

HasAndBelongsToMany relationship (what I’m looking for for the user-group relationship)

Urgent videoconference development

January 13, 2008 Leave a comment

One of our client is currently waiting for a rebrand of the videoconference tool, with which we have finally managed to remove the echo bug (using OpenLaszlo 4 and a few libraries fixed it). The deadline is for the end of February, so any other development will have to wait for a bit.

I’m working on this with Arnaud and we’re trying to make it ever so easy to contribute to, because OpenMeetings (which has the same starting point as the Dokeos videoconference tool) is definitely not going forward fast enough for us and DimDim (the other possibly viable option) is still too complicated to get, in terms of how we could use it and provide it for free to our user base. It seems like the only thing that’s easy with DimDim is to subscribe to their videoconference hosting. Although we might seem to offer that option only as well, it is possible to download and install Red5 on most Linux distributions and to then download the Red5 additional classes for Dokeos and run the videoconference after something like a few hours of setup, and completely for free.

If any of you readers is a pro with OpenLaszlo, please let us know, we are in need of your skills. Only serious and experienced people will be considered.

Dokeos' reservations tool

January 13, 2008 Leave a comment

I had to upgrade the reservations tool for Dokeos lately. Nothing much but a few variables and constants renaming, but the use of the module itself is quite a mystery to me. HoGent and the VUB are working on the tool as well but for different versions of Dokeos and in different perspectives (adding features or integrating it more into the Dokeos calendar).

In any case, the reviewed version of the tool, working with Dokeos 1.8, is available on the Dokeos tools page and has already been downloaded 13 times (in two days time, it’s not bad).

Howto stop a MacBook Pro from short-circuiting you

My girlfriend has read somewhere (I don’t know where exactly) that the very light but very annoying short-circuits you get from the metallic case of a MacBook Pro sold in Europe is due to a failure of Apple’s manufacturer to connect the earth (wire) inside the european plug, so that electricity overcharge is not removed by any other means than your arm.

Well, I just tried the recommended solution: replace the plug with another one (the original cannot be reassembled once disassembled), this time connecting the earth (wire) correctly. I’m happy to say this worked out very well, apparently. It’s a bit sad to have to remove the original plug for a slightly uglier one, but it was really annoying to get shocked continuously…

%d bloggers like this: