I have new versions of Firefox running on my computers, and I was busy adding block images rules on each one. I thought this was less than ideal, so I decided to give Privoxy a new try. I saw that a new version is out, so I updated the www/privoxy package as well. Apart from getting more up-to-date filters, there’s a memory leak fix and I could also enable threads for parallel request handling.
- »
- I had a couple of tweaks in my private copy of mstream to keep stream titles shorter, and it had been working great for a couple of months. So I released a new version and called it 1.0. It does everything I need now. Enjoy!
- »
- Now that I’m using a threaded version of Perl, I get to find out what doesn’t work with it… I’ve upgraded p5-Image-Imlib2 to version 1.03 to bring in threaded Perl support. I’m glad that a version upgrade was all it needed.
6.6.04
Play nice with Markdown
I’ve created a couple of small patches to improve how WordPress works with Markdown:
-
The
balanceTagsfunction was preventing the Markdown autotags feature from working by thinking <http://server/page> is actually some sorf of anhttptag. I didn’t want to completely disablebalanceTags, so I added code to pass throughhttp,httpsandftp“tags” untouched. -
The
wptexturizefunction must be called after Markdown to avoid unwanted “texturizing” of preformatted and code blocks. The fix was easy once I learned that filters have priorities. The default priority is 10, so I modifiedmarkdown.phpto install itself at priority 8.
I’m beginning to think I should import WordPress to my local CVS repository.
wp-links
Storing links in a database is an excellent idea. Storing links in multiple databases is not. To avoid having links all over the place to manage, I wrote wp-links.php for accessing the links table in the WordPress database. The idea is to be able to get lists of links as a “standalone” feature on pages that are not using WordPress, while still being able to manage the links through WordPress as well as use the links on the journal pages.
(more…)
2.6.04
Portable email
I’m often way behind on my personal email, and many messages can go completely unanswered. When I get home from work in the evenings, I’m just not “in the mood” for writing email: there are all sorts of household chores that need to be taken care of, or I’ve just arrived home so late there is nothing else to do but sleep.
I’ve thought about portable before, but haven’t come up with any solutions yet that I could implement right away without having some concerns on feasibility in the long term. (more…)
31.5.04
New spam filters
Last night I upgraded the mail transport software to Postfix 2.1.1 and added a couple of new filtering rules from Jim Seymour’s list of ideas.
I now require that mail with freemail sender addresses arrive from freemail peer addresses (e.g. mail from “foo@yahoo.com” is only accepted from a *.yahoo.com peer). This has already blocked lots of mail from e.g. *.netikka.fi and *.surfer.at from machines that HELO with things like “msn.com” and use *@yahoo.com sender addresses.
I also added a check for bad MX records. I’m now blocking domains with MX records pointing to any private or reserved networks (i.e. that cannot be used for public connectivity):
0.0.0.0/8 REJECT Domain MX in broadcast network 10.0.0.0/8 REJECT Domain MX in RFC-1918 private network 127.0.0.0/8 REJECT Domain MX in loopback network 169.254.0.0/16 REJECT Domain MX in link local network 172.16.0.0/12 REJECT Domain MX in RFC-1918 private network 192.0.2.0/24 REJECT Domain MX in TEST-NET network 192.168.0.0/16 REJECT Domain MX in RFC-1918 private network 224.0.0.0/4 REJECT Domain MX in class D multicast network 240.0.0.0/5 REJECT Domain MX in class E reserved network 248.0.0.0/5 REJECT Domain MX in IANA reserved network
I thought I’d see results from this rule right away, but nothing yet…
Update (6/4/2004): It looks like not that many spammers are using “bad” IP’s for their MX hosts. However, there are a few hits, and this prevents unnecessary bounces to the local postmaster, so I’m certainly keeping these rules.
30.5.04
Yikes, rdist is broken
Christos implemented statvfs on NetBSD (see his proposal when he was planning the work). I just upgraded to 2.0F and found out that rdist6 (a.k.a. freerdist, whatever you wanna call it) no longer compiles, as it expects to use statfs instead.
I use rdist6 to distribute centrally mastered files around on my systems, so I was too impatient to wait for an “official” fix, so I patched something together in pkgsrc to make rdist6 work again.
28.5.04
WordPress character set fixes
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.
24.5.04
Postfix canonical rewriting
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.