| 1 | # $Id: Archive.pm 1306 2003-08-11 09:24:32Z richardc $ | ||||||||||
| 2 | package Siesta::Plugin::Archive; | ||||||||||
| 3 | 8 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 8 | ▶ | use Siesta::Config; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 8 | ▶ | use Siesta::Plugin; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 8 | ▶ | use base 'Siesta::Plugin'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 8 | ▶ | use Email::LocalDelivery; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 1 | ▶ | sub description { | ||||||||
|
Subroutine
description: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 10 | 1 | "save a copy of the message to an archive." | |||||||||
| 11 | } | ||||||||||
| 12 | |||||||||||
| 13 | 1 | ▶ | sub process { | ||||||||
|
Subroutine
process: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 14 | 1 | my $self = shift; | |||||||||
| 15 | 1 | my $mail = shift; | |||||||||
| 16 | |||||||||||
| 17 | 1 | my $path = $self->pref('path'); | |||||||||
| 18 | 1 | ▶ | Email::LocalDelivery->deliver( $mail->as_string, $path ) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | or die "local delivery into '$path' failed"; | ||||||||||
| 20 | 1 | return; | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 1 | ▶ | sub options { | ||||||||
|
Subroutine
options: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 24 | 1 | my $self = shift; | |||||||||
| 25 | 1 | my $name = $self->list->name; | |||||||||
| 26 | |||||||||||
| 27 | +{ | ||||||||||
| 28 | 1 | path => { | |||||||||
| 29 | description => "where to drop the archives", | ||||||||||
| 30 | type => "string", | ||||||||||
| 31 | default => "$Siesta::Config::ARCHIVE/$name/", | ||||||||||
| 32 | }, | ||||||||||
| 33 | }; | ||||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 8 | 1; | |||||||||