Archive for August, 2007

Best Current Practice for mail forwarding?

While SPF seems to be among the currently used technologies for spam protection, SRS looks rather dead. But forwarding mail breaks SPF without workarounds. So what is the best current practice?

  • Completly ignore the existence of SPF
  • Implement SPF but just implement forwarding “the old way”
  • Inform you users that forwarding breaks SPF and they have to whitelist you mail server
  • Implement SRS (but keep it a secret)

The forwarding part of SRS is rather simple, but I havn’t found any clear way to implement the actual handling of bounces. It wouldn’t be hard to hack some usage of Mail::SRS onto postfix but there doesn’t seem to be an off the shelves solution?

Comments (5)

Hvem kan man stole på?

Joachim Breitner skriver i The trustworthy stranger om hvorvidt det er bedst at ens venner eller fuldstændige fremmede har administrator-adgang til ens data og Martin von Haller fortæller om en advokat han overhørte på en togtur mellem Købehnavn og Århus.

Det er den sammen observation, folk er i nogle sammenhæng mere villige til at dele information med vildt fremmede end med deres bedste venner. Pointen er at information ikke har en objektiv værdi, derfor deler vi gerne information med andre som ikke kan bruge informationerne til noget. Vi er først lige begyndt at vænne os til Google og der er stadigvæk folk der bliver stødt over at man lige Googler dem. Det bliver interessant at se hvor tilgængelig information bliver og hvor langt bagefter den brede befolkning kommer for ændringerne.

Men det er irriterende at høre på. Heldigvis skal jeg sjældent så langt at jeg må tage de offentlige.

Comments (2)

New cool Perl packages in Debian

A good read eval print loop for perl has been on my Wanted list for a long time. Matt S Trout’s Devel::REPL has been looking promissing but I didn’t want to fiddle with installing the dependencies. Thanks to Alexis Sukrieh and the Debian Perl Group Devel::REPL will enter unstable. Yeahhh…

Another thing on my wanted list was Debian packages of Perl::Critic. Couldn’t find a ITP, but looking around at the Debian Perl Group’s website to find out how to package it I discovered that Joey Hess allready did the work.

I’ve been using the morning installing the above from the subversion repository on pkg-perl.alioth.debian.org. Only problem was that I needed a newer package of libppi-perl which wasn’t maintained in subversion.

What’s next? Looking at my ~/.perl Perl::Tidy seems to be a candidate.

Comments

On handling email

Watching the popular Inbox Zero video would probally improve my email handling skills better. But this took less time and I wanted to play around with Net::XMPP;


#!/usr/bin/perl -l

use warnings;
use strict;

use Config::Simple;
use Linux::Inotify2;
use Email::Abstract;
use Net::XMPP; # aka Jabber and Gtalk
use POSIX;

my $DEBUG = 0;

our %config;
Config::Simple->import_from("$ENV{HOME}/.mailnotifyrc", \%config);

deamonize() unless $DEBUG;

my $inotify = new Linux::Inotify2
     or die "Unable to create new inotify object: $!";

# Different Maildir implementations triggers different events"
#   IN_MOVED_TO: rename("tmp/file","new/file")
#   IN_CREATE:   link("tmp/file", "new/file") && unlink("tmp/file")
#
# At this point the file should be written and closed.
$inotify->watch("$config{Maildir}/new", IN_MOVED_TO|IN_CREATE, sub {
        my $e = shift;
        my ($fh, $xmpp, $email, $message);

        debug('Got event for ' . $e->fullname);

        open $fh, "<", $e->fullname;
        $email = new Email::Abstract join("", <$fh>);
        close $fh;

        $message = 'Mail from ' . $email->get_header('From') .
                   ' concerning "' . $email->get_header('Subject') .'"';

        debug("Getting ready to send [$message]“);

        my $sender   = new Net::XMPP::JID ($config{Sender});
        my $receiver = new Net::XMPP::JID ($config{Receiver});
        $xmpp = new Net::XMPP::Client();
        $xmpp->Connect( hostname => $sender->GetServer,
                        port     => $config{port} || 5222,
                        tls      => $config{usetls} || 0,
                      );
        $xmpp->AuthSend( username => $sender->GetUserID,
                         password => $config{password},
                         resource => $sender->GetResource || ‘mailnotify’,
                       );

        $xmpp->MessageSend( to   => $receiver,
                            type => $config{MessageType} || ‘chat’,
                            body => $message,
                          );

        $xmpp->Process(1);
        $xmpp->Disconnect;

        debug(”Event done”);
});

1 while $inotify->poll;

sub deamonize {
        my $pid = fork();

        if ($pid) {
                exit 0;
        }

        ### close all input/output and separate
        ### from the parent process group
        open STDIN,  ‘</dev/null’ or die “Can’t open STDIN from /dev/null: [$!]\n”;
        open STDOUT, ‘>/dev/null’ or die “Can’t open STDOUT to /dev/null: [$!]\n”;
        open STDERR, ‘>&STDOUT’   or die “Can’t open STDERR to STDOUT: [$!]\n”;

        ### Change to root dir to avoid locking a mounted file system
        ### does this mean to be chroot ?
        chdir ‘/’                 or die “Can’t chdir to \”/\”: [$!]“;

        ### Turn process into session leader, and ensure no controlling terminal
        POSIX::setsid();
}

sub debug { return unless $DEBUG; print STDERR for @_; }

__END__

Comments (2)

libcbtsysinfo_0

While testing Debian Live I suddenly discovered that something had installed a library in my home directory: ~/cbt/lib/libcbtsysinfo_0.so.

Google gives two hints: Some discussion on the danish usenet group dk.edb.mac and some discussion on debian-user.

It looks like it get installed when I log into my internet bank. By lookin at the symbols extracted by objdump (a couple of symbols stating with Java_com_ibm_cbt_slight_CbtSysInfo) it seems to be IBM’s Crypto-base Transaction system.

Evil to install such thing without asking. (Well, it’s a Linux/x86 library even though I’m using Linux/PPC)

Comments (4)

Re: Two Question for All Serious Free Software Contributors

Russel Cooker asks two questions to free software Contributors. Here is my answers:

The most important advice I can give to someone who wants to contribute to the free software community is “Take it easy, it’s only software”. If you’re not able to take criticism or to be drawn into tough discussions without taking it personal, you should consider if it it worth it to contribute. Most free software project have their part of to big egos, regular kooks and people with less than good communication skills. And worst of all, nor really good way of coercing people to behave or work together.

My own advantage of participationg in open source projects is the famous itch. For me the most convincing argument for working with open source is “Scratching you own itch while being lazy and not reinvent everything else.” If you dn’t have that itch, then you shouldn’t care about joining a project.

Comments