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