imapcli 1.0.5 → 1.0.7

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
  SHA256:
3
- metadata.gz: 82762519bd1f99f30dd9b0255aaf10517ec4045df2e32e261d6af7b6e989cb81
4
- data.tar.gz: f04d65bf77809ec03b33d4295abd0b98fbd8302dc40d00ddd35b99723dd845d1
3
+ metadata.gz: 751085164222eaf57bb834881ed2750aef4e1bdb78b0f80721f813e88c3dcd2d
4
+ data.tar.gz: eb278a49bad1c247dfab3d17346361a681f9fde8c74f87aea288615d2cc52fd2
5
5
  SHA512:
6
- metadata.gz: fb3f87b5f27c2476797c2e9259adb59efabf0e9c0f524d4c465961683b2cab0c1fac999626d85c9f267c844a7ff22e1cdfeaddfd342f683c83d320ae6c7ba4a1
7
- data.tar.gz: e88a99c00a8d0c1175f18cdf74f76d2c5adf7f38567265e9ea36449315656edf7fc79d265d82f35f769969b662cf9d2ca2d85ca9deb5c7502f7f69753814f431
6
+ metadata.gz: 015155ed2a70636f3d072d889408fb26d9bc6267125e432337e4050170a4839a509ab6d822c1abdce011a02c6486541e48137f3435cd70079a715ac18356ffe7
7
+ data.tar.gz: d99cfb0b39d772ab64bd3826fa72f89ff1c5230e4481b9a47a341cfa84db2039b1f6b7977261dcadab77c9589efe5fd65389ae52361a5a0685a5ff5d6d4f209f
data/.gitignore CHANGED
@@ -3,3 +3,5 @@
3
3
  pkg/
4
4
  html/
5
5
  .yardoc/
6
+ vendor/bundle/
7
+ .bundle/
@@ -1,12 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.0.7 (2022-03-02)
4
+
5
+ - Update dependencies.
6
+
7
+ ## v1.0.6
8
+
9
+ - Fix Docker build.
10
+
3
11
  ## v1.0.5
12
+
4
13
  - Update bundle to address CVE-2018-1000201.
5
14
 
6
15
  ## v1.0.4
16
+
7
17
  - Update rake to address CVE-2020-8130.
8
18
 
9
19
  ## Previous changes
20
+
10
21
  - Fix: Docker image.
11
22
  - Fix: Options error message.
12
-
data/Dockerfile CHANGED
@@ -6,6 +6,7 @@ WORKDIR /
6
6
  RUN apk add --no-cache git build-base && \
7
7
  git clone --depth 1 https://github.com/bovender/imapcli && \
8
8
  cd imapcli && \
9
+ bundle update --bundler && \
9
10
  bundle && \
10
11
  apk del build-base && \
11
12
  rm -rf /var/cache/apk/*
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- imapcli (1.0.4)
4
+ imapcli (1.0.6)
5
5
  descriptive_statistics (~> 2.5)
6
6
  dotenv (~> 2.2)
7
7
  filesize (~> 0.1)
@@ -13,22 +13,21 @@ PATH
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- coderay (1.1.2)
16
+ coderay (1.1.3)
17
17
  descriptive_statistics (2.5.1)
18
- diff-lcs (1.3)
19
- dotenv (2.7.5)
20
- equatable (0.6.1)
21
- ffi (1.12.2)
18
+ diff-lcs (1.5.0)
19
+ dotenv (2.7.6)
20
+ ffi (1.15.5)
22
21
  filesize (0.2.0)
23
- formatador (0.2.5)
24
- gli (2.19.0)
25
- guard (2.16.2)
22
+ formatador (1.1.0)
23
+ gli (2.21.0)
24
+ guard (2.18.0)
26
25
  formatador (>= 0.2.4)
27
26
  listen (>= 2.7, < 4.0)
28
27
  lumberjack (>= 1.0.12, < 2.0)
29
28
  nenv (~> 0.1)
30
29
  notiffany (~> 0.0)
31
- pry (>= 0.9.12)
30
+ pry (>= 0.13.0)
32
31
  shellany (~> 0.0)
33
32
  thor (>= 0.18.1)
34
33
  guard-compat (1.2.1)
@@ -36,70 +35,69 @@ GEM
36
35
  guard (~> 2.1)
37
36
  guard-compat (~> 1.1)
38
37
  rspec (>= 2.99.0, < 4.0)
39
- listen (3.2.1)
38
+ listen (3.7.1)
40
39
  rb-fsevent (~> 0.10, >= 0.10.3)
41
40
  rb-inotify (~> 0.9, >= 0.9.10)
42
- lumberjack (1.2.4)
41
+ lumberjack (1.2.8)
43
42
  method_source (1.0.0)
44
- necromancer (0.5.1)
45
43
  nenv (0.3.0)
46
44
  notiffany (0.1.3)
47
45
  nenv (~> 0.1)
48
46
  shellany (~> 0.0)
49
- pastel (0.7.3)
50
- equatable (~> 0.6)
47
+ pastel (0.8.0)
51
48
  tty-color (~> 0.5)
52
- pry (0.13.1)
49
+ pry (0.14.1)
53
50
  coderay (~> 1.1)
54
51
  method_source (~> 1.0)
52
+ psych (4.0.3)
53
+ stringio
55
54
  rake (12.3.3)
56
- rb-fsevent (0.10.3)
55
+ rb-fsevent (0.11.1)
57
56
  rb-inotify (0.10.1)
58
57
  ffi (~> 1.0)
59
- rdoc (5.1.0)
60
- rspec (3.9.0)
61
- rspec-core (~> 3.9.0)
62
- rspec-expectations (~> 3.9.0)
63
- rspec-mocks (~> 3.9.0)
64
- rspec-core (3.9.1)
65
- rspec-support (~> 3.9.1)
66
- rspec-expectations (3.9.1)
58
+ rdoc (6.4.0)
59
+ psych (>= 4.0.0)
60
+ rspec (3.11.0)
61
+ rspec-core (~> 3.11.0)
62
+ rspec-expectations (~> 3.11.0)
63
+ rspec-mocks (~> 3.11.0)
64
+ rspec-core (3.11.0)
65
+ rspec-support (~> 3.11.0)
66
+ rspec-expectations (3.11.0)
67
67
  diff-lcs (>= 1.2.0, < 2.0)
68
- rspec-support (~> 3.9.0)
69
- rspec-mocks (3.9.1)
68
+ rspec-support (~> 3.11.0)
69
+ rspec-mocks (3.11.0)
70
70
  diff-lcs (>= 1.2.0, < 2.0)
71
- rspec-support (~> 3.9.0)
72
- rspec-support (3.9.2)
71
+ rspec-support (~> 3.11.0)
72
+ rspec-support (3.11.0)
73
73
  shellany (0.0.1)
74
- strings (0.1.8)
75
- strings-ansi (~> 0.1)
76
- unicode-display_width (~> 1.5)
74
+ stringio (3.0.1)
75
+ strings (0.2.1)
76
+ strings-ansi (~> 0.2)
77
+ unicode-display_width (>= 1.5, < 3.0)
77
78
  unicode_utils (~> 1.4)
78
- strings-ansi (0.1.0)
79
- thor (1.0.1)
80
- tty-color (0.5.1)
79
+ strings-ansi (0.2.0)
80
+ thor (1.2.1)
81
+ tty-color (0.6.0)
81
82
  tty-cursor (0.7.1)
82
- tty-progressbar (0.17.0)
83
- strings-ansi (~> 0.1.0)
83
+ tty-progressbar (0.18.2)
84
+ strings-ansi (~> 0.2)
84
85
  tty-cursor (~> 0.7)
85
- tty-screen (~> 0.7)
86
- unicode-display_width (~> 1.6)
87
- tty-prompt (0.21.0)
88
- necromancer (~> 0.5.0)
89
- pastel (~> 0.7.0)
90
- tty-reader (~> 0.7.0)
91
- tty-reader (0.7.0)
86
+ tty-screen (~> 0.8)
87
+ unicode-display_width (>= 1.6, < 3.0)
88
+ tty-prompt (0.23.1)
89
+ pastel (~> 0.8)
90
+ tty-reader (~> 0.8)
91
+ tty-reader (0.9.0)
92
92
  tty-cursor (~> 0.7)
93
- tty-screen (~> 0.7)
94
- wisper (~> 2.0.0)
95
- tty-screen (0.7.1)
96
- tty-table (0.11.0)
97
- equatable (~> 0.6)
98
- necromancer (~> 0.5)
99
- pastel (~> 0.7.2)
100
- strings (~> 0.1.5)
101
- tty-screen (~> 0.7)
102
- unicode-display_width (1.7.0)
93
+ tty-screen (~> 0.8)
94
+ wisper (~> 2.0)
95
+ tty-screen (0.8.1)
96
+ tty-table (0.12.0)
97
+ pastel (~> 0.8)
98
+ strings (~> 0.2.0)
99
+ tty-screen (~> 0.8)
100
+ unicode-display_width (2.1.0)
103
101
  unicode_utils (1.4.0)
104
102
  wisper (2.0.1)
105
103
 
@@ -111,8 +109,8 @@ DEPENDENCIES
111
109
  imapcli!
112
110
  pry
113
111
  rake (~> 12.3.3)
114
- rdoc (~> 5.1)
112
+ rdoc (~> 6.3)
115
113
  rspec
116
114
 
117
115
  BUNDLED WITH
118
- 1.17.2
116
+ 2.2.17
data/README.md CHANGED
@@ -1,8 +1,4 @@
1
- **Heads up! Code contributions welcome. Please issue pull requests against the
2
- `develop` branch.**
3
-
4
- imapcli
5
- =======
1
+ # imapcli
6
2
 
7
3
  > Command-line interface (CLI) for IMAP servers
8
4
  > (<https://github.com/bovender/imapcli>)
@@ -11,23 +7,19 @@ imapcli
11
7
  server for configuration details and e-mail statistics. It can be used to gather
12
8
  IMAP mailbox sizes.
13
9
 
10
+ ## Table of contents
14
11
 
15
- Table of contents
16
- -----------------
17
-
18
- * [Motivation](#motivation)
19
- * [Warning](#warning)
20
- * [Installing and executing `imapcli`](#installing-and-executing-imapcli)
21
- * [Terminology](#terminology)
22
- * [Usage](#usage)
23
- * [Alternative resources](#alternative-resources)
24
- * [State of the project](#state-of-the-project)
25
- * [Credits](#credits)
26
- * [License](#license)
12
+ * [Motivation](#motivation)
13
+ * [Warning](#warning)
14
+ * [Installing and executing `imapcli`](#installing-and-executing-imapcli)
15
+ * [Terminology](#terminology)
16
+ * [Usage](#usage)
17
+ * [Alternative resources](#alternative-resources)
18
+ * [State of the project](#state-of-the-project)
19
+ * [Credits](#credits)
20
+ * [License](#license)
27
21
 
28
-
29
- Motivation
30
- ----------
22
+ ## Motivation
31
23
 
32
24
  When my university mail account had almost reached the quota, I needed to find
33
25
  out what the largest mail folders were (in terms of megabytes, not message
@@ -39,9 +31,7 @@ with the server by telnet or OpenSSL.
39
31
 
40
32
  `imapcli` offers a convenient way to query an IMAP server.
41
33
 
42
-
43
- Warning
44
- -------
34
+ ## Warning
45
35
 
46
36
  Some servers are configured to detect potentially malicious login attempts by
47
37
  the frequency of repeat connections from a given source. **It may happen that
@@ -71,13 +61,7 @@ Do not forget to reload the `jail2ban` configuration afterwards:
71
61
 
72
62
  Of course this only works if your IP addresses do not change too much.
73
63
 
74
- (On Ubuntu Linux, the [indicator-ip](https://github.com/bovender/indicator-ip)
75
- applet may be useful to know your remote IP. Disclaimer: I am the author of this
76
- tool.)
77
-
78
-
79
- Installing and executing `imapcli`
80
- --------------------------------
64
+ ## Installing and executing `imapcli`
81
65
 
82
66
  `imapcli` is a Ruby project and as such does not need to be compiled. To run it
83
67
  on your machine, you can either pull the repository, install a Gem, or use a
@@ -86,8 +70,7 @@ Docker image.
86
70
  Detailed usage instructions follow [below](#usage).
87
71
 
88
72
  I don't currently provide a .deb package because Debian packaging done right
89
- is kind of complicated.
90
-
73
+ is kind of complicated (for me).
91
74
 
92
75
  ### Run in the repository
93
76
 
@@ -102,7 +85,6 @@ Run:
102
85
  cd imapcli
103
86
  bundle exec bin/imapcli
104
87
 
105
-
106
88
  ### Install the gem
107
89
 
108
90
  Requirements: a recent Ruby and RubyGems.
@@ -115,7 +97,6 @@ Run:
115
97
 
116
98
  imapcli
117
99
 
118
-
119
100
  ### Docker image
120
101
 
121
102
  With [Docker](https://www.docker.com), you do not have to install Ruby and the
@@ -125,24 +106,20 @@ smaller).
125
106
 
126
107
  Run:
127
108
 
128
- docker run bvndr/imapcli <arguments>
109
+ docker run -it bovender/imapcli <arguments>
129
110
 
130
111
  Example:
131
112
 
132
- docker run bvndr/imapcli -s myserver.example.com -u user -P info
133
-
134
- The Docker repository is at <https://hub.docker.com/r/bvndr/imapcli>.
113
+ docker run -it bovender/imapcli -s myserver.example.com -u user -P info
135
114
 
115
+ The Docker repository is at <https://hub.docker.com/r/bovender/imapcli>.
136
116
 
137
- Terminology
138
- -----------
117
+ ## Terminology
139
118
 
140
119
  `imapcli` attempts to use the typical IMAP terminology. I guess most people
141
120
  have their mails organized in **folders**; in IMAP speak, a folder is a **maibox**.
142
121
 
143
-
144
- Usage
145
- -----
122
+ ## Usage
146
123
 
147
124
  For basic usage instructions and possible options, run `imapcli` and examine
148
125
  the output. Please note that `imapcli` distinguishes between global and
@@ -154,7 +131,6 @@ Note: The following examples use the command `imapcli`. Depending on how you
154
131
  [installed](#installing-and-executing-imapcli) `imapcli`, you may need to use a
155
132
  different command.
156
133
 
157
-
158
134
  ### Setting your server and account information
159
135
 
160
136
  Server and account information are given as *global options*:
@@ -179,7 +155,6 @@ environment variables:
179
155
  These variables can also be set in a `.env` file that resides in the root
180
156
  directory of the repository. Never add this `.env` file to the repository!
181
157
 
182
-
183
158
  ### Obtain general information about the IMAP server
184
159
 
185
160
  $ bundle exec bin/imapcli -s yourserver.example.com -u myusername -P info
@@ -191,7 +166,6 @@ directory of the repository. Never add this `.env` file to the repository!
191
166
  hierarchy separator: /
192
167
  quota: IMAP QUOTA extension not supported by this server
193
168
 
194
-
195
169
  ### List all mailboxes (folders) without size information
196
170
 
197
171
  $ bundle exec bin/imapcli -s yourserver.example.com -u myusername -P list
@@ -205,7 +179,6 @@ directory of the repository. Never add this `.env` file to the repository!
205
179
  - Sports
206
180
  ...
207
181
 
208
-
209
182
  ### Obtain size information about mailboxes
210
183
 
211
184
  To obtain mailbox sizes, the server has to be queried for the message sizes for
@@ -214,14 +187,13 @@ of messages in them, this may take a little while.
214
187
 
215
188
  `imapcli` prints the following statistics about the message sizes in a mailbox:
216
189
 
217
- * `Count`: Number of individual messages
218
- * `Total size`: Total size of all messages in the mailbox (in kiB)
219
- * `Min`: Size of the smallest message in the mailbox (in kiB)
220
- * `Q1`: First quartile of message sizes in the mailbox (in kiB)
221
- * `Median`: Median of all message sizes in the mailbox (in kiB)
222
- * `Q3`: First quartile of message sizes in the mailbox (in kiB)
223
- * `Max`: Size of the largest message in the mailbox (in kiB)
224
-
190
+ * `Count`: Number of individual messages
191
+ * `Total size`: Total size of all messages in the mailbox (in kiB)
192
+ * `Min`: Size of the smallest message in the mailbox (in kiB)
193
+ * `Q1`: First quartile of message sizes in the mailbox (in kiB)
194
+ * `Median`: Median of all message sizes in the mailbox (in kiB)
195
+ * `Q3`: First quartile of message sizes in the mailbox (in kiB)
196
+ * `Max`: Size of the largest message in the mailbox (in kiB)
225
197
 
226
198
  #### All mailboxes
227
199
 
@@ -273,88 +245,72 @@ Use the `-r`/`--recurse` flag:
273
245
  By default, mailboxes are sorted alphabetically. To sort by a specific statistic,
274
246
  use an `-o`/`--sort` option:
275
247
 
276
- * `-o count`
277
- * `-o total_size`
278
- * `-o min_size`
279
- * `-o q1`
280
- * `-o median_size`
281
- * `-o q3`
282
- * `-o max_size`
248
+ * `-o count`
249
+ * `-o total_size`
250
+ * `-o min_size`
251
+ * `-o q1`
252
+ * `-o median_size`
253
+ * `-o q3`
254
+ * `-o max_size`
283
255
 
284
256
  Example:
285
257
 
286
- $ bundle exec bin/imapcli -s yourserver.example.com -u myusername -P stats -r -o max_size Archive
258
+ bundle exec -it bin/imapcli -s yourserver.example.com -u myusername -P stats -r -o max_size Archive
287
259
 
288
260
  #### Obtaining comma-separated values (CSV)
289
261
 
290
262
  Use the `--csv` flag.
291
263
 
292
-
293
- Alternative resources
294
- ---------------------
264
+ ## Alternative resources
295
265
 
296
266
  While researching command-line tools for IMAP servers, I came across the
297
267
  following:
298
268
 
299
-
300
269
  ### IMAP folder size script
301
270
 
302
- * <https://code.iamcal.com/pl/imap_folders>
303
-
304
- Ad-hoc perl script that computes the sizes of each mailbox. `imapcli` was
305
- inspired by this!
271
+ * <https://code.iamcal.com/pl/imap_folders>
306
272
 
273
+ Ad-hoc perl script that computes the sizes of each mailbox. `imapcli` was
274
+ inspired by this!
307
275
 
308
276
  ### IMAP synchronization and backup tools
309
277
 
310
- * <https://github.com/OfflineIMAP/imapfw>
311
-
312
- Framework to work with mails
278
+ * <https://github.com/OfflineIMAP/imapfw>
313
279
 
314
- * <https://github.com/polo2ro/imapbox>
280
+ Framework to work with mails
315
281
 
316
- Pull down e-mails from an IMAP server to your local disk
282
+ * <https://github.com/polo2ro/imapbox>
317
283
 
284
+ Pull down e-mails from an IMAP server to your local disk
318
285
 
286
+ ## State of the project
319
287
 
320
- ### IMAP via Telnet or OpenSSL
288
+ I have not been able to work on this project for quite some time. It still
289
+ serves me well when I occasionally need it. Pull requests are of course welcome.
321
290
 
322
-
323
- State of the project
324
- --------------------
325
-
326
- While `imapcli` does what I need it to do, there are a lot of things that could
327
- be improved. I'll be happy to take **pull request**. Please issue those against
328
- the **develop** branch as I like to follow *[a successful Git branching
329
- model](http://nvie.com/git-model)*.
330
-
331
-
332
- ### Versioning
291
+ I've decided to have one `main` branch, and to get rid of the `master` and
292
+ `
333
293
 
334
294
  This project is [semantically versioned](https://semver.org).
335
295
 
336
296
  ### To do
337
297
 
338
- - More human-friendly number formatting (e.g., MiB/GiB as appropriate)
339
- - Output to file
340
- - Deal with server-specific mailbox separator characters (e.g. '.' vs. '/')
341
- - Man page
342
- - More commands?
343
-
298
+ * More human-friendly number formatting (e.g., MiB/GiB as appropriate)
299
+ * Output to file
300
+ * Deal with server-specific mailbox separator characters (e.g. '.' vs. '/')
301
+ * Man page
302
+ * More commands?
344
303
 
345
- Credits
346
- -------
304
+ ## Credits
347
305
 
348
306
  This tool is build around the awesome [GLI](https://github.com/davetron5000/gli)
349
307
  gem by [David Copeland](https://github.com/davetron5000) and makes extensive use
350
308
  of [Piotr Murach's](https://github.com/piotrmurach) excellent `TTY` tools. See
351
309
  the `Gemfile` for other work that this tool depends on.
352
310
 
311
+ ## License
353
312
 
354
- License
355
- -------
356
-
357
- &copy; 2017 Daniel Kraus (bovender)
313
+ &copy; 2017, 2022 Daniel Kraus (bovender)
358
314
 
359
315
  Licensed under the Apache License, Version 2.0 (the "License");
360
316
  you may not use this file except in compliance with the License.
data/imapcli.gemspec CHANGED
@@ -11,13 +11,12 @@ spec = Gem::Specification.new do |s|
11
11
  s.summary = 'Command-line tool to query IMAP servers'
12
12
  s.files = `git ls-files`.split("\n")
13
13
  s.require_paths << 'lib'
14
- s.has_rdoc = true
15
14
  s.extra_rdoc_files = ['README.md','imapcli.rdoc']
16
15
  s.rdoc_options << '--title' << 'imapcli' << '--main' << 'README.md' << '-ri'
17
16
  s.bindir = 'bin'
18
17
  s.executables << 'imapcli'
19
18
  s.add_development_dependency('rake', '~> 12.3.3')
20
- s.add_development_dependency('rdoc', '~> 5.1')
19
+ s.add_development_dependency('rdoc', '~> 6.3')
21
20
  s.add_runtime_dependency('descriptive_statistics', '~> 2.5')
22
21
  s.add_runtime_dependency('dotenv', '~> 2.2')
23
22
  s.add_runtime_dependency('filesize', '~> 0.1')
@@ -1,3 +1,3 @@
1
1
  module Imapcli
2
- VERSION = '1.0.5'
2
+ VERSION = '1.0.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imapcli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Kraus (bovender)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-20 00:00:00.000000000 Z
11
+ date: 2022-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '5.1'
33
+ version: '6.3'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '5.1'
40
+ version: '6.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: descriptive_statistics
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -147,11 +147,11 @@ extra_rdoc_files:
147
147
  files:
148
148
  - ".gitignore"
149
149
  - ".rspec"
150
+ - CHANGELOG.md
150
151
  - Dockerfile
151
152
  - Gemfile
152
153
  - Gemfile.lock
153
154
  - Guardfile
154
- - NEWS
155
155
  - README.md
156
156
  - Rakefile
157
157
  - bin/imapcli
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
195
  - !ruby/object:Gem::Version
196
196
  version: '0'
197
197
  requirements: []
198
- rubygems_version: 3.0.3
198
+ rubygems_version: 3.1.2
199
199
  signing_key:
200
200
  specification_version: 4
201
201
  summary: Command-line tool to query IMAP servers