Mailgun Email rejected by some providers - dns

I am trying to send emails through MailGun APIs and it was working fine until we noticed some emails were rejected by Orange.fr . I assume it could be the case for other providers, but Gmail is working fine for instance.
Error I see in MailGun admin panel is the following:
Failed: postmaster#mg.lesjardinsdelariviere.com → m****ou#orange.fr 'Subject' Server response: 501 5.1.0 Emetteur invalide. Invalid Sender. OFR003_405 [405]
I am sending those emails from no-reply#lesjardinsdelariviere.com and in Gmail they appear to be signed & sent by "mg.lesjardinsdelariviere.com"
I had requested my DNS provider to make those changes to verify my MailGun account:
(type, hostname, value)
TXT mg.lesjardinsdelariviere.com v=spf1 include:mailgun.org ~all
TXT mx._domainkey.mg.lesjardinsdelariviere.com k=rsa;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC9x/kulF+1LfeDRnrAlDjNBwD7oP7jIcdJ9MhgWASmDh3SJ2t2GT2zmTSKMPt25dtEYNMX2qvXIAq/rmQ4XB15YgBUTUaX/IdJ18bYUulH//BXVq7q8H2J/mWYAcoWnTTecVOUm75CiY6rngtBBw1g+TICnVMq2/HZ0lA047HEhQIDAQAB
(type, priority, value)
MX 10 mxa.mailgun.org
MX 10 mxb.mailgun.org
(type, hostname, value)
CNAME email.mg.lesjardinsdelariviere.com mailgun.org
I tried searching for similar issues and I think there might be something missing in the DNS records but I don't know what... Any help? Thanks!

Mailgun is regularly added to spam blacklists because their entire business model is based on sending out huge numbers of emails and these are not always appreciated.
There is nothing you can do about this except change mail providers or complain to mailgun.
If you are truly sending out mail that is "not spam", for example customer invoices or individually written emails to individual people, you can get your own dedicated server from a reputable hosting company, and a clean IP address, and you will have very few delivery problems.

Related

550 5.7.0 Message rejected per SPF policy

