get local sendmail to use MX records

Greg Barniskis nalists at
Wed Feb 23 18:11:55 GMT 2005

Gerard Meijer wrote:
> No, that is not the solution. It could be, but it's not what I want.
> An example:
> domain:
> is hosted on server B. The MX record for says that 
> server A handles the mail of So anyname at should be 
> handled by server A.
> This works, but now on server B there runs a script that sends an e-mail 
> to gerard at . What SHOULD happen is that sendmail on server B 
> looks up the MX record for, sees that server A handles the 
> mail for and sends the mail to server A. What happens is that 
> sendmail recognizes the domain as hosted on that machine and uses 
> localhost to deliver the mail. It looks for user gerard (in this 
> example), which doesn't exist.
> I agree with you, a solution would be to set in the alias file of server 
> B something like gerard: root at . If this was about just one 
> e-mailaddress, it wouldn't be a problem, but I'm actually talking about 
> a little more then one address.
> So that's not a good solution for me.

If I followed you correctly, "server B" *formerly* was the 
appropriate end point for mail for "". If that is true, 
then on server B, the sendmail config probably indicates that mail 
destined for is delivered locally. Remove that indicator 
and it should revert to MX lookup behavior to find the appropriate 
handler for the domain. There may be multiple places in the sendmail 
config where is named for different purposes. Hunt them 
all down and kill them.

Greg Barniskis, Computer Systems Integrator
South Central Library System (SCLS)
Library Interchange Network (LINK)
<gregb at>, (608) 266-6348

A: Because it reverses the natural flow of a dialog.
Q: Why is top posting undesirable when replying?

More information about the freebsd-questions mailing list