truemail-rb / truemail

🚀 Configurable framework agnostic plain Ruby 📨 email validator/verifier. Verify email via Regex, DNS, SMTP and even more. Be sure that email address valid and exists.

Home Page:https://truemail-rb.org/truemail-gem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[QUESTION] Does using truemail can cause entering to blacklists?

Roko131 opened this issue · comments

commented

New Issue Checklist

Question:
It's a little tricky to explain but..
Lets say I have a bad email address which upon sending an email to it - my IP address will be blacklisted, since it's a spam trap email.
And I check it with
Truemail.validate('bad_email@spam.trap')

Will by only testing it - my IP address will be blacklisted? as if I were to send the mail itself?

Does using Truemail to test the bad email address is essentially the same as sending it?

To my (very poor) understanding, Truemail basically simulates email sending. Doesn't that count the same as actually sending the mail? 'blacklist entering lists' wise?

What raise my suspicion was when testing a non-existing gmail email address I received
errors={:rcptto=>"550-5.1.1 The email account that you tried to reach does not exist. Please try\n"}>>]
Truemail.validate('msinhond@gmail.com')

it says The email account that you tried to reach. So my whole point was not to "anger" the mail providers by sending them invalid emails. That's why I'm trying this Gem.

Is by testing with Truemail I'm actually doing the same as sending the email itself?

So to summarize:
Lets say If I use my IP to send bad_email@spam.trap an email then my IP will be blacklisted.
Will using Truemail to test bad_email@spam.trap will also get me blacklisted as well?

Hope it was clear enough- I can explain more if needed

Thank you.

Hi, @Roko131 Yes, smtp validation is the same as sending, but without send data itself. Here you can find some slides about smtp validation flow. For successful smtp email validation you should use:

  1. Existing verifier email
  2. Existing verifier domain (it should be the same as in verifier email)
  3. Your validation host should has ptr record
  4. Your ip address of validation host and verifier email shouldn't be in email blacklists

Cheers!

commented

Thanks for your response. A follow up question:

[Whitelist/Blacklist] -> [Regex validation] -> [MX validation] -> [SMTP validation]

So to still be able to use True mail but not getting my IP blacklisted all I have to do is skip the SMTP validation stage?

So by doing Truemail.validate('msinhond@gmail.com', with: :mx) , the :smtp step is skipped and my IP won't be blacklisted?

(though since now the test returns valid I will be probably still send the email afterward)

Yup, you can Truemail.validate with mx option, or define it global on configuration level and use Truemail.validate without mx option:

Truemail.configure do |config|
  config.default_validation_type = :mx
end