grtodd / imaputils

Automatically exported from code.google.com/p/imaputils
Other
0 stars 0 forks source link

IMAP/Utils.pm is throwing errors #2

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

Thought I'd inform you about IMAP/Utils.pm throwing errors when executed by 
Perl 5.16. Running the pop3imap command gives some typical error llke this:

"Can't use an undefined value as a symbol reference at 
/Library/Perl/5.16/IMAP/Utils.pm line 163."

Is there a least version of perl required to work with this script?

Original issue reported on code.google.com by williamu...@gmail.com on 27 Jul 2014 at 2:26

GoogleCodeExporter commented 9 years ago
imaputils 1.0.3
Debian 7.6
perl 5.14.2-21+deb7u1

Called script: iu-pop3toimap

I ran into the same error. For me, it had to do with a failed attempt to 
connect to the source POP3 server. The script would always use port 143 instead 
of the port provided through the command line argument -p host:port or -i 
host:port.

I went through the code of iu-pop3toimap and Utils.pm and found out that 
Utils::connectToHost() was called incorrectly in iu-pop3toimap on the lines 61 
and 65.

My fix:

change line 61 of iu-pop3toimap from connectToHost($popHost, $popPort, 
\$p_conn); to connectToHost("$popHost:$popPort", \$p_conn);

change line 65 of iu-pop3toimap from connectToHost($imapHost, $imapPort, 
\$i_conn); to connectToHost("$imapHost:$imapPort", \$i_conn);

HTH

Original comment by daniel.k...@web.de on 11 Sep 2014 at 12:03