[imp] Error connecting to IMAP server. 22 : Invalid argument.

Johan Huldtgren johan+imp at huldtgren.com
Mon Jun 5 16:27:02 PDT 2006


Trying to log into Imp(4.1.1) which I recently built on
a new machine, it results in the following error:

Error connecting to IMAP server. 22 : Invalid argument.

Although I get the above error I get "into" everything
else, eg I get the sidebar and can browse everything there
except mail.

Having dug around in all the log files and in some
mailinglist archives[1] it seems that IMP is incorrectly
trying to make a TLS connection instead of SSL.

 From maillog:

Jun  5 23:34:43 newmail dovecot: imap-login: Login: user=<johan>, 
method=LOGIN, rip=127.0.0.1, lip=127.0.0.1, TLS
Jun  5 23:34:43 newmail dovecot: IMAP(johan): Disconnected: Logged out

 From httpd-error.log:

[Mon Jun 05 23:34:43 2006] [error] [client x.x.x.x] PHP Warning:  
fsockopen(): no SSL support in this build in 
/path/to/my/horde/imp/lib/IMAP/Client.php on line 449, referer: 
https://newmail.mydomain.com/horde/imp/
[Mon Jun 05 23:34:43 2006] [error] [client x.x.x.x] PHP Warning:  
fsockopen(): unable to connect to localhost:993 in 
/path/to/my/horde/imp/lib/IMAP/Client.php on line 449, referer: 
https://newmail.mydomain.com/horde/imp/

 From servers.php

$servers['imap'] = array(
    'name' => 'IMAP Server',
    'server' => 'localhost',
    'hordeauth' => false,
    'protocol' => 'imap/ssl/novalidate-cert',
    'port' => 993,
    'maildomain' => 'mydomain.com',
    'smtphost' => 'localhost',
    'smtpport' => 25,
    'realm' => '',
    'preferred' => '',
);

Running the IMP tests from test.php results in it
confirming the above information as correct and telling
me the amount of messages I have in my INBOX.

System Information:

FreeBSD 6.1-STABLE
postgresql 8.1.4
apache-2.2.2
php-4.4.2 (all required and recomended modules
are installed with the exception of memcached and mime_magic)
dovecot 1.0 beta8
horde 3.1.1
imp 4.1.1
ingo 1.1.1
nag 2.1
turba 2.1.1

This error is only appearing with Imp, reading mail via
thunderbird works flawlessly.

[1] http://tinyurl.com/hemj6

If anybody has any further information on what I can do to
solve this it would be greatly appreciated.

- Johan


More information about the imp mailing list