Solved

Postfix -- Disable Local Delivery

Posted on 2008-10-14
2
1,459 Views
Last Modified: 2013-11-30
Hi Everyone,

We currently have a dedicated web server running Postfix 2.3.3.  The only thing we need Postfix to do on this server is send emails for PHP.  This webserver also hosts our website (ourdomain.com).

The problem is that we have our email accounts hosted with another company (not on this server that runs Postfix) so every time that PHP tries to send an email to an @ourdomain.com address, Postfix attempts to deliver it locally, which results in a failed delivery (because our email is hosted with another company).

Is there a way to have PostFix deliver @ourdomain.com email to the ip address listed on our domain's MX Record (which points to the company that hosts our email), instead of trying to deliver it locally?

Basically we need for Postfix to send all of its email out onto the Internet so that it may find its way to where it needs to go (the company that hosts our email accounts and wherever else).

Thank you in advance.

Karl
0
Comment
Question by:karlcox
  • 2
2 Comments
 
LVL 19

Accepted Solution

by:
bevhost earned 500 total points
ID: 22716581
Make sure that you change postfix so that it doesn't think it is the host for that domain.

1) myhostname setting
myhostname=webserver.ourdomain.com

2) mydestination setting should not contain ourdomain.com

3) virtual_mailbox_domains setting does not contain ourdomain.com

The myhostname setting is normal default to the hostname of the computer.
You could also just change the hostname of the server if that is your preferred solution.

0
 
LVL 19

Assisted Solution

by:bevhost
bevhost earned 500 total points
ID: 22716624
Also check that the MX records resolve correctly on the web server and that it isn't running a master DNS zone.

dig -tmx ourdomain.com @www.ourdomain.com

You can override the MX record by placing a routing entry in the transport file:
eg:

in /etc/postfix/transport
ourdomain.com       smtp:[10.98.76.54]

in /etc/postfix/main.cf
transport_maps = hash:/etc/postfix/transport

But you must make sure that the service is not trying to deliver locally first.

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nearly six years ago I was hired by a company to be their senior server engineer. One of my first projects was to implement Exchange Server 2007 on a Windows Server 2008 Single Copy Cluster for high availability. That was the easy part; read on to l…
Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question