Solved

Postfix -- Disable Local Delivery

Posted on 2008-10-14
2
1,469 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
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.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
In this video we show how to create a mailbox database 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 Servers >> Data…

733 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