Mail Service ERR: Cannot connect to real-server

Good mornig.

Today i will try mail service of nethserver.
My Mail server is externally hosted
And I want to stay that way.

I have created a new domain, internal only for test test-mail.com
in primary domain myrealdomain.it ,Already in the list just install the mail service, i check box “Relay to another server” with ip of external mail server.
But in /var/log/messages i found

POP3 Connection from 192.168.1.28:51349
Jun 12 12:12:26 proxy p3scan[24542]: Real-server address is 192.168.0.254:110
Jun 12 12:12:26 proxy p3scan[24542]: ERR: Cannot connect to real-server: 192.168.0.254
Jun 12 12:12:26 proxy p3scan[24542]: Session done (Critical abort). Mails: 0 Bytes: 0

Instead of connecting to the external peer set in the relay, they connect to the local and obviously fail authentication.

Did I understand the meaning of that relay?
Or whether the name of the external and the internal domain coincide, does not it know where to place the mail?

on the server

host pop3.XXXXX.it
pop3.XXXXX.it has address EX.TE.RN.AL
pop3.XXXXX.it has address 192.168.1.254
pop3.XXXXX.it has address 192.168.0.254

i can remove 192.168.. entry? i have try to remove in /etc/hosts file but dont update dns cache

EDIT: with systemctl restart dnsmasq work and host is clean

 host pop3.XXXXX.it
    pop3.XXXXX.it has address EX.TE.RN.AL

The culprit is this template fragment for /etc/hosts

/etc/e-smith/templates/etc/hosts/01mx_record

Run the following commands

config setprop postfix MxRecordStatus disabled
signal-event nethserver-mail-server-update
1 Like

perfect!
it works!