New upstream version 0.10.0+really0.0.7
Pirate Praveen
3 years ago
48 | 48 |
idle
|
49 | 49 |
|
50 | 50 |
process_mailbox
|
51 | |
rescue Net::IMAP::Error, IOError
|
52 | |
@mailbox.logger.warn({ context: @mailbox.context, action: "Disconnected. Resetting..." })
|
|
51 |
rescue Net::IMAP::Error, IOError => e
|
|
52 |
@mailbox.logger.warn({ context: @mailbox.context, action: "Disconnected. Resetting...", error: e.message })
|
53 | 53 |
reset
|
54 | 54 |
setup
|
55 | 55 |
end
|
|
175 | 175 |
# uid_search still leaves messages UNSEEN
|
176 | 176 |
all_unread = imap.uid_search(@mailbox.search_command)
|
177 | 177 |
|
|
178 |
all_unread = all_unread.slice(0, @mailbox.limit_max_unread) unless @mailbox.limit_max_unread.nil? || @mailbox.limit_max_unread == 0
|
|
179 |
|
178 | 180 |
to_deliver = all_unread.select { |uid| @mailbox.deliver?(uid) }
|
179 | |
@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: all_unread } })
|
|
181 |
@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 } })
|
180 | 182 |
to_deliver
|
181 | 183 |
end
|
182 | 184 |
|
9 | 9 |
:port,
|
10 | 10 |
:ssl,
|
11 | 11 |
:start_tls,
|
|
12 |
:limit_max_unread, #to avoid 'Error in IMAP command UID FETCH: Too long argument'
|
12 | 13 |
:idle_timeout,
|
13 | 14 |
:search_command,
|
14 | 15 |
:name,
|
|
49 | 50 |
:port => 993,
|
50 | 51 |
:ssl => true,
|
51 | 52 |
:start_tls => false,
|
|
53 |
:limit_max_unread => 0,
|
52 | 54 |
:idle_timeout => IMAP_IDLE_TIMEOUT,
|
53 | 55 |
:delete_after_delivery => false,
|
54 | 56 |
:expunge_deleted => false,
|
0 | 0 |
module MailRoom
|
1 | 1 |
# Current version of gitlab-mail_room gem
|
2 | |
VERSION = "0.0.6"
|
|
2 |
VERSION = "0.0.7"
|
3 | 3 |
end
|