Author Topic: remote imap host  (Read 5735 times)

Offline alvo

  • Newbie
  • *
  • Posts: 4
remote imap host
« on: May 09, 2009, 04:23:56 PM »
Hi,

First of all I am very new to all this so please forgive me if my question doesn't make sense. I hope it is not the case though...

Recently I opened a hosting account and I'd like to use RoundCube to access both my local emails and emails from other (external/remote) accounts such as gmail (I'm planning to use MyRoundCube's plugins for this).

My hosting company said that there shouldn't be any problems since they do not block any standard IMAP ports in their shared IP plans.

To start with I set up Fetch Mail of Horde to fetch emails from gmail and it seems to be working. Even though it doesn't seem to sync the folders, simply gets a copy of the emails.

Then I installed RoundCube using SimpleScript and tried to following setup:

$rcmail_config['default_host'] = 'ssl://imap.gmail.com:993';

$rcmail_config['default_port'] = '';

This is not really what I want since I'd like to access my local mails as well but I've thought that it would be a good test to see if I can access gmail's server from my RoundCube installation.

These are the error message from the log file:

[08-May-2009 16:32:55] PHP Warning:  fsockopen() [function.fsockopen]: unable to connect to ssl://imap.gmail.com:993 (Connection timed out) in /home/xxxxx/public_html/rc/program/lib/imap.inc on line 611
[08-May-2009 16:32:55 -0600] IMAP Error: Could not connect to ssl://imap.gmail.com at port 993: Connection timed out (POST /rc/?_task=&_action=login)


First of all I'd like to know if my RoundCube configuration makes any sense and if it is supposed to work?

I'd also like to know how to find out if my settings are wrong or it is my hosting company that is limiting the use of ports after all.
Is there a simple test to check this?
Does the fact that Horde is fetching emails from gmail prove that my hosting company doesn't limit the use of ports?

Now my hosting company says that I need dedicated IP to do this... not exactly what they said before contracting their service... Unfortunately, due to lack of knowledge on my part, they can tell me whatever they want.

I'd appreciate any guidance on this issue.

Thanks!

Alvo

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
remote imap host
« Reply #1 on: May 10, 2009, 03:47:07 AM »
Did you try: $rcmail_config['default_port'] = '993'; ?
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline alvo

  • Newbie
  • *
  • Posts: 4
remote imap host
« Reply #2 on: May 10, 2009, 06:29:43 AM »
Hi Rosali,

Thank you for your reply.

Now I've tried these two cases as well:

$rcmail_config['default_host'] = 'ssl://imap.gmail.com:993';

$rcmail_config['default_port'] = '993';

and

$rcmail_config['default_host'] = 'ssl://imap.gmail.com';

$rcmail_config['default_port'] = '993';


Unfortunately I got the same errors.

What really puzzles me that with Horde I can fetch emails from gmail...
The hosting company says that for INCOMING connections the port 993 is open but for OUTGOING connections it is closed.

Maybe I do not understand something but I guess fetching email with Horde or RoundCube would result in the same kind of connections...

I wouldn't mind paying for a dedicated IP if it is necessary but since I got a lot of contradicting info from the company I am not sure how much I can trust them.

Thanks

Alvo

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
remote imap host
« Reply #3 on: May 11, 2009, 05:59:03 AM »
Not it is not the same. I don't know Horde, but fetching Email normally use the POP3 protocol while RoundCube tries to establish a IMAP connection (outgoing) thru port 993.

Also I noticed that gmail POP3 (ssl) connects via port 995 while gmail IMAP (ssl) connects via port 993.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline alvo

  • Newbie
  • *
  • Posts: 4
remote imap host
« Reply #4 on: May 11, 2009, 07:21:58 AM »
Hi Rosali,

Thanks for your reply.

I configured Horde to use IMAP connection, that's why I'm confused...

Anyway, I'll see if I have more luck with a dedicated IP then.

Thanks

Alvo

Offline alvo

  • Newbie
  • *
  • Posts: 4
remote imap host
« Reply #5 on: May 12, 2009, 04:12:46 AM »
Hi,

Just a quick update.

Now I have a Dedicated IP with the necessary ports whitelisted.
It's working now!

These are my current settings:
$rcmail_config['default_host'] = 'ssl://imap.gmail.com';
$rcmail_config['default_port'] = 993;

I can use my gmail login and read my gmails from RoundCube!

I have noticed something though:
If you select an email and click on the "Move message to trash" button the email stays in Inbox. You need to drag and drop into the Trash folder to make it work.
Otherwise for the moment it seems that the synchronization is working fine with gmail.

Alvo


Correction:

It seems that the "Move message to trash" button removes the email from Inbox but it doesn't put it into the Trash folder and the email can still be accessed in the "All mail" folder of Gmail. I got confused with the Inbox and "All mail" folder when I write the comment above.
In any case the email never ends up in the Trash folder.
Maybe it has something to do with the "unusual" IMAP implementation of Gmail, I do not know... would be nice to have a special Gmail plugin that addresses all the "weird" issues of Gmail's IMAP.


Correction 2#:

Obviously I'm still learning all this... :)
I've just discovered that in the User preferences -> Special Folders you need to select the folders to make "Move message to trash" button work.
Just ignore everything I said about it before.
« Last Edit: May 12, 2009, 01:53:44 PM by alvo »