truemail 2.6.6 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +1 -1
- data/.circleci/gemspec_latest +2 -2
- data/CHANGELOG.md +11 -0
- data/README.md +21 -0
- data/lib/truemail/configuration.rb +3 -0
- data/lib/truemail/validate/smtp/request.rb +3 -4
- data/lib/truemail/version.rb +1 -1
- data/truemail.gemspec +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b75d339a9930d00462714943ac421fc747ea7409cb161b55acb152f842e4627
|
4
|
+
data.tar.gz: 4093a63ef17f5f68703ccd31467bd7e9db12bdbdc417a5f33e248bf029b00610
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c543dd3f257723aaaad1ebb4d5ff4400f8060e2330696c567901453c2f486b7e03aab223b1b8b9222f8fba1a9ea0bc792240790678abff1e6926c25decba8010
|
7
|
+
data.tar.gz: 78607aaaa78587589b80bbbbcf590965939d6d26a2c8a747a9abcc31f04690c207a03f6a6f0af4e6d8a9bea3872492789d178464038c54c92bb57d98d6eca8d7
|
data/.circleci/config.yml
CHANGED
data/.circleci/gemspec_latest
CHANGED
@@ -43,12 +43,12 @@ Gem::Specification.new do |spec|
|
|
43
43
|
spec.add_development_dependency 'pry-byebug', '~> 3.9'
|
44
44
|
spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
|
45
45
|
spec.add_development_dependency 'reek', '~> 6.1'
|
46
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
46
|
+
spec.add_development_dependency 'rspec', '~> 3.11'
|
47
47
|
spec.add_development_dependency 'rubocop', '~> 1.25', '>= 1.25.1'
|
48
48
|
spec.add_development_dependency 'rubocop-performance', '~> 1.13', '>= 1.13.2'
|
49
49
|
spec.add_development_dependency 'rubocop-rspec', '~> 2.8'
|
50
50
|
spec.add_development_dependency 'simplecov', '~> 0.21.2'
|
51
51
|
spec.add_development_dependency 'smtp_mock', '~> 1.0'
|
52
|
-
spec.add_development_dependency 'truemail-rspec', '~> 0.
|
52
|
+
spec.add_development_dependency 'truemail-rspec', '~> 0.9.0'
|
53
53
|
spec.add_development_dependency 'webmock', '~> 3.14'
|
54
54
|
end
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,17 @@
|
|
2
2
|
|
3
3
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
4
4
|
|
5
|
+
## [2.7.0] - 2022.02.23
|
6
|
+
|
7
|
+
### Added
|
8
|
+
|
9
|
+
- Added ability to specify SMTP port number
|
10
|
+
|
11
|
+
### Updated
|
12
|
+
|
13
|
+
- Updated truemail gemspec
|
14
|
+
- Updated gem version
|
15
|
+
|
5
16
|
## [2.6.6] - 2022.02.09
|
6
17
|
|
7
18
|
### Added
|
data/README.md
CHANGED
@@ -136,6 +136,7 @@ You can use global gem configuration or custom independent configuration. Availa
|
|
136
136
|
- blacklisted mx ip-addresses
|
137
137
|
- custom DNS gateway(s)
|
138
138
|
- RFC MX lookup flow
|
139
|
+
- SMTP port number
|
139
140
|
- SMTP fail fast
|
140
141
|
- SMTP safe check
|
141
142
|
- event logger
|
@@ -221,6 +222,9 @@ Truemail.configure do |config|
|
|
221
222
|
# By default this option is disabled.
|
222
223
|
config.not_rfc_mx_lookup_flow = true
|
223
224
|
|
225
|
+
# Optional parameter. SMTP port number. It is equal to 25 by default.
|
226
|
+
config.smtp_port = 2525
|
227
|
+
|
224
228
|
# Optional parameter. This option will provide to use smtp fail fast behaviour. When
|
225
229
|
# smtp_fail_fast = true it means that Truemail ends smtp validation session after first
|
226
230
|
# attempt on the first mx server in any fail cases (network connection/timeout error,
|
@@ -263,6 +267,7 @@ Truemail.configuration
|
|
263
267
|
@verifier_domain="somedomain.com",
|
264
268
|
@verifier_email="verifier@example.com",
|
265
269
|
@not_rfc_mx_lookup_flow=true,
|
270
|
+
@smtp_port=2525,
|
266
271
|
@smtp_fail_fast=true,
|
267
272
|
@smtp_safe_check=true,
|
268
273
|
@logger=#<Truemail::Logger:0x0000557f837450b0
|
@@ -296,6 +301,7 @@ Truemail.configuration
|
|
296
301
|
@verifier_domain="somedomain.com",
|
297
302
|
@verifier_email="verifier@example.com",
|
298
303
|
@not_rfc_mx_lookup_flow=true,
|
304
|
+
@smtp_port=2525,
|
299
305
|
@smtp_fail_fast=true,
|
300
306
|
@smtp_safe_check=true,
|
301
307
|
@logger=#<Truemail::Logger:0x0000557f837450b0
|
@@ -382,6 +388,7 @@ Truemail.validate('email@white-domain.com')
|
|
382
388
|
@response_timeout=2,
|
383
389
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
384
390
|
@not_rfc_mx_lookup_flow=false,
|
391
|
+
@smtp_port=25,
|
385
392
|
@smtp_fail_fast=false,
|
386
393
|
@smtp_safe_check=false,
|
387
394
|
@validation_type_by_domain={"somedomain.com"=>:mx},
|
@@ -431,6 +438,7 @@ Truemail.validate('email@white-domain.com', with: :regex)
|
|
431
438
|
@response_timeout=2,
|
432
439
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
433
440
|
@not_rfc_mx_lookup_flow=false,
|
441
|
+
@smtp_port=25,
|
434
442
|
@smtp_fail_fast=false,
|
435
443
|
@smtp_safe_check=false,
|
436
444
|
@validation_type_by_domain={},
|
@@ -466,6 +474,7 @@ Truemail.validate('email@domain.com', with: :regex)
|
|
466
474
|
@response_timeout=2,
|
467
475
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
468
476
|
@not_rfc_mx_lookup_flow=false,
|
477
|
+
@smtp_port=25,
|
469
478
|
@smtp_fail_fast=false,
|
470
479
|
@smtp_safe_check=false,
|
471
480
|
@validation_type_by_domain={},
|
@@ -503,6 +512,7 @@ Truemail.validate('email@black-domain.com')
|
|
503
512
|
@response_timeout=2,
|
504
513
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
505
514
|
@not_rfc_mx_lookup_flow=false,
|
515
|
+
@smtp_port=25,
|
506
516
|
@smtp_fail_fast=false,
|
507
517
|
@smtp_safe_check=false,
|
508
518
|
@validation_type_by_domain={},
|
@@ -540,6 +550,7 @@ Truemail.validate('email@somedomain.com')
|
|
540
550
|
@response_timeout=2,
|
541
551
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
542
552
|
@not_rfc_mx_lookup_flow=false,
|
553
|
+
@smtp_port=25,
|
543
554
|
@smtp_fail_fast=false,
|
544
555
|
@smtp_safe_check=false,
|
545
556
|
@validation_type_by_domain={},
|
@@ -594,6 +605,7 @@ Truemail.validate('email@example.com', with: :regex)
|
|
594
605
|
@response_timeout=2,
|
595
606
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
596
607
|
@not_rfc_mx_lookup_flow=false,
|
608
|
+
@smtp_port=25,
|
597
609
|
@smtp_fail_fast=false,
|
598
610
|
@smtp_safe_check=false,
|
599
611
|
@validation_type_by_domain={},
|
@@ -639,6 +651,7 @@ Truemail.validate('email@example.com', with: :regex)
|
|
639
651
|
@response_timeout=2,
|
640
652
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
641
653
|
@not_rfc_mx_lookup_flow=false,
|
654
|
+
@smtp_port=25,
|
642
655
|
@smtp_fail_fast=false,
|
643
656
|
@smtp_safe_check=false,
|
644
657
|
@validation_type_by_domain={},
|
@@ -695,6 +708,7 @@ Truemail.validate('email@example.com', with: :mx)
|
|
695
708
|
@response_timeout=2,
|
696
709
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
697
710
|
@not_rfc_mx_lookup_flow=false,
|
711
|
+
@smtp_port=25,
|
698
712
|
@smtp_fail_fast=false,
|
699
713
|
@smtp_safe_check=false,
|
700
714
|
@validation_type_by_domain={},
|
@@ -742,6 +756,7 @@ Truemail.validate('email@example.com', with: :mx)
|
|
742
756
|
@response_timeout=2,
|
743
757
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
744
758
|
@not_rfc_mx_lookup_flow=true,
|
759
|
+
@smtp_port=25,
|
745
760
|
@smtp_fail_fast=false,
|
746
761
|
@smtp_safe_check=false,
|
747
762
|
@validation_type_by_domain={},
|
@@ -793,6 +808,7 @@ Truemail.validate('email@example.com', with: :mx_blacklist)
|
|
793
808
|
@not_rfc_mx_lookup_flow=false,
|
794
809
|
@response_timeout=2,
|
795
810
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
811
|
+
@smtp_port=25,
|
796
812
|
@smtp_fail_fast=false,
|
797
813
|
@smtp_safe_check=false,
|
798
814
|
@validation_type_by_domain={},
|
@@ -869,6 +885,7 @@ Truemail.validate('email@example.com')
|
|
869
885
|
@not_rfc_mx_lookup_flow=false,
|
870
886
|
@response_timeout=2,
|
871
887
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
888
|
+
@smtp_port=25,
|
872
889
|
@smtp_fail_fast=true,
|
873
890
|
@smtp_safe_check=false,
|
874
891
|
@validation_type_by_domain={},
|
@@ -966,6 +983,7 @@ Truemail.validate('email@example.com')
|
|
966
983
|
@response_timeout=2,
|
967
984
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
968
985
|
@not_rfc_mx_lookup_flow=false,
|
986
|
+
@smtp_port=25,
|
969
987
|
@smtp_fail_fast=false,
|
970
988
|
@smtp_safe_check=false,
|
971
989
|
@validation_type_by_domain={},
|
@@ -1079,6 +1097,7 @@ Truemail.validate('email@example.com')
|
|
1079
1097
|
@response_timeout=2,
|
1080
1098
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
1081
1099
|
@not_rfc_mx_lookup_flow=false,
|
1100
|
+
@smtp_port=25,
|
1082
1101
|
@smtp_fail_fast=false,
|
1083
1102
|
@smtp_safe_check=false,
|
1084
1103
|
@validation_type_by_domain={},
|
@@ -1129,6 +1148,7 @@ Truemail.host_audit
|
|
1129
1148
|
@response_timeout=2,
|
1130
1149
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
1131
1150
|
@not_rfc_mx_lookup_flow=false,
|
1151
|
+
@smtp_port=25,
|
1132
1152
|
@smtp_fail_fast=false,
|
1133
1153
|
@smtp_safe_check=false,
|
1134
1154
|
@validation_type_by_domain={},
|
@@ -1158,6 +1178,7 @@ Truemail.host_audit
|
|
1158
1178
|
@response_timeout=2,
|
1159
1179
|
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
1160
1180
|
@not_rfc_mx_lookup_flow=false,
|
1181
|
+
@smtp_port=25,
|
1161
1182
|
@smtp_fail_fast=false,
|
1162
1183
|
@smtp_safe_check=false,
|
1163
1184
|
@validation_type_by_domain={},
|
@@ -6,6 +6,7 @@ module Truemail
|
|
6
6
|
DEFAULT_RESPONSE_TIMEOUT = 2
|
7
7
|
DEFAULT_CONNECTION_ATTEMPTS = 2
|
8
8
|
DEFAULT_VALIDATION_TYPE = :smtp
|
9
|
+
DEFAULT_SMTP_PORT = 25
|
9
10
|
DEFAULT_LOGGER_OPTIONS = { tracking_event: :error, stdout: false, log_absolute_path: nil }.freeze
|
10
11
|
SETTERS = %i[
|
11
12
|
email_pattern
|
@@ -17,6 +18,7 @@ module Truemail
|
|
17
18
|
blacklisted_domains
|
18
19
|
blacklisted_mx_ip_addresses
|
19
20
|
dns
|
21
|
+
smtp_port
|
20
22
|
].freeze
|
21
23
|
|
22
24
|
attr_reader :verifier_email,
|
@@ -96,6 +98,7 @@ module Truemail
|
|
96
98
|
response_timeout: Truemail::Configuration::DEFAULT_RESPONSE_TIMEOUT,
|
97
99
|
connection_attempts: Truemail::Configuration::DEFAULT_CONNECTION_ATTEMPTS,
|
98
100
|
default_validation_type: Truemail::Configuration::DEFAULT_VALIDATION_TYPE,
|
101
|
+
smtp_port: Truemail::Configuration::DEFAULT_SMTP_PORT,
|
99
102
|
validation_type_by_domain: {},
|
100
103
|
whitelisted_domains: [],
|
101
104
|
whitelist_validation: false,
|
@@ -4,7 +4,6 @@ module Truemail
|
|
4
4
|
module Validate
|
5
5
|
class Smtp
|
6
6
|
class Request
|
7
|
-
SMTP_PORT = 25
|
8
7
|
CONNECTION_TIMEOUT_ERROR = 'connection timed out'
|
9
8
|
RESPONSE_TIMEOUT_ERROR = 'server response timeout'
|
10
9
|
CONNECTION_DROPPED = 'server dropped connection after response'
|
@@ -23,7 +22,7 @@ module Truemail
|
|
23
22
|
def check_port
|
24
23
|
response.port_opened = ::Socket.tcp(
|
25
24
|
host,
|
26
|
-
|
25
|
+
configuration.smtp_port,
|
27
26
|
connect_timeout: configuration.connection_timeout,
|
28
27
|
&port_open_status
|
29
28
|
)
|
@@ -42,7 +41,7 @@ module Truemail
|
|
42
41
|
private
|
43
42
|
|
44
43
|
class Configuration
|
45
|
-
REQUEST_PARAMS = %i[connection_timeout response_timeout verifier_domain verifier_email].freeze
|
44
|
+
REQUEST_PARAMS = %i[smtp_port connection_timeout response_timeout verifier_domain verifier_email].freeze
|
46
45
|
|
47
46
|
def initialize(configuration)
|
48
47
|
Truemail::Validate::Smtp::Request::Configuration::REQUEST_PARAMS.each do |attribute|
|
@@ -96,7 +95,7 @@ module Truemail
|
|
96
95
|
def session
|
97
96
|
Truemail::Validate::Smtp::Request::Session.new(
|
98
97
|
host,
|
99
|
-
|
98
|
+
configuration.smtp_port,
|
100
99
|
configuration.connection_timeout,
|
101
100
|
configuration.response_timeout
|
102
101
|
)
|
data/lib/truemail/version.rb
CHANGED
data/truemail.gemspec
CHANGED
@@ -40,6 +40,6 @@ Gem::Specification.new do |spec|
|
|
40
40
|
spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
|
41
41
|
spec.add_development_dependency 'rspec', '~> 3.10'
|
42
42
|
spec.add_development_dependency 'smtp_mock', '~> 1.0'
|
43
|
-
spec.add_development_dependency 'truemail-rspec', '~> 0.
|
43
|
+
spec.add_development_dependency 'truemail-rspec', '~> 0.9.0'
|
44
44
|
spec.add_development_dependency 'webmock', '~> 3.14'
|
45
45
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: truemail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladislav Trotsenko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simpleidn
|
@@ -126,14 +126,14 @@ dependencies:
|
|
126
126
|
requirements:
|
127
127
|
- - "~>"
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version: 0.
|
129
|
+
version: 0.9.0
|
130
130
|
type: :development
|
131
131
|
prerelease: false
|
132
132
|
version_requirements: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
134
|
- - "~>"
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version: 0.
|
136
|
+
version: 0.9.0
|
137
137
|
- !ruby/object:Gem::Dependency
|
138
138
|
name: webmock
|
139
139
|
requirement: !ruby/object:Gem::Requirement
|
@@ -239,7 +239,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
239
239
|
- !ruby/object:Gem::Version
|
240
240
|
version: '0'
|
241
241
|
requirements: []
|
242
|
-
|
242
|
+
rubyforge_project:
|
243
|
+
rubygems_version: 2.7.3
|
243
244
|
signing_key:
|
244
245
|
specification_version: 4
|
245
246
|
summary: truemail
|