Select Page

Mozilla Sunbird, Apple iCal and The Missing Sync

Inbetween moving house I have also been playing with a little 12″ iBook, I think I am going to buy it since I do quite fancy it.
One of my big wishes in life has been to get Sunbird Sync’d up with my iPaq as I have mentioned here a few times before. The Apple has that ability, though not natively, but by buying a 3rd party application called The Missing Sync.
After failing to find a demo version I ended up buying this tool only to find that syncing the device with a Sunbird file loaded into iCal totally nukes the iPaq, needed a hard reset.
After much digging around these files and coming up with the types of entries I have, creating matching ones in a new file in iCal I finally got a good idea of the format that iCal likes. Seems there are 2 major problems with Sunbird data:
1) Sunbird puts things on multiple lines, for some reason iCal does not like this, so I just joined the lines together so that you now have SUMMARY:An Event on one line rather than 2.
2) Monthly repeating events should really have a BYMONTHDAY=nn clause at the end of the RRULE, Sunbird does not add them.
Once I had a perl script to do the fixup and loaded it into iCal syncing worked 100% and I now have a iPaq synced up with iCal files, though cant really edit them in Mozilla ๐Ÿ™

daemon(8)

I’ve been trying to think of a good way to start the exim greylistd which does not by default run in the background.
I remember reading about daemonize long ago and found it again via Google. I checked if my FreeBSD machines has this command and stumbled on daemon(8).
It was introduced around FreeBSD 4.7 and supports running any command in the background complete with pid file support.
I put the following command in a simple rc script so now I have a full start, stop, restart style command for greylistd.

/usr/sbin/daemon -cf -p /var/run/greylistd.pid /usr/local/sbin/greylistd

Composition in Photography

There is a nice collection of links on guides, rules etc on composing images on Digital Photography Blog.
Possibly the most useful advice comes from the same site:

..sometimes in knowingly breaking compositional rules we actually create some of the most interesting and emotion provoking images possible.

Following the rules is all about getting a feeling for photography, breaking them is about getting your own style and standing out amongst the rest.
The full article can be seen here

ipfw tables

FreeBSD has recently added a method for storing large amounts of cidr addresses in a lookup table that can then be matched in a single rule.
I use these on my country blocking to optimize things a bit.
Previously I put a large block of ipfw deny‘s very early up in my rule set and just block it all on everything. This was not optimal since for some IP’s I’d like to keep certain ports open – like port 80. I did not want to have per host block lists since that would mean hosts x 3000 rules. Lookup tables are the answer.
My current setup goes more or less like this:

  • General counter rules per jail
  • Denies on frequently scanned ports like 1433 – without logging
  • Blocks of rules per host – allow TCP, allow UDP, deny TCP, deny UDP, deny ICMP

I am now amending the per host block by adding a single rule above the deny rules that kills off all the traffic from the dodgy countries – without logging it – then I have denies with logging. This keeps my logs reasonably empty of IPFW DENY log entries so I can monitor them easily.
I first create the table, each table is numbered I just chose 1 for my table.

ipfw -q table 1 add 220.228.0.0/15
ipfw -q table 1 add 220.232.64.0/18
ipfw -q table 1 add 220.232.128.0/17

I then simply have to add a single rule for each host which in effect is the equivelant of duplicating all 3000 rules I previously had on a per host basis. Now I can have my port 80’s etc open and still kill off the dodgy traffic without polluting my logs. Perfect.
A sample table rule:

ipfw add 21999 set 15 deny ip from “table(1)” to 1.2.3.4

The quotes around the table(1) are very important since the shell you run the command under may cause havoc with the ()’s. You could alternatively escape the ()’s, example: table\(1\)

Sunbird and Pocket PC

I have not been using my pocket pc for a long time now, since I started using Sunbird because no way exist to sync the two.
Over the weekend I thought I’d have another troll through the net and came across two good things.
The first is a repository of free Pocket PC software, well worth a look.
The 2nd is a promising one way syncing system for ics files -> Pocket Outlook. It is called KCal and can take ics files and replace all your existing calendar entries with what is in the ics file.
So this is good if you do all your entering of events in Sunbird and just need a mobile copy of it, no syncing back to Sunbird. This is a good start and probably pretty much exactly what I need.
I did some testing, it works ok for non recurring events but it has a problem with recurring events. I sent the author some feedback on this and he already responded that he will fix this in the next release. I also asked if it were possible to support loading more than one ics file at sync time.