I am using command like sendmail -bv example#othesite.com to verify some email address to confirm the address is valid or not before sending actual email to people.
it works for most sites I tested. But sometimes, I am using the sendmail
for some website that will give me all pass no matter what the address name I put for
the same site.
For example:
sendmail -bv yyyyyy#othersite.com
where yyyyyy can be anything that also passes the command and always reported out "yyyyyy#othersite.com verified". It seems correct but I think that should be something wrong behind. Why ?
Other command checking mail address on linux will be reliable and available, how and what command does this?
Short answer:
There is no 100% reliable way to verify the existence of a recipient email address other than actually send a message there and have the recipient click a link in the message body.
Explanation:
What most of these address verifcation tools do is contact the recipient server, start a SMTP session and use the SMTP "RCPT TO" (or sometimes "VRFY") command check if the server responds with 200 OK or 550 User Unknown. This works if the server does recipient verification, but many servers simply accept everything first and then bounce the message later if the recipient doesn't exist. Even with recipient filtering enabled some systems (for example Exchange 2013) only respond with "User unknown" after the SMTP DATA stage which means you actually have to send a full message before you get the result.
More advanced verification systems also check for bounces, but even this is not reliable. Getting no bounce could mean the recipient address exists but it could also mean the address probe was quarantined or you simply didn't wait long enough for the bounce.
In short:
No, there's no command that does this.
Gaining confidence in existence:
While there is no completely accurate way to verify the existence of an email address without an end-user clicking a signed link from an email, there are long, detailed guides on how one might approach getting a kind of "confidence level" of an address's existence. A rough breakdown of these levels are:
The host exists and has mail exchanges (DNS lookup with nslookup or equivalent).
A MX accepts an envelope to the address, but is a forwarding server (could be a false positive).
A MX accepts an envelope to the address, and is a "core" server (often not accessible externally).
A real message was sent that didn't bounce, given enough time (assuming the server isn't just keeping mum).
A real message was sent and the recipient indicated so.
And mapping the levels to what they mean:
(0) Definitely does not exist.
(1,2) Is indeterminable.
(>=3) Exists.
You could figure out which MX's accept envelopes to obviously nonexistent addresses, and thereby be able to distinguish between confidence levels 2 and 3.
The following command and link have solved the issue.
-nslookup command help to find out mail server address for examplesite.com
nslookup -type=mx examplesite.com;
-https://superuser.com/questions/224015/how-to-check-if-email-address-does-exist
The answer instruction in the link help to verfiy the email address completely
Related
Some emails sent by our sever go to spam for certain recipients. E.g when sent to #outlook.com email addresses.
I have been testing our emails using https://www.mail-tester.com
SpamAssassin gives a score of -0.1 for the issue of 'HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different'
This is the only issue reported. Everything else, such as SPF and DKIM, passes. There is no documentation on their website for this issue and I don't understand what it means or how to fix it.
The email is sent using PHPMailer via AWS SES.
I solved this by completing the setup of 'MAIL FROM' in AWS SES. This set the mail from header in emails to be my domain name.
"HEADER_FROM_DIFFERENT_DOMAINS" and mail-tester.com now gives me a score of 10/10.
Note that for some email providers it took a few weeks before we were trusted and emails stopped going to spam.
It means that the envelope sender address (which is used at the SMTP level) is different to the address used in the From header. This is very common, but can be a problem if you try to implement DMARC alignment. For example, you might send a message with a from header containing user#example.com, but your envelope sender might be bouncehandler#mail.example.com. You should be able to see this in the Return path header of a received message. Whether you can change this depends on exactly how you're sending your message, but in PHPMailer the envelope sender defaults to the from address, and you can override it by setting the Sender property.
A -0.1 penalty is unlikely to be the entire cause of your mail being sent to spam.
Its outlooks rubbish filtering system. They have "AI" rules that look at the sending ip address for reputation. They score you on user reportsand lots of other bits they will not tell you about. Make sure you have SPF, DMARC, DKIM, and sign up for their JMRP and SDNS they will tell you. But it still is a game of cat and mouse. Its a slippery slope and even Microsoft trap their own mail to their own outlook users. PITA, to be honest and luckily we managed to get a mitigation to the issue. However some users in different domains still complain of email going to JUNK. Go figure. I hate having to work on issues with Outlook.com. They themselves send out spam and have the audacity to block well configured SMTP senders.
I wish you luck. You will need it.
using email analysis we can find senders IP address through some tools only if they are from different domains like senders sends from yahoo mail to gmail user.
How to find senders IP if they are from same domain?
example:
from: abcd#gmail.com
to : wxyz#gmail.com
while in email analysis iam getting senders IP as google servers IP
What you can actually achive with any tools depends very much on whose IP address you want to find out:
If you want to get the address of the client, on which a user probabply typed the email and from which it was transferred to its provider's Mail User Agent (MUA), forget it. As long as you are not a government with the appropriate court decision or very good friends with the server operator, the latter one will not give you even slightly sensitive information about its clients, also not the IP address.
If you want the IP address of the MUA of the client's mail service provider, you have much better chances. Assuming that the from field is correct, then just check out which addresses this provider uses. Gmail has probably a lot of various server machines and I think you might not find the exakt IP of the server the sender's client connected to. If the from field is manipulated (junk mail), Gmail's Mail Transfer Agent (MTA) will probably reject the mail, so that it will never arrive in your inbox anyway.
The sender and the recipient may use different mail service providers, in that case your provider's admin could have a look into the server's log files to find out from which IP address the recipient's provider's MTA was connected. However, usually this is absolutely irrelevant, as long we are dealing with two respectable organizations. Also you explicitly mentioned that in this scenario, it is one and the same provider.
Finally, you can find out the address of your own MUA, but I think that has nothing to do with the author of the email.
So, in conclusion: technically you can't. The only really interesting information is the address of the client used by the author of the email. Google is a respectable enough company to never ever give this information to you, except if the sender's mail client explicitly wrote it into the mail header, which it probably never will.
If you want the IP address because of criminal activity or any kind of abuse by the sender, just contact Gmail. If that does not help, file a lawsuit. The latter one may actually take a long breath until you (may!) be successful, so be sure if your situation is really that bad.
However, if you have a lot of criminal energy you could use the more general metadata from the header to create a profile of the sender's client, like which client software of which version he*she uses and more. But I think this is going to be very, very much work until you get more relevant information (and it should be).
It would actually be very helpful to have a few more information on your scenario, e.g. what you need the address for, if you really mean the client's address or the mail provider's server address, how much work you are willing to invest and also which kind of mail service provider we are talking about. If you run your own mail server, you suddenly gain access to a lot of interesting information...
Feel free to clarify your needs, so maybe someone can help you better. Also, I hope I didn't hit you with too many words, I am new and excited about stackoverflow ;)
I have 2 Windows 2008 R2 boxes running in Microsoft Azure. My ASP.NET 4.0 site (let's imagine it's running at "example.com") has a standard Contact Us form.
When a user sends a Contact Us message, I use System.Net.Mail and SmtpDeliveryMethod.Network to deliver mail to an IIS6 SMTP server running on each box, which sends the mail to a Google Apps "enquiries#example.com" account, using the email address the user entered into the Contact Us form as the "From" address.
This was working beautifully for a year until I checked it today, and found this error in a .BDP file in the \Badmail folder:
550-5.7.1 Our system has detected an unusual rate of unsolicited mail originating from your IP address. To protect our users from spam, mail sent from your IP address has been blocked. Please visit http://www.google.com/mail/help/bulk_mail.html to review our Bulk Email Senders Guidelines.
Obviously Google upped their anti-spam strategies in the last 6 months - last time it worked was Feb 2013 (yeah, we don't get much mail luckily... yet).
I've read the Bulk Senders Guidelines linked above, but they're not really suited to my use case. My case is not sending emails from our server to users of our site (I simply use the Gmail API and send from our enquiries#example.com for that), but rather to collect users' enquiries so that we can easily respond by clicking Reply in that inbox.
I am looking for the easiest solution here. In response to the ones in Google's Bulk Senders Guidelines:
Use a consistent IP address to send bulk mail: I already do, doesn't seem to help
Reverse DNS: Godaddy, my domain and DNS provider doesn't seem to support them: http://support.godaddy.com/groups/domains-management-and-services/forum/topic/how-do-i-setup-reverse-dns/ Anyone know if there's a way?
Use the same address in the 'From:' header on every bulk mail you send: This is totally not my use case. I'll have different From headers in every email
SPF record: I think this only works if I am sending From ...#example.com every time. Is that right? My feeling is SPF doesn't help me here. Would love someone to enlighten me.
DKIM: This looks hellishly complicated, but I'll pursue it if someone thinks it can work in this case. Specifically is it OK that the From address doesn't match the "signing domain"? Anyone got any good "how to" links? And will this be sufficient for Google to un-blacklist me?
Sendgrid: Azure's preferred mail sending app. This means signing up, code changes, testing, and unknowns like "does Sendgrid allow any From address? It's non-trivial, and I'd like to avoid this, but again, will go there if it's what people think is the sanest option.
As a general answer to your questions, sending email on behalf of many different domains from one IP (e.g. example.net, example.org, and ex.co from 10.0.0.1) is generally seen as spammy behavior (and therefor not recommended).
Your points 1-5 only apply if you're sending from one domain. rDNS, SPF, and DKIM only improve delivery for one IP to one domain (in a generally 1:1) relationship.
Generally, the best way to avoid getting marked as spam in a situation like this is to set the From email as a consistent one that you actually control (e.g. enquery-sender#example.com), and then setting the Reply-To as the entered address (e.g. enquirer#someprovider.com). This way you consistently send from one domain, while still getting the benefit of replies going to the message originator (for example LinkedIn does it this way). Doing this will allow you to setup rDNS, SPF, and DKIM with benefit.
That said, if you decide that you don't want to use the recommended Reply-To method, you can use SendGrid to send from any arbitrary domain. It should not require any significant code change (just switching your current SMTP credentials to SendGrid's).
Disclaimer: I am a SendGrid employee.
I'm new to SMTP techniques so with just a few days work with it, I have this question - Can a mail-sending program send mails under my email?
It seems like I can put any email in to from field and if I put my friend's email there, I can disguise him!? This sound strange since I believe that being some one else is not that ease at all.
Please guide me if you have experiences on this.
Any email client can send an email using ANY email address as the from field.
That said, a lot of receiving mail servers are configured to do various tests to ensure that the email is coming from a real mail server.
For a list of those techniques used by receiving mail servers go here: http://en.wikipedia.org/wiki/Anti-spam_techniques Specifically the "automated techniques for e-mail administrators" section.
A short list from there is:
1. Reverse DNS - tests the IP address of the sender to ensure that the IP is listed as an MX record for the domain.
2. FCrDNS - receiving mail server will attempt to do an SMTP HELO or EHLO command back to the sender's IP. This makes sure the sender is an SMTP server.
3. Disallow Dynamic IPs - receiving server will test the sender's IP to see if it is DHCP'd. If so, then the mail is marked as spam.
Point is, you can send email as being originated from any email address. However, there is a huge possibility that the email will simply be deleted by the receiving server.
Actually, you can do what you say with an email client like Thunderbird where you can set the From address freely.
Anyway, you will need a SMTP server that will accept this any domain address (your provider SMTP will probably do).
That's also why some SMTP servers (like Gmail's one for instance) force the user to get athenticated and displays his user adress (it will sometimes display on behalf of when sending from another e-mail address. This is very well explained on Google site.
Regards,
Max
How do you stop the "Default SMTP Virtual Server" from sending bounce messages for email addresses that you don't have?
i.e. I'm using IIS' SMTP server to handle my email and if an email is sent unknown at mydomain.com a bounce email with 'address not known' (or something like that) is sent back to the sender. I want it to silently fail.
I found this article which has a script you can run to configure a catch-all account on your server. All emails which would generate a NDR will instead be directed to this account. Sorry, I haven't tested it. The article above has been removed here it is via the WayBack Machine
Basically the short answer to your question is no.
On another note, if you don't want to spend any money, or have no budget, and want a better email system, try something like Smarter Mail which you can use for free up to 10 users. I am sure there are others out there, but I have used Smarter Mail in the past successfully.
This isn't an IIS failure. The SMTP server receiving the message is looking for a valid email address, and when it doesn't find one, sends an email back to your email address saying that there isn't one there. The only way to have it silently fail is by putting the from address as a bogus email like no-reply#company.com, etc.
From an SMTP point of view, a better way to handle this is to reject the RCPT request at some point during the SMTP transaction. This way, your server isn't responsible for sending any blowback to the alleged sender.
I don't know how to configure IIS to do this specifically, but you certainly can with Postfix (which is what I use).