May 6th, 2006

belize

DJabberd config file

Ahhh yeah, Artur and I just added Apache-style conf to DJabberd so you don't have to write a Perl file with a bunch of server/vhost/plugin constructors by hand. Now it looks like:

$ cat djabberd.conf
OldSSL  enable

# defaults:
ClientPort 5222
ServerPort 5269

#PerlModule DJabberd::SixApart

<VHost jabber.bradfitz.com>
  S2S enable
  RequireSSL no

  <Plugin DJabberd::Authen::AllowedUsers>
     Policy accept
     AllowedUsers brad crucially test
  </Plugin>

  <Plugin DJabberd::Authen::StaticPassword>
      Password password
  </Plugin>

  <Plugin DJabberd::PresenceChecker::Local />
  <Plugin DJabberd::Delivery::Local />
  <Plugin DJabberd::Delivery::S2S   />

  <Plugin DJabberd::RosterStorage::SQLite>
     Database roster.sqlite
  </Plugin>

</VHost>

$ ./djabberd --conf=djabberd.conf
Next step is removing the need for the must-have plugins and making them automatic. That means adding plugin-declared before/after dependencies so DJabberd can do the hook ordering. Should be easy. Then DJabberd should be getting ready for usability by the masses. :-)

Update: the as_bool function was fun:
sub as_bool {
    my $val = shift;
    return 1 if $val =~ /^1|yes|true|t|on|enabled?$/;
    return 0 if $val =~ /^0|no|false|f|off|disabled?$/;
    die "Can't determine booleanness of '$val'\n";
}
belize

Diving, dog

Dina's in Portland.

I'm watching the dog.

Except I'm scuba diving tomorrow morning, while the dog lays in the sun and goes to the beach with the neighbor dog/family.

I have to wake up (or leave?) at 5:15 tomorrow to head down to Monterey. Early boat dive. Just two tanks.

Major's so tired he's howling at his own reflection. Had to close the blinds.

I'm tired too, but want to get all my gear in order first so I don't have to think tomorrow morning. Don't even know who's driving.
belize

DJabberd, PAM, simple config...

With PAM support and automatic plugins when you don't specify plugins for a given phase, a simple DJabberd server config is down to:
OldSSL enable
<VHost jabber.bradfitz.com>
  S2S enable
  RequireSSL yes
  <Plugin DJabberd::Authen::PAM />
  <Plugin DJabberd::RosterStorage::SQLite>
     Database roster.sqlite
  </Plugin>
</VHost>