diff options
| author | fukachan <fukachan> | 2008-07-20 09:15:19 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2008-07-20 09:15:19 +0000 |
| commit | fc590347427e32c2b8f14a39f0d256b015bfcab4 (patch) | |
| tree | 84a18efd5343838db722fdb1cb6e8eeef71ef41f /fml | |
| parent | b3ecd69c6591bd13f9a3f76d4e3f5c5eaec345c5 (diff) | |
| download | fml8-fc590347427e32c2b8f14a39f0d256b015bfcab4.tar.gz fml8-fc590347427e32c2b8f14a39f0d256b015bfcab4.tar.bz2 fml8-fc590347427e32c2b8f14a39f0d256b015bfcab4.zip | |
define isolate_system_special_accounts() and
isolate_system_accounts().
Diffstat (limited to 'fml')
| -rw-r--r-- | fml/lib/FML/Restriction/Post.pm | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/fml/lib/FML/Restriction/Post.pm b/fml/lib/FML/Restriction/Post.pm index a6a3b2f9..8be2f7e4 100644 --- a/fml/lib/FML/Restriction/Post.pm +++ b/fml/lib/FML/Restriction/Post.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Post.pm,v 1.29 2008/07/03 20:45:09 fukachan Exp $ +# $FML: Post.pm,v 1.30 2008/07/06 05:31:47 fukachan Exp $ # package FML::Restriction::Post; @@ -242,6 +242,40 @@ sub isolate } +# Descriptions: isolate the message if $sender matches a system account. +# Arguments: OBJ($self) STR($rule) STR($sender) +# Side Effects: none +# Return Value: ARRAY(STR, STR) +sub isolate_system_special_accounts +{ + my ($self, $rule, $sender) = @_; + my $curproc = $self->{ _curproc }; + my $cred = $curproc->credential(); + my $match = $cred->match_system_special_accounts($sender); + + if ($match) { + $curproc->log("${rule}: $match matches sender address"); + unless ($curproc->restriction_state_get_isolate_reason()) { + $curproc->restriction_state_set_isolate_reason($rule); + } + return("matched", "isolate"); + } + + return(0, undef); +} + + +# Descriptions: isolate if $sender matches a system account. +# Arguments: OBJ($self) STR($rule) STR($sender) +# Side Effects: none +# Return Value: ARRAY(STR, STR) +sub isolate_system_accounts +{ + my ($self, $rule, $sender) = @_; + $self->isolate_system_special_accounts($rule, $sender); +} + + =head1 EXTENSION: IGNORE CASE =head2 ignore |
