diff --git a/config/application.yml.example b/config/application.yml.example index 273e83312..9f8f213f7 100644 --- a/config/application.yml.example +++ b/config/application.yml.example @@ -126,6 +126,11 @@ defaults: &defaults # Automatically enable TLS? Ignored if smtp_authentication is set to none smtp_starttls_auto: true + # OpenSSL verify mode used when connecting to a SMTP server with TLS. + # Set this to none if you have a self signed certificate, keep it empty (not '') for the default + # Possible values: none, peer, client_once, fail_if_no_peer_cert + smtp_openssl_verify_mode: + # Domain of smtp server. # This should match the common name of the certificate # the SMTP server sends. If he sends one diff --git a/config/initializers/mailer_config.rb b/config/initializers/mailer_config.rb index 18754930c..786a82557 100644 --- a/config/initializers/mailer_config.rb +++ b/config/initializers/mailer_config.rb @@ -17,7 +17,8 @@ Diaspora::Application.configure do :address => AppConfig[:smtp_address], :port => AppConfig[:smtp_port], :domain => AppConfig[:smtp_domain], - :enable_starttls_auto => false + :enable_starttls_auto => false, + :openssl_verify_mode => AppConfig[:smtp_openssl_verify_mode] } else config.action_mailer.smtp_settings = { @@ -27,7 +28,8 @@ Diaspora::Application.configure do :authentication => AppConfig[:smtp_authentication], :user_name => AppConfig[:smtp_username], :password => AppConfig[:smtp_password], - :enable_starttls_auto => AppConfig[:smtp_starttls_auto] + :enable_starttls_auto => AppConfig[:smtp_starttls_auto], + :openssl_verify_mode => AppConfig[:smtp_openssl_verify_mode] } end end