rfc 5321 – prework for my policy daemon

In my last two articles My first Java Application (apache commons cli) #1 and Server / Thread (threading & connection handling) #2, I’ve started to write a Policy-Daemon for Postfix. In this article I’m stumbling through postfix documentation and the RFC to create a flowchart and a state diagram for my before-queue-filter. Hence I call that „pre“-work.

Continue Reading

My first Java Application (apache commons cli) #1

Recently I’ve started to write my first Java-Application. I’m developing a before-queue-policy filter for Postfix (aka smtpd-proxy) which allows to filter whole mails before they’re stored in postfix‘ queue. I’ll document my process of learning Java and writing that policy daemon here 🙂 Alright, I have to admit that I already have some experience with Java and due to my programming background the syntax isn’t very difficult to me. Also some friends are helping sometimes (thanks to Till, Stefan and Sven).

Continue Reading

Intellij Idea

Today my license key for Intellij Idea arrived; first time I bought something commercial (except for games) in the past years. I did start webdevelopment with some WYSIWYG editors in windows, back when I was 11 up to 14. Due to all the problems that caused (not w3c conform, having to add hacks for several browsers, precise work was impossible, those editors created table based layouts, etc) and me learning PHP I started to use simple editors with syntax highlighting. When I switched completly to Linux (14 years now linux only) I was using bluefish and vim to do webdevelopment. I think one or two years ago, Till was showing me eclipse, my first IDE – I’ve been pretty impressed because he was hacking down a simple CRUD application within less than 5 minutes and eclipse was doing a lot of stuff automatically, so I switched to eclipse. But…
Continue Reading

Useful JavaScripts when dealing with browser compatibility

Just finished some jquery/javascript stuff when the customer called and told me „It’s not working“, after some talks we’ve found out, they use IE8. And the page was optimized for „current“ browsers, while I wouldn’t say the ie8 is current, it seems that IE8 is shipped with some (all?) windows 7 installations. Hence everything had to be modified to work with IE8. Then the customer called again and asked „Uhm, can we make sure it works for IE7, too?“ – That was the moment I was looking for some ways to test pages in IE7 and by doing so I stumbled over a few interesting JavaScripts:

Continue Reading

Singleton

Somehow I thought the singleton pattern would be pretty useful for my Request and Response classes, because they’re unique things and there should be only one object of them. They shouldn’t get initialized over and over again. PHP is request based, which means, once you got the output of your php script, the request is finished. Reloading the page will just cause a new request. That means if you write a Request or a Response class it doesn’t make much sense to initialize them more than once. At least, that’s my opinion.
Continue Reading

Quality of Regexp

In my last blog-entry you’ve seen that I compared regexp vs nonregexp-techniques and the result was, that there are „bad“ and „good“ regexp; while the good regexp are as fast as non-regexp-techniques. Let’s take a closer look at what „good“ regexp are. Please notice that I’m not a regexp-magician so if you know about a regexp which would do better than the regexp I’ll show, please let me know.

Want to jump directly to the result and skip the boring php examples? 🙂
Continue Reading