Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've now spent 2 hours trying to figure out this issue and I am about to give up and go to bed. I've been having issues with Gmail rejecting emails from my VPS server because of false spam alerts (probably caused by lfd sending too many emails).

So I changed my Exim config to send emails from a different IP (my VPS comes with 3) and that fixed the issue. I also enabled DKIM and SPF on my domains for added measure. But now, all my emails appear as ("From: Sender Name via") where is my VPS hostname. I previously had the same issue in Outlook and turning off "Set SMTP Sender: headers" solved that problem. But I believe adding the DKIM and SPF now makes Gmail add "via" to my messages. How do I fix this?

This is a typical header for a message (as it appears at gmail):

Received: by with SMTP id f3csp248622oem;
        Thu, 29 Mar 2012 21:23:18 -0700 (PDT)
Received: by with SMTP id gw8mr452788igb.10.1333081398523;
        Thu, 29 Mar 2012 21:23:18 -0700 (PDT)
Return-Path: <>
Received: from ([X.X.X.X])
        by with ESMTPS id y1si810998igb.3.2012.
        (version=TLSv1/SSLv3 cipher=OTHER);
        Thu, 29 Mar 2012 21:23:18 -0700 (PDT)
Received-SPF: pass ( domain of designates X.X.X.X as permitted sender) client-ip=X.X.X.X;
Authentication-Results:; spf=pass ( domain of designates X.X.X.X as permitted sender); dkim=pass
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;; s=default;
    h=Date:Message-Id:From:Content-type:MIME-Version:Subject:To; bh=wF8bBRgh01EYg4t5DAeVPv1Ps906UVIeRnQCb/HvSYw=;
Received:       (Exim 4.77)
       id 1SDTVE-0005HA-9Y   
    for; Fri, 30 Mar 2012 00:31:56 -0400
Subject: Password Reset Request
MIME-Version: 1.0
Content-type: text/html; charset=iso-8859-1
From: Sender Name <>
Message-Id: <>
Date: Fri, 30 Mar 2012 00:31:56 -0400
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname -
X-AntiAbuse: Original Domain -
X-AntiAbuse: Originator/Caller UID/GID - [507 504] / [47 12]
X-AntiAbuse: Sender Address Domain -
share|improve this question

I was able to find the answer here:

Basically, you need add a 5th header to your PHP mail() call with the following: "-f[from_email_address]"

And also add a new variable to your exim configuration: trusted_users = [colon separated list of user IDs that can modify send from addresses]

Doing those two worked. :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.