gitlab-mail_room 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mail_room/connection.rb +5 -3
- data/lib/mail_room/mailbox.rb +2 -0
- data/lib/mail_room/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e292b944039730eb7a2e51d8f878aba00921a827e11af32a17d1c1bb68e460ed
|
4
|
+
data.tar.gz: aec54302a613d21a4156bfadcd81beae514a08e8ab137177af8d86cf60e191e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c417220205744707fbe7c8b2bcb837abb1f7fbc07e5ec13fe04656d101f5eb0dbb80146fd5cfa1bbfe936c9dc2b8a4c331de5718ea8a4f0c2505173903713533
|
7
|
+
data.tar.gz: 7171e962dbf1e20e574bfbb26ad803ffa8dbfaecda7831c3a1f22faa11e9fe33ab093ae48a72ace3342e8bfe833010e3d15b700b869f0e369b6929865a0cd40d
|
data/lib/mail_room/connection.rb
CHANGED
@@ -49,8 +49,8 @@ module MailRoom
|
|
49
49
|
idle
|
50
50
|
|
51
51
|
process_mailbox
|
52
|
-
rescue Net::IMAP::Error, IOError
|
53
|
-
@mailbox.logger.warn({ context: @mailbox.context, action: "Disconnected. Resetting..." })
|
52
|
+
rescue Net::IMAP::Error, IOError => e
|
53
|
+
@mailbox.logger.warn({ context: @mailbox.context, action: "Disconnected. Resetting...", error: e.message })
|
54
54
|
reset
|
55
55
|
setup
|
56
56
|
end
|
@@ -176,8 +176,10 @@ module MailRoom
|
|
176
176
|
# uid_search still leaves messages UNSEEN
|
177
177
|
all_unread = imap.uid_search(@mailbox.search_command)
|
178
178
|
|
179
|
+
all_unread = all_unread.slice(0, @mailbox.limit_max_unread) unless @mailbox.limit_max_unread.nil? || @mailbox.limit_max_unread == 0
|
180
|
+
|
179
181
|
to_deliver = all_unread.select { |uid| @mailbox.deliver?(uid) }
|
180
|
-
@mailbox.logger.info({ context: @mailbox.context, action: "Getting new messages", unread: {count: all_unread.count, ids: all_unread}, to_be_delivered: { count: to_deliver.count, ids:
|
182
|
+
@mailbox.logger.info({ context: @mailbox.context, action: "Getting new messages", unread: {count: all_unread.count, ids: all_unread}, to_be_delivered: { count: to_deliver.count, ids: to_deliver } })
|
181
183
|
to_deliver
|
182
184
|
end
|
183
185
|
|
data/lib/mail_room/mailbox.rb
CHANGED
@@ -10,6 +10,7 @@ module MailRoom
|
|
10
10
|
:port,
|
11
11
|
:ssl,
|
12
12
|
:start_tls,
|
13
|
+
:limit_max_unread, #to avoid 'Error in IMAP command UID FETCH: Too long argument'
|
13
14
|
:idle_timeout,
|
14
15
|
:search_command,
|
15
16
|
:name,
|
@@ -50,6 +51,7 @@ module MailRoom
|
|
50
51
|
:port => 993,
|
51
52
|
:ssl => true,
|
52
53
|
:start_tls => false,
|
54
|
+
:limit_max_unread => 0,
|
53
55
|
:idle_timeout => IMAP_IDLE_TIMEOUT,
|
54
56
|
:delete_after_delivery => false,
|
55
57
|
:expunge_deleted => false,
|
data/lib/mail_room/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-mail_room
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Pitale
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -240,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
240
240
|
- !ruby/object:Gem::Version
|
241
241
|
version: '0'
|
242
242
|
requirements: []
|
243
|
-
rubygems_version: 3.1
|
243
|
+
rubygems_version: 3.0.1
|
244
244
|
signing_key:
|
245
245
|
specification_version: 4
|
246
246
|
summary: mail_room will proxy email (gmail) from IMAP to a callback URL, logger, or
|