Hi there!
I am currently running a website using Drupal version 5.21 and have installed the 'Basic_Webmail' module (http://drupal.org/project/basic_webmail) so that users can send/receive email through the website via an IMAP mail server at the backend. This previously worked without any problems but for the last month or so, users receive this message when clicking the 'Email' link:
warning: imap_open() [function.imap-open]: Couldn't open stream {MailServerName/novalidate-cert/notls}INBOX in D:\Website\modules\basic_webmail\basic_webmail.module on line 1961.
Has anybody seen this before and possibly have any insight on how to troubleshoot the issue from the error message returned?
Thanks in advance!
Matt Jones
Comments
Comment #1
oadaeh commentedEdit: I didn't realize I had submitted this, and I revised and submitted the one below.
Comment #2
oadaeh commentedThat error message is an internal system error message. At that point in the code, you should be getting something slightly different, so I have a few questions for you:
Which version of Basic webmail are you using? I'm thinking that the line number in that error message should be 1960, so I'm wondering if the file has been changed, or if you're using a different version. If the former, you might try downloading the module again and replacing the files you have installed on your server with the newly downloaded files. You won't lose any data and you won't have to reconfigure.
Do you have any other related errors in the logs (admin/logs/watchdog)? Since I'm thinking that the error message should be different, maybe you're getting multiple errors, but only seeing one.
Does it really have "MailServerName" in the error, or did you just put that in there to protect the innocent? If you didn't cover up the real name with a fake name, double-check that your Server settings (on admin/settings/basic_webmail) are correct.
What changed a month ago? This type of error doesn't just show up out of the blue w/o a reason. Something changed to cause it. It might have been something on the server end, or it might have been something in the configuration of the Basic webmail module. Test the connection to the server in some other way and then double-check that your Server settings (on admin/settings/basic_webmail) are correct.
Comment #3
matt.jones commentedHi there,
Some answers to your questions:
Q. Which version of Basic webmail are you using?
A. We are running version 5.x-1.1
Q. I'm thinking that the line number in that error message should be 1960, so I'm wondering if the file has been changed, or if you're using a different version.
A. There is an older version of the module that has been renamed (i assume for backup purposes). If this module is renamed to replace the current module, the error throws at line 1960 as you expected. However, the problem still persisted when using the older module so the newer one was put back in place.
Q. Does it really have "MailServerName" in the error, or did you just put that in there to protect the innocent?
A. No it doesn't, it was just to hide the obscure the real hostname of the server for security reasons. This is not the cause of the issue.
Q. Do you have any other related errors in the logs (admin/logs/watchdog)?
A. Yes, the Watchdog logs showed that login failures were occuring.
Q. What changed a month ago? This type of error doesn't just show up out of the blue w/o a reason
A. I have no idea as i have just began to support and troubleshoot this problem and the previous admin is no longer available.
However, I have discovered the root cause of the problem but just don't know how to fix it. Basically, when a user account is set up, a two-step process occurs. 1. A mailbox is created for a user on the server and credentials are assigned for the mailbox, i.e. user@domain.com and password 12345. 2. A user account is created on the website with details provided for the username, i.e. user, an external email address (for notifications, password reset instructions, etc), i.e. user@gmail.com, and a password for the user account.
What the email server shows in the logs is that when a user attempts to access their mailbox via webmail, the external email address credentials are used, i.e. user@gmail.com and an INVALID LOG ON message is thrown. However, if i change the external email address field to user@domain.com (the account set up on the mail server), they are able to access their mailbox via webmail.
Is this a bug?
Thanks
Comment #4
oadaeh commentedThat is something that is being done outside of Basic webmail. There is some code being executed, either by another contrib module or by a cusom module (probably the latter), that is intervening in the user creation process (via a hook_user() implementation) to add the necessary extra information (probably on the server's end, but it could be to both areas).
Based on your explanation, it sounds like you have the "Use the user's account e-mail address and password for checking e-mail." option enabled on the settings page (admin/settings/basic_webmail). You might try disabling that to see if it helps solve your problem, although you still might have some code troubleshooting and modifying (not in Basic webmail) to do.
Beyond that, your problem is outside of the scope of this support forum. While I could help you solve your problem, I won't do it for free, and I would need access to the server to see what code was being run.
Comment #5
matt.jones commentedHi again,
Guess what?? :)
"Based on your explanation, it sounds like you have the "Use the user's account e-mail address and password for checking e-mail." option enabled on the settings page"
.....it was enabled! When unchecked, everything works!
Thanks for your help, problem solved and things are working as they should be.
Matt
Comment #6
oadaeh commentedGlad to hear it. :^)