Anyone else's mailhandler stop working with Gmail all of a sudden?
Oyjord - May 2, 2009 - 18:28
| Project: | Mailhandler |
| Version: | 6.x-1.5 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
My mailhandler worked great with my gmail account, but for no reason whatsoever, out of the blue (I haven't edited my site in weeks), it stopped working. When I manually hit "retrieve," my site just times out, and I now get the errors:
# warning: imap_open() [function.imap-open]: Couldn't open stream {pop.gmail.com:995/pop3/ssl/novalidate-cert}INBOX in /home/public_html/drupal/modules/mailhandler/mailhandler.module on line 193.
# warning: imap_close(): supplied argument is not a valid imap resource in /home/public_html/drupal/modules/mailhandler/mailhandler.retrieve.inc on line 601.Any tips? Thanks!

#1
#2
#3
I have also problems with gmail account now. I have tried to change pop3<->imap and /ssl <-> /ssl/novalidate-cert and username <-> username@gmail.com, but all without success.
Edited: Problems are only for my web hosting on hostmonster.com. Therefore I am not able to restart Apache. I am able to connect to gmail account absolutely without any problem from local installation [tested with Acquia Drupal 1.2.8 Stack for Windows].
#4
did you try restarting apache? I had a sudden problem with making connections to external network resources (aggregator, mailhandler, etc.) and it was fixed after an apache restart.
#5
I also noticed this problem briefly a few days ago, but restarting Apache fixed the problem for me. I have no idea what might have caused it.
#6
Is this still an active problem for people? If not, it might have just been a temporary problem with Gmail, or just a coincidence that a few of us ran into an error at the same time and all used Gmail, or some other sort of fluke occurrence...
#7
Unfortunately, it is still problem for me at my hostmonster webhosting , but the problem is there and NOT in drupal+mailhandler+gmail, as working without problems on localhost.
#8
Okay, I will mark this as fixed for now to get it out of my issue queue, but anyone feel free to open it up again if you think you are having problems that are caused by Mailhandler
#9
Automatically closed -- issue fixed for 2 weeks with no activity.
#10
I just thought I would add I've been having no end of grief getting mailhandler to work with gmail. Went through various iterations with php_imap on win32 busted with ssl, to various command switches (/ssl/novalidate-cert) etc. I was following the general guidelines for pop and imap configuration for gmail, but finally ran across a working solution (for me, anyway)
The fix was using a different imap server than what gmail says in their imap config.
Email address: accountname@gmail.com
Folder: INBOX
(note that other folders - actually labels - didn't seem to work for me)
Pop3 or IMAP: IMAP
Mailbox Domain: gmail-imap.l.google.com
(this is the imap server that I used. imap.google.com did NOT work)
Mailbox Port: 993
Mailbox Username: accountname@gmail.com
Extra commands: /ssl/novalidate-cert
Check delete messages after they are processed.
(If you do not, it will continue to re-import the same message over and over again)
#11
There is an inconsistency about it, and I don't know how to explain it. The fact is that different people use the same configuration, but reach different results with Gmail.
For example, I use the same config as you did (with imap.google.com), and I have no problem...
This might hint inconsistency at Gmail's side, as well as issues per implementation.
#12
as I know, the reason of this is the mail server of GMAIL does not have a static IP (usually did before). some web hosts configure their server only opening ports to static IP, not to dynamic IP.
#13
@cpn2003: that's very interesting. Do you know which configuration should be looked for on the server, to verify this is indeed a possible cause?
Also, can this hint a problem with routers that cache IPs for too long?
#14
That was what I was told by my web host. I usually used mailhandler without problem But as described by others above that it stopped working at the beginning of this year. I consulted with my web host and they tried for a couple of days and told me the results.
I do not have problem to read my GMAIL boxes from my local machine and another server with code made by myself. The same code doesn't work on the server mentioned above.
#15
Following is the answer I got from the support of my web host:
We have checked your script and also host imap.gmail.com. Your script works fine on another servers without firewalls, and does not work properly on our server, because IP address of imap.gmail.com has changed after our whitelisting in Ticket #946034. I have been checking IP address during 15-20 minutes and IP address changed twice during that time. Unfortunately it is impossible to open 993 port for all IP addresses. In order to find solution of this issue I suggest you to contact google and ask what could be done from their side to resolve such issue. Please update this ticket once you have any additional information. Should you have any further question feel free to contact us and we will be glad to assist you.
#16
So I have not had any updates for awhile as I also use a gmail account as my 'mailing list' account for submission to my site.
Pride out the window, what e-mail service offers a free e-mail account that works well with mailhandler?
#17
Here's my solution. I just signed up with an account at gawab.com - and I am forwarding my mail from within gmail so that I can maintain the proper 'from' field. I think this will work... :)
#18
It seems the problem is created by webhosting security filters together with gmail strange fast IP changes.
Mailhandler works OK with gmail for me on my local PC (even retrieving emails with specific label only), but not on my hostmoster webhosting. Therefore I am using the following bypath - I have created email account directly on hostmonster and I am forwarding emails there. As an advantage, I am able to use forwarding to several email accounts by filters defined within gmail (as quivalents to previously defined gmail labels) and then retrieve those emails by different mailhandler mailboxes with different commands. Alternatively I am handling/tuning my emails within Outlook - transfering manually from one IMAP account (gmail) to another (hm) and marking them as read/unread. It works also on very old email if I want to publish it.
#19
@salava, @cpn2003 -
It's not so much that Google have their IPs "change" all the time. They just have more IPs than you'll ever see, and they hand them out somewhat randomly to provide load-balancing via DNS.
Try looking up a single imap.gmail.com IP address, then using that as your mailserver. You can whitelist that IP and keep using it forever. Google shouldn't care in the slightest.
Google IMAP works very well for us, but we don't have a need to whitelist IMAP servers. I'm a bit perplexed as to why your hosting co felt a need to whitelist connections to remote IMAP servers by IP address, but that's their call!
#20
Did using a static IP instead of a name-based URL work for people?