I have 2 ips on my server, I’m trying to set up 2 emails, one email sends from one ip, the other sends from the second ip. The first email is fine but I’m getting an error in mail-tester.com for the second email (ips are obviously dummy examples):
Your IP address 1.1.1.2 is associated with the domain
port25.domain.com. Nevertheless your message appears to be sent from
port24.domain.com. You may want to change your pointer (PTR type) DNS
record and the host name of your server to the same value. Here are
the tested values for this check: IP: 1.1.1.2 HELO: port24.domain.com
rDNS: port25.domain.com
My setup on my vps - 2 ip’s each has their own hostname rdns
port24.domain.com → 1.1.1.1 (ip1)
port25.domain.com → 1.1.1.2 (ip2)
I’ve set up 2 domains in vesta cp, domain1.com uses ip1, domain2.com uses ip2. DNS is correct.
I’ve created emails in roundcube. I’ve added the following to my exim conf:
interface =
${lookup{$sender_address_domain}lsearch{/etc/exim/mailips}{$value}{}}
helo_data = ${if exists
{/etc/exim/mailhelo}{${lookup{$sender_address_domain}lsearch{/etc/exim/mailhelo}{$value}{$primary_hostname}}}{$primary_hostname}}
(here is a link to a google doc with my exim config)
I’ve added the following to my mailips and mailhelo file:
mailips: domain1.com:1.1.1.1 domain2.com:1.1.1.2
mailhelo: domain1.com: port24.domain.com domain2.com:
port25.domain.com
*: port24.domain.com
The previous error in mail-tester.com shows emails from domain2.com on 1.1.1.2 are coming from port24 when they should be coming from port25.
# telnet 1.1.1.2 587
Trying 1.1.1.2... Connected to 1.1.1.2. Escape character is '^]'. 220 port24.domain.com ESMTP Exim 4.96 Sat, 08 Jul 2023 10:57:23 -1000
How do I solve this?