Spam classification and 127.0.0.1 in email headers

1.8k views Asked by At

Is it a problem if 127.0.0.1 appears in email headers?

Example: Received: from baobabsmail.baobab.fi ([127.0.0.1])

I ask because emails sent from my server to @outlook.com addresses end up in the spam folder and this is the last thing I can think of. I have properly configured HELO, DKIM, Reverse DNS, SenderID, SPF and DMARC. I don't send out mass emails. My IP is from AWS, but it isn't on any publicly available blacklists. I have verified that everything is set up correctly using DKIMvalidator, MxToolBox and mail-tester.

Edit: for what it's worth, I finally got rid of the 127.0.0.1's in my headers and it did not resolve the issue for me.

2

There are 2 answers

0
rivimey On

Unfortunately, it depends...

Mail systems vary in how they are configured, and it is perfectly legitimate for an MUA (e.g. Thunderbird) to send outgoing mail to an MTA / mail server (e.g. exim) running on the same machine using the localhost address. Unusual, these days, but not "bad by definition".

When you say 'end up in the spam folder', what is it that puts it there: are you using a local mail server? if so is it that server that junks the mail (on send) or outlook.com itself (on receipt). Either way, what error messages or other failure information have you found?

Some random thoughts:

  • DKIM is a pain to set up correctly. Try disabling it entirely and see if that changes things in interesting ways.

  • Ditto DMARC.

  • Have you got SPF set up separately? If so, disable SPF and retry.

  • Is IPv6 involved in the mix at all? Various things are subtly different if so.

  • If outlook.com were to do sender verify callbacks (i.e. on receipt, check that mail from address was an acceptable recipient to your server) would it pass?

  • Is your email system sending RFC-conformant mail: that is, does it have a From: address, To: or Sender: address, Message-ID:, Date: headers and, if using MIME, Content-* headers (and probably a couple I forget!).

If changing DKIM / DMARC / SPF changes things (and remembering DNS timeouts, leave it a while between attempts), re-add SPF first - it is the simplest to get right.

0
EricN On

127.0.0.1 can be flagged by Spam filters because it fails to provide an identity trace of the sender. Most common e-mail systems will show the IP address or the host name. The next item will be the recipient e-mail server.

For example: Received: from [127.0.0.1] (81.27.148.196) by TAE1.agent.com.pk

What is funny about this one is that the top-level domain says it is received initially by a domain in Pakistan, but the IP address is registered to an entity in St. Petersburg, Russia.