I recently installed a server with webmin and virtualmin. Both applications work very well.
But I have a problem with sending mail. When sending mails to an address under a domain created as vhost, this mail stays in the inbox of the server itself and does not go to the internet.
For example I have a vhost called test.com that has dns resolution and mail service in external provider. If I send an email from the web test.com with php (apache in vhost) to email@example.com the mail stays in the postfix. If I send to firstname.lastname@example.org or email@example.com the mail is sent well.
I hope I have explained correctly and you can help me.
I’m guessing you named your server test.com.
You could try this:
In /etc/postfix/main.cf, add a line like
transport_maps = hash:/etc/postfix/transport.
Then, in /etc/postfix/transport, add a line like
Afterward, you need to run the command
and then restart postfix.
Make sure I didn’t clobber your delivery to other domains in the process as I’m going from memory.
Thank you very much for the help.
Before changing configurations I will mount another server for testing.
As soon as I have it ready, I’ll let you know if your proposal works.
If it helps, I have found a post where I see a problem similar to mine.
I’ve tried your proposal and I still can not get the emails out. It’s clear that I’m missing some Postfix configuration.