http://www.perlmonks.org?node_id=924429

mmittiga17 has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, I am using Perl's Pop3 module to download email along with Mime::Parser to detach any files into readable formats. I have never seen this before but I am now getting an error message: no decoder for uuencode at /usr/lib/perl5/site_perl/5.8.8/MIME/Parser.pm line 789 no decoder for uuencode at /usr/lib/perl5/site_perl/5.8.8/MIME/Parser.pm line 789 Debug shows this for the first time: with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate I am using pop3 with ssl. Here is my code.

#---set mail credentials---# my $_MAILHOST="xxxxx"; my $_USER="xxxx"; #username my $_PASS="xxxx"; #password #---Define output directory---# my $_OUTDIR="/x/xxx/mail/xxx"; #Output attachments here #---Begin retrieve mail and strip attachment---# my $i = 0; my $parser = new MIME::Parser; my $pop = new Mail::POP3Client( HOST =>$_MAILHOST, USER =>$_USER, PASSWORD =>$_PASS, DEBUG =>2, SOCKET => undef, USESSL => 1 ); $parser->output_dir( $_OUTDIR ); if( $pop->Count() < 0 ) { die "Error accessing POP mailbox"; } for( $i = 0; $i <= $pop->Count(); $i++ ) { my $wholeBody = $pop->HeadAndBody( $i ); ### Automatically attempt to RFC 2047-decode the MIME headers? $parser->decode_headers(0); ### default is false ### Look for uuencode in "text" messages, and extract it? $parser->extract_uuencode(0); ### default is false my $entity = $parser->parse_data( $wholeBody ); #$pop->Delete( $i ); }

If I pull the mail via Outlook I do not have any issues. Any advise will be appreciated.

Replies are listed 'Best First'.
Re: Mime::Parser question.
by Anonymous Monk on Sep 06, 2011 at 17:31 UTC

    What is different between then and now?

    Is your script now running on a different PC? Does it happen with certain emails but not others? How can you cause this?

      Nothing has changed. I have used the same code to pull and extract attachments for different email accounts that receive attachements from different providers. I now believe this has to do with Net::SSLeay and openSSL. Some reason Net::SSLeay will not install via cpan.
      Cannot determine perl version info from lib/Net/SSLeay.pm Cannot determine license info from lib/Net/SSLeay.pm *** Found OpenSSL-0.9.8e installed in /usr *** Be sure to use the same compiler and options to compile your OpenS +SL, perl, and Net::SSLeay. Mixing and matching compilers is not supported. Do you want to run external tests? These tests *will* *fail* if you do not have network connectivity. [n] + n Checking if your kit is complete... Looks good Writing Makefile for Net::SSLeay cp lib/Net/SSLeay.pm blib/lib/Net/SSLeay.pm AutoSplitting blib/lib/Net/SSLeay.pm (blib/lib/auto/Net/SSLeay) blib/lib/Net/SSLeay.pm: some names are not unique when truncated to 8 +characters: directory blib/lib/auto/Net/SSLeay: do_https3.al, do_https2.al, do_https4.al, do_https.al truncate to do +_https do_httpx3.al, do_httpx2.al, do_httpx4.al truncate to do_httpx get_https.al, get_https3.al, get_https4.al, get_http.al, get_http3.a +l, get_http4.al, get_httpx.al, get_httpx3.al, get_httpx4.al truncate +to get_http head_https.al, head_https3.al, head_https4.al, head_http.al, head_ht +tp3.al, head_http4.al, head_httpx.al, head_httpx3.al, head_httpx4.al +truncate to head_htt post_https.al, post_https3.al, post_https4.al, post_http.al, post_ht +tp3.al, post_http4.al, post_httpx.al, post_httpx3.al, post_httpx4.al +truncate to post_htt put_https.al, put_https3.al, put_https4.al, put_http.al, put_http3.a +l, put_http4.al, put_httpx.al, put_httpx3.al, put_httpx4.al truncate +to put_http ssl_read_all.al, ssl_read_until.al, ssl_read_CRLF.al truncate to ssl +_read ssl_write_all.al, ssl_write_CRLF.al truncate to ssl_writ tcp_read_all.al, tcp_read_until.al, tcp_read_CRLF.al truncate to tcp +_read tcp_write_all.al, tcp_write_CRLF.al truncate to tcp_writ cp lib/Net/SSLeay/Handle.pm blib/lib/Net/SSLeay/Handle.pm /usr/bin/perl "-Iinc" /usr/lib/perl5/site_perl/5.8.8/ExtUtils/xsubpp +-typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap SSLe +ay.xs > SSLeay.xsc && mv SSLeay.xsc SSLeay.c gcc -c -I/usr/include -I/usr/inc32 -I/usr/kerberos/include -D_REENTRA +NT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-state +ment -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +-I/usr/include/gdbm -O2 -g -DVERSION=\"1.36\" -DXS_VERSION=\"1.36\" + -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE" SS +Leay.c SSLeay.xs:98:25: error: openssl/err.h: No such file or directory SSLeay.xs:99:27: error: openssl/lhash.h: No such file or directory SSLeay.xs:100:26: error: openssl/rand.h: No such file or directory SSLeay.xs:101:28: error: openssl/buffer.h: No such file or directory SSLeay.xs:102:25: error: openssl/ssl.h: No such file or directory SSLeay.xs:103:74: error: openssl/comp.h: No such file or directory make: *** [SSLeay.o] Error 1 FLORA/Net-SSLeay-1.36.tar.gz /usr/bin/make -- NOT OK Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible Failed during this command: FLORA/Net-SSLeay-1.36.tar.gz : make NO