Lines 757-762
Link Here
|
757 |
} |
757 |
} |
758 |
}); |
758 |
}); |
759 |
|
759 |
|
|
|
760 |
=item enlist_addrlist (listname) user@example.com |
761 |
|
762 |
Adds one or more addresses to a named list of addresses. |
763 |
The named list can then be consulted through a check_from_in_list() or a |
764 |
check_to_in_list() eval rule implemented by the WLBLEval plugin, which takes |
765 |
the list name as an argument. Parenthesis around a list name are literal - a |
766 |
required syntax. |
767 |
|
768 |
Listed addresses are file-glob-style patterns, so C<friend@somewhere.com>, |
769 |
C<*@isp.com>, or C<*.domain.net> will all work. |
770 |
Specifically, C<*> and C<?> are allowed, but all other metacharacters |
771 |
are not. Regular expressions are not used for security reasons. |
772 |
Matching is case-insensitive. |
773 |
|
774 |
Multiple addresses per line, separated by spaces, is OK. Multiple |
775 |
C<enlist_addrlist> lines are also OK. |
776 |
|
777 |
Use the remove_addrlist directive to neutralize previous enlist_addrlist |
778 |
settings. |
779 |
|
780 |
Enlisting an address to the list named blacklist_to is synonymous to using the |
781 |
directive blacklist_to |
782 |
|
783 |
Enlisting an address to the list named blacklist_from is synonymous to using the |
784 |
directive blacklist_from |
785 |
|
786 |
Enlisting an address to the list named whitelist_to is synonymous to using the |
787 |
directive whitelist_to |
788 |
|
789 |
Enlisting an address to the list named whitelist_from is synonymous to using the |
790 |
directive whitelist_from |
791 |
|
792 |
e.g. |
793 |
|
794 |
enlist_addrlist (PAYPAL_ADDRESS) service@paypal.com |
795 |
enlist_addrlist (PAYPAL_ADDRESS) *@paypal.co.uk |
796 |
|
797 |
=cut |
798 |
|
799 |
push (@cmds, { |
800 |
setting => 'enlist_addrlist', |
801 |
type => $CONF_TYPE_ADDRLIST, |
802 |
code => sub { |
803 |
my($conf, $key, $value, $line) = @_; |
804 |
local($1,$2); |
805 |
if ($value !~ /^ \( (.*?) \) \s+ (.*) \z/sx) { |
806 |
return $MISSING_REQUIRED_VALUE; |
807 |
} |
808 |
my $listname = $1; # corresponds to arg in check_uri_host_in_wblist() |
809 |
# note: must not factor out dereferencing, as otherwise |
810 |
# subhashes would spring up in a copy and be lost |
811 |
$conf->{parser}->add_to_addrlist ($listname, split(/\s+/, $value)); |
812 |
} |
813 |
}); |
814 |
|
760 |
=item blacklist_uri_host host-or-domain ... |
815 |
=item blacklist_uri_host host-or-domain ... |
761 |
|
816 |
|
762 |
Is a shorthand for a directive: enlist_uri_host (BLACK) host ... |
817 |
Is a shorthand for a directive: enlist_uri_host (BLACK) host ... |