perl模块的替代方案Mail :: CheckUser

时间:2015-10-10 23:02:49

标签: perl email centos7

我需要验证电子邮件地址,但我意识到我能够安装Mail :: CheckUser的唯一方法是。

 cpan -f Mail::CheckUser 

我使用的是CentOS 7.

我找不到另一个使用SMTP信号来测试和报告电子邮件地址状态的perl模块。

我是否必须重写模块或是否有其他方法?

这是输出:

 $ cpan -t Mail::CheckUser
 Loading internal null logger. Install Log::Log4perl for.   logging messages
 CPAN: Storable loaded ok (v2.20)
 Reading '/home/folder/.cpan/Metadata'
  Database was generated on Sun, 26 Jul 2015.   01:17:02 GMT
CPAN: LWP::UserAgent loaded ok (v6.13)
CPAN: Time::HiRes loaded ok (v1.9721)
Fetching with LWP:
http://cpan-du.viaverio.com//authors/01mailrc.txt.gz
CPAN: YAML loaded ok (v1.15)
 Reading.   '/home/folder/.cpan/sources/authors/01mailrc.txt.gz'
 CPAN: Compress::Zlib loaded ok (v2.021)
  ............................................................................DONE
   Fetching with LWP:
    http://cpan-du.viaverio.com//modules/02packages.details.txt.gz
     Reading.       '/home/folder/.cpan/sources/modules      /02packages.details.txt.gz'
  Database was generated on Sun, 11 Oct 2015.   11:53:29 GMT
   ............................................................................DONE
Fetching with LWP:
 http://cpan-du.viaverio.com//modules/03modlist.data.gz
Reading '/home/folder/.cpan/sources/modules/03modlist.data.gz'
 DONE
 Writing /home/ehelpful/.cpan/Metadata
CPAN: Module::CoreList loaded ok (v2.18)
  Running test for module 'Mail::CheckUser'
 Fetching with LWP:
http://cpan-du.viaverio.com//authors/id/I/IL/ILYAM/Mail-CheckUser-1.21.tar.gzCPAN: Digest::SHA loaded ok (v5.47)
  Fetching with LWP:
  http://cpan-du.viaverio.com//authors/id/I/IL/ILYAM/CHECKSUMS
 Checksum for /home/folder/.cpan/sources/authors/id/I/IL/ILYAM/Mail-CheckUser-1.21.tar.gz ok
 CPAN: Archive::Tar loaded ok (v1.58)
  Mail-CheckUser-1.21/
  Mail-CheckUser-1.21/README
Mail-CheckUser-1.21/CheckUser.pm
Mail-CheckUser-1.21/MANIFEST
Mail-CheckUser-1.21/t/
 Mail-CheckUser-1.21/t/timeout.t
 Mail-CheckUser-1.21/t/smtp.t
 Mail-CheckUser-1.21/t/wildcard.t
 Mail-CheckUser-1.21/t/syntax.t
Mail-CheckUser-1.21/t/smtp-taint.t
Mail-CheckUser-1.21/t/check.pl
 Mail-CheckUser-1.21/t/dns.t
Mail-CheckUser-1.21/Changes
 Mail-CheckUser-1.21/Makefile.PL
   Mail-CheckUser-1.21/TODO
 Mail-CheckUser-1.21/procmail/
  Mail-CheckUser-1.21/procmail/cufilter
 Mail-CheckUser-1.21/procmail/.procmailrc
  CPAN: CPAN::Meta::Requirements loaded ok (v2.133)
  CPAN: CPAN::Meta loaded ok (v2.150001)
 Configuring I/IL/ILYAM/Mail-CheckUser-1.21.tar.gz.   with Makefile.PL
 Checking if your kit is complete...
 Looks good
 Only one of PREFIX or INSTALL_BASE can be given.          Not both.
  No 'Makefile' created  ILYAM/Mail-CheckUser-1.21.tar.gz
    /usr/bin/perl Makefile.PL.        PREFIX=/home/folder/perl/usr -- NOT OK

