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

Problem on 3.0.3 #5

Closed
ghost opened this issue Apr 16, 2013 · 13 comments
Closed

Problem on 3.0.3 #5

ghost opened this issue Apr 16, 2013 · 13 comments

Comments

@ghost
Copy link

ghost commented Apr 16, 2013

I have tested your auth-mailbox on 2.5 and it worked perfect. We are now going to move to a 3.0.3 install and I installed your version for 3x and set it up the same but cannot get it to work. I have tried every combo I can think of and even tried another imap account and still cannot get it to work. I just keep getting two errors. one: Failed to authenticate: %s and the other: Username and password do not match or you do not have an account yet.

@kevinoid
Copy link
Owner

Thanks for using it and reporting the error. Looks like the "Failed to authenticate: %s" message is because the error message translations aren't being loaded properly, I'll start tracking that down. I think the only matching error message is if the imap_open function is missing. Could you confirm that the PHP IMAP module is installed and, if so, what version is being used? The information will be available in the output of the phpinfo(); function.

@ghost
Copy link
Author

ghost commented Apr 16, 2013

php-imap is installed version 5.3.3 according to the yum output.
This is a test machine with a fresh version of CentOS 6 and Joomla 3.0.3

I just uninstalled and reinstalled it and now I only get the error about
the password not matching.

From phpinfo:

imap
IMAP c-Client Version 2007e
SSL Support enabled
Kerberos Support enabled

On 04/15/2013 09:50 PM, Kevin Locke wrote:

Thanks for using it and reporting the error. Looks like the "Failed to
authenticate: %s" message is because the error message translations
aren't being loaded properly, I'll start tracking that down. I think
the only matching error message is if the |imap_open| function is
missing. Could you confirm that the PHP IMAP module is installed and,
if so, what version is being used? The information will be available
in the output of the |phpinfo();| function.


Reply to this email directly or view it on GitHub
#5 (comment).

@ghost
Copy link
Author

ghost commented Apr 16, 2013

Additional follow-up: I have been working with it a bit more and now I
only get the error below. I have double checked the username and password.

    Warning

Authentication to mailbox server failed

On 04/15/2013 09:50 PM, Kevin Locke wrote:

Thanks for using it and reporting the error. Looks like the "Failed to
authenticate: %s" message is because the error message translations
aren't being loaded properly, I'll start tracking that down. I think
the only matching error message is if the |imap_open| function is
missing. Could you confirm that the PHP IMAP module is installed and,
if so, what version is being used? The information will be available
in the output of the |phpinfo();| function.


Reply to this email directly or view it on GitHub
#5 (comment).

@kevinoid
Copy link
Owner

What are the plugin settings for "Allow Plaintext Password" and "Protocol Encryption"? By default I disallow plaintext (PLAIN) passwords, but almost all IMAP servers require them. And they're safe as long as TLS is required.

@ghost
Copy link
Author

ghost commented Apr 16, 2013

I have tried every combo of this and none work. The 2.5 and 3.x
installs are on different machines. Could I be missing something else
in my install?

On the 2.5 install this works: (I tried this same setup on the 3.0
install)

Incl mail domian YES
Protocal IMAP
Port 143
All plain YES
Encryption None

On 04/15/2013 10:46 PM, Kevin Locke wrote:

What are the plugin settings for "Allow Plaintext Password" and
"Protocol Encryption"? By default I disallow plaintext (PLAIN)
passwords, but almost all IMAP servers require them. And they're safe
as long as TLS is required.


Reply to this email directly or view it on GitHub
#5 (comment).

@ghost
Copy link
Author

ghost commented Apr 16, 2013

The more I look into this I think it might be a server problem. I just
installed 2.5 on this test box and it does not work with your plugin.
Could I be missing something in my php setup? Or server setup?

On 04/15/2013 10:46 PM, Kevin Locke wrote:

What are the plugin settings for "Allow Plaintext Password" and
"Protocol Encryption"? By default I disallow plaintext (PLAIN)
passwords, but almost all IMAP servers require them. And they're safe
as long as TLS is required.


Reply to this email directly or view it on GitHub
#5 (comment).

@kevinoid
Copy link
Owner

The "Authentication to mailbox server failed" message (not followed by a specific error message) indicates that imap_open failed and imap_errors didn't return an array to tell us what happened. If you have access to the IMAP server, do its logs have anything useful to add?

Try creating a new PHP file on your server with the following content:

<?php
$mailboxStream = imap_open("{server.example.com/service=imap/readonly/novalidate-cert}", "username", "password", OP_READONLY | OP_HALFOPEN);
if ($mailboxStream) {
    print("Connected!");
    imap_close($mailboxStream);
} else {
    print("Failed: " . implode('<br />', imap_errors()));
}
?>

Where "server.example.com", "username", and "password" are replaced as appropriate. Then browse to the PHP file and let me know what happens.

@ghost
Copy link
Author

ghost commented Apr 16, 2013

I am getting an error: Failed: Can't connect to mail.---------.com,143:
Permission denied

On 04/15/2013 11:28 PM, Kevin Locke wrote:

|', imap_errors())); } ?>|

@kevinoid
Copy link
Owner

Hmmm. "Permission denied" instead of "Connection refused" or "Authentication failed"... Sounds like the PHP process isn't able to make an outgoing connection to the mail server. Could it be an issue with SELinux or another security mechanism on the web server?

@ghost
Copy link
Author

ghost commented Apr 16, 2013

Oh now I feel dumb. It was SELinux. I was thinking I had disabled it but I was only disabling it per session. Thank you for your help.

@ghost ghost closed this as completed Apr 16, 2013
@kevinoid
Copy link
Owner

Glad you got it figured out! I've also tracked down the error message formatting issue, which will be fixed in the next version. Hopefully that will make it a little easier to troubleshoot in the future.

@ghost
Copy link
Author

ghost commented Apr 17, 2013

Kevin:

I have a feature request. Since you are logging into a IMAP server is
it possible to check the number of unread emails and deliver that to the
user? Something that would check the number and it could be displayed
"You have x unread emails" And give an option to launch into the
web-mailbox? Would this be possible?

On 04/16/2013 08:37 AM, Kevin Locke wrote:

Glad you got it figured out! I've also tracked down the error message
formatting issue, which will be fixed in the next version. Hopefully
that will make it a little easier to troubleshoot in the future.


Reply to this email directly or view it on GitHub
#5 (comment).

@kevinoid
Copy link
Owner

Although it would be technically possible and I can see it being a useful feature for some users, it's beyond the scope that I have in mind for the plugin.

If you (or another developer) would like to add the feature, I'd be happy to answer any questions you might have about the plugin internals. But it's not something that I'm planning to implement personally.

Sorry.

This issue was closed.
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

1 participant