Strange Bounce Address preventing my Emails from Inbox

I am using php mail function to send an email, and it keeps going to google spam folder.

I sent an email to http://www.mail-tester.com and I see the problem:

This is what it says:

From : info@appstoreranktracker.com

Bounce address : www-data@beastmode

Reply-To : info@appstoreranktracker.com

[SPF] beastmode does not allow your server 173.255.253.72 to use www-data@beastmode

We check if there is a mail server (A Record) behind your hostname beastmode.

You may want to publish a DNS record (A type) for the hostname beastmode or use a different hostname in your mail software.

Why is my bounce address www-data@beastmode andd not info@appstoreranktracker.com?

Anyone know how to fix this?

These are the headers I am using with the php mail:

$header = 'From: info@appstoreranktracker.com' . "\r\n" .

'Reply-To: info@appstoreranktracker.com' . "\r\n" .

'Return-Path: info@appstoreranktracker.com' . "\r\n" .

'X-Mailer: PHP/' . phpversion();

11 Replies

Is your Linode's hostname 'beastmode'?

The name 'beastmode' probably appears somewhere in your email server's config. What email server software are you using (postfix, courier, exim, sendmail, etc)?

Yes, my linode hostname is: beastmode

I am using Sendmail, the php mail function.

Your configuration is using 'www-data' (your apache user name) @ 'beastmode' (your hostname) as the bounce address.

When using the PHP mail() function you should add the envelope sender as the last parameter (don't forget the -f flag): mail('nobody@example.com', 'the subject', 'the message', $header, '-f info@appstoreranktracker.com');

That worked to solve the strange bounce address, although I am still getting flagged for spam because of a missing mx record:

http://www.mail-tester.com/web-A1EU26

We didn't find a mail server (A Record) behind your hostname beastmode.

We check if there is a mail server (A Record) behind your hostname beastmode.

You may want to publish a DNS record (A type) for the hostname beastmode or use a different hostname in your mail software.

How do I add that mx record? I know how to do it through linode, but what exactly am I suppose to add?

You have two choices:

  • add an a record for beastmode.appstoreranktracker.com

  • research how to change your email config

Verify what email software you are using on your Linode (just because you're using mail() doesn't mean you're using sendmail). What do you get when you run the following command: netstat -tulpn | grep ":25"

tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 13421/sendmail: MTA

Looks like sendmail.

Should I change the config, if so what should I change? I just added an a record, now my a records are the following:

beastmode 173.255.253.72 Default

mail 173.255.253.72 Default

www 173.255.253.72 Default

Is that right?

I would research changing sendmail hostname

What should I change it to? my domain name?

Got it, this is what I need to add to my sendmail config

define(confDOMAIN_NAME',mail.yourdomain.com')dnl

Well, it worked, but my email still goes to spam, even though I have a 9/10 rating with mail-checker.com

http://www.mail-tester.com/web-Tw0wT2

I have everything working except DKIM but I am almost positive that is not required to reach inbox for google.

I have not been able to get a linode to reach google inbox, what am I doing wrong? Have you been able to get sendmail to reach inbox using sendmail?

$to = "dcman99@gmail.com";

$subject = "How are you?";

$message = "Did you get this email? This is a test from the new server setup.";

$header = 'From: info@appstoreranktracker.com' . "\r\n" .

'Reply-To: info@appstoreranktracker.com' . "\r\n" .

'Return-Path: info@appstoreranktracker.com' . "\r\n" .

'X-Mailer: PHP/' . phpversion();

$retval = mail ($to,$subject,$message,$header, '-f info@appstoreranktracker.com');

if( $retval == true )

{

echo "Message sent successfully…";

}

else

{

echo "Message could not be sent…";

}

?>

Ahh it may be Reverse DNS, I just enabled it but it says it will take 24 hours to take effect.

Reverse DNS lookup or reverse DNS resolution (rDNS) is the determination of a domain name that is associated with a given IP address.

Some companies such as AOL will reject any message sent from a server without rDNS, so you must ensure that you have one.

You cannot associate more than one domain name with a single IP address.

Your IP address 173.255.253.72 is associated with the domain li263-72.members.linode.com.

Nevertheless your message appears to be sent from mail.appstoreranktracker.com.

You may want to change your pointer (PTR type) DNS record and the host name of your server to the same value.

Here are the tested values for this check:

IP: 173.255.253.72

HELO: mail.appstoreranktracker.com

rDNS: li263-72.members.linode.com

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct