Does mailhandler support SSL? For example, connecting to gmails pop3 on port 995. I can get it to work by adding /pop3/ssl/user=user @gmail.com on line 14 of mailhandler.module,v 1.80.2.5 2006/04/19 18:34:04 weitzman Exp. But is there any way to do this through the interface?
Comments
Comment #1
varunvnair commentedbump! Any update on this?
Comment #2
RobRoy commentedYeah it does. I've used mailhandler successfully with SSL and both pop3/imap. I used these options in the add/edit mailbox page: /pop3/ssl/novalidate-cert and /ssl/novalidate-cert respectively.
Did that work for gmail?
Comment #3
RobRoy commentedChanging to support request.
Comment #4
ChrisKennedy commentedJust add /ssl in the options box, as #2 says.
Comment #5
mike stewart commentedI've been trying to setup mailhandler with either gmail or google apps...
I've tried every configuration I can think of using the above suggestions... however I cannot get it to work. I have php imap, and I am using SMTP module with google apps without a problem.
Has anyone else had success with a similar setup? I could really use some insight or better documentation... can someone post if they've got google apps to work and what settings were involved?
my setup is below... maybe a fresh pair of eyes can help?
I have also tried similar setup with a gmail account
Comment #6
RobRoy commentedLeave folder INBOX and use /ssl/novalidate-cert. The only thing that is weird is that you have the email not @gmail.com so you may need to do a username like post%mydomain.org or try this with a normal gmail account as I just have "myusername" in there, not "myusername@gmail.com".
Also, make sure to enable POP3 at gmail in the settings page. That could be your issue.
Comment #7
mike stewart commentedRobRoy, thanks for the timely response! I quickly tested your suggestion, but it still didn't work for me. Ok, I had actually already tried said flags. heck, I had even tried a few others. In short, I've been unable to find anyone with this problem that has solved it AND posted their solution.
I suspect by the nature of your earlier posts that you are using mailhandler with gmail? I'd be very curious what version(s) of os/webserver/php you're using. I think I know what the problem is, but have no way to fix. I sure hope someone can tell me I'm wrong and this is in fact fixable? (please)
I've done a lot of research in the last few days in hopes of getting this to work. I run a neighborhood website and mailhandler was quite useful but I've migrated the email for my domain to gmail apps in order to prevent my domain from being blacklisted - as the previous setup had the website AND email server hosted in a shared hosting environment with a few other not so courteous webmasters.
PROBLEM
Anyway, from what I gather it seems to have something to do with HostGator's Linux & PHP 4.4.4 setup. Note: from what I read it seems particularly bad for Windows PHP servers (see notes below).
LIKELY SOLUTION
seems most likely that php_imap.dll is not compiled using --with-imap-ssl option.
WHY?
I found the following paragraph somewhere on the internet discussing gmail with example imap_open code... everything I have found suggests the flags above are correct for gmail:
that logic supports the following:
background: http://bugs.php.net/bug.php?id=36496&edit=2
which seems fixed? here -> http://bugs.php.net/bug.php?id=29036
details on how to compile with SSL: http://us2.php.net/imap
Comment #8
mike stewart commentedJust to update, I worked with hostgator (my host) and they recompiled php_imap.dll with open ssl - i can now check email via google apps - looks like problem solved. i've been to busy to finish setup, but mailhandler is definitely connecting to pop.gmail.com on port 995 using /ssl/novalidate-cert
my setup
google apps - which allows me to use gmail with my own domain
E-mail address: example@yourdomain.com
Second E-mail address: NULL
Folder: INBOX
POP3 or IMAP Mailbox: POP3
Mailbox domain: pop.gmail.com
Mailbox port: 995
Mailbox username: example@yourdomain.com
Mailbox password: (your password here)
Extra commands: /ssl/novalidate-cert
Comment #9
KrisBulman commentedI can run a test script using a gmail account and it works.. it uses:
imap_open("{pop.gmail.com:995/pop3/ssl/novalidate-cert}INBOX", "#username#","#password#");But I am unable to get mailhandler working with the following settings:
E-mail address: example@gmail.com
Second E-mail address: NULL
Folder: INBOX
POP3 or IMAP Mailbox: POP3
Mailbox domain: pop.gmail.com
Mailbox port: 995
Mailbox username: example@gmail.com
Mailbox password: (your password here)
Extra commands: /ssl/novalidate-cert
any ideas?
Comment #10
KrisBulman commentednvm.. i actually forgot to add the @gmail.com, it indeed works!!
Comment #11
drupaljunkee commentedAttempting this as well. Using google Apps.
Getting error:
warning: imap_open() [function.imap-open]: Couldn't open stream {pop.gmail.com:995/pop3/novalidate-cert}INBOX in /var/.../public_html/family/modules/mailhandler/mailhandler.module on line 167.My settings are similar to above comment:
Google account has POP enabled.
Sent e-mail to my webhost to see if port 995 is blocked. Also saw something about ensuring PHP is encoded with SSL???
Any other suggestions?
Comment #12
doublejosh commentedSubscribing.
I've had intermittent success. I feel like I've configured and re-configured this 100 times.
Adding the /ssl caused success once. Dealing with my host's PHP extensions was another issue.
Now it's not working again. Not sure what comes next for debug.
I've used both local (on-host) mail hosting and gmail apps for my domain. Both have worked, the gmail isn't anymore :(
Comment #13
ari-meetai commentedHaving same problem here. Tried with Wordpress and nothing. Also posted there and still no solution.
Woudln't tell my host to compile php with imap and ssl, 'cause is still not clear that's the issue...
Used also /notls (taken from php.net reference) without luck.
anyone?
Comment #14
mike stewart commentedtelling you host to do it wouldnt be nice either. :)
just ask them how its compiled - then you'll know. its worked for me ever since this was done.
php_imap.dll compiled with open ssl
Comment #15
z.stolar commentedI'd appreciate it if someone summarize the issue into a handbook page, or even a patch to improve the in-site module's help section.
Comment #16
mfbI haven't had any trouble using SSL with a Gmail inbox. My settings:
POP or IMAP Mailbox = "IMAP"
Mailbox domain = "imap.gmail.com"
Mailbox port = "993"
Extra commands = "/ssl"
You can make sure your PHP supports SSL by running phpinfo() and looking for:
Comment #17
electronicmonkey commentedSo where is the content ? I get the message displayed
:Mailhandler retrieve successful: 10 messages for mymail@googlemail.com
but there is no new content on the site
Comment #18
z.stolar commented@electronicmonkey: This might be a trivial question, but - do you have a "status: 0" in default commands, or is it the default state for the content type you use?
Did you check "admin/content/node"?
... just verifying
Comment #19
electronicmonkey commentedI checked "admin/content/node" ; nothing.
I did not put anything in default commands
Comment #20
electronicmonkey commentedOK I put some default commands now and its ok ....... but a minute later it does not function again
Comment #21
robclay commentedI use hostgator and I am also getting:
warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX
I just received this from a hostgator chat support:
"If you are using a direct mailing program that needs to use an outgoing port especially a nonstandard one, you will need to send an email to support@hostgator.com asking for that specific port to be opened up for you."
So I have sent this request to hostgator support:
"Will you please open port 993, 995, and 587 so that I may use my a module with my website that interfaces with google hosted apps?"
Will report back here when / if it happens and fixes the (my) problems.
Comment #22
robclay commentedEureka!
I received this from Hostgator:
Hello,
I have enabled the outgoing ports as you have requested:
[root@enclave ~]# iptables -nL | grep 993
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:993
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:993
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:993
[root@enclave ~]# iptables -nL | grep 995
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:995
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:995
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:995
[root@enclave ~]# iptables -nL | grep 587
ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:587
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:587
And I test my mailhandler account:
Hope this helps a few people...
And by the way, in my extra commands field is just "/ssl"
Now to the next step!
Comment #23
jjjames commentedGood work!
Comment #24
arthurf commentedIf you need ssl imap on osx and you're running MAMP, check out http://www.vargatron.com/blogatron/2009/03/14/imap-ssl-with-mamp/
Comment #25
z.stolar commentedMarking fixed. Please re-open if needed.
Thanks for all the participants.
Comment #27
socialnicheguru commentedhow do you check to see if MAMP has enabled the correct IMAP ssl? I checked under phpinfo.
Is this what is needed for ssl to work on MAMP?
imap
IMAP c-Client Version 2004
Kerberos Support enabled
IMAP and pop are enabled for my email address which is google.
It is the same config as #16.
Any help would be greatly appreciated.
Comment #28
kentr commentedDid you try the link given in #24?
Comment #29
gregglesThis page has lots of good documentation on the topic http://drupal.org/node/207366
Comment #30
prasannah.ganeshan commentedThis configuration worked for me. I advice other too to use the same settings.