30.5.04
I’ve been looking at new spam prevention options with Postfix 2.1.1 and one of the most interesting features is SMTP Access Policy Delegation or “the policy daemon.” It seems an excellent framework — instead of having to constantly modify the MTA you can just hook up another external policy server. Current implementations of policy servers include greylisting and support for SPF.
While reading about SPF I decided to go ahead and add SPF records for a number of domains I run. I could do this because I’m not a travelling salesman and the domains I selected don’t have users that would suffer from the forwarding problem.
In general, though, it seems a bit tricky to define working SPF records for any complex domains with remote or mobile users. Maybe in a couple of years when everyone has an IMAP server with SSL or TLS support, and all MTA’s have SRS support…
28.5.04
PHP (or possibly Apache itself) inserts a default charset=
field in the Content-Type:
header. This can cause problems with the syndication feeds, if you are not using the exact same character set on your blog. In my case the character set I use on this site is iso-8859-15 while the default that shows up is iso-8859-1.
I modified wp-rss2.php
to return the character set specified in the WordPress options, and then went through other files to apply the same change. You can download the full patch that should apply cleanly to WordPress 1.2.
27.5.04
I have wanted to experiment with different layouts and fonts on my site. I have a “beta” site on my LAN for experimenting, but it doesn’t have all the different parts of the site available. I had already heard of alternate style sheets, and since all this experimenting was mainly within the CSS code, that’s what I added.
Firefox (and Mozilla) allow selecting the style, but I was surprised to discover that they would not remember the selection from page to page. Reading the spec I realize this is considered “correct” behaviour (as far as the spec is concerned). But just how long is anyone going to keep re-selecting the style over and over? Not me…
A quick Google search on alternate style sheets provided a link to A List Apart with the solution. Working With Alternate Style Sheets is an excellent article complete with the necessary JavaScript code.
Now you can click on the Sans-Serif and Serif links at the bottom of the page to select a different font-set for viewing these pages, and the selection will be remembered throughout the site.
26.5.04
Writing HTML is not exactly easy — all those angle brackets require lots of shift key pressing, and reformatting text from inside one set of tags to outside means working around these or those tags constantly. On the other hand, writing regular plain text email is rather easy. Ascii enhancements to highlight text have been around for ages, and with almost 20 years of writing messages they are practically automatic to my fingers.
With WordPress and other blog tools I’ve looked into different markup systems. I’ve really taken a liking to Markdown, as it is very close to how I write in email. As an added bonus, I can basically take any email and put it on my web server, and it turns into an HTML document almost without any work. And I can still email it as plain text!
Since the framework of this site is written in PHP I installed a PHP version of Markdown. Then I hunted around for a PHP version of SmartyPants for a couple of minutes before realizing I should just look at the WordPress code right under my nose… (Look in the functions-formatting.php
file in the distribution.)
To tie it all together, I enhanced my page wrapper to handle .txt
files in addition to the .html
files it was already processing to add the “look-and-feel” of the site.
24.5.04
The first revision of my Postfix configuration files was committed in RCS on February 19, 2001. By March 25th I had implemented a patch to allow me to use Postfix even on the central mail server. The patch allowed disabling canonical rewriting for the SMTP envelope recipient.
Traditionally the GW systems have supported the use of external mail redirection services (e.g. IKI ry and Pobox), and I did not want to discontinue this just because I switched the MTA. I think it is great that we can have mail headers correctly reflect the preferred mail address for all of our users, regardless how the mail enters our system. This is really just a “per-user configurable masquerading” of addresses. Doing it in the MTA avoids the need to modify all software to support configurable mail addresses (and the need to separately configure the address all over the place).
However, maintaining a private patch can take quite a bit of time, so I submitted my patch for inclusion in the official Postfix distribution. Unfortunately Wietse rejected it, but he encouraged me to model it after the masquerading classes. I’m hoping he will accept the new patch. I must admit, this approach is much nicer, allowing canonical maps to be enabled or disabled for any of envelope sender, envelope recipient, sender headers or recipient headers individually.
But I need to wait a couple of weeks to make sure the new implementation works without problems in production first. Brave souls out there can download the patch and try it out. Please let me know if you are using this feature, and how it works for you.
Provided that no problems surface, this feature should be part of the Postfix package in pkgsrc as well as in the NetBSD base system as they are upgraded to Postfix 2.1.1 or later.
23.5.04
I think WordPress needs dedicated filters to be applied on content and excerpt immediately when they are retrieved from the database, to be used by formatting filters such as Markdown.
I like Markdown, but I was having problems with how WordPress does not pass the complete article to it when the “more tag” is used, and when forming RSS descriptions. Markdown uses shorthand link tags that would normally be resolved with references placed at the end of the document. With the truncation, links were not being resolved, and what’s worse, Markdown notation was left in the resulting display.
I created a patch that fixes the problem for my current articles. However, I think multipage entries would still have this problem, so this patch is not sufficient. Also, I’m not sure if I’m causing undesirable side-effects by moving the the_excerpt
filter further up in the code.
Before I start working on the filters to be applied on database retrieval, I’m waiting to hear back from WordPress developers about the approach, to avoid wasted work.
19.5.04
I took some time today to release tcsh 6.13, allowing Christos to spend his time on code enhancements rather than the release procedure. The latest beta had already been out for a couple of months, and I had been using it every day for over a month without problems. This combined with no complaints on the beta testers list would seem to indicate it was an excellent release candidate. The previous release was from July of 2002, so it was about time to get a new release out.
Christos has promptly committed new patches into the code repository, so I’m thinking I’ll try to pick another beta 6 months from now and see if I could push the next release out soon after.
16.5.04
It seems unbelievable that I have not written anything for almost eight months. Maybe it is not unbelievable to people who know me (or are waiting for an email from me), but I’ve certainly surprised myself. I must be good at self-deception.
I just got WordPress embedded to my site today. WordPress is quite flexible — I was expecting to have to modify the code, but as it stands today, there are no local modifications. The only “change” is that I’m calling the code from my custom index.php
file, but that’s actually how the authors intended it to be used anyway. Once I get familiar with the new tools (such as sending in entries via email and blogrolling links) I hope to get back to more frequent updates.