0

I am having trouble with failing to deliver mails with my setup.

Server 1 - example.com + Direct Admin IP: 111.111.111.111, default domain (provided by hosting company: vps11111.company.com

Server 2 - dev.example.com, IP: 222.222.222.222, default domain (provided by hosting company: vps222222.company2.com

A Jira instance runs on dev.example.com, I am sending an invitation email being logged in as [email protected] to [email protected]

SMTP error from remote mail server after RCPT TO:<[email protected]>:
host mx.poczta.onet.pl [213.180.147.146]: 554 5.7.1 <[email protected]>:
Recipient address rejected: Spf check: fail

Test

Return-path: <[email protected]> Received: from
dfault.return.serv2.dns ([222.222.222.222] helo=vps222222.company.com)
   by vps11111.company.com with esmtpa (Exim 4.82)    (envelope-from
   <[email protected]>)  id 1aILXy-00044d-K9     for
   [email protected]; Sun, 10 Jan 2016 20:21:02 +0100

I have set the TXT record on example.com Direct Admin of dev.example.com to: "v=spf1 a mx ip4:222.222.222.222 ~all"

A records for mail, smtp and pop are left to 111.111.111.111 (jira setup to use [email protected] address).

A records for dev.example.com., ftp and www are set to 222.222.222.222.

I am confused about all this setup (my first time) and would appreciate any help.

3
  • Have you tried ending it from the domain name you own? You don't own gmail.com :) Jan 10, 2016 at 23:48
  • @VirgilShelton for some reasons jira uses the admin email address as reply-to field. I'll check with email in my domain, but this does not fix the problem. Jan 11, 2016 at 10:15
  • Reply-To should not matter. And From can only matter in case there is no Sender header. Most servers, however, only check Envelope-From. So If you set Envelope-From (and Sender for paranoid email servers), you can use From and Reply-To as you wish.
    – mihi
    Jan 11, 2016 at 17:28

1 Answer 1

1

The problem is that the email is sent with the envelope sender set to your gmail address. That means that the SPF record that is being checked is the record for gmail.com, not the one for your own domain.

You need to fix your setup so that you either use your own address as sender, or so that you send your emails through google's servers by logging in with your google account.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .