imap-filter 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.semver +1 -1
- data/Gemfile.lock +53 -50
- data/README.org +29 -26
- data/imap-filter.gemspec +4 -4
- data/lib/imap-filter/cli.rb +0 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c84599ffe1524bc60088e545d040079a406901f
|
4
|
+
data.tar.gz: b5a598624e3a9ea3a31f133c9583b08484780190
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de6b32387a740f68ddefa74d443a462e8d769e0fdc1aea44072f34f3452e7e3cb4c7a76dd2498a7f8c52c83db82bd3b09f327133d6b0adb60d913c6520bb5994
|
7
|
+
data.tar.gz: 45d357e4c9e10d33958d4d7afd7eb758c7b8bc19abb6ed0ef39055c3a1db8c42ca9493d4f122b727e4b70fb4c6b35182500f4fea1ba92cf506f9f9ece3dd92c4
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.4.
|
1
|
+
2.4.1
|
data/.semver
CHANGED
data/Gemfile.lock
CHANGED
@@ -3,104 +3,107 @@ GEM
|
|
3
3
|
specs:
|
4
4
|
addressable (2.4.0)
|
5
5
|
aspector (0.14.0)
|
6
|
-
awesome_print (1.
|
6
|
+
awesome_print (1.8.0)
|
7
7
|
binding_of_caller (0.7.2)
|
8
8
|
debug_inspector (>= 0.0.1)
|
9
|
-
builder (3.2.
|
10
|
-
byebug (9.0
|
11
|
-
coderay (1.1.
|
9
|
+
builder (3.2.3)
|
10
|
+
byebug (9.1.0)
|
11
|
+
coderay (1.1.2)
|
12
12
|
colorize (0.8.1)
|
13
|
-
debug_inspector (0.0.
|
13
|
+
debug_inspector (0.0.3)
|
14
14
|
descendants_tracker (0.0.4)
|
15
15
|
thread_safe (~> 0.3, >= 0.3.1)
|
16
|
-
diff-lcs (1.
|
16
|
+
diff-lcs (1.3)
|
17
17
|
docile (1.1.5)
|
18
18
|
faraday (0.9.2)
|
19
19
|
multipart-post (>= 1.2, < 3)
|
20
20
|
git (1.3.0)
|
21
|
-
github_api (0.
|
21
|
+
github_api (0.17.0)
|
22
22
|
addressable (~> 2.4.0)
|
23
23
|
descendants_tracker (~> 0.0.4)
|
24
24
|
faraday (~> 0.8, < 0.10)
|
25
25
|
hashie (>= 3.4)
|
26
|
+
mime-types (>= 1.16, < 3.0)
|
26
27
|
oauth2 (~> 1.0)
|
27
|
-
hashie (3.
|
28
|
+
hashie (3.5.6)
|
28
29
|
highline (1.7.8)
|
29
30
|
interception (0.5)
|
30
|
-
json (2.0
|
31
|
-
juwelier (2.
|
31
|
+
json (2.1.0)
|
32
|
+
juwelier (2.4.7)
|
32
33
|
builder
|
33
|
-
bundler
|
34
|
-
git
|
34
|
+
bundler
|
35
|
+
git
|
35
36
|
github_api
|
36
|
-
highline
|
37
|
-
|
38
|
-
|
37
|
+
highline
|
38
|
+
kamelcase (~> 0)
|
39
|
+
nokogiri
|
40
|
+
psych
|
39
41
|
rake
|
40
42
|
rdoc
|
41
|
-
|
43
|
+
semver2
|
42
44
|
jwt (1.5.6)
|
45
|
+
kamelcase (0.0.1)
|
46
|
+
semver2 (~> 3)
|
43
47
|
method_source (0.8.2)
|
44
|
-
|
45
|
-
|
48
|
+
mime-types (2.99.3)
|
49
|
+
mini_portile2 (2.3.0)
|
50
|
+
multi_json (1.12.2)
|
46
51
|
multi_xml (0.6.0)
|
47
52
|
multipart-post (2.0.0)
|
48
|
-
nokogiri (1.
|
49
|
-
mini_portile2 (~> 2.
|
50
|
-
oauth2 (1.
|
51
|
-
faraday (>= 0.8, < 0.
|
53
|
+
nokogiri (1.8.1)
|
54
|
+
mini_portile2 (~> 2.3.0)
|
55
|
+
oauth2 (1.4.0)
|
56
|
+
faraday (>= 0.8, < 0.13)
|
52
57
|
jwt (~> 1.0)
|
53
58
|
multi_json (~> 1.3)
|
54
59
|
multi_xml (~> 0.5)
|
55
60
|
rack (>= 1.2, < 3)
|
56
|
-
pry (0.
|
61
|
+
pry (0.11.0)
|
57
62
|
coderay (~> 1.1.0)
|
58
63
|
method_source (~> 0.8.1)
|
59
|
-
|
60
|
-
|
61
|
-
byebug (~> 9.0)
|
64
|
+
pry-byebug (3.5.0)
|
65
|
+
byebug (~> 9.1)
|
62
66
|
pry (~> 0.10)
|
63
|
-
pry-doc (0.
|
67
|
+
pry-doc (0.11.1)
|
64
68
|
pry (~> 0.9)
|
65
|
-
yard (~> 0.
|
69
|
+
yard (~> 0.9)
|
66
70
|
pry-remote (0.1.8)
|
67
71
|
pry (~> 0.9)
|
68
72
|
slop (~> 3.0)
|
69
|
-
pry-rescue (1.4.
|
73
|
+
pry-rescue (1.4.5)
|
70
74
|
interception (>= 0.5)
|
71
75
|
pry
|
72
76
|
pry-stack_explorer (0.4.9.2)
|
73
77
|
binding_of_caller (>= 0.7)
|
74
78
|
pry (>= 0.9.11)
|
75
|
-
psych (2.2.
|
76
|
-
rack (2.0.
|
77
|
-
rake (12.
|
79
|
+
psych (2.2.4)
|
80
|
+
rack (2.0.3)
|
81
|
+
rake (12.1.0)
|
78
82
|
rdoc (3.9.5)
|
79
|
-
rspec (3.
|
80
|
-
rspec-core (~> 3.
|
81
|
-
rspec-expectations (~> 3.
|
82
|
-
rspec-mocks (~> 3.
|
83
|
-
rspec-core (3.
|
84
|
-
rspec-support (~> 3.
|
85
|
-
rspec-expectations (3.
|
83
|
+
rspec (3.6.0)
|
84
|
+
rspec-core (~> 3.6.0)
|
85
|
+
rspec-expectations (~> 3.6.0)
|
86
|
+
rspec-mocks (~> 3.6.0)
|
87
|
+
rspec-core (3.6.0)
|
88
|
+
rspec-support (~> 3.6.0)
|
89
|
+
rspec-expectations (3.6.0)
|
86
90
|
diff-lcs (>= 1.2.0, < 2.0)
|
87
|
-
rspec-support (~> 3.
|
88
|
-
rspec-mocks (3.
|
91
|
+
rspec-support (~> 3.6.0)
|
92
|
+
rspec-mocks (3.6.0)
|
89
93
|
diff-lcs (>= 1.2.0, < 2.0)
|
90
|
-
rspec-support (~> 3.
|
91
|
-
rspec-support (3.
|
92
|
-
semver (1.0.1)
|
94
|
+
rspec-support (~> 3.6.0)
|
95
|
+
rspec-support (3.6.0)
|
93
96
|
semver2 (3.4.2)
|
94
|
-
simplecov (0.
|
97
|
+
simplecov (0.15.1)
|
95
98
|
docile (~> 1.1.0)
|
96
99
|
json (>= 1.8, < 3)
|
97
100
|
simplecov-html (~> 0.10.0)
|
98
|
-
simplecov-html (0.10.
|
101
|
+
simplecov-html (0.10.2)
|
99
102
|
slop (3.6.0)
|
100
103
|
text-table (1.2.4)
|
101
|
-
thor (0.
|
102
|
-
thread_safe (0.3.
|
103
|
-
yard (0.9.
|
104
|
+
thor (0.20.0)
|
105
|
+
thread_safe (0.3.6)
|
106
|
+
yard (0.9.9)
|
104
107
|
|
105
108
|
PLATFORMS
|
106
109
|
ruby
|
@@ -127,4 +130,4 @@ DEPENDENCIES
|
|
127
130
|
yard (~> 0)
|
128
131
|
|
129
132
|
BUNDLED WITH
|
130
|
-
1.
|
133
|
+
1.14.6
|
data/README.org
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
* imap-filter
|
2
|
+
** Intoduction
|
2
3
|
imap-filter is a Ruby implementation of an IMAP filtering application.
|
3
4
|
it can handle multiple IMAP accounts, and create IMAP folders automatically
|
4
5
|
where none exists.
|
@@ -23,10 +24,10 @@
|
|
23
24
|
gem 'imap-filter'
|
24
25
|
#+end_src
|
25
26
|
|
26
|
-
By default,
|
27
|
+
By default,
|
27
28
|
|
28
29
|
** Documentation
|
29
|
-
I think that to make this documenation truly "complete", I would wind up writing
|
30
|
+
I think that to make this documenation truly "complete", I would wind up writing
|
30
31
|
more lines than in the imap-filter code itself!!! I will attempt to be as concise
|
31
32
|
as possible, and besides me writing a thick manual, no one wants to read such either.
|
32
33
|
|
@@ -62,7 +63,7 @@
|
|
62
63
|
to your accounts and nothing more.
|
63
64
|
|
64
65
|
And nothing happens. Why not? Very simple. The directive of this file
|
65
|
-
must be activated. Edit your default.imap and add "activate :all" to the very
|
66
|
+
must be activated. Edit your default.imap and add "activate :all" to the very
|
66
67
|
end:
|
67
68
|
|
68
69
|
#+begin_src ruby
|
@@ -97,14 +98,14 @@
|
|
97
98
|
====== Test Accounts
|
98
99
|
gmail...FAILED: Lookup failed xxxxxxxxxxxxx
|
99
100
|
#+end_src
|
100
|
-
|
101
|
+
|
101
102
|
And so check your login line to make sure your userID and password is correct.
|
102
|
-
For some vendors, the userID is your complete email address. For others, it might
|
103
|
+
For some vendors, the userID is your complete email address. For others, it might
|
103
104
|
just be what procedes the '@'. Please check with your vendor to see what it is for
|
104
105
|
you. Usually, your vendor will have IMAP Client instructions on their website.
|
105
106
|
|
106
107
|
We use ssl connections by default, and it would be extremely insecure not to. But
|
107
|
-
you can turn off the ssl if need be. You can also change your port settings
|
108
|
+
you can turn off the ssl if need be. You can also change your port settings
|
108
109
|
accordingly, if your vendor uses a non-standard port. For example,
|
109
110
|
|
110
111
|
#+begin_src ruby
|
@@ -127,7 +128,7 @@
|
|
127
128
|
we do not support them at this time. If you have need for that support,
|
128
129
|
please let me know!!!!!
|
129
130
|
|
130
|
-
Now, let's assume you have your settings working. Now what? There are no
|
131
|
+
Now, let's assume you have your settings working. Now what? There are no
|
131
132
|
filters specified, which is the entire point of this program!!! So let's
|
132
133
|
add one:
|
133
134
|
|
@@ -143,7 +144,7 @@
|
|
143
144
|
from 'github.com'
|
144
145
|
unseen
|
145
146
|
end
|
146
|
-
|
147
|
+
|
147
148
|
cp 'gmail:test/Github'
|
148
149
|
end
|
149
150
|
|
@@ -158,7 +159,7 @@
|
|
158
159
|
which is cluttering up the Inbox. This filter will copy the "unseen", or
|
159
160
|
unread ones to the "test/Github" mailbox.
|
160
161
|
|
161
|
-
Notice in the string, we also specify the target account label. This is
|
162
|
+
Notice in the string, we also specify the target account label. This is
|
162
163
|
required, and will allow you to specify alternate accounts very easily.
|
163
164
|
|
164
165
|
The mailbox will automatically be created if it does not exist yet.
|
@@ -172,8 +173,8 @@
|
|
172
173
|
|
173
174
|
The "-u" is the alias for "--dryrun" The "-v1" is the verbosity switch. While
|
174
175
|
doing your setups and debugging your scripts, you will want to use "-v1" or even
|
175
|
-
"-v2" verbosity settings.
|
176
|
-
|
176
|
+
"-v2" verbosity settings.
|
177
|
+
|
177
178
|
If you actually have a match for the search critieria, you may see a list of messages
|
178
179
|
that matched the search scroll by. In my test case:
|
179
180
|
|
@@ -193,7 +194,7 @@
|
|
193
194
|
#+end_src
|
194
195
|
|
195
196
|
Which are all unread or "unseen" as per our specificaions. Now no modifications
|
196
|
-
were peformed due to the "-u" dry run switch.
|
197
|
+
were peformed due to the "-u" dry run switch.
|
197
198
|
|
198
199
|
Now that we are feeling a bit more confident, let's run the same
|
199
200
|
command without the "-u" setting:
|
@@ -208,7 +209,7 @@
|
|
208
209
|
|
209
210
|
Well, that's it for the tutorial. Please have a look at the [[examples/default.imap][example]].
|
210
211
|
|
211
|
-
There's a shorthand for the filters that may interest you for the
|
212
|
+
There's a shorthand for the filters that may interest you for the
|
212
213
|
majority of your cases. For example:
|
213
214
|
|
214
215
|
#+begin_src ruby
|
@@ -223,7 +224,7 @@
|
|
223
224
|
to do is search a single field, like in this case, the From
|
224
225
|
field.
|
225
226
|
|
226
|
-
Others are obvios: to:, cc:, subject: will all work here.no-expand
|
227
|
+
Others are obvios: to:, cc:, subject: will all work here.no-expand
|
227
228
|
|
228
229
|
*** Environment variables
|
229
230
|
| Variable | Description |
|
@@ -232,15 +233,15 @@
|
|
232
233
|
|
233
234
|
*** Accessing your Gmail
|
234
235
|
Google may automatically block this application by default.
|
235
|
-
Please visit the follow page to understand how to allow
|
236
|
+
Please visit the follow page to understand how to allow
|
236
237
|
imap-filter to access your Gmail account.
|
237
238
|
|
238
239
|
https://support.google.com/accounts/answer/6010255
|
239
240
|
|
240
241
|
*** Automatic blocks might happen while you are testing your Email accounts
|
241
242
|
Depending on the vendor, while you are setting up your scripts, you will
|
242
|
-
be doing many tests. Some vendors like Yahoo might block the app if it sees
|
243
|
-
what it consideres to be "too much" activity. If you see this happen, wait about
|
243
|
+
be doing many tests. Some vendors like Yahoo might block the app if it sees
|
244
|
+
what it consideres to be "too much" activity. If you see this happen, wait about
|
244
245
|
30 minutes before trying again. Should work in most cases.
|
245
246
|
|
246
247
|
*** DSL
|
@@ -279,16 +280,19 @@
|
|
279
280
|
|
280
281
|
** Release Notes and Known Issues
|
281
282
|
*** Release Notes
|
282
|
-
| Version | Breif
|
283
|
-
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
283
|
+
| Version | Breif | Description |
|
284
|
+
|---------+--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
285
|
+
| 0.1.4 | Dangling command removed | There was a list command that I had not implemented yet, but Thor now complains when it sees that. So the dangling command was removed. |
|
286
|
+
| 0.1.0 | election day bug fixed | This was an issue with moves not deleting the sources, and had to do with state information not existing in the duplicate delegator object. This snafu has been dealt with. No more duplicate delegators |
|
287
|
+
| 0.0.4 | "Too many errors" fixed | The "duplicate mailbox" error was being counted by some providers as being "too much" so now we check first before attempting to create a new mailbox. |
|
288
|
+
| 0.0.3 | Fixed bug with timeout | On some lengthy remove copy/move operations, the source account can timeout. We do a simple NOOP to keep the connection alive. |
|
289
|
+
| 0.0.2 | Initial Release | |
|
288
290
|
|
289
291
|
*** Known Issues
|
290
292
|
| Date | Description |
|
291
293
|
|------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
294
|
+
| 2017-09-25 | No spec coverage. I know, I know... |
|
295
|
+
| 2017-09-25 | There is a problem connecting to Yahoo, and it looks like an OAuth support issue from my end, as they apparenly no longer support the "simple" login anymore. Issue is being worked on on a branch for now. |
|
292
296
|
| 2016-11-08 | US election day bug :p -- messages on move are not being moved, only copied with v0.0.4. Refactoring is broken. Use 0.0.3 for now. Fix is coming soon. |
|
293
297
|
| 2016-11-05 | Aside from being Guy Fawkes Day, the fix to "Too Many Errors" involved caching the list of mail boxes. If something else creates a mailbox while this is running, there is a potential race condition, but the name collision, if any, will only result in a "duplicate mailbox" error. |
|
294
298
|
| 2016-09-25 | Remote copy / moves of HTML-based email does not work cleanly. |
|
@@ -316,7 +320,7 @@
|
|
316
320
|
this section.
|
317
321
|
|
318
322
|
:Login:
|
319
|
-
imap = Net::IMAP.new('imap.gmail.com', ssl: true)
|
323
|
+
imap = Net::IMAP.new('imap.gmail.com', ssl: true)
|
320
324
|
imap.authenticate('PLAIN', ENV['GOOGLE_EMAIL'], ENV['GOOGLE_PASS'])
|
321
325
|
imap.select('Shelby')
|
322
326
|
seq = imap.search(['ALL'])
|
@@ -327,9 +331,8 @@
|
|
327
331
|
acc.imap.fetch(1..2, 'BODY[HEADER.FIELDS (SUBJECT)]')
|
328
332
|
:END:
|
329
333
|
|
330
|
-
|
334
|
+
|
331
335
|
:Syswrite:
|
332
336
|
IOError: closed stream
|
333
337
|
from 2.3.1/lib/ruby/2.3.0/openssl/buffering.rb:322:in `syswrite'
|
334
338
|
:END:
|
335
|
-
|
data/imap-filter.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: imap-filter 0.1.
|
5
|
+
# stub: imap-filter 0.1.4 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "imap-filter".freeze
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.4"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Fred Mitchell".freeze]
|
14
|
-
s.date = "
|
14
|
+
s.date = "2017-09-25"
|
15
15
|
s.description = "\n imap-filter is a Ruby implementation of an IMAP filtering application.\n it can handle multiple IMAP accounts, and create IMAP folders automatically\n where none exists.\n\n The imap-filter DSL makes it easy to filter. You can also do \"dry-runs\"\n to make sure what happens is what is expected.".freeze
|
16
16
|
s.email = "fred.mitchell@gmx.de".freeze
|
17
17
|
s.executables = ["imap-filter".freeze]
|
@@ -45,7 +45,7 @@ Gem::Specification.new do |s|
|
|
45
45
|
s.homepage = "http://github.com/flajann2/imap-filter".freeze
|
46
46
|
s.licenses = ["MIT".freeze]
|
47
47
|
s.required_ruby_version = Gem::Requirement.new(">= 2.2".freeze)
|
48
|
-
s.rubygems_version = "2.6.
|
48
|
+
s.rubygems_version = "2.6.11".freeze
|
49
49
|
s.summary = "IMAP Scriptable filter for one or multiple Email accounts.".freeze
|
50
50
|
|
51
51
|
if s.respond_to? :specification_version then
|
data/lib/imap-filter/cli.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imap-filter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fred Mitchell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: semver2
|
@@ -339,7 +339,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
339
339
|
version: '0'
|
340
340
|
requirements: []
|
341
341
|
rubyforge_project:
|
342
|
-
rubygems_version: 2.6.
|
342
|
+
rubygems_version: 2.6.11
|
343
343
|
signing_key:
|
344
344
|
specification_version: 4
|
345
345
|
summary: IMAP Scriptable filter for one or multiple Email accounts.
|