mail2cb 0.0.10 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Dockerfile +1 -1
- data/bin/mail2cb +2 -0
- data/lib/mail2cb.rb +1 -0
- data/lib/mail2cb/email_handler.rb +3 -0
- data/lib/mail2cb/email_watcher.rb +20 -2
- data/lib/mail2cb/version.rb +1 -1
- data/mail2cb.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d2cba71197126aa98852f1e336207c4135ffb5e
|
4
|
+
data.tar.gz: ea8bc136dd810fcf720091dfc05ed0ea0118a72f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 401608a23939fb8fda0fade16549d771e170502a61873e213fb9d737030a0b822f1bb414e1f7acd8463854db134ffae995cfe0feea64bff84d9ac1d30a22d38c
|
7
|
+
data.tar.gz: 1fc92b60cc5a1057670c73cbc5e56cd58869e295154113fe5da545365aebdac7fb024b349a9b161d7571d66de307f9006649fee33812b03c9fba134e7999f1ac
|
data/Dockerfile
CHANGED
data/bin/mail2cb
CHANGED
@@ -30,6 +30,8 @@ puts "Connecting to Redis: #{ENV["REDIS_URL"]}"
|
|
30
30
|
ENV["FAYE_HOST"] = "http://localhost"
|
31
31
|
ENV["FAYE_PORT"] = "9292"
|
32
32
|
|
33
|
+
ENV["CRYPT_API_ENDPOINT"] = "http://localhost:8888/case_blocks/crypt" if ENV["CRYPT_API_ENDPOINT"].nil?
|
34
|
+
|
33
35
|
ENV["DEBUG"] = "false"
|
34
36
|
|
35
37
|
oh = Mail2cb::Handler.new
|
data/lib/mail2cb.rb
CHANGED
@@ -58,6 +58,9 @@ module Mail2cb
|
|
58
58
|
"in_reply_to" => @email.in_reply_to,
|
59
59
|
"message_id" => @email.message_id,
|
60
60
|
"account_code" => @options[:mailbox][:account_code],
|
61
|
+
"mailbox_id" => @options[:mailbox][:mailbox_id],
|
62
|
+
"mailbox_name" => @options[:mailbox][:mailbox_name],
|
63
|
+
"mailbox_default" => @options[:mailbox][:mailbox_default],
|
61
64
|
"references" => id_parser.references
|
62
65
|
}.merge(id_parser.hash)
|
63
66
|
end
|
@@ -69,7 +69,9 @@ module Mail2cb
|
|
69
69
|
case_blocks_email_accounts.imap_search_command,
|
70
70
|
case_blocks_email_accounts.imap_messages_processed,
|
71
71
|
case_blocks_email_accounts.imap_last_processed_at,
|
72
|
-
u.authentication_token
|
72
|
+
u.authentication_token,
|
73
|
+
case_blocks_email_accounts.id as mailbox_id,
|
74
|
+
case_blocks_email_accounts.name as mailbox_name
|
73
75
|
FROM case_blocks_email_accounts
|
74
76
|
JOIN case_blocks_accounts
|
75
77
|
ON case_blocks_email_accounts.account_id = case_blocks_accounts.id
|
@@ -87,7 +89,23 @@ EOS
|
|
87
89
|
auth_token = row["authentication_token"]
|
88
90
|
decrypted_password = Encryption.new(auth_token).decrypt(row["imap_encrypted_password"])
|
89
91
|
puts "decrypted password: #{decrypted_password}"
|
90
|
-
mailboxes << {:id => row["id"],
|
92
|
+
mailboxes << {:id => row["id"],
|
93
|
+
:account_code => row["nickname"],
|
94
|
+
:account_id => row["account_id"],
|
95
|
+
:username => row["imap_username"],
|
96
|
+
:host => row["imap_host"],
|
97
|
+
:port => row["imap_port"],
|
98
|
+
:password => decrypted_password,
|
99
|
+
:ssl_options => ssl_options,
|
100
|
+
:start_tls => row["imap_start_tls"]==1,
|
101
|
+
:name => row["imap_folder_nam"],
|
102
|
+
:search_command => row["imap_search_command"],
|
103
|
+
:message_count => row["imap_messages_processed"],
|
104
|
+
:last_delivered_at => row["imap_last_processed_at"],
|
105
|
+
:mailbox_id => row["mailbox_id"],
|
106
|
+
:mailbox_name => row["mailbox_name"],
|
107
|
+
:mailbox_default => row['smtp_is_default']==1
|
108
|
+
}
|
91
109
|
end
|
92
110
|
end
|
93
111
|
mailboxes
|
data/lib/mail2cb/version.rb
CHANGED
data/mail2cb.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
|
30
30
|
spec.add_dependency 'mysql2'
|
31
31
|
spec.add_dependency 'mail'
|
32
|
-
spec.add_dependency 'mail_daemon', "~> 0.0.
|
32
|
+
spec.add_dependency 'mail_daemon', "~> 0.0.10"
|
33
33
|
spec.add_dependency 'nokogiri'
|
34
34
|
spec.add_dependency 'sinatra'
|
35
35
|
spec.add_dependency 'sanitize'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mail2cb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- EmergeAdapt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.0.
|
131
|
+
version: 0.0.10
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.0.
|
138
|
+
version: 0.0.10
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: nokogiri
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|