This project is archived and is in readonly mode.

#6508 new
Florent Piteau

Undocumented ActionMailer openssl_verify_mode option

Reported by Florent Piteau | March 2nd, 2011 @ 06:07 PM

In the mail lib used by ActionMailer, there is a really usefull option for people using wildcard and/or self-signed ssl certificates for their mail server : openssl_verify_mode which can take a string value (none, peer, client_once, fail_if_no_peer_cert) or OpenSSL verify mode constant (OpenSSL::SSL::VERIFY_NONE, OpenSSL::SSL::VERIFY_PEER, ...)

This is how i'm using it :

ActionMailer::Base.smtp_settings = {  
  :address              => 'mail.mydomain.net',
  :port                 => 587,  
  :domain               => 'mydomain.net',  
  :user_name            => 'user@mydomain.net',  
  :password             => 'thatsasecret',  
  :authentication       => :login,  
  :enable_starttls_auto => true,  
  :openssl_verify_mode  => 'none' # Only use this option for a self-signed and/or wildcard certificate
}

I think this should be mentioned in the "Configuration options" section of ActionMailer::Base documentation. Some people could really use it and shouldn't have to go in to the mail lib documentation to find it.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages