mailman 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cdeb5aa44e41f7d2b6d9b4652ab467d26a160699
4
- data.tar.gz: 4ee7a90bc537c2f38b300227c50e0f0780dd956b
3
+ metadata.gz: 1c3b65580c2e1e59760378031bdd07edec3e63b5
4
+ data.tar.gz: 720c4e3338e79516337ff085a4fe2bad691f35a9
5
5
  SHA512:
6
- metadata.gz: 569481ea8e5df1b94f809c93af6071303c4c22093c3fcaf4721c0924b8c6d719320c4853a8dd93ca243877f14f2aa1da843f050080a04155e4708febb64eeeb9
7
- data.tar.gz: 78382077fab9d79e6088d85e693f99ff59b8a58b5e9d5d7ec64bd30aa02a7986924f4f2a3535e602fc5735cc0185b0601e596f569b5b6da69d8d16adc9b1bcf1
6
+ metadata.gz: b0ca65554bb294ae609e7843a6f7cf8f6e8965cc7e901295523761b61edfd6e91d6e4ea6c0d18f9aadde3a06cd5081f69f8038e7a3c9bb3e8239ce4b3f3e074a
7
+ data.tar.gz: 9f58307d28c7f097bcfec95f219ceb9be9efd651aaa5ed00439527448b811f6132f846b6c1d8b437e9e3d6562a5397e448b3251c58b6168d5441caa533bf7322
@@ -1,3 +1,11 @@
1
+ ## 0.7.1 (June 6, 2014)
2
+
3
+ Bugfixes
4
+
5
+ - Update to listen 2.2.0
6
+ - Handle POP3 receiver crashes better
7
+
8
+
1
9
  ## 0.7.0 (August 11, 2013)
2
10
 
3
11
  Features
@@ -173,6 +173,7 @@ with the `Mailman.config.ignore_stdin` option.
173
173
 
174
174
  **Example**: `cat plain_message.eml | ruby mailman_app.rb`
175
175
 
176
+ *Note that the standard input receiver is not supported on Windows platforms.*
176
177
 
177
178
  ### POP3
178
179
 
@@ -185,6 +186,24 @@ that you use a mail retriever with the Maildir receiver. You could also use
185
186
  Gmail and set it to keep messages after they have been retrieved with POP3.
186
187
 
187
188
 
