From c6aa6141d4000185c20a8110eebd7af208e6ac5d Mon Sep 17 00:00:00 2001 From: Rafael Vega Date: Wed, 4 Jan 2012 11:25:53 -0500 Subject: [PATCH] Adds SSH authentication when fetching incoming emails with POP. --- app/models/emailer/incoming.rb | 3 +++ config/teambox.yml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/app/models/emailer/incoming.rb b/app/models/emailer/incoming.rb index ab6c5d06e1..7cd62ad6d3 100644 --- a/app/models/emailer/incoming.rb +++ b/app/models/emailer/incoming.rb @@ -36,6 +36,9 @@ def self.fetch(settings) end def self.fetch_pop(settings) + if Teambox.config.enable_pop_ssh + Net::POP3.enable_ssl(OpenSSL::SSL::VERIFY_NONE) + end Net::POP3.start(settings[:address], settings[:port], settings[:user_name], settings[:password]) do |pop| pop.mails.each do |email| begin diff --git a/config/teambox.yml b/config/teambox.yml index 184a999a85..1eaf2d385e 100644 --- a/config/teambox.yml +++ b/config/teambox.yml @@ -87,9 +87,13 @@ defaults: &defaults incoming_email_settings: :type: POP :address: mail.example.com + :port: 110 :user_name: USER :password: PASSWORD + # Set to true when using Gmail + enable_pop_ssh: false + # Allow teambox.com to gather statistics about this installation tracking_enabled: true