Permalink
Browse files

Add SSL support to POP3. Closes #2

  • Loading branch information...
1 parent 7875a53 commit f614a374f4a25deaa0a8c34fa50b9b4b3c26128c @titanous titanous committed Sep 2, 2010
Showing with 9 additions and 5 deletions.
  1. +7 −5 USER_GUIDE.md
  2. +2 −0 lib/mailman/receiver/pop3.rb
View
@@ -162,7 +162,8 @@ will poll every minute by default (this can be changed with
`Mailman.config.poll_interval`). After new messages are processed, they will
be deleted from the server. *No copy of messages will be saved anywhere
after processing*. If you want to keep a copy of messages, it is recommended
-that you use a mail retriever with the Maildir receiver.
+that you use a mail retriever with the Maildir receiver. You could also use
+Gmail and set it to keep messages after they have been retrieved with POP3.
### Maildir
@@ -200,10 +201,11 @@ set, Mailman will use POP3 polling as the receiver.
**Example**:
Mailman.config.pop3 = {
- :username => 'chunky',
- :password => 'bacon',
- :server => 'example.org',
- :port => 110 # defaults to 110
+ :username => 'chunkybacon@gmail.com',
+ :password => 'foobar',
+ :server => 'pop.gmail.com',
+ :port => 995, # defaults to 110
+ :ssl => true # defaults to false
}
@@ -15,11 +15,13 @@ class POP3
# @option options [Integer] :port the port to connect to
# @option options [String] :username the username to authenticate with
# @option options [String] :password the password to authenticate with
+ # @option options [true,false] :ssl enable SSL
def initialize(options)
@processor = options[:processor]
@username = options[:username]
@password = options[:password]
@connection = Net::POP3.new(options[:server], options[:port])
+ @connection.enable_ssl(OpenSSL::SSL::VERIFY_NONE) if options[:ssl]
end
# Connects to the POP3 server.

0 comments on commit f614a37

Please sign in to comment.