189
+ ### IMAP
190
+
191
+ The IMAP receiver is enabled when the `Mailman.config.imap` hash is set.
192
+ Polling can be set with `Mailman.config.poll_interval`. This will read all unread messages in the INBOX by default.
193
+ Here are example settings for gmail.
194
+
195
+ ```ruby
196
+ Mailman.config.imap = {
197
+ server: 'imap.gmail.com',
198
+ port: 993, # usually 995, 993 for gmail
199
+ ssl: true,
200
+ username: 'foo@somedomain.com',
201
+ password: 'totallyunsecuredpassword'
202
+ }
203
+
204
+ ```
205
+ * When using gmail, remember to [enable IMAP](https://support.google.com/mail/troubleshooter/1668960)
206
+
188
207
  ### Maildir
189
208
 
190
209
  The Maildir receiver is enabled when `Mailman.config.maildir` is set to a
@@ -294,4 +313,4 @@ end
294
313
 
295
314
  # Add it to the Mailman middleware stack
296
315
  Mailman.config.middleware.add ErrorLoggingMiddleware
297
- ```
316
+ ```
@@ -1,4 +1,8 @@
1
+ require 'rbconfig'
2
+
1
3
  module Mailman
4
+ IS_WINDOWS = (RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i)
5
+
2
6
  # The main application class. Pass a block to {#new} to create a new app.
3
7
  class Application
4
8
 
@@ -66,7 +70,7 @@ module Mailman
66
70
  end
67
71
 
68
72
  # STDIN
69
- if !config.ignore_stdin && $stdin.fcntl(Fcntl::F_GETFL, 0) == 0
73
+ if !IS_WINDOWS && !config.ignore_stdin && $stdin.fcntl(Fcntl::F_GETFL, 0) == 0
70
74
  Mailman.logger.debug "Processing message from STDIN."
71
75
  @processor.process($stdin.read)
72
76
 
@@ -95,16 +99,18 @@ module Mailman
95
99
  if config.watch_maildir
96
100
  require 'listen'
97
101
  Mailman.logger.debug "Monitoring the Maildir for new messages..."
102
+ base = Pathname.new(@maildir.path)
98
103
 
99
104
  callback = Proc.new do |modified, added, removed|
100
105
  added.each do |new_file|
101
- message = Maildir::Message.new(@maildir, "new/#{new_file}")
106
+ message = Maildir::Message.new(@maildir, Pathname.new(new_file).relative_path_from(base).to_s)
102
107
  @processor.process_maildir_message(message)
103
108
  end
104
109
  end
105
110
 
106
- @listener = Listen.to(File.join(@maildir.path, 'new'), :relative_paths => true).change(&callback)
111
+ @listener = Listen::Listener.new(File.join(@maildir.path, 'new'), &callback)
107
112
  @listener.start
113
+ sleep
108
114
  end
109
115
  end
110
116
  end
@@ -131,9 +137,10 @@ module Mailman
131
137
  begin
132
138
  connection.connect
133
139
  connection.get_messages
134
- connection.disconnect
135
140
  rescue SystemCallError => e
136
141
  Mailman.logger.error e.message
142
+ ensure
143
+ connection.disconnect
137
144
  end
138
145
 
139
146
  break unless polling?
@@ -5,7 +5,10 @@ module Mailman
5
5
  attr_accessor :logger
6
6
 
7
7
  # @return [Hash] the configuration hash for POP3
8
- attr_accessor :pop3, :imap
8
+ attr_accessor :pop3
9
+
10
+ # @return [Hash] the configuration hash for IMAP
11
+ attr_accessor :imap
9
12
 
10
13
  # @return [Fixnum] the poll interval for POP3 or IMAP. Setting this to 0
11
14
  # disables polling
@@ -1,3 +1,3 @@
1
1
  module Mailman
2
- VERSION = '0.7.0'
2
+ VERSION = '0.7.1'
3
3
  end
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rudenberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-11 00:00:00.000000000 Z
11
+ date: 2014-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mail
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 2.0.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 2.0.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 2.3.4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 2.3.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: listen
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.4.1
47
+ version: 2.2.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.4.1
54
+ version: 2.2.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: maildir
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: 0.5.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.5.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: i18n
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: 0.4.1
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.4.1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '2.10'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '2.10'
97
97
  description: Mailman makes it easy to process incoming emails with a simple routing
@@ -103,29 +103,29 @@ executables:
103
103
  extensions: []
104
104
  extra_rdoc_files: []
105
105
  files:
106
+ - CHANGELOG.md
107
+ - LICENSE
108
+ - README.md
109
+ - USER_GUIDE.md
106
110
  - bin/mailman
111
+ - examples/simple_route.rb
112
+ - lib/mailman.rb
107
113
  - lib/mailman/application.rb
108
114
  - lib/mailman/cli.rb
109
115
  - lib/mailman/configuration.rb
110
116
  - lib/mailman/message_processor.rb
111
117
  - lib/mailman/middleware.rb
118
+ - lib/mailman/receiver.rb
112
119
  - lib/mailman/receiver/imap.rb
113
120
  - lib/mailman/receiver/pop3.rb
114
- - lib/mailman/receiver.rb
121
+ - lib/mailman/route.rb
115
122
  - lib/mailman/route/condition.rb
116
123
  - lib/mailman/route/conditions.rb
117
124
  - lib/mailman/route/matcher.rb
118
125
  - lib/mailman/route/regexp_matcher.rb
119
126
  - lib/mailman/route/string_matcher.rb
120
- - lib/mailman/route.rb
121
127
  - lib/mailman/router.rb
122
128
  - lib/mailman/version.rb
123
- - lib/mailman.rb
124
- - examples/simple_route.rb
125
- - LICENSE
126
- - README.md
127
- - USER_GUIDE.md
128
- - CHANGELOG.md
129
129
  homepage: https://github.com/titanous/mailman
130
130
  licenses: []
131
131
  metadata: {}
@@ -135,17 +135,17 @@ require_paths:
135
135
  - lib
136
136
  required_ruby_version: !ruby/object:Gem::Requirement
137
137
  requirements:
138
- - - '>='
138
+ - - ">="
139
139
  - !ruby/object:Gem::Version
140
140
  version: '0'
141
141
  required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - '>='
143
+ - - ">="
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  requirements: []
147
147
  rubyforge_project: mailman
148
- rubygems_version: 2.0.3
148
+ rubygems_version: 2.2.2
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: A incoming email processing microframework