diff --git a/app/controllers/getting_started_controller.rb b/app/controllers/getting_started_controller.rb index 96cd7e185..9f7f0f96f 100644 --- a/app/controllers/getting_started_controller.rb +++ b/app/controllers/getting_started_controller.rb @@ -846,9 +846,14 @@ curl http://localhost/api/v1/getting_started -v -u #{login}:#{password} end def mxers(domain) - mxs = Resolv::DNS.open do |dns| - ress = dns.getresources(domain, Resolv::DNS::Resource::IN::MX) - ress.map { |r| [r.exchange.to_s, IPSocket::getaddress(r.exchange.to_s), r.preference] } + begin + mxs = Resolv::DNS.open do |dns| + ress = dns.getresources(domain, Resolv::DNS::Resource::IN::MX) + ress.map { |r| [r.exchange.to_s, IPSocket::getaddress(r.exchange.to_s), r.preference] } + end + rescue Exception => e + logger.error e.message + logger.error e.backtrace.inspect end mxs end