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 »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Bounce handling cannot connect to gmail
Pages: [1]

Author Topic: Bounce handling cannot connect to gmail  (Read 2849 times)

TimG

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 2
  • CiviCRM version: 4.4.6
  • CMS version: Joomla 2.5.24
  • MySQL version: 5.5.37
  • PHP version: 5.4.23
Bounce handling cannot connect to gmail
July 23, 2014, 03:22:34 am
Hi,

When I try to run the bounce handling, all I get is 'unable to connect' which is fairly unhelpful. What can I do to diagnose this?

I've triple checked all the settings for our gmail account, I've checked the firewall settings with the server guys and they reckon they aren't blocking outgoing traffic so I should be able to access the gmail servers. I'm at a loss as to what I check next

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Bounce handling cannot connect to gmail
July 23, 2014, 03:29:38 am
What are the settings you've put?
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

TimG

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 2
  • CiviCRM version: 4.4.6
  • CMS version: Joomla 2.5.24
  • MySQL version: 5.5.37
  • PHP version: 5.4.23
Re: Bounce handling cannot connect to gmail
July 23, 2014, 03:38:53 am
Name default
Server   imap.gmail.com
Username   xxx@gmail.com
Password        (triple checked against gmail account)
Localpart   xxx+
Email Domain  gmail.com
Return-Path   (empty)
Protocol IMAP
Source   (empty)
Use SSL?   Y
Used For?    Bounce Processing

(with actual email replaced by xxx)

Error is:
Parameters parsed (and passed to API method):
a:1:{s:7:"version";i:3;}

Full message:
Finished execution of Fetch Bounces with result: Failure, Error message: A fatal error was triggered: Could not connect to MailStore
Error message:

An error occured while sending or receiving mail. Failed to connect to the server: imap.gmail.com:993.

DaveFF

  • I post occasionally
  • **
  • Posts: 54
  • Karma: 5
  • Developer at Future First
    • Future First
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.34
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Bounce handling cannot connect to gmail
July 31, 2014, 01:22:06 am
Even if the credentials are correct, you have to enable IMAP access separately- in your Gmail inbox, click the gear, then Settings, then Forwarding and POP/IMAP, then Enable IMAP and save changes.
Do Not Contact Until extension: https://civicrm.org/extensions/do-not-contact-until
Organisation Name De-duplicator extension: https://civicrm.org/extensions/organisation-name-de-duplicator

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Bounce handling cannot connect to gmail
July 31, 2014, 02:03:02 am
You can use google apps domain names (ie. your own domain name with google webmail), but it will not work very well if you use an email @gmail

It's because civicrm will need to send the emails as yourname@gmail.com from your own smtp server (likely the box that runs your civicrm) and google has only whitelisted their own servers as being able to send emails as gmail.com (SPF records) so most of the mail servers will ignore your emails as spam.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

TimG

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 2
  • CiviCRM version: 4.4.6
  • CMS version: Joomla 2.5.24
  • MySQL version: 5.5.37
  • PHP version: 5.4.23
Re: Bounce handling cannot connect to gmail
July 31, 2014, 03:27:12 am
I'm not trying to send mail via the account, just use it for bounce handling. I'll go and triple check the imap set up on gmail, as far as I know it's configured correctly

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Bounce handling cannot connect to gmail
July 31, 2014, 03:46:22 am
The way it works is that civimail use the bounce email as the sender at the technical level (SMTP envelope).
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

TimG

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 2
  • CiviCRM version: 4.4.6
  • CMS version: Joomla 2.5.24
  • MySQL version: 5.5.37
  • PHP version: 5.4.23
Re: Bounce handling cannot connect to gmail
September 15, 2014, 08:31:23 am
Just to say we've found the root cause of this. It appears the server firewall was so tightly locked down we didn't have outgoing port 993 open. Once it was opened we could connect to gmail with no problems. Emails get sent, bounces end up in the gmail account, if I manually run the bounce handling everything works well.

Now all I've got to do is get the cron job running ... getting authorisation errors. But that's a subject for another thread, I think

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Bounce handling cannot connect to gmail
June 03, 2015, 07:04:04 am
For references: please do NOT use a gmail address for the bounces, it won't work (a google app email is fine however).

The reason is you do that and use your mail() or local mailer, you are trying to send an email from your civicrm server as being from gmail email, something that google said is not allowed (SPF record).

and if you do use google smtp as mail servers, they will prevent you to send too many emails (the too many is going to be changed over time, but is pretty much guaranteed to be above the number of emails you want to send)
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Bounce handling cannot connect to gmail

This forum was archived on 2017-11-26.