Page 1 of 1

gmail SMTP timeout

Posted: Tue Mar 11, 2014 5:39 pm
by zmenchho
Script URL: support.pckeyboard.com
Version of script: 2.5.2
Hosting company: self
URL of phpinfo.php: support.pckeyboard.com/7sholen8/
URL of session_test.php: same ^
What terms did you try when SEARCHING for a solution:

Write your message below:


Hello!

We have GAPPS and have been using the SMTP routing from HESK for awhile and it has worked great.

However recently it has stopped.

here is the error when i try to test it.
Error: Could not connect to the host "smtp.gmail.com": Connection timed out
Resolving SMTP server domain "smtp.gmail.com"...
Connecting to host address "173.194.77.108" port 465... and tried 587
I called GAPPS support and we went thru testing and everything is fine, we complied an email from SSH thru smtp.gmail.com and it works fine.

anyone else having issues with using smtp.gmail.com?

detailed logging of the smpt call?

Re: gmail SMTP timeout

Posted: Tue Mar 11, 2014 9:04 pm
by Klemen
Try logging with your google account you use here and click "Allow access to your Google account "
https://www.google.com/accounts/DisplayUnlockCaptcha

And, of course, double-check you are using the recommended settings:
http://www.hesk.com/knowledgebase/index.php?article=72

Re: gmail SMTP timeout

Posted: Tue Mar 18, 2014 12:05 pm
by zmenchho
Hello!

I have tried all you stated, I contacted Google Apps support and this is what they tell me after looking through logs.
I've requested additional logs. From the logs we’ve noticed an issue with the handshake when opening a session at the HELO/EHLO level from the server:76.73.3.xxx.

However, since we don't have session logs to determine what is causing the handshake failure and additionally it can also relate to network disruption on the server side such as firewall. One thing I can assure you is the script will need to be reviewed in order to resolve this.

Re: gmail SMTP timeout

Posted: Tue Mar 18, 2014 5:21 pm
by Klemen
I'm not sure what to tell you. When it stopped working the code didn't change, so it must be something else. Besides, it works just fine from my server?

My bet is that either your firewall or Google apps is blocking requests (it doesn't even come to the HELO/EHLO, connection stops before sending it). Are you able to connect to any other SMTP server on the same port?

Re: gmail SMTP timeout

Posted: Wed Jun 11, 2014 2:08 pm
by zmenchho
Klemen,

We are at it again. . . gapps gives us the error again.

Code: Select all

Error: Could not connect to the host "smtp.gmail.com": Connection timed out
Resolving SMTP server domain "smtp.gmail.com"...
Connecting to host address "173.194.77.108" port 465... and tried 587
I spoke with gapps corp support and they say there is nothing wrong no flags on the account we whitelisted the server IP in our gapps portal.

They are now asking for transaction logs from the hesk portal.. . is there away to get the logs to see what is actually going on ?

THANK YOU!!!
ZAch

Re: gmail SMTP timeout

Posted: Fri Jun 13, 2014 10:57 am
by Klemen
It worked fine but it suddenly stopped?

This can only mean one of two things:

- your server is blocking connections
- Google is blocking logins

There is no other alternative if it worked fine but doesn't work anymore. The HESK code hasn't changed a bit.

Re: gmail SMTP timeout

Posted: Fri Jun 13, 2014 11:08 am
by zmenchho
I understand that the code hasn't changed however, is there any logging anywhere that I can drill down and see the errors in somewhat of detail??

Re: gmail SMTP timeout

Posted: Fri Jun 13, 2014 5:36 pm
by Klemen
The errors you see is the only log HESK generates. The firewall should have logs about dropped connections.

Re: gmail SMTP timeout

Posted: Fri Jun 13, 2014 5:46 pm
by Klemen
You may also want to try this from server:
https://accounts.google.com/DisplayUnlockCaptcha

Make sure you open and solve the captcha from your SERVER, not your PC!

Re: gmail SMTP timeout

Posted: Fri Jun 13, 2014 6:18 pm
by Klemen
Just some more info: Google seems to be locking "suspicious" login attempts from time to time.

I was able to get it working on my server like this:

1. Test SMTP/POP3 connection from HESK settings (an error occurs saying web login is required)

2. I used my dedicated server as a proxy:
http://www.makeuseof.com/tag/dedicated- ... tunneling/

3. I used the server as a proxy to visit this webpage and unlock access:
https://accounts.google.com/DisplayUnlockCaptcha

4. SMTP/POP3 tests worked fine then.

Again, this is a security feature Google forces, not something HESK can predict/prevent. It is Google who is blocking login and it is Google who needs to be told to unlock/allow access.

Re: gmail SMTP timeout

Posted: Fri Dec 30, 2016 8:14 pm
by happyjjd
SOLVED
After numerous attempts at this, I have figured out some things I have not seen posted elsewhere and I am sharing them here.

The settings Hesk suggest are correct but were not working on my linux server until I did a few simple things.

1. I went into my hosts WHM and went into firewall config and removed "SMTP Blocking" (this is a security measure to stop email being sent via smtp from malicious scripts or a hacker - do this at your own risk!) and saved and restarted firewall. I then received a 504.7 error or something like it, so....

2. I went to this google link that allows "less secure apps" and of course..... allowed them.
https://www.google.com/settings/security/lesssecureapps

I then used Hesk's suggested settings
port 587
SSL = off
TLS = on
username
pass

also making sure the "from" address in "general settings" is set to same address as the smtp sending address you used in smtp settings.

All worked for me, this after my host(liquidweb) tried dilligently to help w/ the issue, but to no avail....
It just goes to show.... Don't give up, there in no problem without a solution...

HappyJJD