Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to setup with Hostgator #42

Closed
pauldyke opened this issue Aug 30, 2013 · 10 comments
Closed

Unable to setup with Hostgator #42

pauldyke opened this issue Aug 30, 2013 · 10 comments

Comments

@pauldyke
Copy link

I have been trying to setup this module but I'm receiving and error message:

Error: Unable to connect to inbox - Certificate failure for ***.hostgator.com: unable to get local issuer certificate: /C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=PositiveSSL CA 2

I am using Hostgator as my shared web host and they have verified that the PHP IMAP module is installed and present. Hostgator support suggested I contact you as they believe that there is a "bug in the script that prevents it from verifying the certificate presented by the IMAP server. Additionally, the script does not properly detect if SSL is being used or not, so even setting the IMAP port to 143 and using localhost as the server does not work because the script assumes SSL is in use and fails to establish a connection."

Thank you

@r-a-y
Copy link
Owner

r-a-y commented Sep 2, 2013

Hi pauldyke, this is the same bug as reported in issue #39.

I do not have the proper options built in the admin panel yet to enable / disable SSL and enable / disable certificate checking (see #41).

So in order to disable both at the moment, you'll have to use a code snippet in wp-content/plugins/bp-custom.php::

// allow novalidate-cert flag and disable SSL when connecting via IMAP
function my_rbe_novalidate_nossl( $retval ) {
    return str_replace( 'ssl', 'novalidate-cert', $retval );
}
add_filter( 'bp_rbe_mailbox', 'my_rbe_novalidate_nossl' );`

Let me know if that works for you.

I should note that the plugin isn't optimized for shared hosts at the moment. Also make sure that your email system supports address tags.

@pauldyke
Copy link
Author

pauldyke commented Sep 3, 2013

Hi r-a-y

Thanks so much for your reply. This didn't work unfortunately, there was no change.

I have been trying to setup with a new Gmail account, but I also received an error with this:

Error: Unable to connect to inbox - Certificate failure for imap.gmail.com: unable to get local issuer certificate: /C=US/O=Google Inc/CN=Google Internet Authority

Many thanks

@r-a-y
Copy link
Owner

r-a-y commented Sep 4, 2013

Hi Paul,

I forgot to mention that you need to deactivate and reactivate RBE for
the code snippet to take effect.

If you are using Gmail, remove the code snippet I mentioned. If you
added the code snippet from before, deactivate and reactivate RBE.

@r-a-y
Copy link
Owner

r-a-y commented Sep 4, 2013

After looking at your error message regarding your Gmail error, it looks like certificate checking might need to be disabled.

Try the code snippet I posted in another issue and report back: #39 (comment)

Remember to deactivate RBE. add the code snippet and reactivate RBE.

@pauldyke
Copy link
Author

pauldyke commented Sep 4, 2013

I followed this and received an error message at the top of the website and dashboard:

// allow novalidate-cert flag when connecting via IMAP function my_rbe_novalidate( $retval ) { return str_replace( 'ssl', 'ssl/novalidate-cert', $retval ); } add_filter( 'bp_rbe_mailbox', 'my_rbe_novalidate' )

After reactivating RBE, I received the additional message:

Warning: Cannot modify header information - headers already sent by (output started at //wp/wp-content/plugins/bp-custom.php:5) in //wp/wp-includes/pluggable.php on line 875

@r-a-y
Copy link
Owner

r-a-y commented Sep 4, 2013

You have trailing spaces at the beginning of your bp-custom.php

Before <?php remove all whitespace and save the file again.

@pauldyke
Copy link
Author

pauldyke commented Sep 4, 2013

Thanks for spotting this. I've corrected the file. But the error from above remains:
Error: Unable to connect to inbox - Certificate failure for imap.gmail.com: unable to get local issuer certificate: /C=US/O=Google Inc/CN=Google Internet Authority
Happy to park this here unless you have any new ideas.
Many thanks again

@r-a-y
Copy link
Owner

r-a-y commented Sep 4, 2013

Can you pass me your site's details privately? Contact me so I can debug.

@r-a-y
Copy link
Owner

r-a-y commented Sep 4, 2013

Looks like I made a typo in naming one of my filters.

Can you try this code snippet?

// allow novalidate-cert flag when connecting via IMAP
function my_rbe_novalidate( $retval ) {
    return str_replace( 'ssl', 'ssl/novalidate-cert', $retval );
}
add_filter( 'bp_rbe_mailbox', 'my_rbe_novalidate' );
add_filter( 'bp_rbe_hostname', 'my_rbe_novalidate' );

Remove anything you might have had in bp-custom.php before.

@r-a-y
Copy link
Owner

r-a-y commented Jun 4, 2014

You might want to try a new operating mode that doesn't rely on connecting to an IMAP inbox.

If interested, read this wiki entry:
https://github.com/r-a-y/bp-reply-by-email/wiki/Mandrill

Going to close this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants