Email signing between two domains on same server

Problem Description

A colleague and myself both send and receive email using Gmail’s POP3/IMAP send/receive function via my Sympl server. We are using different domains, but both domains are hosted on the same sympl server.
I’ve noticed that when I send him an email Exim does not sign the email properly. Therefore when it is collected by Gmail via POP3 it fails SPF (gmail thinks it was sent via the google server) and DKIM (no signature is added).

I have added “” to my domain’s SPF record to avoid the email being considered spam straight away, however I’d quite like to remove this as it seems spammers also send email using google’s servers.

Is there a way to force Exim to add the DKIM signature and for the SPF check to assume the server’s IP address rather than google’s IP address?

When I send emails to other domains or directly to gmail, then SPF and DKIM works perfectly. DMARC reports are all looking good (I recommend GitHub - liuch/dmarc-srg: A php parser, viewer and summary report generator for incoming DMARC reports. as a nice simple way to parse the DMARC reports).

Any Error Messages

DMARC reports suggest DKIM and SPF checks fail.

Headers according to google of one example email:

spf=pass ( domain of designates as permitted sender)
Received-SPF: pass ( domain of designates as permitted sender) client-ip=;
Received: by [my server’s IPv6 address] with POP3 id c17mf13043323lfv.5;
Mon, 07 Feb 2022 11:47:28 -0800 (PST)
X-Gmail-Fetch-Info: 6 995
Received: from ([]) by with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from id 1nH9yW-0004hV-Iq for; Mon, 07 Feb 2022 19:47:00 +0000
Received: by with SMTP id o17so21271673ljp.1
for; Mon, 07 Feb 2022 11:47:00 -0800 (PST)
X-Gm-Message-State: AOAM532GI7/cIU/mATn+tB47lU4fpt3A+BHrENKNun1Wn8cxblAI2lJc 0T9TQQTHf6pNBPGmsZYEVlcrie16WxJIr8TrgGI=
X-Received: by 2002:a2e:2c12:: with SMTP id s18mr618646ljs.391.1644263219898; Mon, 07 Feb 2022 11:46:59 -0800 (PST)
MIME-Version: 1.0
From: “Trevor”
Date: Mon, 7 Feb 2022 19:46:23 +0000
Subject: XXXXXX
To: Gary


  • Sympl Version 10.0:
  • Sympl Testing Version? No
  • Debian Version Buster:
  • Hardware Type? Virtual
  • Hosted On? Brightbox

That’s sort of expected, at least at the moment, as you don’t typically need to sign mail unless it’s going out somewhere, but the above is a very good example of why it’s useful.

I’ll have a look into what would be required to have Exim treat all mail as external, although it may not be that trivial to do it safely.

1 Like

Thank you!

although it may not be that trivial to do it safely

Yes - I did a bit of googling and it sounded a bit scary so I decided not to fiddle :slight_smile:

I bumped into something similar but different to this today - only the one domain involved, Sympl used for outgoing email and DKIM signing (so /srv/<domain>/config/dkim and dkim.key exist), but the email isn’t stored on the Sympl server (though it probably should be, that’s by the by). For almost all emails, this works lovely, but if an email is sent both from and to emails @<domain>, it isn’t DKIM signed even though it is being sent out (as it doesn’t match dnslookup_with_dkim, but matches vhost_no_local_mail). I think in this case I can create a copy of vhost_no_local_mail as vhost_no_local_mail_with_dkim with the extra check/different transport.