Google Apps SMTP setup problems.

Started by mcb, February 27, 2013, 12:30:58 PM

Previous topic - Next topic

mcb

Hello,

I have looked at the threads related to this and tried their suggestions to no avail.  I will list what i have tried thus far.

  • First off i tried the Unencrypted Google mail handler with port 25.  (aspmx.l.google.com)   I also updated the DNS SPF record to include the IP address of the forum site.  However, I get this error
    QuoteRan into problems sending Mail. Error: 502 5.5.1 Unrecognized command. cm4si6539703obc.56 - gsmtp
  • I then tried the steps to enable SSL handling for the forum site. 
  • I enabled the "php_openssl" entry in the php.ini file
  • I could not find the two ssl libraries in the PHP folder so i installed them from this site.  http://slproweb.com/products/Win32OpenSSL.html  I copied the two .dll's that one post called for into the system 32 folder and the php root folder.  (libeay32.dll & ssleay32.dll)
  • When i try to connect to ssl://smtp.gmail.com at port 465 i get this error. 
    Quote2: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to SSL://smtp.googlemail.com:465 (Unable to find the socket transport "SSL" - did you forget to enable it when you configured PHP?)
    File: C:\SMF\Apache Software Foundation\Apache2.2\htdocs\Sources\Subs-Post.php and
    Line: 973 & Could not connect to SMTP host: 78444548 : Unable to find the socket transport "SSL" - did you forget to enable it when you configured PHP?
  • When i pull up the phpinfo.php page i don't even find anything referring to SSL.
I was hoping using the port 25 mail handler would just work and i wouldn't have to mess with SSL.  There is apparently something wrong with the SSL in my forum site, but i do not know what at this point.

Thanks for your help.  :)

Ricky.

I can see you are using windows  and from error messages you showed, you have issue with SSL connection through PHP,

See this to know how to install extension properly in windows :
http://php.net/manual/en/install.windows.extensions.php

Herman's Mixen

Everything as PHP on Windows... Restart Apache when you done your new configs and check if that popup some new error messages... sometimes the whole PC need a restart in some cases... have you tried that ??
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

mcb

Thank you for your replies.

I have restarted Apache several times, as well as, rebooted the server several times.  I have installed the php extension the way the php.net site says.  I have also put the two .dll's in every root folder that is mentioned.  I still get the same error.

I do not get any errors when starting the server and when the site starts up.  Where else should i check to see what settings i am missing? 

Also, are there any ideas as to why it would not work on a plain un-encrypted port 25 smtp server?  When we housed our own mail server MDaemon, we connected to it via port 25 sans SSL.

Thanks,

Night09

Under Apache modules (left click green apache icon > apache > apache modules) is ssl service enabled ?

mcb

Forgive me NightBre.  I am unfamiliar with where to find what you are referencing.

Herman's Mixen

do you have some where have an firewall and configured port 465 on it ?

also have a feeling that apache is not installed with openssl


Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

mcb

I checked the firewall and there are exceptions for port 25 & 465 traffic. 

The install is one of the compiled packages that i downloaded off of the SMF website several years ago.  It is utilizing Apache 2.2.4 and PHP 5.2.1.  The current rev of SMF is 1.1.18.  I cannot recall for certain, but i just installed the default/basic SMF package. 

If the installation of openssl requires things like re-compiling or re-installing the whole setup that would be out of the scope of what i know how to do.  I have been viewing this as a process of editing the php.ini file and placing a couple of .dll's in a directory.  If it goes beyond that i will need specific instructions. 

At this point i would rather use the un-encrypted Google Apps server on port 25, but that doesn't work either.  I have put in a support call to Google and they are looking into it, but will probably pass the buck back to the SMF setup. 

Thanks,

Night09

Quote from: nightbre on February 27, 2013, 02:29:19 PM
Under Apache modules (left click green apache icon > apache > apache modules) is ssl service enabled ?

Look at your Apache icon near the clock, Left click and follow through Apache > Apache modules then scroll down the list and you will find ssl_module. Tick this then restart Apache and see if it helps.

mcb

Thanks,

I have the Apache Monitor in my system tray.  (Lil feather with a white circle that has a green triangle.)  That is the only Apache/Forum related icon i have running down there.  I left click on it and it gives me > Apache2 > Start, Stop & Restart.  With Start being grayed out.  That is all the options it shows.

Night09

Ah I think its because I use wamp and you have installed apache directly giving you its options. If you look for its httpd.config then open and find the line :

#LoadModule ssl_module modules/mod_ssl.so

and remove the # so it is included then save and restart for it to take effect.

Herman's Mixen

Have you tried the port 587?  Port 465 is common used for Implicit SSL. However, System.Net.Mail only supports Explicit SSL

http://blogs.msdn.com/b/webdav_101/archive/2008/06/02/system-net-mail-with-ssl-to-authenticate-against-port-465.aspx
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

