| 1 | package Mail::MtPolicyd::Plugin::Action; | ||
| 2 | |||
| 3 | 3 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 3 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 3 | our $VERSION = '2.01'; # VERSION | |
| 7 | # ABSTRACT: mtpolicyd plugin which just returns an action | ||
| 8 | |||
| 9 | |||
| 10 | 3 | extends 'Mail::MtPolicyd::Plugin'; | |
| 11 | |||
| 12 | 3 | ▶ | use Mail::MtPolicyd::Plugin::Result; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 3 | has 'action' => ( is => 'ro', isa => 'Str', required => 1 ); | |
| 15 | |||
| 16 | sub run { | ||
| 17 | 2 | ▶ | my ( $self, $r ) = @_; |
|
Subroutine
run: called CC=1 SCAR=0.0
Pod
documented
| |||
| 18 | |||
| 19 | 2 | return Mail::MtPolicyd::Plugin::Result->new( | |
| 20 | action => $self->action, | ||
| 21 | abort => 1, | ||
| 22 | ); | ||
| 23 | } | ||
| 24 | |||
| 25 | 3 | __PACKAGE__->meta->make_immutable; | |
| 26 | |||
| 27 | 3 | 1; | |
| 28 | |||
| 29 | __END__ | ||
| 30 | |||
| 31 | =pod | ||
| 32 | |||
| 33 | =encoding UTF-8 | ||
| 34 | |||
| 35 | =head1 NAME | ||
| 36 | |||
| 37 | Mail::MtPolicyd::Plugin::Action - mtpolicyd plugin which just returns an action | ||
| 38 | |||
| 39 | =head1 VERSION | ||
| 40 | |||
| 41 | version 2.01 | ||
| 42 | |||
| 43 | =head1 DESCRIPTION | ||
| 44 | |||
| 45 | This plugin just returns the specified string as action. | ||
| 46 | |||
| 47 | =head1 PARAMETERS | ||
| 48 | |||
| 49 | =over | ||
| 50 | |||
| 51 | =item action (required) | ||
| 52 | |||
| 53 | A string with the action to return. | ||
| 54 | |||
| 55 | =back | ||
| 56 | |||
| 57 | =head1 EXAMPLE | ||
| 58 | |||
| 59 | <Plugin reject-all> | ||
| 60 | module = "action" | ||
| 61 | # any postfix action will do | ||
| 62 | action=reject no reason | ||
| 63 | </Plugin> | ||
| 64 | |||
| 65 | =head1 AUTHOR | ||
| 66 | |||
| 67 | Markus Benning <ich@markusbenning.de> | ||
| 68 | |||
| 69 | =head1 COPYRIGHT AND LICENSE | ||
| 70 | |||
| 71 | This software is Copyright (c) 2014 by Markus Benning <ich@markusbenning.de>. | ||
| 72 | |||
| 73 | This is free software, licensed under: | ||
| 74 | |||
| 75 | The GNU General Public License, Version 2, June 1991 | ||
| 76 | |||
| 77 | =cut | ||