Solved

Postfix -- Disable Local Delivery

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

Promote certifications in your email signature

Has your company recently won an award or achieved a certification? They'll no doubt want to show it off. Email signature images used to promote certifications & awards can instantly establish credibility with a recipient and provide you with numerous benefits.

Join & Write a Comment

There was an incident about the POP3 issue for the double read receipts and delivery receipts in Exchange 2013.  There was huge research been done and found solution for the duplicate mails. Especially when the user gets  duplicate mails.
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…
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…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now