Postfix problem with local mail delivery

4 posts / 0 new
Last post
#1 Thu, 07/13/2017 - 11:19
jorgem705

Postfix problem with local mail delivery

Hi all,

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 user@test.com the mail stays in the postfix. If I send to user@gmail.com or example@otherdomain.com the mail is sent well.

I hope I have explained correctly and you can help me.

Thank you.

Fri, 07/14/2017 - 02:46
noisemarine

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

test.com   smtp:mail.test.com

Afterward, you need to run the command

postmap /etc/postfix/transport

and then restart postfix.

Make sure I didn't clobber your delivery to other domains in the process as I'm going from memory.

Tue, 07/18/2017 - 04:22 (Reply to #2)
jorgem705

Hi noisemarine,

I've tried your proposal and I still can not get the emails out. It's clear that I'm missing some Postfix configuration.

Regards

Fri, 07/14/2017 - 06:48
jorgem705

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. https://www.virtualmin.com/node/42070

Topic locked