Additional IP adress vs SPF

inomi13

Verified User
Joined
Jan 7, 2022
Messages
155
I have one IP address which has status server and another IP address which is assigned to resellers accounts. Domain in reseller accounts has all records A assign to shared IP adress and it's correct but I can't understand why record TXT includes IP adress of server.

I have made test and I have configured e-mail box via imap and I have set connections hosts as mail.examle.com but message headers has showed information that e-mail come from IP server not IP with assign to reseller acount, why?

When resellers acounts will spam, another mail servers will block my IP adress of server but not IP reseller adress.
 
that e-mail come from IP server not IP with assign to reseller acount, why?
Because that is the default. DA always uses the server ip to send mail.

If you want seperate things, you have to configure things.
Check this doc, this will help you.

And maybe check this post to for additional commands if things still not work. Check post #6 and #8.
 
thanks for your eplanation but i have one more question. When I set value add_domain_to_domainips=1 and rest parameters can I be able to fast back to last state. I ask because I work on production server and all services ahould work all time. If my IP of server has record PTR which is assined to hostname server so what name should has additional IP in record PTR in my provider?
 
so what name should has additional IP in record PTR in my provider?
Just telnet to that ip via port 25 and see how the mailserver answers. Most likely it will be mail.domain.com and in that case, set the PTR for that ip to mail.domain.com.
 
  1. Tell m, maybe my thinking wrong. My provider has set record PTR for IP server to Hostname and global it is working. Additional IP addres which I shared beetwen resellers, my provider has to assign record PTR? Provider can't be able to assign that IP record, PTR with name mail.example.com because this IP will use many domains
  2. I assigned additional IP 1.2.3.4 do user account. Domain example.com has record TXT with SPF which include ip server, is it correct?

    1730385254046.png
 
PTR records can be any sub/domain.
Just ensure when query record from IP to PTR or PTR to IP must matching each other.

Example:
PTR "1.2.3.4" must return "sub.doamin"
"sub.domain" must pointer to "1.2.3.4
 
Domain example.com has record TXT with SPF which include ip server, is it correct?
Yes I think so, because most likely non-smtp (so php scripts) will still be sending via the hostname, unless you disable that.
In that case A MX should be enough, but I always enter the used ip (so in this case domain ip) in the SPF record. Probably not needed but I always to that.
 
@Richard G Below I describe what I did and ewerything is working but I don't know thta file in /etc/virtual/helo_data is empty.
da config-set add_domain_to_domainips 1
systemctl restart directadmin
echo "action=rewrite&value=domainips" >> /usr/local/directadmin/data/task.queue
echo "action=rewrite&value=domainips&domain=domain.com" >> /usr/local/directadmin/data/task.queue
@Ohm J So if PTR records can be any sub/domain. Can assign additional IP to the same name whta has IP server I mean Hostname?
 
Last edited:
Yes, one subdomain can have multiple IP, but I'm not recommend to do this.
Just separate it as ... "server01, server02, server03 .... " something like this.
 
Well... I would restart Directadmin and then issue this command again:
echo "action=rewrite&value=helo_data" >> /usr/local/directadmin/data/task.queue
it can take one or two minutes until the task.queue is finished running and then the ip's should be in that file.

If not, try this:
echo "action=rewrite&value=domainips&domain=domain.com" >> /usr/local/directadmin/data/task.queue

If they are still not in there, then follow the doc on how to put them in manually.
 
Back
Top