← Index
NYTProf Performance Profile   « line view »
For /usr/local/libexec/sympa/task_manager-debug.pl
  Run on Tue Jun 1 22:32:51 2021
Reported on Tue Jun 1 22:35:11 2021

Filename/usr/local/libexec/sympa/Sympa/Tools/Domains.pm
StatementsExecuted 0 statements in 0s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
0000s0sSympa::Tools::Domains::::BEGIN@26Sympa::Tools::Domains::BEGIN@26
0000s0sSympa::Tools::Domains::::BEGIN@27Sympa::Tools::Domains::BEGIN@27
0000s0sSympa::Tools::Domains::::BEGIN@28Sympa::Tools::Domains::BEGIN@28
0000s0sSympa::Tools::Domains::::BEGIN@29Sympa::Tools::Domains::BEGIN@29
0000s0sSympa::Tools::Domains::::__ANON__Sympa::Tools::Domains::__ANON__ (xsub)
0000s0sSympa::Tools::Domains::::is_blocklistedSympa::Tools::Domains::is_blocklisted
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# -*- indent-tabs-mode: nil; -*-
2# vim:ft=perl:et:sw=4
3# $Id$
4
5# Sympa - SYsteme de Multi-Postage Automatique
6#
7# Copyright 2019 The Sympa Community. See the AUTHORS.md file at
8# the top-level directory of this distribution and at
9# <https://github.com/sympa-community/sympa.git>.
10#
11# This program is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program. If not, see <http://www.gnu.org/licenses/>.
23
24package Sympa::Tools::Domains;
25
26use strict;
27use warnings;
28use Conf;
29use Sympa::Tools::Text;
30
31sub is_blocklisted {
32 my $email = shift;
33
34 if (defined($Conf::Conf{'domains_blocklist'})) {
35 my @parts = split '@', Sympa::Tools::Text::canonic_email($email);
36 foreach my $f (split ',', lc($Conf::Conf{'domains_blocklist'})) {
37 if ($parts[1] && $parts[1] eq $f) {
38 return 1;
39 }
40 }
41 }
42
43 return 0;
44}
45
461;
47__END__