I Resove the problem and is not necesary local host name for ip.
I want in one server:
1. 2 domains (mail1.mydomain.com, mail2.mydomain.com)
2. 3 ips for domain: a) priority mails b) medium mails c) other mails
3. 100% in test no spam:
https://www.mail-tester.com/
I thought it was absolutely necessary to have 6 local host name, one per ip but but none of that.
I explain my configuration that has worked perfectly.
DNS:
only for Reverse:
mailcommon.mydomain.com A x.x.x.1
mailcommon.mydomain.com A x.x.x.2
mailcommon.mydomain.com A x.x.x.3
mailcommon.mydomain.com A x.x.x.4
mailcommon.mydomain.com A x.x.x.5
mailcommon.mydomain.com A x.x.x.6
note: no mail1.mydomain.com and no mail2.mydomain.com new register type A for each ip for mailcommon.mydomain.com
and config reverse in mi isp for each ip with value: mailcommon.mydomain.com
and config htmlmailserver local host name with value: mailcommon.mydomain.com
DNS: domain 1:
A:
mail1a.mydomain.com A x.x.x.1
mail1b.mydomain.com A x.x.x.2
mail1c.mydomain.com A x.x.x.3
MX:
mail1.mydomain.com MX10 mail1a.mydomain.com
mail1.mydomain.com MX20 mail1b.mydomain.com
mail1.mydomain.com MX30 mail1c.mydomain.com
DNS: domain 2:
A:
mail2a.mydomain.com A x.x.x.4
mail2b.mydomain.com A x.x.x.5
mail2c.mydomain.com A x.x.x.6
MX:
mail2.mydomain.com MX10 mail2a.mydomain.com
mail2.mydomain.com MX20 mail2b.mydomain.com
mail2.mydomain.com MX30 mail2c.mydomain.com
For Change Ip dinamic I added a header from my application to know what ip to use
And with Global Rule:
1:
Criteria:
a) Custom header field x-miapppriority = 1
AND
b) Predefined field From Contains @mail1.mydomain.com
Actions: Bind to local IP address: x.x.x.1
2:
Criteria:
a) Custom header field x-miapppriority = 2
AND
b) Predefined field From Contains @mail1.mydomain.com
Actions: Bind to local IP address: x.x.x.2
3:
Criteria:
a) Custom header field x-miapppriority = 3
AND
b) Predefined field From Contains @mail1.mydomain.com
Actions: Bind to local IP address: x.x.x.3
4:
Criteria:
a) Custom header field x-miapppriority = 1
AND
b) Predefined field From Contains @mail2.mydomain.com
Actions: Bind to local IP address: x.x.x.4
5:
Criteria:
a) Custom header field x-miapppriority = 2
AND
b) Predefined field From Contains @mail2.mydomain.com
Actions: Bind to local IP address: x.x.x.5
6:
Criteria:
a) Custom header field x-miapppriority = 3
AND
b) Predefined field From Contains @mail2.mydomain.com
Actions: Bind to local IP address: x.x.x.6
This has solved all my problems. I hope I can help you