A script that was operational for every 2 weeks for 2 years failed when I moved it to a ubuntu 12.04 LTS system Linux 3.8.0-34-generic Perl (v5.14.2) The modules in use are the following - I've included the version numbers for those I think might be involved in the problem:

use warnings; use DBI; use Text::CSV_XS; use Text::CSV; use Net::SMTP::SSL; 1.01 use MIME::Base64; use File::Spec; use LWP::MediaTypes; 6.01 use Date::Calc qw(:all); use Mail::Sender; 0.8.22
The mail server being used is our Exchange Server, via a local IP address. I think the change may be a more-enforeced requirement for certificates OR I need to install the server's certificate on this new Linux system. The operative part of the script that is throwing the error is:

open my $DEBUG, ">> //root/FAVOR_Data_Reports_scripts/debug_file_gen_a +nd_mail_adv_reports.txt" or die "Can't open the debug file: $!\n"; ref ($sender = new Mail::Sender({from => 'janedoe@madeup.org',smt +p => '10.11.74.18'})) or die "$Mail::Sender::Error\n"; (ref ($sender->MailFile( {to =>'johndoe@madeup.org', subject => "FY 2012-13 - All Open +EOCs - Advocates Report for ".$report_date, msg => "\nAttached is the FAVOR Advocates Report for All Open +EOCS - 2012-2013", debug => $DEBUG, debug_level => 4, file => $advocates_report_filename })) and print "Mail sent OK." ) or die "$Mail::Sender::Error\n";

The error this produces is:

IO::Socket::SSL->start_SSL failed: SSL connect attempt failed with unk +nown errorerror:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:cer +tificate verify failed

The debug file created when the script is run shows:

>> 220 mail.madeup.org Microsoft ESMTP MAIL Service ready at Sat, 28 D +ec 2013 13:28:21 -0500 << EHLO localhost >> 250-mail.madeup.org Hello [10.11.74.25] >> 250-SIZE 36700160 >> 250-PIPELINING >> 250-DSN >> 250-ENHANCEDSTATUSCODES >> 250-STARTTLS >> 250-AUTH NTLM >> 250-8BITMIME >> 250-BINARYMIME >> 250 CHUNKING << STARTTLS >> 220 2.0.0 SMTP server ready

I looked at the log on the Exchanger Server and this is what's going on on that end - Exchange sends a certificate verification and I'm not sure what to do with that (the line numbers on the left were put inserted so we can use references):

1 2014-01-02T10:24:35.047Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,0,10.11.74.18:25,10.11.74.25:34156,+,, 2 2014-01-02T10:24:35.047Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,1,10.11.74.18:25,10.11.74.25:34156,*,SMTPSubmit SMTPAcceptAnySender +SMTPAcceptAuthoritativeDomainSender AcceptRoutingHeaders,Set Session +Permissions 3 2014-01-02T10:24:35.047Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,2,10.11.74.18:25,10.11.74.25:34156,>,"220 mail.somedomain.org Micros +oft ESMTP MAIL Service ready at Thu, 2 Jan 2014 05:24:34 -0500", 4 2014-01-02T10:24:35.094Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,3,10.11.74.18:25,10.11.74.25:34156,<,EHLO localhost, 5 2014-01-02T10:24:35.094Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,4,10.11.74.18:25,10.11.74.25:34156,>,250-mail.somedomain.org Hello [ +10.11.74.25], 6 2014-01-02T10:24:35.094Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,5,10.11.74.18:25,10.11.74.25:34156,>,250-SIZE 36700160, 7 2014-01-02T10:24:35.094Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,6,10.11.74.18:25,10.11.74.25:34156,>,250-PIPELINING, 8 2014-01-02T10:24:35.094Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,7,10.11.74.18:25,10.11.74.25:34156,>,250-DSN, 9 2014-01-02T10:24:35.094Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,8,10.11.74.18:25,10.11.74.25:34156,>,250-ENHANCEDSTATUSCODES, 10 2014-01-02T10:24:35.094Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,9,10.11.74.18:25,10.11.74.25:34156,>,250-STARTTLS, 11 2014-01-02T10:24:35.094Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,10,10.11.74.18:25,10.11.74.25:34156,>,250-AUTH NTLM, 12 2014-01-02T10:24:35.094Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,11,10.11.74.18:25,10.11.74.25:34156,>,250-8BITMIME, 13 2014-01-02T10:24:35.094Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,12,10.11.74.18:25,10.11.74.25:34156,>,250-BINARYMIME, 14 2014-01-02T10:24:35.094Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,13,10.11.74.18:25,10.11.74.25:34156,>,250 CHUNKING, 15 2014-01-02T10:24:35.140Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,14,10.11.74.18:25,10.11.74.25:34156,<,STARTTLS, 16 2014-01-02T10:24:35.140Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,15,10.11.74.18:25,10.11.74.25:34156,>,220 2.0.0 SMTP server ready, 17 2014-01-02T10:24:35.140Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,16,10.11.74.18:25,10.11.74.25:34156,*,,Sending certificate 18 2014-01-02T10:24:35.140Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,17,10.11.74.18:25,10.11.74.25:34156,*,"CN=webmail.somedomain.org, OU +=Domain Control Validated",Certificate subject 19 2014-01-02T10:24:35.140Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,18,10.11.74.18:25,10.11.74.25:34156,*,"SERIALNUMBER=07969287, CN=Go +Daddy Secure Certification Authority, OU=http://certificates.godaddy. +com/repository, O=""GoDaddy.c om, Inc."", L=Scottsdale, S=Arizona, + C=US",Certificate issuer name 20 2014-01-02T10:24:35.140Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,19,10.11.74.18:25,10.11.74.25:34156,*,4B7D04F464AD8A,Certificate ser +ial number 21 2014-01-02T10:24:35.140Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,20,10.11.74.18:25,10.11.74.25:34156,*,C3B8E4FF095318BBE93F4D26ACA11E +6218481790,Certificate thumbprint 22 2014-01-02T10:24:35.140Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,21,10.11.74.18:25,10.11.74.25:34156,*,webmail.somedomain.org;www.web +mail.somedomain.org;mail.somedomain.org,Certificate alternate names 23 2014-01-02T10:24:35.281Z,EXCHSERVER\Relay Receive,08D0C0F3026261AE +,22,10.11.74.18:25,10.11.74.25:34156,-,,Local

In reply to Mail::Sender script fails upon Linux (and Perl) update by dneill8

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.