Solved

Postfix -- Disable Local Delivery

Posted on 2008-10-14
2
1,475 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

The new Gmail Phishing Scam going around is surprising even the savviest of users with its sophisticated techniques.
This article outlines some of the reasons why an email message gets flagged as spam on a recipient's end.
In this video we show how to create a Contact 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 Recipients >> Contact ta…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

724 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