From: David Bremner Date: Sat, 19 Jul 2008 23:10:40 +0000 (-0300) Subject: stash page as header X-Git-Tag: 0.1~41 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8849d841b20477eb7ab29ccb5ad43ccf5d2d9c00;p=ikiwiki.git stash page as header --- 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"); +