Hi again.
I found out the solution for this issue.
So basically since they are in a private network (those two VM, have local ip) there is a conflict on port 25 when they try to send internally between server.
The solution:
Edit
/etc/hosts
and add the local IP and the domains from the other machine (the MX record for each)
Edit
/etc/postfix/transport
and there add info from others domain like
- DOMAIN.com smtp:192.168.0.XX:25
- .DOMAIN.com smtp:192.168.0.XX:25
Run the command
postmap /etc/postfix/transport
from terminal
What this solution will do is not seding the email via internet and relay the emails to the machine where is hosted, like an internal email. The details in transport file will filter emails based on domain. This way i was able to send emails both internal and to other domain outside the network.