From 8849d841b20477eb7ab29ccb5ad43ccf5d2d9c00 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 19 Jul 2008 20:10:40 -0300 Subject: [PATCH] stash page as header --- filters/postal-filer.pl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/filters/postal-filer.pl b/filters/postal-filer.pl index ac5a3a7c2..043515141 100644 --- a/filters/postal-filer.pl +++ b/filters/postal-filer.pl @@ -17,14 +17,22 @@ die "configuration file is mandatory" unless ($config_file); my %config=IkiWiki::Setup::load($config_file); -my $maildir=$config{postal_maildir}; -my $prefix=$config{postal_prefix}; +my $maildir=$config{postal_maildir} || die "maildir not set"; + +my $prefix=$config{postal_prefix} || die "prefix not set"; $mail=Email::Filter->new(emergency => $maildir); my $to=$mail->to; if ($to =~ m/$prefix($Convert::YText::valid_rex)/){ my $key=decode_ytext($1); - print $key; + + print $key,"\n"; + $mail->simple->header_set('X-IkiPostal-Key',$key); + + my @path=split(qr{/},$key); + }; +$mail->accept("testbox"); + -- 2.26.2