HostOnNet Blog

MailGun.com experiance – account suspended for 5 bounce mail.

Looking for Linux Server Admin or WordPress Expert? We can help.

Recently we started loving MailGun, implemented MailGun in some of the customer projects, because it is too easy to use. Instead of using normal PHP mail() function, you use the code provided by MailGun to sent mail through MailGun servers.

We tried this service because mails from FreeMarriage.com went to SPAM BOX after a recent server move. It was working perfectly on old server. As with all new server setup, we set RDNS for hostname properly. Still Google sent mails from the server to SPAM folder. To make google happy, we tried SPF, still no luck.

So tried MailGun, it worked perfectly. Yesterday i got following email.

mailgun_disabled

So i checked the Message Tracking.

mailgun_disabled_2

On the high bounce day, we sent 55 mails, 5 of them bounced. That is the high bounce rate of 11% they said in the mail.

Previous day, we sent 201 message and 14 of them bounced.

Why Bounce ?

This is caused by users trying to signup on the web site with wrong email address.

How can we fix it ? I don’t know, may be educate users, so they will learn to type with out spelling mistake.

It may be a big issue for MailGun, for me it looks normal. Also, if some one enter few invalid email on your site that use MailGun, your account get disabled ? That too only 5 wrong email per day, that is easy to take down a MailGun powered web site.

MailGun Support

After i get Account disabled email from MailGun, i want to know why. So i open a support ticket with MailGun. No reply to it even after 22 hours.

Since our script have admin setting to disable MailGun, was not a big issue this time. But for some customer applications, we trusted MailGun, created the app with MailGun only, in such cause, it will be a problem as we have to edit code in multiple files in the application to switch back to PHP mail() function and make sure everything works after such a change is time consuming, while MailGun don’t even care to reply.

Maybe they calculated with out daily volume, we will stay in free 10K sending limit ?

Mail Problem Resolved

My initial mail problem was due to IPv6 enabled on the server and recenly Google looking for SPF record for IPv4 too. So i have to add AAA record for Hostname. Then set SPF record for that IPv6 IP too. Now all mails are going to inbox. So i don’t have much problem with mail delivery now. No real need for MailGun.

[root@server12 ~]# nslookup
> set type=aaaa
> server12.hosthat.com
Server:         213.133.99.99
Address:        213.133.99.99#53

Non-authoritative answer:
server12.hosthat.com    has AAAA address 2a01:4f8:101:24a3::2

Authoritative answers can be found from:
> set type=a
> server12.hosthat.com
Server:         213.133.99.99
Address:        213.133.99.99#53

Non-authoritative answer:
Name:   server12.hosthat.com
Address: 188.40.131.92
> set type=txt
> server12.hosthat.com
Server:         213.133.99.99
Address:        213.133.99.99#53

Non-authoritative answer:
server12.hosthat.com    text = "v=spf1 a:server12.hosthat.com ip6:2a01:4f8:101:24a3::2 ~all"

Authoritative answers can be found from:
>
[root@server12 ~]#

When you type

set type=a

in nslookup command prompt, nslookup will return A record.

set type=aaaa

For IPv6 Record.

set type=txt

For return TXT records. SPF record is a Text Record.

MailGun API Abuse

Just closed my MailGun account. Now waiting for the confirmation.

mailgun_disabled_3

Another security concern is if some use MailGun with popular CMS, that get hacked and hacker used MailGun to send spam mail, webmaster get charged for the bulk email. In such cause, they won’t suspend the sender, just charge you for all abuse.

They should implement some IP restriction so only validated/trusted IP can sent mail using the API keys.

Posted in PHP

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.