Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Postfix -- Disable Local Delivery

Posted on 2008-10-14
2
Medium Priority
?
1,500 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 2000 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 2000 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Utilizing an array to gracefully append to a list of EmailAddresses
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
In this video we show how to create a Shared Mailbox 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 >> Sha…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Suggested Courses

596 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