I have 2 Ubuntu 16.04 virtual machines and I have installed Postfix on both of them.
How can I send a mail between them in localhost?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
I assume, this is sort of test environment, without a real DNS/MX/etc settings? I think you should take a look at https://linux.die.net/man/5/transport. These postfix settings allows you to force the recipient/destination host for some emails. Just setup the destination host for your needs.