Report this

What is the reason for this report?

How to remove "via" from email From header?

Posted on May 1, 2017

My droplet (Ubuntu 14.04) is hosting multiple websites using Apache virtual hosts. I have send-only Exim4 installed (for website contact forms, admin emails etc.) and I’ve set up SPF and DKIM records. Emails from all the websites are verified and do not end up with any flags or go into spam. Awesome!

However, emails from all websites except my main website (the one my droplet is named after) arrive with “From: Name <website@thisdomain.com> via hostname.maindomain.com”.

How can I get rid of “via hostname.maindomain.com”?

My /etc/exim4/conf.d/transport/30_exim4-config_remote_smtp contains the following:

DKIM_DOMAIN = ${lc:${domain:$h_from:}}
DKIM_PRIVATE_KEY = /etc/exim4/dkim/{DKIM_DOMAIN}.pem
DKIM_SELECTOR = mail
DKIM_CANON = relaxed

In other words, all my websites are using the same DKIM keys. But that shouldn’t make a difference, right?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.