So recently we started to get this issue of email rejected by SPF, We we using the fraud-detector.eu site as away to send mails to test SPF :
Recipient: [SMTP:spf#fraud-detector.eu] Reason: Remote SMTP Server Returned: 550 5.7.23 <spf#fraud-detector.eu>: Recipient address rejected: Message rejected due to: SPF fail - not authorized. Please see http://www.openspf.net/Why? s=helo;id=mail.domain.co.uk;ip=45.83.xxx.xxx;r=<UNKNOWN>
**We have tweaked SPF and tested again with such tools as:**
[https://www.mail-tester.com][1]
[https://www.spf-record.com/analyzer][2]
[https://www.kitterman.com/spf/validate.html][3]
[https://mxtoolbox.com][4]
and they all gives the thumbs up, but still we are receiving these SPF rejection messages. So I'm sort of out of ideas.
**Current SPF on our domain names:**"
v=spf1 mx ip4:45.83.xxx.xxx ip4:45.83.xxx.xxx include:crm.cloud-example.com -all"
**The two listed ip4's represents:**
**1.)** our mail server
**2.)** Our business application server which also sends emails and host various busyness systems including our company's CRM which obviously also sends emails from staff and marketing mails.
We have updated the SPF records, but the result is nevertheless the same. We have checked and validated both SPF, Dmarc and DMKIM and they all turn out green and authenticated correctly on test tools such as:
[1]: https://www.mail-tester.com
[2]: https://www.spf-record.com/analyzer
[3]: https://www.kitterman.com/spf/validate.html
[4]: https://mxtoolbox.com
Feedback please?

cpanel sent emails marked as spam

my site use latest version of cpanel
but when i send email via cpanel email account to gmail,the gmail marked it as spam
where is the problem?
This can occur for many causes,
The first thing that causes many email services mark a message as SPAM is your IP address, maybe your IP address is listed as SPAM generator - But I think it's not very important for GMail.
You should set your Reverse DNS record because It's important too.
Maybe you're sending email with bad protocol parameters - I think cpanel does It good, I'm not a cpanel experienced.
Removing SPAM mark from emails helps to GMail removes the sender from blacklists.
Google has very good documents about how to send emails to GMail to not marking as SPAM.
you can check if your mail server is not listed in spam databases.
Here is one: http://www.spamhaus.org/query/bl?ip=173.194.32.21
When i opened spam message in gmail, then she said why it is in spam ...

MX and A Records with Google Apps

So I have this weird problem at my company with our email system.
(And I'll preface this by saying that I'm a web/graphic designer forced into an IT role as well, so forgive my noobish-ness please)
I just switched our company over to Google Apps for Business to take advantage of all of Google's apps and features.
The MX records for all six of our domains have been switched over to Google for days now, and it seems to be working very well except for a couple of things...
Those users in the organization who haven't switched their Outlook/Thunderbird/Mail App to Google's settings are still sending and receiving mail through the old system, which is hosted by MyHosting.com, even though the MX records clearly show that mail should be going to Google's servers.
Our website contact forms are still sending through the old system as well and NOT Google. For instance, woodshedsmokehouse.com contact form sends an email to info#woodshedsmokehouse.com on the old system, instead of sending it to info#woodshedsmokehouse.com at our Google Apps account (which is a 'nickname' of info#cheftimlove.com).
Now, here's where I think there might be some confusion... maybe, again I'm a noob.
All six of our domains have A Records of SMTP and MAIL that still point to MyHosting.com's mail servers.
Is this the issue? If so, how can I fix it? Google Apps support has not said a word about altering A Records
Any insight and help is more than greatly appreciated. Thank you!
I can understand why it's sending through the old domain, but I can't understand the receiving part. Are the emails they are receiving through the old domain a "Reply To Email" Or "New Emails".
I know A records are used as backup MX Records. And MX record are not needed at all, if your hosting the mail server off the A record location.
I'm curious, if you found a solution and an explanation. I checked your MX Records and they seem fine of the 2 domains you listed. I also use MyHosting, but I host my own email servers.
If you can post the headers of the email on the ones they receive and send, that would be helpful.

How to check if an email address belongs to Gmail

I'm creating a function uses Google's API to import contacts from a person's gmail account. However I'm aware that many businesses sign up to Google in order to have a more professional domain name( eg. some_name#bislr.com) but still belongs to Gmail.
Is there a way to check for that?
Option 1
if you do a DNS lookup for the MX records on bislr.com, you get the following:
$ host -t mx bislr.com
bislr.com mail is handled by 10 aspmx.l.google.com.
bislr.com mail is handled by 20 alt1.aspmx.l.google.com.
bislr.com mail is handled by 20 alt2.aspmx.l.google.com.
bislr.com mail is handled by 30 aspmx2.googlemail.com.
bislr.com mail is handled by 30 aspmx3.googlemail.com.
bislr.com mail is handled by 30 aspmx4.googlemail.com.
bislr.com mail is handled by 30 aspmx5.googlemail.com.
Anyone hosting their email Google Apps will have MX records very similar to these. You can do a MX lookup with any common DNS mechanism and test the MX records for Google's most-recommended mail servers - aspmx.l.google.com, alt1.aspmx.l.google.com, and alt2.aspmx.l.google.com, or look for any/all of the servers in this list.
This won't show you anyone who uses an external forwarding/filtering service but it will work for all of the common cases.
Option 2
You can connect to a mail server to verify if it will accept mail to a specific address. Using this, we can connect to asmpx.l.google.com and ask it whether an address is a valid Google Mail account.
If you connect to aspmx.l.google.com:25 and send this string (replace the email addresses as appropriate):
HELO
MAIL FROM:<ping#mydomain.com>
RCPT TO:<user#theirdomain.com>
Google's mail server will respond with a smtp status code, probably a line starting with something like 250 2.1.5 OK if it's a valid address. This is a cleaner and far more reliable way than simply checking DNS records, and should work as long as you don't get the checking IP blacklisted by using it to send actual spam to gmail.
Here is a full walkthrough of the process.
You can't be certain.
The MX record check described by #lunixbochs covers most cases, but many corporates will use Postini, which has different domain names. They might also be using any number of other mail pre-processing engines which will hide the aspmx records.
One other way to check is to see if they have an active domain name:
curl http://www.google.com/a/DOMAINNAME | grep "domain that isn't using Google Apps"
Use your language / library of choice instead of curl to fetch the url...

How to prevent emails from a specific address going to Hotmail SPAM?

I have a site on a dedicated server with it's own IP range that has been running for a good few years. We have a notification email address (mailout#domain.com) which we use to send automated emails (activation emails when a user signs up and notification emails if something relevant to them happens, eg someone befriends them or comments on their picture etc). Users can select whether to receive these notifications or not. We have SPF and RDNS setup.
Email from all our other email accounts go to hotmail/gmail/yahoo mail etc correctly into the inbox. However any mail sent from the mailout#domain.com account (whether automatically by the server or manually via outlook) is delivered correctly to the inboxes for yahoo and gmail however goes into Junk in Hotmail (but other #domain.com addresses deliver to hotmail's inbox correctly). It says at the top of the message that MS Smartscreen marked this message as junk. I signed up for MS Smart Network Data Services to monitor the IP and it says it's not blocked but it displays Bot-like behaviour (which kind of makes sense as our notifications are kind of bot like even though they're not spam).
I can't work out what to do to prevent this from happening, we've authenticated the email, there's obviously not a general block on the IP as emails from different accounts on the same domain are going through successfully. It doesn't seem to be the format of the email either because if I send identical emails from mailout#domain.com and contact#domain then the one from contact# gets through to the inbox but the one from mailout# goes through to junk.
I can't really work out what to do and obviously trying to get MS to sort it out is never going to happen and i've used all their available tools. I can obviously try setting up a new email address (eg noreply#domain.com) and using that for notifications but i assume it will only be a matter of time before that gets blocked as well.
I would be immensely grateful for any suggestions anyone has!
Thanks so much,
Dave
You don't have many options. Try to do as many of the following as you can:
Reach out to MS support (don't discard this notion)
Implement DKIM and possibly DMARC (which are vastly more informative than SPF)
Change your IP address to something cleaner
Find and follow bulk sender best practices, e.g. M³AAWG's BCPs, perhaps the Help – I'm on a Blocklist doc

Resources