2

I'm running a MediaWiki install under Ubuntu Server 10.10. I have configured it to use the standard php mail() function with my local mail delivery agent (postfix). The mail gets sent from the MediaWiki site, but the only problem is that whenever the address it's meant to be sent to is on the same domain as the server, those mails get delivered to local inboxes on the Ubuntu server.

So basically, the server is linuxbox.companydomain.com, and our e-mails are [email protected]. Any mail sent to an address like that simply ends up in the user's local inbox, e.g. a message to [email protected] ends up in /home/anders/mbox, while a message to [email protected] would end up in the correct gmail inbox.

How do I prevent this from happening?

2 Answers 2

2

Mails to [email protected] end up in a local inbox because Postfix is configured to use local(8) delivery for the companydomain.com domain. Most likely this happens because companydomain.com is listed in the mydestination parameter, either explicitly or implicitly (because for example myhostname is companydomain.com and mydestination is at its default value which includes $myhostname).

So try setting mydestination=. If that doesn't help, edit your question and post output of the following commands to give more information on your setup:

  • postconf -n
  • postconf mydestination
  • postconf myhostname
1

What you need is probably what is called a "smarthost" setup. Basically, you set up Postfix to pass everything on to a different SMTP server.

This is controlled by the relayhost configuration parameter in Postfix's main.cf.

You may also need to adjust other settings, particularly mydestination, for this to work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .