diff --git a/bulkvalidate/bulkvalidate.go b/bulkvalidate/bulkvalidate.go index 10e3b09..7a05136 100644 --- a/bulkvalidate/bulkvalidate.go +++ b/bulkvalidate/bulkvalidate.go @@ -129,7 +129,7 @@ func writeResultsFile(results []run.VerifyEmailResponse, filePath string, append resp.Email, resp.Syntax.User, resp.Syntax.Domain, strconv.FormatBool(resp.Syntax.IsValid), resp.IsDeliverable, - resp.Provider, resp.Firewall, + resp.Provider, resp.SecureGatewayProvider, strconv.FormatBool(resp.IsRisky), strconv.FormatBool(resp.Risk.IsFirewalled), strconv.FormatBool(resp.Risk.IsFreeAccount), diff --git a/internal/run/run.go b/internal/run/run.go index 655e380..fa44b6a 100644 --- a/internal/run/run.go +++ b/internal/run/run.go @@ -9,18 +9,18 @@ import ( ) type VerifyEmailResponse struct { - Email string - IsDeliverable string - IsValidSyntax bool - IsCatchAll bool - Provider string - Firewall string - IsRisky bool - Risk VerifyEmailRisk - Syntax mailvalidate.SyntaxValidation - RetryValidation bool - Smtp mailvalidate.SmtpResponse - MailServerHealth mailvalidate.MailServerHealth + Email string + IsDeliverable string + IsValidSyntax bool + IsCatchAll bool + Provider string + SecureGatewayProvider string + IsRisky bool + Risk VerifyEmailRisk + Syntax mailvalidate.SyntaxValidation + RetryValidation bool + Smtp mailvalidate.SmtpResponse + MailServerHealth mailvalidate.MailServerHealth } type VerifyEmailRisk struct { @@ -81,18 +81,18 @@ func BuildResponse( } response := VerifyEmailResponse{ - Email: cleanEmail, - IsDeliverable: email.IsDeliverable, - IsValidSyntax: syntax.IsValid, - IsCatchAll: domain.IsCatchAll, - Provider: domain.Provider, - Firewall: domain.Firewall, - IsRisky: isRisky, - Risk: risk, - RetryValidation: email.RetryValidation, - Syntax: syntax, - Smtp: email.SmtpResponse, - MailServerHealth: email.MailServerHealth, + Email: cleanEmail, + IsDeliverable: email.IsDeliverable, + IsValidSyntax: syntax.IsValid, + IsCatchAll: domain.IsCatchAll, + Provider: domain.Provider, + SecureGatewayProvider: domain.SecureGatewayProvider, + IsRisky: isRisky, + Risk: risk, + RetryValidation: email.RetryValidation, + Syntax: syntax, + Smtp: email.SmtpResponse, + MailServerHealth: email.MailServerHealth, } return response diff --git a/mailvalidate/validation.go b/mailvalidate/validation.go index 4159e93..ff02149 100644 --- a/mailvalidate/validation.go +++ b/mailvalidate/validation.go @@ -30,16 +30,16 @@ type SyntaxValidation struct { } type DomainValidation struct { - Provider string - Firewall string - AuthorizedSenders dns.AuthorizedSenders - IsFirewalled bool - IsCatchAll bool - HasMXRecord bool - HasSPFRecord bool - SmtpResponse SmtpResponse - MailServerHealth MailServerHealth - Error string + Provider string + SecureGatewayProvider string + AuthorizedSenders dns.AuthorizedSenders + IsFirewalled bool + IsCatchAll bool + HasMXRecord bool + HasSPFRecord bool + SmtpResponse SmtpResponse + MailServerHealth MailServerHealth + Error string } type EmailValidation struct { @@ -196,7 +196,7 @@ func evaluateDnsRecords(validationRequest *EmailValidationRequest, knownProvider provider, firewall := dns.GetEmailProviderFromMx(*validationRequest.Dns, *knownProviders) results.Provider = provider if firewall != "" { - results.Firewall = firewall + results.SecureGatewayProvider = firewall results.IsFirewalled = true } } @@ -219,7 +219,7 @@ func evaluateDnsRecords(validationRequest *EmailValidationRequest, knownProvider if !results.IsFirewalled && len(results.AuthorizedSenders.Security) > 0 { results.IsFirewalled = true - results.Firewall = results.AuthorizedSenders.Security[0] + results.SecureGatewayProvider = results.AuthorizedSenders.Security[0] } }