Page 1 of 2
DKIM for secondary ip not working
Posted: Tue Feb 02, 2016 8:45 am
by pandabb
Hello, i have 2 ip address and my mailserver is working fine on my default ip. I use mail-tester to get my mailscore, using the default ip i get a perfect 10/10 score.
My problem is.
When i add a new domain and i point it to my secondary ip address, i get a error on dkim it says.
Your DKIM signature is not valid -3
[SPF] myseconddomain.tld does not allow your server (192.xx.xx.xxx my main ip) to use
[email protected]
Can you please enlighthen me, also which template should i use? default or child ? If i just want a one primary nameserver to be used to all of my domains, i guess its child, correct? I also set the nameservers on the dns ie. ns1.mydomain.com ns2.mydomain.com
Thanks!
Re: DKIM for secondary ip not working
Posted: Tue Feb 02, 2016 8:57 am
by tjebbeke
try to add your IP to your SPF records
Re: DKIM for secondary ip not working
Posted: Tue Feb 02, 2016 9:19 am
by pandabb
Thanks for the reply, it's already configured, also not just spf, the dkim shows it's invalid. But if i change the IP of the domain and point it to my main eg 199.121.255.1 it works. When i point it to 199.121.255.2 it doesn't work.
Re: DKIM for secondary ip not working
Posted: Tue Feb 02, 2016 10:13 am
by tjebbeke
I don't know much about DKIM. I don't see any relation between the IP and DKIM in the
code. Maybe you can try to regenerate the DKIM.
Re: DKIM for secondary ip not working
Posted: Tue Feb 02, 2016 11:36 am
by skurudo
You can regenarate DKIM via checkbox (remove support / add support)
Code: Select all
v-add-mail-domain-dkim
v-delete-mail-domain-dkim
or you can use commands
and for check:
Code: Select all
v-list-mail-domain-dkim
v-list-mail-domain-dkim-dns
Re: DKIM for secondary ip not working
Posted: Tue Feb 02, 2016 1:28 pm
by pandabb
Thanks i think i found my problem.
When i change my mx ip and spf ip and point it to my main ip, it works 100% gives me a perfect score. I believe exim is configured to use my main ip to send e-mail, correct?
I thought when you add a different ip, it will use that ip to send message.
Re: DKIM for secondary ip not working
Posted: Tue Feb 02, 2016 2:27 pm
by skurudo
pandabb wrote:I believe exim is configured to use my main ip to send e-mail, correct?
...
I thought when you add a different ip, it will use that ip to send message.
hostlist relay_from_hosts changed after you add IP?
Re: DKIM for secondary ip not working
Posted: Tue Feb 02, 2016 2:40 pm
by pandabb
How do i check the host-relay?
Centos7
this is my interface ifcfg-0 /etc/sysconfig/network-scripts
Code: Select all
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=eth0
UUID=02a3ff16-b9cb-47b3-8ef5-cedbdbbe2edc
ONBOOT=yes
PEERDNS=yes
PEERROUTES=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPADDR1=19x.x9x.55.132
IPADDR2=192.x9x.55.133
NOTE: i add the ip below manually to my ifcfg-0.
By default no IP is listed its like set to automatic.
IPADDR1=19x.x9x.55.132
IPADDR2=192.x9x.55.133
When i delete those ip and then add IP in VESTA PANEL, httpd and nginx wont boot after reset. Only after i delete the ip added in vesta cp it will start.
vesta will create this and my nginx and httpd will not boot anymore.
GNU nano 2.3.1 File: ifcfg-ens3:0
# Added by vesta
DEVICE=ens3:0
BOOTPROTO=static
ONBOOT=yes
IPADDR=19x.x9x.55.133
NETMASK=255.255.255.0
Re: DKIM for secondary ip not working
Posted: Tue Feb 02, 2016 2:47 pm
by skurudo
pandabb wrote:How do i check the host-relay?
Look into exim configuration file.
Re: DKIM for secondary ip not working
Posted: Tue Feb 02, 2016 2:50 pm
by pandabb
This one?
Code: Select all
# Exim configuration file for Vesta Control Panel #
# #
######################################################################
SPAMASSASSIN = yes
SPAM_SCORE = 50
CLAMD = yes
domainlist local_domains = dsearch;/etc/exim/domains/
domainlist relay_to_domains = dsearch;/etc/exim/domains/
hostlist relay_from_hosts = 127.0.0.1