truemail 3.0.1 → 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md DELETED
@@ -1,1175 +0,0 @@
1
- # Changelog
2
-
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
-
5
- ## [3.0.1] - 2022.11.01
6
-
7
- ### Fixed
8
-
9
- - Fixed wrong semantic version comparison in gemspec runtime dependency definition
10
-
11
- ### Updated
12
-
13
- - Updated RSpec helpers
14
- - Updated gemspecs, circleci config
15
- - Updated gem version
16
-
17
- ## [3.0.0] - 2022.10.24
18
-
19
- ### Added
20
-
21
- - Added ability to specify whitelisted/blacklisted emails by complete match
22
-
23
- ```ruby
24
- Truemail.configure do |config|
25
- # Optional parameter. Validation of email which contains whitelisted emails always will
26
- # return true. Other validations will not processed even if it was defined in validation_type_for
27
- # It is equal to empty array by default.
28
- config.whitelisted_emails = %w[user@somedomain1.com user@somedomain2.com]
29
-
30
- # Optional parameter. Validation of email which contains blacklisted emails always will
31
- # return false. Other validations will not processed even if it was defined in validation_type_for
32
- # It is equal to empty array by default.
33
- config.blacklisted_emails = %w[user@somedomain3.com user@somedomain4.com]
34
- end
35
- ```
36
-
37
- ### Updated
38
-
39
- - Updated `Truemail::Configuration`, tests
40
- - Updated namespace from `Truemail::Validate::DomainListMatch` to `Truemail::Validate::ListMatch`
41
- - Updated `Truemail::Validator#run, tests
42
- - Updated `Truemail::Log::Serializer::ValidatorJson`, tests
43
- - Updated `Truemail::Log::Serializer::ValidatorText`, tests
44
- - Updated `Truemail::Log::Serializer::AuditorJson`, tests
45
- - Updated schemas, gemspecs, circleci/codeclimate config
46
- - Updated docs, gem version
47
-
48
- ## [2.7.5] - 2022.10.10
49
-
50
- ### Updated
51
-
52
- - Updated gemspecs, circleci config
53
- - Updated codeclimate config
54
- - Updated gem version
55
-
56
- ## [2.7.4] - 2022.08.16
57
-
58
- ### Updated
59
-
60
- - Updated gemspecs, circleci config
61
- - Updated rubocop/codeclimate configs
62
- - Updated gem version
63
-
64
- ## [2.7.3] - 2022.05.31
65
-
66
- ### Updated
67
-
68
- - Updated gemspecs, circleci config
69
- - Updated rubocop/codeclimate configs
70
- - Updated gem version
71
-
72
- ## [2.7.2] - 2022.04.02
73
-
74
- ### Updated
75
-
76
- - Updated gemspecs, circleci config
77
- - Updated rubocop/codeclimate configs
78
- - Updated git templates
79
- - Updated gem version
80
-
81
- ## [2.7.1] - 2022.03.02
82
-
83
- ### Updated
84
-
85
- - Updated truemail gemspecs
86
- - Updated gem version
87
-
88
- ## [2.7.0] - 2022.02.23
89
-
90
- ### Added
91
-
92
- - Added ability to specify SMTP port number
93
-
94
- ### Updated
95
-
96
- - Updated truemail gemspec
97
- - Updated gem version
98
-
99
- ## [2.6.6] - 2022.02.09
100
-
101
- ### Added
102
-
103
- - Added development environment guide docs
104
-
105
- ### Updated
106
-
107
- - Updated truemail gemspec
108
- - Updated gem version
109
-
110
- ## [2.6.5] - 2022.02.09
111
-
112
- ### Added
113
-
114
- - Added gemspec with latest dependencies for latest Ruby env
115
-
116
- ### Updated
117
-
118
- - Updated default gemspec, ruby-version
119
- - Updated CircleCI Ruby env flow
120
- - Updated gem version
121
-
122
- ### Fixed
123
-
124
- - Fixed redefining builtin implementations caused using stdlib as external dependencies
125
-
126
- ## [2.6.4] - 2022.02.09
127
-
128
- ### Fixed
129
-
130
- - Fixed redefining builtin implementations caused using stdlib as external dependencies. Thanks [@adzap](https://github.com/adzap) for report.
131
-
132
- ## [2.6.3] - 2022.02.07
133
-
134
- ### Updated
135
-
136
- - Updated gem `net-smtp` runtime dependency
137
- - Updated gem development dependencies
138
- - Updated gem version
139
-
140
- ## [2.6.2] - 2022.01.19
141
-
142
- ### Updated
143
-
144
- - Updated tests
145
- - Updated gem development dependencies
146
- - Updated gem version
147
-
148
- ## [2.6.1] - 2022.01.04
149
-
150
- ### Fixed
151
-
152
- - Fixed redefining builtin implementations caused using stdlib as external dependencies. Thanks [@allard](https://github.com/allard) for report.
153
-
154
- ### Updated
155
-
156
- - Updated `Truemail::Validate::Smtp::Request::Session#initialize`, `Truemail::Validate::Smtp::Request::Session#start`, tests
157
- - Updated rubocop/reek configs
158
- - Updated gem docs, version
159
-
160
- ## [2.6.0] - 2021.12.28
161
-
162
- ### Added
163
-
164
- - Added Ruby 3.1.x compatibility
165
- - Added `Truemail::Validate::Smtp::Request::Session` - `Net::SMTP` wrapper, tests
166
-
167
- ### Updated
168
-
169
- - Updated `Truemail::Validate::Smtp::Request#session`, `Truemail::Validate::Smtp::Request#run`, tests
170
- - Updated rubocop/reek/codeclimate/circleci configs
171
- - Updated gem runtime/development dependencies
172
- - Updated gem docs, version
173
-
174
- ## [2.5.4] - 2021.12.03
175
-
176
- ### Fixed
177
-
178
- - `Net::SMTP#start` Ruby 2.x compatibility. Thanks [@evserykh](https://github.com/evserykh) for bug report.
179
-
180
- ### Updated
181
-
182
- - Updated `Truemail::Validate::Smtp::Request#run`
183
- - Updated rubocop/codeclimate configs
184
- - Updated gem development dependencies
185
- - Updated gem docs, version
186
-
187
- ## [2.5.3] - 2021.11.08
188
-
189
- ### Fixed
190
-
191
- - Fixed Ruby 3.0 stdlib SMTP client SSL certificate verification issues for cases when IP address uses as MX host. Thanks [@esb](https://github.com/esb) for bug report.
192
-
193
- ### Updated
194
-
195
- - Updated `Truemail::Validate::Smtp::Request#run`
196
- - Updated gem development dependencies
197
- - Updated gem version
198
-
199
- ## [2.5.2] - 2021.10.06
200
-
201
- ### Fixed
202
-
203
- - `Truemail::RegexConstant::REGEX_EMAIL_PATTERN` behaviour with double `@` in email. Thanks [@your-favorite-dev](https://github.com/your-favorite-dev) for bug report.
204
-
205
- ### Updated
206
-
207
- - Updated tests
208
- - Updated gem development dependencies
209
- - Updated gem version
210
-
211
- ## [2.5.1] - 2021.10.01
212
-
213
- ### Updated
214
-
215
- - Updated gem development dependencies
216
- - Updated gem version
217
-
218
- ## [2.5.0] - 2021.09.01
219
-
220
- ### Updated
221
-
222
- Optimized DNS (MX) validation flow. Removed needless DNS request for case when custom email pattern was defined and email for validation includes invalid domain name.
223
-
224
- - Updated `Truemail::Validate::Mx#run`, tests
225
- - Updated gem development dependencies
226
- - Updated gem documentation, version
227
-
228
- ## [2.4.9] - 2021.08.20
229
-
230
- ### Updated
231
-
232
- - Updated `Truemail::Validate::DomainListMatch#email_domain`, tests
233
- - Updated `Truemail::Validate::Mx#domain`, tests
234
- - Updated gem development dependencies
235
- - Updated gem version
236
-
237
- ## [2.4.8] - 2021.08.12
238
-
239
- ### Updated
240
-
241
- - Updated gem development dependencies
242
- - Updated gem version
243
-
244
- ### Changed
245
-
246
- - `faker` to `ffaker` development dependency
247
-
248
- ## [2.4.7] - 2021.08.09
249
-
250
- ### Updated
251
-
252
- - Updated gem codebase, refactored `Truemail::ContextHelper`
253
- - Updated tests with `Truemail::DnsHelper#dns_mock_gateway`
254
- - Updated gem development dependencies
255
- - Updated gem version
256
-
257
- ## [2.4.6] - 2021.07.10
258
-
259
- ### Fixed
260
-
261
- - Wrong domain punycode extraction in DNS validation layer
262
-
263
- ### Updated
264
-
265
- - Updated gem codebase, restored `Truemail::RegexConstant::REGEX_DOMAIN_FROM_EMAIL`
266
- - Updated tests
267
-
268
- ## [2.4.5] - 2021.07.09
269
-
270
- ### Removed
271
-
272
- - `Truemail::RegexConstant::REGEX_DOMAIN_FROM_EMAIL`
273
-
274
- ### Updated
275
-
276
- - `Truemail::Validate::Mx`
277
- - Updated gem development dependencies
278
- - Updated gem version
279
-
280
- ## [2.4.4] - 2021.06.29
281
-
282
- ### Updated
283
-
284
- Allowed using special characters in email user names (following [RFC 3696](https://datatracker.ietf.org/doc/html/rfc3696#page-6)) for default regex email pattern.
285
-
286
- - Updated `Truemail::RegexConstant::REGEX_EMAIL_PATTERN`, tests
287
- - Updated gem development dependencies
288
- - Updated Rubocop/Codeclimate config
289
- - Updated gem documentation, version
290
-
291
- ## [2.4.3] - 2021.06.15
292
-
293
- ### Updated
294
-
295
- - Updated gem development dependencies
296
- - Updated Rubocop/Codeclimate config
297
- - Updated gem documentation, version
298
-
299
- ## [2.4.2] - 2021.05.13
300
-
301
- ### Fixed
302
-
303
- - Fixed security vulnerability for bundler ([CVE-2019-3881](https://github.com/advisories/GHSA-g98m-96g9-wfjq))
304
- - Fixed test coverage issues
305
-
306
- ### Updated
307
-
308
- - Updated gem development dependencies
309
- - Updated simplecov/CircleCi config
310
- - Updated gem documentation, version
311
-
312
- ## [2.4.1] - 2021.05.05
313
-
314
- ### Updated
315
-
316
- - `Truemail::Validate::MxBlacklist`, tests
317
- - Updated gem development dependencies
318
- - Updated gem documentation, version
319
-
320
- ## [2.4.0] - 2021.04.28
321
-
322
- ### Added
323
-
324
- - Implemented `MxBlacklist` validation. This layer provides checking mail servers with predefined blacklisted IP addresses list and can be used as a part of DEA ([disposable email address](https://en.wikipedia.org/wiki/Disposable_email_address)) validations.
325
-
326
- ```ruby
327
- Truemail.configure do |config|
328
- # Optional parameter. With this option Truemail will filter out unwanted mx servers via
329
- # predefined list of ip addresses. It can be used as a part of DEA (disposable email
330
- # address) validations. It is equal to empty array by default.
331
- config.blacklisted_mx_ip_addresses = ['1.1.1.1', '2.2.2.2']
332
- end
333
- ```
334
-
335
- ### Changed
336
-
337
- - Updated `Truemail::Core`, tests
338
- - Updated `Truemail::Configuration`, tests
339
- - Updated `Truemail::Validator`
340
- - Updated `Truemail::Validate::Smtp`, tests
341
- - Updated `Truemail::Log::Serializer::Base`, dependent tests
342
- - Updated `Truemail::Log::Serializer::ValidatorText`, tests
343
- - Updated gem development dependencies
344
- - Updated gem documentation, changelog, version
345
-
346
- ## [2.3.4] - 2021.04.16
347
-
348
- ### Fixed
349
-
350
- Fixed bug with impossibility to use valid dns port number. Now validation for dns port for range `1..65535` works as expected.
351
-
352
- - Updated `Truemail::RegexConstant::REGEX_PORT_NUMBER`, tests
353
- - Updated gem documentation
354
- - CircleCI config moved to `.circleci/config.yml`
355
-
356
- ## [2.3.3] - 2021.04.14
357
-
358
- ### Changed
359
-
360
- - Updated gem development dependencies
361
- - Updated rubocop/codeclimate config
362
- - Updated CircleCI config
363
-
364
- ## [2.3.2] - 2021.03.08
365
-
366
- ### Changed
367
-
368
- - Updated gem development dependencies
369
- - Updated rubocop/codeclimate config
370
-
371
- ## [2.3.1] - 2021.02.26
372
-
373
- ### Changed
374
-
375
- - Updated gem development dependencies
376
- - Updated rubocop/codeclimate config
377
- - Updated tests
378
-
379
- ## [2.3.0] - 2021.02.05
380
-
381
- ### Added
382
-
383
- - Ability to use custom DNS gateway. Thanks [@le0pard](https://github.com/le0pard) for the great idea and [@verdi8](https://github.com/verdi8) for feature [request](https://github.com/truemail-rb/truemail/issues/126).
384
-
385
- ```ruby
386
- Truemail.configure do |config|
387
- # Optional parameter. This option will provide to use custom DNS gateway when Truemail
388
- # interacts with DNS. If you won't specify nameserver's ports Truemail will use default
389
- # DNS TCP/UDP port 53. By default Truemail uses DNS gateway from system settings
390
- # and this option is equal to empty array.
391
- config.dns = ['10.0.0.1', '10.0.0.2:5300']
392
- end
393
- ```
394
-
395
- - Added `Truemail::Dns::Resolver`
396
- - Added `Truemail::Dns::Worker`
397
-
398
- ### Changed
399
-
400
- - Updated `Truemail::Configuration`, tests
401
- - Updated `Truemail::Validate::Mx`, tests
402
- - Updated `Truemail::Audit::Base`
403
- - Updated `Truemail::Audit::Dns`, tests
404
- - Updated `Truemail::Audit::Ptr`, tests
405
- - Updated `Truemail::Log::Serializer::Base`, dependent tests
406
- - Updated namespaces for stdlib classes
407
- - Updated gem development dependencies
408
- - Updated linters/codeclimate configs
409
- - Updated gem runtime/development dependencies
410
- - Updated gem documentation, changelog, version
411
-
412
- ## [2.2.3] - 2021.01.12
413
-
414
- ### Fixed
415
-
416
- Removed needless `Timeout.timeout` block in `Truemail::Validate::Smtp::Request#check_port`, replaced `TCPSocket` to `Socket` with native timeout detection. Thanks to [@wikiti](https://github.com/wikiti) for idea, testing on production and clean PR [#127](https://github.com/truemail-rb/truemail/pull/127).
417
-
418
- ### Changed
419
-
420
- - Updated `Truemail::Validate::Smtp::Request`
421
- - Updated gem development dependencies
422
- - Updated rubocop, reek configs
423
-
424
- ## [2.2.2] - 2020.12.30
425
-
426
- ### Changed
427
-
428
- - Updated gem development dependencies
429
- - Updated rubocop config
430
-
431
- ## [2.2.1] - 2020.12.06
432
-
433
- ### Fixed
434
-
435
- - Filter out ASCII-8BIT chars for serialized SMTP response errors. Fixed `Encoding::UndefinedConversionError` in `Truemail::Log::Serializer::ValidatorJson#serialize`. Thanks to [@eni9889](https://github.com/eni9889) for report
436
- - Added missed `smtp_fail_fast` attribute to serialized validator and auditor results
437
-
438
- ### Added
439
-
440
- - Added `Truemail::Log::Serializer::ValidatorBase#replace_invalid_chars`
441
-
442
- ### Changed
443
-
444
- - Updated `Truemail::Log::Serializer::Base`
445
- - Updated `Truemail::Log::Serializer::ValidatorBase`
446
- - Updated gem development dependencies
447
-
448
- ## [2.2.0] - 2020.12.01
449
-
450
- Ability to use fail fast behaviour for SMTP validation layer. When `smtp_fail_fast = true` it means that `truemail` ends smtp validation session after first attempt on the first mx server in any fail cases (network connection/timeout error, smtp validation error). This feature helps to reduce total time of SMTP validation session up to 1 second.
451
-
452
- ### Added
453
-
454
- - Added `Truemail::Configuration#smtp_fail_fast`
455
- - Added `Truemail::Validate::Smtp#smtp_fail_fast?`
456
- - Added `Truemail::Validate::Smtp#filtered_mail_servers_by_fail_fast_scenario`
457
-
458
- ### Changed
459
-
460
- - Updated `Truemail::Validate::Smtp#attempts`
461
- - Updated `Truemail::Validate::Smtp#establish_smtp_connection`
462
- - Updated gem documentation
463
-
464
- It's a configurable and not required option:
465
-
466
- ```ruby
467
- Truemail.configure do |config|
468
- config.smtp_fail_fast = true # by default it's equal to false
469
- end
470
- ```
471
-
472
- Thanks to [@wikiti](https://github.com/wikiti) for timeout reports.
473
-
474
- ## [2.1.0] - 2020.11.21
475
-
476
- Collecting only unique ip-addresses for target mail servers. This update reduces email validation time for case when remote server have closed connection via avoiding connection attempt to server with the same ip address.
477
-
478
- ### Changed
479
-
480
- - Updated `Truemail::Validate::Mx#fetch_target_hosts`
481
-
482
- ## [2.0.2] - 2020.11.14
483
-
484
- ### Fixed
485
-
486
- Timeouts time units in `Setting global configuration` of Truemail documentation's section. Thanks to [@wikiti](https://github.com/wikiti) for report.
487
-
488
- ### Changed
489
-
490
- - Refactored `Truemail::RegexConstant::REGEX_EMAIL_PATTERN`
491
- - Updated gem development dependencies
492
- - Updated gem documentation
493
-
494
- ## [2.0.1] - 2020.10.20
495
-
496
- ### Changed
497
-
498
- - Updated gem development dependencies
499
- - Updated gem documentation
500
-
501
- ## [2.0.0] - 2020.10.19
502
-
503
- ### Fixed
504
-
505
- SMTP connection errors: invalid `HELO` hostname (`localhost`), duplicate `HELO` (`verifier domain`). Thanks to [@nenoganchev](https://github.com/nenoganchev) for report.
506
-
507
- ### Changed
508
-
509
- - Updated `Truemail::Validate::Smtp::Request#run`
510
- - Updated `Truemail::Validate::Smtp::Request#session_data`
511
- - Updated `Truemail::Validate::Smtp::Response`
512
-
513
- Now `helo` is a `Boolean` instead of `Net::SMTP::Response` instance. It was changed because `helo` is sending during SMTP-session initializing (`Net::SMTP.new.start`), and `helo` is always `true` if session up is okay. Also `hello` response won't logged as error if it happens. Example of `Truemail::Validate::Smtp::Response` instance from 2.x version.
514
-
515
- ```ruby
516
- #<struct Truemail::Validate::Smtp::Response:0x00007fa74704cd10
517
- port_opened=true,
518
- connection=true,
519
- helo=true, # Returns Boolean instead of Net::SMTP::Response instance
520
- mailfrom=false,
521
- rcptto=nil,
522
- errors={:mailfrom=>"server response timeout"}>
523
- ```
524
-
525
- ## [1.9.2] - 2020.10.02
526
-
527
- ### Added
528
-
529
- - `Truemail::TypeError`
530
- - error handling for invalid types as input email
531
-
532
- ### Changed
533
-
534
- - Updated `Truemail.validate`
535
- - Updated `Truemail.valid?`
536
-
537
- ## [1.9.1] - 2020.09.21
538
-
539
- ### Changed
540
-
541
- Migrated to updated Ruby 2.7.x syntax.
542
-
543
- - Updated `Truemail::Configuration#logger=`
544
-
545
- ## [1.9.0] - 2020.09.01
546
-
547
- ### Added
548
-
549
- - Ability to use `Truemail::Auditor` instance represented as json directly
550
- - `Truemail::Log::Serializer::AuditorJson`
551
-
552
- ### Changed
553
-
554
- - `Truemail::Auditor`, `Truemail::Validator`
555
- - serializers namespaces
556
- - gem development dependencies
557
- - gem documentation
558
-
559
- ```ruby
560
- Truemail.host_audit.as_json
561
-
562
- =>
563
- # Serialized Truemail::Auditor instance
564
- {
565
- "date": "2020-08-31 22:33:43 +0300",
566
- "current_host_ip": "127.0.0.1",
567
- "warnings": {
568
- "dns": "A-record of verifier domain not refers to current host ip address", "ptr": "PTR-record does not reference to current verifier domain"
569
- },
570
- "configuration": {
571
- "validation_type_by_domain": null,
572
- "whitelist_validation": false,
573
- "whitelisted_domains": null,
574
- "blacklisted_domains": null,
575
- "not_rfc_mx_lookup_flow": false,
576
- "smtp_safe_check": false,
577
- "email_pattern": "default gem value",
578
- "smtp_error_body_pattern": "default gem value"
579
- }
580
- }
581
- ```
582
-
583
- ## [1.8.0] - 2020.06.21
584
-
585
- ### Added
586
-
587
- Separated audit features for verifier host.
588
-
589
- - `Truemail::Audit::Ip`
590
- - `Truemail::Audit::Dns`
591
-
592
- ```ruby
593
- Truemail.host_audit
594
-
595
- => #<Truemail::Auditor:0x00005580df358828
596
- @result=
597
- #<struct Truemail::Auditor::Result
598
- current_host_ip="127.0.0.1",
599
- warnings={
600
- :dns=>"a record of verifier domain not refers to current host ip address",
601
- :ptr=>"ptr record does not reference to current verifier domain"
602
- },
603
- configuration=
604
- #<Truemail::Configuration:0x00005615e86327a8
605
- @blacklisted_domains=[],
606
- @connection_attempts=2,
607
- @connection_timeout=2,
608
- @default_validation_type=:smtp,
609
- @email_pattern=/(?=\A.{6,255}\z)(\A([\p{L}0-9]+[\w|\-|\.|\+]*)@((?i-mx:[\p{L}0-9]+([\-\.]{1}[\p{L}0-9]+)*\.[\p{L}]{2,63}))\z)/,
610
- @response_timeout=2,
611
- @smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
612
- @not_rfc_mx_lookup_flow=false,
613
- @smtp_safe_check=false,
614
- @validation_type_by_domain={},
615
- @verifier_domain="example.com",
616
- @verifier_email="verifier@example.com",
617
- @whitelist_validation=false,
618
- @whitelisted_domains=[]>
619
- ```
620
-
621
- ### Changed
622
-
623
- - `Truemail::Auditor`
624
- - `Truemail::Auditor::Result`
625
- - `Truemail::Audit::Base`
626
- - `Truemail::Audit::Ptr`
627
- - `Truemail::VERSION`
628
- - gem documentation
629
-
630
- ## [1.7.1] - 2020.05.10
631
-
632
- ### Added
633
-
634
- - Ability to show `not_rfc_mx_lookup_flow` attribute in serialized validation result
635
-
636
- ```ruby
637
- Truemail.validate('nonexistent_email@bestweb.com.ua').as_json
638
-
639
- =>
640
- # Serialized Truemail::Validator instance
641
- {
642
- "date": "2020-05-10 10:00:00 +0200",
643
- "email": "nonexistent_email@bestweb.com.ua",
644
- "validation_type": "smtp",
645
- "success": false,
646
- "errors": {
647
- "smtp": "smtp error"
648
- },
649
- "smtp_debug": [
650
- {
651
- "mail_host": "213.180.193.89",
652
- "port_opened": true,
653
- "connection": true,
654
- "errors": {
655
- "rcptto": "550 5.7.1 No such user!\n"
656
- }
657
- }
658
- ],
659
- "configuration": {
660
- "validation_type_by_domain": null,
661
- "whitelist_validation": false,
662
- "whitelisted_domains": null,
663
- "blacklisted_domains": null,
664
- "not_rfc_mx_lookup_flow": false,
665
- "smtp_safe_check": false,
666
- "email_pattern": "default gem value",
667
- "smtp_error_body_pattern": "default gem value"
668
- }
669
- }
670
- ```
671
-
672
- ### Changed
673
-
674
- - `Truemail::Log::Serializer::Base`
675
- - `Truemail::VERSION`
676
- - gem documentation
677
-
678
- ## [1.7.0] - 2020.05.09
679
-
680
- ### Added
681
-
682
- - Ability to use not RFC MX lookup flow (MX and Null MX records will be checked on the DNS validation layer only)
683
-
684
- ```ruby
685
- Truemail.configure do |config|
686
- # Optional parameter. This option will provide to use not RFC MX lookup flow.
687
- # It means that MX and Null MX records will be cheked on the DNS validation layer only.
688
- # By default this option is disabled.
689
- config.not_rfc_mx_lookup_flow = true
690
- end
691
- ```
692
-
693
- ### Changed
694
-
695
- - `Truemail.configuration`
696
- - `Truemail::Validate::Mx`
697
- - `Truemail::VERSION`
698
- - gem development dependencies
699
- - gem documentation
700
-
701
- ## [1.6.1] - 2020.03.23
702
-
703
- ### Changed
704
-
705
- - `Truemail.configuration`
706
- - `Truemail::ArgumentError`
707
- - `Truemail::Audit::Ptr`
708
- - `Truemail::VERSION`
709
- - gem development dependencies
710
- - gem documentation
711
-
712
- ### Removed
713
-
714
- `Truemail::Configuration.retry_count` deprecated, and alias for this method has been removed. Please use `Truemail::Configuration.connection_attempts` instead.
715
-
716
- ## [1.6.0] - 2020-02-01
717
-
718
- ### Added
719
-
720
- - Ability to use `Truemail::Validator` instance represented as json directly
721
-
722
- ### Changed
723
-
724
- - gem development dependencies
725
- - gem documentation
726
-
727
- ## [1.5.1] - 2020-01-20
728
-
729
- ### Changed
730
-
731
- - gem development dependencies
732
- - gem documentation
733
-
734
- ## [1.5.0] - 2019-12-29
735
-
736
- ### Added
737
-
738
- - Supporting of internationalized emails ([EAI](https://en.wikipedia.org/wiki/International_email)). Now you can validate emails, like: `dörte@sörensen.de`, `квіточка@пошта.укр`, `alegría@mañana.es`
739
-
740
- ### Changed
741
-
742
- - `Truemail::RegexConstant::REGEX_DOMAIN`
743
- - `Truemail::RegexConstant::REGEX_EMAIL_PATTERN`
744
- - `Truemail::Validator::Result`
745
- - `Truemail::Validate::Mx#run`
746
- - `Truemail::Validate::Smtp#establish_smtp_connection`
747
- - gem runtime dependencies
748
- - gem development dependencies
749
- - gem documentation
750
- - linters configs
751
-
752
- ## [1.4.2] - 2019-11-27
753
-
754
- ### Changed
755
-
756
- - `Truemail::Configuration`
757
- - gem development dependencies
758
- - linters configs
759
-
760
- ## [1.4.1] - 2019-11-20
761
-
762
- ### Changed
763
-
764
- - gem development dependencies
765
- - gem documentation
766
- - linters configs
767
-
768
- ### Removed
769
-
770
- - truemail rspec helpers (moved to independent gem [`truemail-rspec`](https://github.com/truemail-rb/truemail-rspec))
771
-
772
- ## [1.4.0] - 2019-10-28
773
-
774
- ### Added
775
-
776
- - Event logger (ability to output validation logs to stdout/file)
777
- - JSON serializer for validator instance
778
- - [Changelog](CHANGELOG.md)
779
- - [Logo](https://repository-images.githubusercontent.com/173723932/6dffee00-e88e-11e9-94b6-c97aacc0df00)
780
-
781
- Truemail gem allows to output tracking events to stdout/file or both of these. Please note, at least one of the outputs must exist. Tracking event by default is `:error`
782
-
783
- **Available tracking events**
784
-
785
- - `:all`, all detected events including success validation cases
786
- - `:unrecognized_error`, unrecognized errors only (when `smtp_safe_check = true` and SMTP server does not return an exact answer that the email does not exist)
787
- - `:recognized_error`, recognized errors only
788
- - `:error`, recognized and unrecognized errors only
789
-
790
- ```ruby
791
- Truemail.configure do |config|
792
- config.logger = { tracking_event: :all, stdout: true, log_absolute_path: '/home/app/log/truemail.log' }
793
- end
794
- ```
795
-
796
- Also starting from this version Truemail has built in JSON serializer for `Truemail::Validator` instance, so you can represent your email validation result as json.
797
-
798
- ```ruby
799
- Truemail::Log::Serializer::Json.call(Truemail.validate('nonexistent_email@bestweb.com.ua'))
800
- ```
801
-
802
- ### Changed
803
-
804
- - `Truemail::Configuration`
805
- - `Truemail::Validator`
806
- - `Truemail::Validate::Regex`
807
- - `Truemail::VERSION`
808
- - gem documentation
809
- - gem description
810
-
811
- ## [1.3.0] - 2019-09-16
812
-
813
- ### Added
814
-
815
- - Ability to create new `Truemail::Configuration` instance with block
816
- - `Truemail::Validate::Smtp::Request::Configuration`
817
-
818
- ### Changed
819
-
820
- - `Truemail::Wrapper`
821
- - `Truemail::Validate::Base`
822
- - `Truemail::Validator`
823
- - `Truemail::Validator::Result`
824
- - `Truemail::Validate::Regex`
825
- - `Truemail::Validate::Mx`
826
- - `Truemail::Validate::Smtp`
827
- - `Truemail::Validate::Smtp::Request`
828
- - `Truemail::Audit::Base`
829
- - `Truemail::Auditor`
830
- - `Truemail::Audit::Ptr`
831
- - `::Truemail` module
832
- - `Truemail::VERSION`
833
- - gem documentation
834
- - gem description
835
-
836
- ## [1.2.1] - 2019-06-27
837
-
838
- ### Fixed
839
-
840
- - Removed memoization from ```DomainListMatch#whitelisted_domain?```
841
-
842
- ### Changed
843
-
844
- - `Truemail::VERSION`
845
- - gem documentation
846
-
847
- ## [1.2.0] - 2019-06-26
848
-
849
- ### Added
850
-
851
- - Configurable option: validation for whitelisted domains only.
852
-
853
- When email domain in whitelist and ```whitelist_validation``` is sets equal to ```true``` validation type will be passed to other validators. Validation of email which not contains whitelisted domain always will return ```false```.
854
-
855
- ```ruby
856
- Truemail.configure do |config|
857
- config.verifier_email = 'verifier@example.com'
858
- config.whitelisted_domains = ['white-domain.com']
859
- config.whitelist_validation = true
860
- end
861
- ```
862
-
863
- **Email has whitelisted domain**
864
-
865
- ```ruby
866
- Truemail.validate('email@white-domain.com', with: :regex)
867
-
868
- #<Truemail::Validator:0x000055b8429f3490
869
- @result=#<struct Truemail::Validator::Result
870
- success=true,
871
- email="email@white-domain.com",
872
- domain=nil,
873
- mail_servers=[],
874
- errors={},
875
- smtp_debug=nil>,
876
- @validation_type=:regex>
877
- ```
878
-
879
- **Email hasn't whitelisted domain**
880
-
881
- ```ruby
882
- Truemail.validate('email@domain.com', with: :regex)
883
-
884
- #<Truemail::Validator:0x000055b8429f3490
885
- @result=#<struct Truemail::Validator::Result
886
- success=false,
887
- email="email@domain.com",
888
- domain=nil,
889
- mail_servers=[],
890
- errors={},
891
- smtp_debug=nil>,
892
- @validation_type=:blacklist>
893
- ```
894
-
895
- ### Changed
896
-
897
- - `Truemail::VERSION`
898
- - gem documentation
899
-
900
- ## [1.1.0] - 2019-06-18
901
-
902
- ### Added
903
-
904
- - Configurable default validation type, [issue details](https://github.com/truemail-rb/truemail/issues/48)
905
-
906
- You can predefine default validation type for `Truemail.validate('email@email.com')` call without with-parameter. Available validation types: `:regex`, `:mx`, `:smtp`. By default validation type still remains `:smtp`
907
-
908
- ```ruby
909
- Truemail.configure do |config|
910
- config.verifier_email = 'verifier@example.com'
911
- config.default_validation_type = :mx
912
- end
913
- ```
914
-
915
- ### Changed
916
-
917
- - `Truemail::VERSION`
918
- - gem documentation
919
-
920
- ## [1.0.1] - 2019-06-08
921
-
922
- ### Added
923
-
924
- - Result validation type marker for domain list match check
925
-
926
- ```ruby
927
- Truemail.validate('email@white-domain.com')
928
-
929
- #<Truemail::Validator:0x000055b8429f3490
930
- @result=#<struct Truemail::Validator::Result
931
- success=true,
932
- email="email@white-domain.com",
933
- domain=nil,
934
- mail_servers=[],
935
- errors={},
936
- smtp_debug=nil>,
937
- @validation_type=:whitelist>
938
-
939
- Truemail.validate('email@black-domain.com')
940
-
941
- #<Truemail::Validator:0x000023y8429f3493
942
- @result=#<struct Truemail::Validator::Result
943
- success=false,
944
- email="email@black-domain.com",
945
- domain=nil,
946
- mail_servers=[],
947
- errors={},
948
- smtp_debug=nil>,
949
- @validation_type=:blacklist>
950
- ```
951
-
952
- ### Changed
953
-
954
- - `Truemail::VERSION`
955
- - gem documentation
956
-
957
- ## [1.0] - 2019-06-04
958
-
959
- ### Added
960
-
961
- - Feature domain whitelist blacklist. Other validations will not processed even if it was defined in `validation_type_for`.
962
-
963
- ```ruby
964
- Truemail.configure do |config|
965
- # Optional parameter. Validation of email which contains whitelisted domain
966
- # always will return true.
967
- config.whitelisted_domains = ['somedomain1.com', 'somedomain2.com']
968
-
969
- # Optional parameter. Validation of email which contains whitelisted domain
970
- # always will return false.
971
- config.blacklisted_domains = ['somedomain1.com', 'somedomain2.com']
972
- end
973
- ```
974
-
975
- and
976
-
977
- ```ruby
978
- Truemail.configuration.whitelisted_domains = ['somedomain1.com', 'somedomain2.com']
979
- Truemail.configuration.blacklisted_domains = ['somedomain1.com', 'somedomain2.com']
980
- ```
981
-
982
- ### Removed
983
-
984
- - `:skip` validation type for `validation_type_for`
985
-
986
- ### Fixed
987
-
988
- - error key in `lower_snake_case`
989
-
990
- ### Changed
991
-
992
- - `Truemail::VERSION`
993
- - gem documentation
994
-
995
- ## [0.2] - 2019-05-23
996
-
997
- ### Added
998
-
999
- - skip validation by domain for `validation_type_for` configuration option:
1000
-
1001
- ```ruby
1002
- Truemail.configure do |config|
1003
- config.validation_type_for = { 'somedomain.com' => :skip }
1004
- end
1005
- ```
1006
-
1007
- and
1008
-
1009
- ```ruby
1010
- Truemail.configuration.validation_type_for = { 'somedomain.com' => :skip }
1011
- ```
1012
-
1013
- ### Changed
1014
-
1015
- - `Truemail::VERSION`
1016
- - gem documentation
1017
-
1018
- ## [0.1.10] - 2019-05-10
1019
-
1020
- ### Added
1021
-
1022
- - SMTP error body configurable option, [issue details](https://github.com/truemail-rb/truemail/issues/19)
1023
-
1024
- ### Changed
1025
-
1026
- - `Truemail::VERSION`
1027
- - gem documentation
1028
-
1029
- ## [0.1.9] - 2019-04-29
1030
-
1031
- ### Fixed
1032
-
1033
- - Empty ptr constant
1034
-
1035
- ## [0.1.8] - 2019-04-29
1036
-
1037
- ### Added
1038
-
1039
- - Reverse trace, [issue details](https://github.com/truemail-rb/truemail/issues/18)
1040
-
1041
- ### Fixed
1042
-
1043
- - Behaviour of current host address resolver, [issue details](https://github.com/truemail-rb/truemail/issues/18)
1044
-
1045
- ### Changed
1046
-
1047
- - `Truemail::VERSION`
1048
- - gem documentation
1049
-
1050
- ## [0.1.7] - 2019-04-17
1051
-
1052
- ### Added
1053
-
1054
- - PTR record audit, [issue details](https://github.com/truemail-rb/truemail/issues/18)
1055
-
1056
- ### Changed
1057
-
1058
- - `Truemail::VERSION`
1059
- - gem documentation
1060
-
1061
- ## [0.1.6] - 2019-04-08
1062
-
1063
- ### Added
1064
-
1065
- - MX gem logic with [RFC 7505](https://tools.ietf.org/html/rfc7505), null MX record supporting, [issue details](https://github.com/truemail-rb/truemail/issues/27)
1066
- - [Contributing guideline](CONTRIBUTING.md)
1067
-
1068
- ### Fixed
1069
-
1070
- - Multihomed MX records supporting, [issue details](https://github.com/truemail-rb/truemail/issues/28)
1071
-
1072
- ### Changed
1073
-
1074
- - `Truemail::VERSION`
1075
- - gem documentation
1076
-
1077
- ## [0.1.5] - 2019-04-05
1078
-
1079
- ### Added
1080
-
1081
- - Retries for `Truemail::Validate::Smtp` for cases when one mx server
1082
-
1083
- ### Changed
1084
-
1085
- - `Truemail::Configuration` class, please use `.connection_attempts` instead `.retry_count`
1086
- - `Truemail::VERSION`
1087
- - gem documentation
1088
-
1089
- ## [0.1.4] - 2019-04-01
1090
-
1091
- ### Added
1092
-
1093
- - Checking A record presence if `MX` and `CNAME` records not exist, [issue details](https://github.com/truemail-rb/truemail/issues/10)
1094
- - Handling of `CNAME` records, [issue details](https://github.com/truemail-rb/truemail/issues/11)
1095
- - Checking A record if `MX` and `CNAME` records not found, [issue details](https://github.com/truemail-rb/truemail/issues/12)
1096
- - Supporting of multihomed MX records, conversion host names to ips, [issue details](https://github.com/truemail-rb/truemail/issues/17)
1097
- - Timeout configuration for DNS resolver, [issue details](https://github.com/truemail-rb/truemail/issues/13)
1098
- - `.valid?` helper
1099
-
1100
- ### Changed
1101
-
1102
- - `Truemail::VERSION`
1103
- - gem documentation
1104
-
1105
- ## [0.1.3] - 2019-03-27
1106
-
1107
- ### Added
1108
-
1109
- - Independent domain name extractor to `Truemail::Validate::Mx#run`
1110
-
1111
- ### Fixed
1112
-
1113
- - Default `REGEX_EMAIL_PATTERN`, [issue details](https://github.com/truemail-rb/truemail/issues/7)
1114
- * local part of address can't start with a dot or special symbol
1115
- * local part of address can include ```+``` symbol
1116
- - Default `REGEX_DOMAIN_PATTERN`, [issue details](https://github.com/truemail-rb/truemail/issues/8)
1117
- * TLD size increased up to 63 characters
1118
- - Case sensitive domain names, [issue details](https://github.com/truemail-rb/truemail/issues/9)
1119
-
1120
- ### Changed
1121
-
1122
- - `Truemail::VERSION`
1123
- - gem documentation
1124
-
1125
- ## [0.1.0] - 2019-03-26
1126
-
1127
- ### Added
1128
-
1129
- - 'SMTP safe check' option for cases when SMTP server does not return an exact answer that the email does not exist.
1130
-
1131
- ```ruby
1132
- Truemail.configure do |config|
1133
- config.verifier_email = 'verifier@example.com'
1134
- config.smtp_safe_check = true
1135
- end
1136
-
1137
- Truemail.validate('email@example.com')
1138
-
1139
- # Successful SMTP validation
1140
- => #<Truemail::Validator:0x0000000002ca2c70
1141
- @result=
1142
- #<struct Truemail::Validator::Result
1143
- success=true,
1144
- email="email@example.com",
1145
- domain="example.com",
1146
- mail_servers=["mx1.example.com"],
1147
- errors={},
1148
- smtp_debug=
1149
- [#<Truemail::Validate::Smtp::Request:0x0000000002c95d40
1150
- @configuration=
1151
- #<Truemail::Configuration:0x0000000002c95b38
1152
- @connection_timeout=2,
1153
- @email_pattern=/regex_pattern/,
1154
- @response_timeout=2,
1155
- @smtp_safe_check=true,
1156
- @validation_type_by_domain={},
1157
- @verifier_domain="example.com",
1158
- @verifier_email="verifier@example.com">,
1159
- @email="email@example.com",
1160
- @host="mx1.example.com",
1161
- @response=
1162
- #<struct Truemail::Validate::Smtp::Response
1163
- port_opened=true,
1164
- connection=false,
1165
- helo=true,
1166
- mailfrom=false,
1167
- rcptto=nil,
1168
- errors={:mailfrom=>"554 5.7.1 Client host blocked\n", :connection=>"server dropped connection after response"}>>,]>,
1169
- @validation_type=:smtp>
1170
- ```
1171
-
1172
- ### Changed
1173
-
1174
- - `Truemail::VERSION`
1175
- - gem documentation