[SOLVED] GMail SMTP SSL Connectivity

LATEST Official version.
Questions and discussions - NO ISSUES
FOR ISSUES => http://mantis.testlink.org

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
fyl
Advanced user
Posts: 20
Joined: Tue Nov 09, 2010 12:32 am

[SOLVED] GMail SMTP SSL Connectivity

Post by fyl »

Issue: Can't send e-mail via gmail smtp servers.

This configurations works on Redhat 5.4, but not on Fedora 5.

Testlink 1.9.1 with Fix-4131 applied
Using either
TLS/SSL (587/465)

On Fedora I get the following error:
E_WARNING fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol - in /usr/local/httpd/htdocs/testlink/third_party/phpmailer/class.smtp.php - Line 132


OPEN SSL Information:

[root@ip-10-160-183-136 testlink]# which openssl
/usr/bin/openssl
[root@ip-10-160-183-136 testlink]# openssl version
OpenSSL 0.9.8b 04 May 2006

Apache 2.2.17
./configure --prefix=/usr/local/httpd --with-mpm=worker --enable-so --with-ssl --enable-ssl=shared --with-libdir=lib64 --with-apxs2=/usr/local/httpd/bin/apxs --with-mysql=/usr/local/mysql/include

PHP 3.3.6
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd/bin/apxs --includedir=/usr/include --with-libdir=lib64 --with-openssl --with-mysql-sock --with-mysql=usr/include/mysql --with-xpm-dir=/usr/include/X11 --with-gd --with-zlib-dir=/usr/local/src/zlib-1.2.3 --with-png-dir=/usr/local/include/libpng --with-png-dir=/usr/include/libpng12/ --with-jpeg-dir=/usr/include/ --with-freetype-dir=/usr/include/freetype2/freetype --with-libxml-dir=/usr/include/libxml2/libxmlmake --enable-sockets
fyl
Advanced user
Posts: 20
Joined: Tue Nov 09, 2010 12:32 am

Re: GMail SMTP SSL Connectivity

Post by fyl »

operating system: uname -a
Linux ip-10-160-183-136 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
fyl
Advanced user
Posts: 20
Joined: Tue Nov 09, 2010 12:32 am

Re: GMail SMTP SSL Connectivity

Post by fyl »

I have resolved the issue which was a configuration mismatch between config.inc.php and custom_config.inc.php. Configuration for custom_config.inc, which overrides the config.inc.php, was configured for ssl on port 587 . I removed the configuration from custom_config.inc all together and I was able to connect to gmail using tls on port 587.


As a test you can run this to see which version of ssl(2/3) is compatible with gmail:
[root@ip-10-160-183-136 java]# openssl s_client -ssl3 -connect smtp.gmail.com:587 -starttls smtp -crlf
CONNECTED(00000003)
14954:error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number:s3_pkt.c:284:


[root@ip-10-160-183-136 java]# openssl s_client -ssl2 -connect smtp.gmail.com:587 -starttls smtp -crlf
CONNECTED(00000003)
Post Reply