
Modular
Dependencies up the wazoo
my $build = Siesta::Build
->new( module_name => "Siesta",
license => 'perl',
scripts => [ 'bin/tequila', 'bin/nacho' ],
requires => { 'Test::More' => 0,
'Test::MockObject' => 0,
'Class::Accessor::Fast' => 0,
'Mail::Address' => 0,
'Email::Simple' => '1.4',
'Email::LocalDelivery' => '0.02',
'DBD::mysql' => 0,
'Class::DBI::BaseDSN' => 0,
'Class::DBI::mysql' => 0, # for live
'Class::DBI::SQLite' => 0, # for test
'File::Path' => 0,
'File::Basename' => 0,
'File::Find::Rule' => 0,
'UNIVERSAL::require' => 0,
'Template' => 0,
'Digest::MD5' => 0,
# Module::Build 0.18 is the first release with
# working scripts shebang rewriting
'Module::Build' => '0.18',
'Tie::IxHash' => 0,
'Storable' => 0,
'Log::LogLite' => 0.
},
dynamic_config => 1,
sign => 1,
);
But that's okay, because CPANPLUS loves that kind of thing.
Plugin based
Siesta comprises twenty-nine modules, and two scripts
inject the mail into the system
lots of little bits. commands line control tool
TT + Template::Plugin::Siesta
mail arrives at the system, and gets funelled into the system with standard MTA juju.
siesta-dev: "|/usr/local/bin/tequila post siesta-dev"
#!/usr/bin/perl -w
use strict;
use Siesta;
use constant debug => 1;
eval {
Siesta->new->process( action => $ARGV[0],
list => $ARGV[1],
mail => \*STDIN );
};
if ($@) {
# let the MTA know we're deferring.
print $@ if debug;
exit 20;
}
__END__
=head1 NAME ...
Siesta::process is this:
sub process {
my $self = shift;
my %args = @_;
my $action = $args{action} || 'post';
my $mail = Siesta::Message->new( $args{mail} );
my $list = Siesta::List->load( $args{list} );
$self->log("processing $action", 1);
for my $plugin ( $list->plugins($action) ) {
# SIESTA_NON_STOP is used by 20fullsend.t to ensure
# excercising of everything. it means "run the next plugin,
# even if the last one said to stop"
return if $plugin->process($mail) && !$ENV{SIESTA_NON_STOP};
}
}
package Siesta::Plugin::SubjectTag; use strict; use Siesta::Plugin; use base 'Siesta::Plugin';
sub description {
'add [list.id] to subject lines';
}
sub process {
my $self = shift;
my $mail = shift;
my $subject = $mail->subject || 'no subject';
my $list_name = $self->list->name;
$mail->subject("[$list_name] $subject")
unless $subject =~ /\[$list_name\]/;
return;
}
1; __END__
Reject/defer non-member posts
Adds RFC2919 and RFC2396 headers
Saves messages to a maildir
Rejects mails with overly long signatures
Munges the Reply-To header to be the list address
Dispatches the mail to subscribers
We know Reply-To munging is an issue dear to all your hearts.
So much so that Simon wrote this into version 1.0 of the plugin.
# see : # http://www.unicom.com/pw/reply-to-harmful.html # http://www.metasystema.org/essays/reply-to-useful.mhtml # http://thegestalt.org/simon/replytorant.html # http://www.deez.info/sengelha/writings/considered-harmful/ # for various for and against arguments thrashed out by the great # and the good and for why I don't care. Feel free to argue about # this to your hearts content - the monkeys dance for my pleasure. # # DANCE MONKEYS! DANCE!
And it's still there now.

Yes, that's what we used to call it, and I was always like wuh? And it was like bleep bleep bleep.
The Send plugin is special
It actually likes and listens to you (if your admin lets it)
If there's a personalisation pipeline configured for the list, it will happily run all the Plugins in it.
Just for you.

That's what you get when you google for "Big American Party!"
Per-user Reply-To munging.
I'm not showing you a bunch of stuff today.
It's a command line interface, it's not overly exciting
TT + Plugin. unfinished. just call on methods in the other classes
Don't worry, that's what the next slide is for:
How many roads must a man walk down, before you can call him a man?
Sweet. What does mine say?
Why do things always come in threes?