Releases: truemail-rb/truemail
Releases · truemail-rb/truemail
Feature/DNS audit
Separated audit features for verifier host.
Truemail.host_audit
=> #<Truemail::Auditor:0x00005580df358828
@result=
#<struct Truemail::Auditor::Result
current_host_ip="127.0.0.1",
warnings={
:dns=>"a record of verifier domain not refers to current host ip address",
:ptr=>"ptr record does not reference to current verifier domain"
},
configuration=
#<Truemail::Configuration:0x00005615e86327a8
@blacklisted_domains=[],
@connection_attempts=2,
@connection_timeout=2,
@default_validation_type=:smtp,
@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)/,
@response_timeout=2,
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
@not_rfc_mx_lookup_flow=false,
@smtp_safe_check=false,
@validation_type_by_domain={},
@verifier_domain="example.com",
@verifier_email="verifier@example.com",
@whitelist_validation=false,
@whitelisted_domains=[]>
- Implement separated DNS audit for verifier host
- Refactored
Truemail::Auditor
,Truemail::Audit::Base
,Truemail::Auditor::Result
- Extracted IP determining logic to independet auditor class
- Refactored PTR audit logic
- Updated gem documentation
- Updated gem version to
1.8.0
Feature/Update base serializer attributes
Added ability to show not_rfc_mx_lookup_flow
attribute in serialized validation result:
Truemail.validate('nonexistent_email@bestweb.com.ua').as_json
=>
# Serialized Truemail::Validator instance
{
"date": "2020-05-10 10:00:00 +0200",
"email": "nonexistent_email@bestweb.com.ua",
"validation_type": "smtp",
"success": false,
"errors": {
"smtp": "smtp error"
},
"smtp_debug": [
{
"mail_host": "213.180.193.89",
"port_opened": true,
"connection": true,
"errors": {
"rcptto": "550 5.7.1 No such user!\n"
}
}
],
"configuration": {
"validation_type_by_domain": null,
"whitelist_validation": false,
"whitelisted_domains": null,
"blacklisted_domains": null,
"not_rfc_mx_lookup_flow": false,
"smtp_safe_check": false,
"email_pattern": "default gem value",
"smtp_error_body_pattern": "default gem value"
}
}
- Updated
Truemail::Log::Serializer::Base
- Updated gem documentation
- Updated gem version to
1.7.1
Feature/Implement not RFC MX lookup flow
Added ability to use not RFC MX lookup flow (MX and Null MX records will be checked on the DNS validation layer only).
Truemail.configure do |config|
# Optional parameter. This option will provide to use not RFC MX lookup flow.
# It means that MX and Null MX records will be cheked on the DNS validation layer only.
# By default this option is disabled.
config.not_rfc_mx_lookup_flow = true
end
- Updated
Truemail::Configuration
- Updated
Truemail::Validate::Mx
- Updated gem development dependencies
- Updated gem documentation
- Updated gem version to
1.7.0
v1.6.1
v1.6.0
- Added
Truemail::Validator#as_json
- Updated gem documentation
- Updated gem development dependencies
- Updated gem version to
1.6.0
Possibility to use Truemail validator instance represented as json
directly:
Truemail.validate('nonexistent_email@bestweb.com.ua').as_json
=>
# Serialized Truemail::Validator instance
{
"date": "2020-02-01 10:00:00 +0200",
"email": "nonexistent_email@bestweb.com.ua",
"validation_type": "smtp",
"success": false,
"errors": {
"smtp": "smtp error"
},
"smtp_debug": [
{
"mail_host": "213.180.193.89",
"port_opened": true,
"connection": true,
"errors": {
"rcptto": "550 5.7.1 No such user!\n"
}
}
],
"configuration": {
"validation_type_by_domain": null,
"whitelist_validation": false,
"whitelisted_domains": null,
"blacklisted_domains": null,
"smtp_safe_check": false,
"email_pattern": "default gem value",
"smtp_error_body_pattern": "default gem value"
}
}
v1.5.1
v1.5.0
- Supporting of internationalized emails (EAI). Now you can validate emails, like:
dörte@sörensen.de
,квіточка@пошта.укр
,alegría@mañana.es
- Updated
Truemail::RegexConstant::REGEX_DOMAIN
- Updated
Truemail::RegexConstant::REGEX_EMAIL_PATTERN
- Added
Truemail::Validator::Result#punycode_email
- Updated
Truemail::Validate::Mx#run
- Updated
Truemail::Validate::Smtp#establish_smtp_connection
- Updated gem documentation
- Updated gem runtime/development dependencies
- Updated linters configs
- Updated gem version to
1.5.0
v1.4.2
v1.4.1
- Truemail rspec helpers moved to independent gem
truemail-rspec
- Updated gem development dependencies
- Updated linters configs
- Updated documentation
- Updated gem version to
1.4.1
v1.4.0
Event logger feature
- Implemented
Truemail::Logger
class - Implemented
Truemail::Log::Event
class - Implemented
Truemail::Log::Serializer::Base
class - Implemented
Truemail::Log::Serializer::Text
class - Implemented
Truemail::Log::Serializer::Json
class - Updated
Truemail::Configuration
- Updated
Truemail::Validator
- Updated
Truemail::Validate::Regex
- Added changelog
- Updated gem version to
1.4.0
- Updated gem description
- Updated readme
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
Available tracking events
:all
, all detected events including success validation cases:unrecognized_error
, unrecognized errors only (whensmtp_safe_check = true
and SMTP server does not return an exact answer that the email does not exist):recognized_error
, recognized errors only:error
, recognized and unrecognized errors only
Truemail.configure do |config|
config.logger = { tracking_event: :all, stdout: true, log_absolute_path: '/home/app/log/truemail.log' }
end
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.
Truemail::Log::Serializer::Json.call(Truemail.validate('nonexistent_email@bestweb.com.ua'))