青山 素子

Quote from: nightbre on February 27, 2013, 06:01:26 PM
Ah I think its because I use wamp and you have installed apache directly giving you its options. If you look for its httpd.config then open and find the line :

#LoadModule ssl_module modules/mod_ssl.so

and remove the # so it is included then save and restart for it to take effect.

That isn't needed to connect to SSL externally from the server, only if you want to run an SSL-secured website.

Apache HTTPd has nothing to do with the issue. This is a PHP issue.

I haven't tried setup with Google yet, but I'll try to see if I can manage it and provide some direction.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Night09

Quote from: 青山 素子 on February 27, 2013, 11:46:11 PM
Quote from: nightbre on February 27, 2013, 06:01:26 PM
Ah I think its because I use wamp and you have installed apache directly giving you its options. If you look for its httpd.config then open and find the line :

#LoadModule ssl_module modules/mod_ssl.so

and remove the # so it is included then save and restart for it to take effect.

That isn't needed to connect to SSL externally from the server, only if you want to run an SSL-secured website.

Apache HTTPd has nothing to do with the issue. This is a PHP issue.

Your right, its openssl for php to get mail working I think needs to be enabled.

mcb

When i restart the Apache Server this is the error i get:
Quote[Fri Mar 01 11:06:23 2013] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Fri Mar 01 11:06:23 2013] [notice] Child 4616: Exit event signaled. Child process is ending.
[Fri Mar 01 11:06:24 2013] [notice] Child 4616: Released the start mutex
[Fri Mar 01 11:06:25 2013] [notice] Child 4616: Waiting for 250 worker threads to exit.
[Fri Mar 01 11:06:31 2013] [notice] Child 4616: All worker threads have exited.
[Fri Mar 01 11:06:31 2013] [notice] Child 4616: Child process is exiting
[Fri Mar 01 11:06:31 2013] [notice] Parent: Child process exited successfully.
[Fri Mar 01 11:06:36 2013] [notice] Apache/2.2.4 (Win32) PHP/5.2.1 configured -- resuming normal operations
[Fri Mar 01 11:06:36 2013] [notice] Server built: Jan  9 2007 23:17:20
[Fri Mar 01 11:06:36 2013] [notice] Parent: Created child process 5508
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\SMF\\PHP\\ext\\php_openssl.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning:  Module 'gd' already loaded in Unknown on line 0
PHP Warning:  Module 'mysql' already loaded in Unknown on line 0
[Fri Mar 01 11:06:36 2013] [notice] Child 5508: Child process is running
[Fri Mar 01 11:06:36 2013] [notice] Child 5508: Acquired the start mutex.
[Fri Mar 01 11:06:36 2013] [notice] Child 5508: Starting 250 worker threads.
[Fri Mar 01 11:06:36 2013] [notice] Child 5508: Starting thread to listen on port 80.
I have added a php_openssl.dll to that directory that i downloaded.  But i have no idea if that is what was needed.

Ricky.

Do you see opnssl in your phpinfo() output ?
Can you post screenshot ?

mcb

Here is the phpinfo report attached.

Ricky.

I don't see Openssl extension loaded ...

I found following on Google :
Quote

As a prerequisite, two libraries must be existing in your Windows system: libeay32.dll and ssleay32.dll. Two ways to achieve this:

    Install OpenSSL for Windows
    Or, copy these two files to C:\WINDOWS\system32 folder. They're shipped with PHP package, you can find them in PHP root folder.

OK, it's time to open php.ini by using any text editor, and remove the semicolon before the following line:

extension=php_openssl.dll

Done!

mcb

Thanks, I covered the install as you delineated back in steps 2,3 & 4 of my original post.  At this point I am trying to figure out the following 3 things:
1.  Why that didn't work?  Did i do something wrong?
2.  Since this was a step that i did not do at the creation of the forum site years ago, does that mean i cannot enable it now.
3.  Why trying to send mail through Google's plain port 25 mail handler won't work.  (This being my preferred option at this point.)

青山 素子

Quote from: mcb on March 02, 2013, 03:54:24 PM
1.  Why that didn't work?  Did i do something wrong?

At the moment, I'm not sure. You're likely missing some components with PHP.


Quote from: mcb on March 02, 2013, 03:54:24 PM
2.  Since this was a step that i did not do at the creation of the forum site years ago, does that mean i cannot enable it now.

No, you should be able to change the configuration as you need. However, the age of your software stack may make things more difficult.


Quote from: mcb on March 02, 2013, 03:54:24 PM
3.  Why trying to send mail through Google's plain port 25 mail handler won't work.  (This being my preferred option at this point.)

Google normally requires any sender to authenticate before relaying, and they won't allow unencrypted authentication. If you must send through port 25, read this information on how to configure for sending. Note that the configuration in that document requires a Google Apps account - normal gmail.com mail will not work. You also need a static IP address on the sending machine.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Advertisement: