Skip to content
This repository has been archived by the owner on Jan 30, 2018. It is now read-only.

Adds SSH authentication when fetching incoming emails with POP. #37

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/models/emailer/incoming.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions config/teambox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down