UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  eUKhost's Official Web Hosting Forum > Web Hosting and Domains > Ruby on Rails

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 03-03-2009, 17:27
Member
 
Join Date: Mar 2008
Posts: 56
Default hostname was not match with the server certificate

Hi, I am setting up a rails application and when I deliver an email, i get this

OpenSSL::SSL::SSLError in UsersController#forgot_password

hostname was not match with the server certificate

here is my setting

ActionMailer::Base.raise_delivery_errors = true
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.delivery_method = :smtp

ActionMailer::Base.smtp_settings = {
:address => "localhost",
:port => 25,
:domain => "domain.com",
:user_name => "user@domain.com",
:password => "pass",
:authentication => :login
}

by not using any of the settings, only using sendmail, i am able to receive emails but its "From: " is not having proper domain.com ( it has the server name i have set in cpanel). Any help is much appreciated.
__________________
for sale
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-03-2009, 17:42
Chief Technical Officer(eUKhost.com)
 
Join Date: Jun 2007
Posts: 269
Default

Hello,

Its not a error rather a warning message as SSL is hostname based.
If you are using secure connection then you will need to use the SMTP server as servers's hostname i.e the actual hostname of server on which your domain is hosted. Also, secure SMTP port would be 465.

Regards,
NicK J.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-03-2009, 04:24
Moderator (eUKhost.com)
 
Join Date: Mar 2009
Posts: 353
Default

Hi,

With the new versions of rails you now have to use the server’s host name as set in SSL certificate rather than using localhost I guess. Just as you have it here:

:address => "localhost",

Make sure to point your ActionMailer settings to use the server’s host name as set in the server’s SSL certificate.

:address => ’server.ssl.name’,

while I cannot assure if this is a quick fix to it, but worth a try

Let me know how you get on it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-03-2009, 19:27
Member
 
Join Date: Mar 2008
Posts: 56
Default

jennifer

I never had a ssl in my vps.

thanks
__________________
for sale
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-03-2009, 04:36
Moderator (eUKhost.com)
 
Join Date: Mar 2009
Posts: 353
Default

Did you try replacing it with the server hostname or your domain name rather than using localhost?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 05-03-2009, 14:15
Member
 
Join Date: Mar 2008
Posts: 56
Default

Quote:
Originally Posted by jennifer View Post
Did you try replacing it with the server hostname or your domain name rather than using localhost?
I did try but it did not work. May be I have to install smtp-tls gem.?.
__________________
for sale
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 05-03-2009, 20:22
AlexP's Avatar
System Administrator.(eUKhost.com)
 
Join Date: Apr 2007
Posts: 266
Send a message via MSN to AlexP Send a message via Skype™ to AlexP
Default

Hello,

The problem is that enable_starttls_auto comes true by default so you will have to disable it, Please add following line in config.action_mailer.smtp_settings =

Quote:
:enable_starttls_auto => false
Let me know if still you have a problem so I will check it further.
__________________
Thanks and Regards,
Alex P
Senior System Administrator.
Dedicated Hosting || Semi Dedicated Hosting

MSN: alex @ eukhost.com
SKYPE: euk_alexp
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 10-03-2009, 15:41
Member
 
Join Date: Mar 2008
Posts: 56
Default

Quote:
Originally Posted by AlexP View Post
Hello,

The problem is that enable_starttls_auto comes true by default so you will have to disable it, Please add following line in config.action_mailer.smtp_settings =



Let me know if still you have a problem so I will check it further.
Alex, I tried that bit but rails threw an error as this setting is not recognised in rails 2.2.2. So, i had to hack action mailer. Now it works as expected.

Thanks everyone for offering help.
__________________
for sale
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 12-03-2009, 03:32
Moderator (eUKhost.com)
 
Join Date: Mar 2009
Posts: 353
Default

Is there anyway you could post here what are the exact changes you made to get it working? It would be good to know the fix for the next time

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 12-03-2009, 21:32
Member
 
Join Date: Mar 2008
Posts: 56
Default

Absolutely Jenni

Open up the base.rb in ActionMailer and comment the following line:

smtp.enable_starttls_auto if smtp.respond_to?(:enable_starttls_auto)

for me, he was the troublemaker, so had to sort him with a #

cheers
__________________
for sale
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 13-03-2009, 03:45
Moderator (eUKhost.com)
 
Join Date: Mar 2009
Posts: 353
Default

aah thanks for posting the quick fix.

Alex was almost there... the trick is basically to turn off TLS with the current running mail server. So adding a code to disable it or commenting the enable_starttls line either should do to get this working..

Thank you for posting the fix.. much appreciated
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT. The time now is 15:11.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
UK Web Hosting by eUKHosting 3.1.0
Copyright © 2001-2010, eUKhost LTD. All rights reserved.

 
 
UK VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

VoIP Dedicated Servers
Asterisk, Trixbox Dedicated Servers

Business Web Hosting
100% uptime Hosting

UK Cpanel Hosting
cPanel Shared Hosting

Domain Hosting
Cheap Domains & Hosting Plans

UK Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

ColdFusion Hosting
ColdFusion Web Hosting


 
Reseller Web Hosting UK
 
knowledgebase articles
eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting

Joomla Hosting
Joomla Web Hosting

Mambo Hosting
Mambo Web Hosting

Magento Hosting
Magento Web Hosting

Wordpress Hosting
Wordpress Web Hosting


popular blog categories

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines

VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles