Hello,
We’re trying to configure the support_ticket
capability for our OOD 3.1.10 deployment. We have postfix
running on our OOD portal node listening on localhost:25
only, then configured to relay to our main SMTP server and are just trying to configure OOD to do SMTP → localhost:25
but it’s getting hung up on the self-signed certificate generated by postfix
.
Either I need to just disable it trying to use TLS or get it to accept OpenSSL::SSL::VERIFY_NONE
, but I can’t quite get the YAML right for either case.
I saw the following in ./ondemand/root/usr/share/gems/3.1/ondemand/3.1.10-1/gems/mail-2.8.1/lib/mail/network/delivery_methods/smtp.rb
# === Certificate verification
#
# When using TLS, some mail servers provide certificates that are self-signed
# or whose names do not exactly match the hostname given in the address.
# OpenSSL will reject these by default. The best remedy is to use the correct
# hostname or update the certificate authorities trusted by your ruby. If
# that isn't possible, you can control this behavior with
# an :openssl_verify_mode setting. Its value may be either an OpenSSL
# verify mode constant (OpenSSL::SSL::VERIFY_NONE, OpenSSL::SSL::VERIFY_PEER),
# or a string containing the name of an OpenSSL verify mode (none, peer).
Here is what I’ve tried in my for YAML VERIFY_NONE
, but with no luck:
support_ticket:
attachments:
max_items: 1
max_size: 10485760
email:
to: "oodsupport@epa.gov"
delivery_method: "smtp"
deliver_settings:
address: 'localhost'
port: 25
domain: 'epa.gov'
enable_starttls_auto: auto
openssl_verify_mode: 'none'
enable_starttls: true
I’ve also tried to just disable TLS:
delivery_settings:
address: 'localhost'
port: 25
domain: 'epa.gov'
tls: false
enable_starttls: false
enable_starttls_auto: false
which gives the same error and can’t seem to get the correct YAML option set for either no TLS or just accept the self signed certificate. However, if I manually edit the class SMTP
code:
class SMTP
attr_accessor :settings
DEFAULTS = {
:address => 'localhost',
:port => 25,
:domain => 'localhost.localdomain',
:user_name => nil,
:password => nil,
:authentication => nil,
:enable_starttls => nil,
:enable_starttls_auto => true,
:openssl_verify_mode => nil,
:ssl => nil,
:tls => nil,
:open_timeout => 5,
:read_timeout => 5
}
and set :openssl_verify_mode => OpenSSL::SSL::VERIFY_NONE
and restart the PUN, I was able to send a message no problem. So the issue is entirely how do I correctly set the Ruby equivalent of :openssl_verify_mode => OpenSSL::SSL::VERIFY_NONE
from the YAML. I figure I am just missing something obvious, so any pointers is appreciated.
Thanks!