CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • time out in CiviMailProcessor.php
Pages: [1]

Author Topic: time out in CiviMailProcessor.php  (Read 1883 times)

geraldr_sc

  • Guest
time out in CiviMailProcessor.php
April 28, 2009, 09:17:18 am
When I try connecting manually to the server with CiviMailProcessor.php I get the following:

Uncaught exception 'ezcMailTransportException' with message 'An error occurred while sending or receiving mail. Failed to connect to the server'

The trace that follows shows the correct server, port, name, and password. The name and password on the url is the name and password to the joomla account. The name and password in the trace are the username (with domain included -- like user@somedomain.com) and the password to the email account.

The trace shows the error at .../packages/ezc/Mail/src/transports/transport_connection.php on line 97 which is the line throwing the exception. Using trigger_error following line 87 it showed that stream_socket_client is setting $errno to 110 and $errstr to 'Connection timed out'.  The value for the remote_socket parameter is ssl://imap.gmail.com:993. The return value of the stream_socket_client call is bool(false). I tried changing the $this->options->timeout but it doesn't seem to use that parameter. (It does use it)

I connected to the mail box with IMAP and using the same parameters using thunderbird mail client with no trouble.

The server is imap.gmail.com. (google apps).

Any ideas?

Thanks
« Last Edit: April 30, 2009, 08:58:25 pm by geraldr_sc »

geraldr_sc

  • Guest
Re: time out in CiviMailProcessor.php
April 30, 2009, 08:56:34 pm
I managed to temporarily (I hope) hack around the problem by setting up email forwarding from the google apps civicrm email account to an account with the same user name except a different domain (that I manage).

I then used the new email address and domain for the user name and password in the configuration for polling. Finally I modified transport_connection.php to set the server and port to the new domain. The forward kept the VERP addresses and the CiviMailProcessor.php seems to poll ok and work with subscribes, unsubscribes, etc, though I have more testing. It is not exactly pretty, so any ideas of how to get the transport to poll the google apps email or any warnings about unforeseen problems with this hack would be appreciated.




Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: time out in CiviMailProcessor.php
May 04, 2009, 03:06:00 am
Quote from: geraldr_sc on April 28, 2009, 09:17:18 am
When I try connecting manually to the server with CiviMailProcessor.php I get the following:

Uncaught exception 'ezcMailTransportException' with message 'An error occurred while sending or receiving mail. Failed to connect to the server'

This reads to me as a network problem; are you sure you spelt the name of the server correctly?

Quote
Using trigger_error following line 87 it showed that stream_socket_client is setting $errno to 110 and $errstr to 'Connection timed out'.  The value for the remote_socket parameter is ssl://imap.gmail.com:993. The return value of the stream_socket_client call is bool(false).

Hm, if you cut-and-pasted the remote_socket value, then it’s spelt correctly. The error indicates that the machine that runs the CiviMail Processor timed out when connecting to imap.gmail.com’s 993 port.

Quote
I connected to the mail box with IMAP and using the same parameters using thunderbird mail client with no trouble.

Was this from the same machine as the CiviMail Processor?

(This is a strange case; I explicitly tested CiviMail Processor on a Gmail account, for both IMAP and POP3.)
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

geraldr_sc

  • Guest
Re: time out in CiviMailProcessor.php
May 05, 2009, 03:34:35 pm
Quote
Was this from the same machine as the CiviMail Processor?

No, the thunderbird connection was from my home desktop. The Civimail processor was on a shared server.


I can't connect using ssl to the other site where I was forwarding email to check with CiviMailProcessor.php I was not using ssl when I was connecting there successfully. I even tried using ssl to connect with CiviMailProcessor on an email account on the same host machine as civicrm and could not connect using ssl, but I could not using ssl.

Could it be a firewall blocking it?

Could it be related to the fact that mail server where the website domain where I have installed civicrm does not accept mail for the domain? All the mx entries for the dns go to google apps and the local mail server does not accept mail for the domain. Is there something about the ssl:// protocol?


« Last Edit: May 05, 2009, 05:24:19 pm by geraldr_sc »

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: time out in CiviMailProcessor.php
May 06, 2009, 06:14:45 am
Quote from: geraldr_sc on May 05, 2009, 03:34:35 pm
I can't connect using ssl to the other site where I was forwarding email to check with CiviMailProcessor.php I was not using ssl when I was connecting there successfully. I even tried using ssl to connect with CiviMailProcessor on an email account on the same host machine as civicrm and could not connect using ssl, but I could not using ssl.

Then the SSL is most probably the cause of the problem.

Quote
Could it be a firewall blocking it?

It’s either the firewall, or (more probably) OpenSSL support not being enabled in your PHP version. Can you verify whether OpenSSL is enabled, for example by checking the output of phpinfo()?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

geraldr_sc

  • Guest
Re: time out in CiviMailProcessor.php
May 08, 2009, 06:52:34 pm
Quote
It’s either the firewall, or (more probably) OpenSSL support not being enabled in your PHP version. Can you verify whether OpenSSL is enabled, for example by checking the output of phpinfo()?

It says OpenSSL is enabled  (version 0.9.7a Feb 19 2003). Does that mean the firewall is the likely reason, or could there be something else?

Thanks for your help, and sorry I am a bit slow in responding. I have too many things going at once.
« Last Edit: May 08, 2009, 07:09:07 pm by geraldr_sc »

geraldr_sc

  • Guest
Re: time out in CiviMailProcessor.php
May 08, 2009, 08:28:34 pm
I submitted a support ticket to the host and asked about the firewall. They responded that outgoing ports 993 and 995 were indeed blocked, but they removed the block. I tested again and it worked as expected!!

Thanks for your help.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • time out in CiviMailProcessor.php

This forum was archived on 2017-11-26.