我使用了另一台带有CentOS 6.4的虚拟机并得到了相同的结果,因为YAML没有安装,但我确认我有最新版本的YAML:

sudo cpan Mail::CheckUser
CPAN: Storable loaded ok (v2.20)
Going to read '/root/.cpan/Metadata'
Database was generated on Mon, 12 Oct 2015 16:41:02 GMT
Running install for module 'Mail::CheckUser'
CPAN: YAML loaded ok (v0.70)
Running make for I/IL/ILYAM/Mail-CheckUser-1.21.tar.gz
CPAN: Digest::SHA loaded ok (v5.47)
Checksum for /root/.cpan/sources/authors/id/I/IL/ILYAM/Mail-CheckUser-    1.21.tar.gz ok
 Mail-CheckUser-1.21/
 Mail-CheckUser-1.21/README
 Mail-CheckUser-1.21/CheckUser.pm
 Mail-CheckUser-1.21/MANIFEST
 Mail-CheckUser-1.21/t/
 Mail-CheckUser-1.21/t/timeout.t
 Mail-CheckUser-1.21/t/smtp.t
 Mail-CheckUser-1.21/t/wildcard.t
 Mail-CheckUser-1.21/t/syntax.t
 Mail-CheckUser-1.21/t/smtp-taint.t
 Mail-CheckUser-1.21/t/check.pl
 Mail-CheckUser-1.21/t/dns.t 
 Mail-CheckUser-1.21/Changes
 Mail-CheckUser-1.21/Makefile.PL
 Mail-CheckUser-1.21/TODO
 Mail-CheckUser-1.21/procmail/
 Mail-CheckUser-1.21/procmail/cufilter
 Mail-CheckUser-1.21/procmail/.procmailrc
 CPAN: File::Temp loaded ok (v0.22)

 CPAN.pm: Going to build I/IL/ILYAM/Mail-CheckUser-1.21.tar.gz

 Checking if your kit is complete...
 Looks good
 Writing Makefile for Mail::CheckUser
 cp CheckUser.pm blib/lib/Mail/CheckUser.pm
 cp procmail/cufilter blib/script/cufilter
 /usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/cufilter
 Manifying blib/man1/cufilter.1
 Manifying blib/man3/Mail::CheckUser.3pm
     ILYAM/Mail-CheckUser-1.21.tar.gz
     /usr/bin/make -- OK
 Running make test
 PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
 t/dns.t ......... ok   
 t/smtp-taint.t .. No subtests run 
 t/smtp.t ........ 4/4 # Failed test 4 in t/check.pl at line 20 fail #4
  #  t/check.pl line 20 is:     ok($ok);
  t/smtp.t ........ Failed 1/4 subtests 
  t/syntax.t ...... ok     
  t/timeout.t ..... ok   
  t/wildcard.t .... 1/13 # Failed test 9 in t/check.pl at line 20 fail #9
  #  t/check.pl line 20 is:     ok($ok);
  # Failed test 12 in t/check.pl at line 20 fail #12
  t/wildcard.t .... Failed 2/13 subtests 

  Test Summary Report
  -------------------
  t/smtp-taint.t (Wstat: 0 Tests: 0 Failed: 0)
    Parse errors: No plan found in TAP output
  t/smtp.t      (Wstat: 0 Tests: 4 Failed: 1)
    Failed test:  4
  t/wildcard.t  (Wstat: 0 Tests: 13 Failed: 2)
    Failed tests:  9, 12
  Files=6, Tests=59, 146 wallclock secs ( 0.03 usr  0.03 sys +  0.34 cusr  0.08 csys =  0.48 CPU)
  Result: FAIL
  Failed 3/6 test programs. 3/59 subtests failed.
  make: *** [test_dynamic] Error 255
    ILYAM/Mail-CheckUser-1.21.tar.gz
    /usr/bin/make test -- NOT OK
  //hint// to see the cpan-testers results for installing this module, try:
    reports ILYAM/Mail-CheckUser-1.21.tar.gz
        Running make install
    make test had returned bad status, won't install without force
  [root@ip-ccccccc emails]# cpan -t Mail::CheckUser
  CPAN: Storable loaded ok (v2.20)
  Going to read '/root/.cpan/Metadata'
    Database was generated on Mon, 12 Oct 2015 16:41:02 GMT
  Running test for module 'Mail::CheckUser'
  CPAN: YAML loaded ok (v0.70)
  Running make for I/IL/ILYAM/Mail-CheckUser-1.21.tar.gz
  CPAN: Digest::SHA loaded ok (v5.47)
  Checksum for /root/.cpan/sources/authors/id/I/IL/ILYAM/Mail-CheckUser-1.21.tar.gz ok
  Mail-CheckUser-1.21/
  Mail-CheckUser-1.21/README
  Mail-CheckUser-1.21/CheckUser.pm
  Mail-CheckUser-1.21/MANIFEST
  Mail-CheckUser-1.21/t/
  Mail-CheckUser-1.21/t/timeout.t
  Mail-CheckUser-1.21/t/smtp.t
  Mail-CheckUser-1.21/t/wildcard.t
  Mail-CheckUser-1.21/t/syntax.t
  Mail-CheckUser-1.21/t/smtp-taint.t
  Mail-CheckUser-1.21/t/check.pl
  Mail-CheckUser-1.21/t/dns.t
  Mail-CheckUser-1.21/Changes
  Mail-CheckUser-1.21/Makefile.PL
  Mail-CheckUser-1.21/TODO
  Mail-CheckUser-1.21/procmail/
  Mail-CheckUser-1.21/procmail/cufilter
  Mail-CheckUser-1.21/procmail/.procmailrc
  CPAN: File::Temp loaded ok (v0.22)

    CPAN.pm: Going to build I/IL/ILYAM/Mail-CheckUser-1.21.tar.gz

  Checking if your kit is complete...
  Looks good
  Writing Makefile for Mail::CheckUser
  cp CheckUser.pm blib/lib/Mail/CheckUser.pm
  cp procmail/cufilter blib/script/cufilter
  /usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/cufilter
  Manifying blib/man1/cufilter.1
  Manifying blib/man3/Mail::CheckUser.3pm
    ILYAM/Mail-CheckUser-1.21.tar.gz
    /usr/bin/make -- OK
  Running make test
  PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"      "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
  t/dns.t ......... ok   
  t/smtp-taint.t .. No subtests run 
  t/smtp.t ........ 4/4 # Failed test 4 in t/check.pl at line 20 fail #4
  #  t/check.pl line 20 is:     ok($ok);
  t/smtp.t ........ Failed 1/4 subtests 
  t/syntax.t ...... ok     
  t/timeout.t ..... ok   
  t/wildcard.t .... 1/13 # Failed test 9 in t/check.pl at line 20 fail #9
  #  t/check.pl line 20 is:     ok($ok);
  # Failed test 12 in t/check.pl at line 20 fail #12
  t/wildcard.t .... Failed 2/13 subtests 

  Test Summary Report
  -------------------
  t/smtp-taint.t (Wstat: 0 Tests: 0 Failed: 0)
    Parse errors: No plan found in TAP output
  t/smtp.t      (Wstat: 0 Tests: 4 Failed: 1)
    Failed test:  4
  t/wildcard.t  (Wstat: 0 Tests: 13 Failed: 2)
    Failed tests:  9, 12
  Files=6, Tests=59, 173 wallclock secs ( 0.04 usr  0.03 sys +  0.34 cusr  0.07 csys =  0.48 CPU)
  Result: FAIL
  Failed 3/6 test programs. 3/59 subtests failed.
  make: *** [test_dynamic] Error 255
    ILYAM/Mail-CheckUser-1.21.tar.gz
    /usr/bin/make test -- NOT OK
  //hint// to see the cpan-testers results for installing this module, try:
    reports ILYAM/Mail-CheckUser-1.21.tar.gz

1 个答案:

答案 0 :(得分:0)

Mail::CheckUser已更新12年且其CPAN测试人员页面为a sea of red。我建议最好避免使用这个模块。

大多数人似乎都使用Email::Valid进行这类检查。你看过那个吗?