How do I specify the hostname SPF shows to users?

STW asked:

I have a production Magento site which is on a dedicated host. The machine has it’s “hosting” name,, as well as its public name, DNS has been configured for SPF email validation for emails originating from our server as well as from 3rd party mailing services. Here’s the gist of the DNS record ( being the dedicated magento server):

v spf1 mx ip4: ~all

With the current configuration SPF is working, but emails appear in my GMain inbox with the “from” portion showing

STW [email protected] via

I’d like to clean this up so that SPF displays our public name:

STW [email protected] via

Where do I configure this? Is it within Magento? Is it an email setting for the hosting user? Is it a DNS change?

My answer:

Normally I’d just point you at the docs, but they turned out to be rather difficult to locate, so I’ll point you at the docs instead:

Google says you need to set up both SPF and DKIM records to avoid the “via” whatever domain being displayed.

I’m a sender and I don’t want my recipients to see the “via” link. What can I do?

Gmail checks whether emails are correctly authenticated. If your messages are sent by a bulk mailing vendor or by third-party affiliates, please publish an SPF record that includes the IPs of the vendor or affiliates which send your messages and sign your messages with a DKIM signature that is associated with your domain.

You should also get your reverse DNS fixed, and review the rest of Google’s Bulk Senders Guidelines.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.