Skip to content

Releases: truemail-rb/truemail

Feature/DNS audit

21 Jun 19:11
d4e72af
Compare
Choose a tag to compare

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=[]>
  1. Implement separated DNS audit for verifier host
  2. Refactored Truemail::Auditor, Truemail::Audit::Base, Truemail::Auditor::Result
  3. Extracted IP determining logic to independet auditor class
  4. Refactored PTR audit logic
  5. Updated gem documentation
  6. Updated gem version to 1.8.0

Feature/Update base serializer attributes

10 May 15:56
0bb4af9
Compare
Choose a tag to compare

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"
  }
}
  1. Updated Truemail::Log::Serializer::Base
  2. Updated gem documentation
  3. Updated gem version to 1.7.1

Feature/Implement not RFC MX lookup flow

09 May 10:25
e703a56
Compare
Choose a tag to compare

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
  1. Updated Truemail::Configuration
  2. Updated Truemail::Validate::Mx
  3. Updated gem development dependencies
  4. Updated gem documentation
  5. Updated gem version to 1.7.0

v1.6.1

23 Mar 09:36
ce553ee
Compare
Choose a tag to compare
  1. Updated Truemail.configuration
  2. Updated Truemail::ArgumentError
  3. Updated Truemail::Audit::Ptr
  4. Updated gem development dependencies
  5. Updated gem documentation
  6. Updated gem version to 1.6.1

v1.6.0

01 Feb 18:56
aad2836
Compare
Choose a tag to compare
  1. Added Truemail::Validator#as_json
  2. Updated gem documentation
  3. Updated gem development dependencies
  4. 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

20 Jan 19:50
1be3e59
Compare
Choose a tag to compare
  1. Updated Truemail::Validator::Result
  2. Updated gem documentation
  3. Updated gem development dependencies
  4. Updated gem version to 1.5.1

v1.5.0

30 Dec 06:26
aeb921c
Compare
Choose a tag to compare
  1. Supporting of internationalized emails (EAI). Now you can validate emails, like: dörte@sörensen.de, квіточка@пошта.укр, alegría@mañana.es
  2. Updated Truemail::RegexConstant::REGEX_DOMAIN
  3. Updated Truemail::RegexConstant::REGEX_EMAIL_PATTERN
  4. Added Truemail::Validator::Result#punycode_email
  5. Updated Truemail::Validate::Mx#run
  6. Updated Truemail::Validate::Smtp#establish_smtp_connection
  7. Updated gem documentation
  8. Updated gem runtime/development dependencies
  9. Updated linters configs
  10. Updated gem version to 1.5.0

v1.4.2

27 Nov 06:10
37f7a64
Compare
Choose a tag to compare
  1. Freezed mutable constants
  2. Optimized methods
  3. Updated tests
  4. Updated gem development dependencies
  5. Updated linters configs
  6. Updated gem version to 1.4.2

v1.4.1

21 Nov 07:28
5348f97
Compare
Choose a tag to compare
  1. Truemail rspec helpers moved to independent gem truemail-rspec
  2. Updated gem development dependencies
  3. Updated linters configs
  4. Updated documentation
  5. Updated gem version to 1.4.1

v1.4.0

28 Oct 10:26
b3e236a
Compare
Choose a tag to compare

Event logger feature

  1. Implemented Truemail::Logger class
  2. Implemented Truemail::Log::Event class
  3. Implemented Truemail::Log::Serializer::Base class
  4. Implemented Truemail::Log::Serializer::Text class
  5. Implemented Truemail::Log::Serializer::Json class
  6. Updated Truemail::Configuration
  7. Updated Truemail::Validator
  8. Updated Truemail::Validate::Regex
  9. Added changelog
  10. Updated gem version to 1.4.0
  11. Updated gem description
  12. 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 (when smtp_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'))