Re: get local sendmail to use MX records
Since everybody was sure that the problem was with my fault and something had to be wrong with my files, I feel that I have to post the solution, that I was send to me to a member from the comp.mail.sendmail newsgroup. It's really very easy when you know it (as always). As I was sure about, it didn't have anything to do with my local-host-names file(s) or another place where I accidentilly had left the domain name in. The solution was to put the following line in sendmail.cf: O DontProbeInterfaces=True As I said, very easy, but not if you don't know it. I hope it will become of someone someday. Thanks a lot to everybody who replied to my thread! Gerard - Original Message - From: Gerard Meijer [EMAIL PROTECTED] To: Ted Mittelstaedt [EMAIL PROTECTED]; Greg Barniskis [EMAIL PROTECTED] Cc: freebsd-questions@freebsd.org Sent: Thursday, February 24, 2005 9:07 AM Subject: Re: get local sendmail to use MX records I'm 100% sure this is not the case and here is why. I figured something out. All my servers do the same thing. It has something to do with the reverse DNS pointers of some domains. For example. I have (another) server running with 20 domains under 4 ip addresses where I never ever touched sendmail or its configuration files. 4 of the domains have a reverse DNS pointer to one of the 4 ips. Sendmail handles 16 domains well (= looks up MX records and delegates the mail to the right server) and tries to handle the mail of 4 domains itself. Needles to say that those 4 domains are the ones that have reverse pointers to the 4 ips attached to that particular server. I tested this on 5 servers and its the same everywhere. I hope one of you knows what to do with this information. I spotted the problem now, but I don't know how to solve it. Clearly sendmail prefers a reverse pointer to a domain above looking up the MX records and using them, but how can I let it stop doing that? Thanks! - Original Message - From: Ted Mittelstaedt [EMAIL PROTECTED] To: Gerard Meijer [EMAIL PROTECTED]; Greg Barniskis [EMAIL PROTECTED] Cc: freebsd-questions@freebsd.org Sent: Thursday, February 24, 2005 8:49 AM Subject: RE: get local sendmail to use MX records -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Gerard Meijer Sent: Wednesday, February 23, 2005 2:08 PM To: Greg Barniskis Cc: freebsd-questions@freebsd.org Subject: Re: get local sendmail to use MX records I really don't understand it at all now. I emptied my virtusertable and local-host-names files. I really don't know why this happens. Did you look in your mailertable file? You have domain.com listed in one of your sendmail config files, that is the only explanation. Or you have it in /etc/hosts. or in /etc/rc.conf. it's somewhere. It is problems like this is why when your running commercial servers that you create build sheets for each server. That is, you record on a separate document EVERY configuration step of any significance that you or anyone else does. Sorry you had to find this out the hard way. You probably have domain.com secreted in some hack you forgot that you did. Maybe one of these days when you do a nuke and repave you will remember to start a build sheet. Ted ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: get local sendmail to use MX records
I'm 100% sure this is not the case and here is why. I figured something out. All my servers do the same thing. It has something to do with the reverse DNS pointers of some domains. For example. I have (another) server running with 20 domains under 4 ip addresses where I never ever touched sendmail or its configuration files. 4 of the domains have a reverse DNS pointer to one of the 4 ips. Sendmail handles 16 domains well (= looks up MX records and delegates the mail to the right server) and tries to handle the mail of 4 domains itself. Needles to say that those 4 domains are the ones that have reverse pointers to the 4 ips attached to that particular server. I tested this on 5 servers and its the same everywhere. I hope one of you knows what to do with this information. I spotted the problem now, but I don't know how to solve it. Clearly sendmail prefers a reverse pointer to a domain above looking up the MX records and using them, but how can I let it stop doing that? Thanks! - Original Message - From: Ted Mittelstaedt [EMAIL PROTECTED] To: Gerard Meijer [EMAIL PROTECTED]; Greg Barniskis [EMAIL PROTECTED] Cc: freebsd-questions@freebsd.org Sent: Thursday, February 24, 2005 8:49 AM Subject: RE: get local sendmail to use MX records -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Gerard Meijer Sent: Wednesday, February 23, 2005 2:08 PM To: Greg Barniskis Cc: freebsd-questions@freebsd.org Subject: Re: get local sendmail to use MX records I really don't understand it at all now. I emptied my virtusertable and local-host-names files. I really don't know why this happens. Did you look in your mailertable file? You have domain.com listed in one of your sendmail config files, that is the only explanation. Or you have it in /etc/hosts. or in /etc/rc.conf. it's somewhere. It is problems like this is why when your running commercial servers that you create build sheets for each server. That is, you record on a separate document EVERY configuration step of any significance that you or anyone else does. Sorry you had to find this out the hard way. You probably have domain.com secreted in some hack you forgot that you did. Maybe one of these days when you do a nuke and repave you will remember to start a build sheet. Ted ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
get local sendmail to use MX records
Hi, I have the following situation: I have moved my mail services from my dedicated server to another server. The MX records were updated at the DNS host to point to the other server. Email from the outside is being routed correctly to the new server, but now the local scripts on the dedicated server are still being routed to the local accounts and not actually sent to the other server. So sendmail on the first server tries to use localhost as a relay, instead of looking up the MX records for the domain. Anybody knows how to solve this? Thanks! Gerard ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: get local sendmail to use MX records
GM Hi, GM I have the following situation: GM I have moved my mail services from my dedicated server to another server. The MX records were updated at the DNS host to point to the other server. Email from the outside is being routed GM correctly to the new server, but now the local scripts on the dedicated server are still being routed to the local accounts and not actually sent to the other server. GM So sendmail on the first server tries to use localhost as a relay, instead of looking up the MX records for the domain. GM Anybody knows how to solve this? GM Thanks! GM Gerard GM ___ GM freebsd-questions@freebsd.org mailing list GM http://lists.freebsd.org/mailman/listinfo/freebsd-questions GM To unsubscribe, send any mail to [EMAIL PROTECTED] - Quick and dirty: /etc/mail/aliases putting in something like root: [EMAIL PROTECTED] should do the trick. Or am I missing something ? Hexren ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: get local sendmail to use MX records
No, that is not the solution. It could be, but it's not what I want. An example: domain: domain.com domain.com is hosted on server B. The MX record for domain.com says that server A handles the mail of domain.com. So [EMAIL PROTECTED] should be handled by server A. This works, but now on server B there runs a script that sends an e-mail to [EMAIL PROTECTED] . What SHOULD happen is that sendmail on server B looks up the MX record for domain.com, sees that server A handles the mail for domain.com 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: [EMAIL PROTECTED] . 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. - Original Message - From: Hexren [EMAIL PROTECTED] To: Gerard Meijer [EMAIL PROTECTED] Cc: freebsd-questions@freebsd.org Sent: Wednesday, February 23, 2005 6:30 PM Subject: Re: get local sendmail to use MX records GM Hi, GM I have the following situation: GM I have moved my mail services from my dedicated server to another server. The MX records were updated at the DNS host to point to the other server. Email from the outside is being routed GM correctly to the new server, but now the local scripts on the dedicated server are still being routed to the local accounts and not actually sent to the other server. GM So sendmail on the first server tries to use localhost as a relay, instead of looking up the MX records for the domain. GM Anybody knows how to solve this? GM Thanks! GM Gerard GM ___ GM freebsd-questions@freebsd.org mailing list GM http://lists.freebsd.org/mailman/listinfo/freebsd-questions GM To unsubscribe, send any mail to [EMAIL PROTECTED] - Quick and dirty: /etc/mail/aliases putting in something like root: [EMAIL PROTECTED] should do the trick. Or am I missing something ? Hexren ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: get local sendmail to use MX records
Gerard Meijer wrote: No, that is not the solution. It could be, but it's not what I want. An example: domain: domain.com domain.com is hosted on server B. The MX record for domain.com says that server A handles the mail of domain.com. So [EMAIL PROTECTED] should be handled by server A. This works, but now on server B there runs a script that sends an e-mail to [EMAIL PROTECTED] . What SHOULD happen is that sendmail on server B looks up the MX record for domain.com, sees that server A handles the mail for domain.com 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: [EMAIL PROTECTED] . 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 domain.com. If that is true, then on server B, the sendmail config probably indicates that mail destined for domain.com 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 domain.com 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 scls.lib.wi.us, (608) 266-6348 A: Because it reverses the natural flow of a dialog. Q: Why is top posting undesirable when replying? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: get local sendmail to use MX records
* On Wed, Feb 23, 2005 at 06:52:37PM +0100 Gerard Meijer wrote: An example: domain: domain.com domain.com is hosted on server B. The MX record for domain.com says that server A handles the mail of domain.com. So [EMAIL PROTECTED] should be handled by server A. This works, but now on server B there runs a script that sends an e-mail to [EMAIL PROTECTED] . What SHOULD happen is that sendmail on server B looks up the MX record for domain.com, sees that server A handles the mail for domain.com 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. Somewhere, probably in /etc/mail/local-host-names, you told sendmail that domain.com should be delivered locally. Remove that entry and restart sendmail. If if was defined in /etc/mail/HOSTNAME.mc, then edit /etc/mail/HOSTNAME.mc and restart sendmail with a make all install restart. You can probably find the entry with a grep domain.com /etc/mail/*. Mark -- The fix is only temporary...unless it works. - Red Green ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: get local sendmail to use MX records
Hi Greg, I'm absolutely sure that this is not the case anymore. I removed everything. - Original Message - From: Greg Barniskis [EMAIL PROTECTED] To: Gerard Meijer [EMAIL PROTECTED] Cc: Hexren [EMAIL PROTECTED]; freebsd-questions@freebsd.org Sent: Wednesday, February 23, 2005 7:11 PM Subject: Re: get local sendmail to use MX records Gerard Meijer wrote: No, that is not the solution. It could be, but it's not what I want. An example: domain: domain.com domain.com is hosted on server B. The MX record for domain.com says that server A handles the mail of domain.com. So [EMAIL PROTECTED] should be handled by server A. This works, but now on server B there runs a script that sends an e-mail to [EMAIL PROTECTED] . What SHOULD happen is that sendmail on server B looks up the MX record for domain.com, sees that server A handles the mail for domain.com 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: [EMAIL PROTECTED] . 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 domain.com. If that is true, then on server B, the sendmail config probably indicates that mail destined for domain.com 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 domain.com 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 scls.lib.wi.us, (608) 266-6348 A: Because it reverses the natural flow of a dialog. Q: Why is top posting undesirable when replying? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: get local sendmail to use MX records
Gerard Meijer wrote: Hi Greg, I'm absolutely sure that this is not the case anymore. I removed everything. ... If I followed you correctly, server B *formerly* was the appropriate end point for mail for domain.com. If that is true, then on server B, the sendmail config probably indicates that mail destined for domain.com 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 domain.com is named for different purposes. Hunt them all down and kill them. Nevertheless... the grep suggested by another poster seems completely appropriate. There are few other explanations than sendmail config error. You restarted sendmail after the config change, right? Another test you could try would be to fire up nslookup on server B's command line. If you ask there for the MX record in question, do you actually get the right answer? -- Greg Barniskis, Computer Systems Integrator South Central Library System (SCLS) Library Interchange Network (LINK) gregb at scls.lib.wi.us, (608) 266-6348 A: Because it reverses the natural flow of a dialog. Q: Why is top posting undesirable when replying? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: get local sendmail to use MX records
Yes the grep suggested by Mark was appropriate. I did that and it returned nothing. Nslookup on the server shows the right MX records for the specific domain. I really don't know what it is. - Original Message - From: Greg Barniskis [EMAIL PROTECTED] To: Gerard Meijer [EMAIL PROTECTED] Cc: freebsd-questions@freebsd.org Sent: Wednesday, February 23, 2005 8:09 PM Subject: Re: get local sendmail to use MX records Gerard Meijer wrote: Hi Greg, I'm absolutely sure that this is not the case anymore. I removed everything. ... If I followed you correctly, server B *formerly* was the appropriate end point for mail for domain.com. If that is true, then on server B, the sendmail config probably indicates that mail destined for domain.com 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 domain.com is named for different purposes. Hunt them all down and kill them. Nevertheless... the grep suggested by another poster seems completely appropriate. There are few other explanations than sendmail config error. You restarted sendmail after the config change, right? Another test you could try would be to fire up nslookup on server B's command line. If you ask there for the MX record in question, do you actually get the right answer? -- Greg Barniskis, Computer Systems Integrator South Central Library System (SCLS) Library Interchange Network (LINK) gregb at scls.lib.wi.us, (608) 266-6348 A: Because it reverses the natural flow of a dialog. Q: Why is top posting undesirable when replying? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: get local sendmail to use MX records
No, that is not the solution. It could be, but it's not what I want. An example: domain: domain.com domain.com is hosted on server B. The MX record for domain.com says that server A handles the mail of domain.com. So [EMAIL PROTECTED] should be handled by server A. Do you mean that your /bin/hostname show domain.com and not machine.domain.com? Anyway, you may have the option to bury the problem by using smart_host and mail_hub: like this in sendmail.mc: define(`SMART_HOST',`serverA.domain.com.')dnl define(`MAIL_HUB',`serverA.domain.com.')dnl -- Hilsen Lars This works, but now on server B there runs a script that sends an e-mail to [EMAIL PROTECTED] . What SHOULD happen is that sendmail on server B looks up the MX record for domain.com, sees that server A handles the mail for domain.com 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: [EMAIL PROTECTED] . 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. - Original Message - From: Hexren [EMAIL PROTECTED] To: Gerard Meijer [EMAIL PROTECTED] Cc: freebsd-questions@freebsd.org Sent: Wednesday, February 23, 2005 6:30 PM Subject: Re: get local sendmail to use MX records GM Hi, GM I have the following situation: GM I have moved my mail services from my dedicated server to another server. The MX records were updated at the DNS host to point to the other server. Email from the outside is being routed GM correctly to the new server, but now the local scripts on the dedicated server are still being routed to the local accounts and not actually sent to the other server. GM So sendmail on the first server tries to use localhost as a relay, instead of looking up the MX records for the domain. GM Anybody knows how to solve this? GM Thanks! GM Gerard GM ___ GM freebsd-questions@freebsd.org mailing list GM http://lists.freebsd.org/mailman/listinfo/freebsd-questions GM To unsubscribe, send any mail to [EMAIL PROTECTED] - Quick and dirty: /etc/mail/aliases putting in something like root: [EMAIL PROTECTED] should do the trick. Or am I missing something ? Hexren ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: get local sendmail to use MX records
I really don't understand it at all now. When I run sendmail in test mode (sendmail -bt) and I do: 3,0 [EMAIL PROTECTED], I get: canonify input: something @ domain . com Canonify2 input: something @ domain . com Canonify2returns: something @ domain . com . canonify returns: something @ domain . com . parse input: something @ domain . com . Parse0 input: something @ domain . com . Parse0 returns: something @ domain . com . ParseLocal input: something @ domain . com . ParseLocal returns: something @ domain . com . Parse1 input: something @ domain . com . Parse1 returns: $# local $: something parsereturns: $# local $: something So obviously sendmail thinks it should handle the mail. Strange thing is that I have 6 domains hosted on this server and I get this outcome by two of them. One is the domain I'm talking about and the other one is [EMAIL PROTECTED] [EMAIL PROTECTED] works as it should work and goes to the other server. I emptied my virtusertable and local-host-names files. I really don't know why this happens. - Original Message - From: Greg Barniskis [EMAIL PROTECTED] To: Gerard Meijer [EMAIL PROTECTED] Cc: freebsd-questions@freebsd.org Sent: Wednesday, February 23, 2005 8:09 PM Subject: Re: get local sendmail to use MX records Gerard Meijer wrote: Hi Greg, I'm absolutely sure that this is not the case anymore. I removed everything. ... If I followed you correctly, server B *formerly* was the appropriate end point for mail for domain.com. If that is true, then on server B, the sendmail config probably indicates that mail destined for domain.com 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 domain.com is named for different purposes. Hunt them all down and kill them. Nevertheless... the grep suggested by another poster seems completely appropriate. There are few other explanations than sendmail config error. You restarted sendmail after the config change, right? Another test you could try would be to fire up nslookup on server B's command line. If you ask there for the MX record in question, do you actually get the right answer? -- Greg Barniskis, Computer Systems Integrator South Central Library System (SCLS) Library Interchange Network (LINK) gregb at scls.lib.wi.us, (608) 266-6348 A: Because it reverses the natural flow of a dialog. Q: Why is top posting undesirable when replying? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: get local sendmail to use MX records
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Gerard Meijer Sent: Wednesday, February 23, 2005 2:08 PM To: Greg Barniskis Cc: freebsd-questions@freebsd.org Subject: Re: get local sendmail to use MX records I really don't understand it at all now. I emptied my virtusertable and local-host-names files. I really don't know why this happens. Did you look in your mailertable file? You have domain.com listed in one of your sendmail config files, that is the only explanation. Or you have it in /etc/hosts. or in /etc/rc.conf. it's somewhere. It is problems like this is why when your running commercial servers that you create build sheets for each server. That is, you record on a separate document EVERY configuration step of any significance that you or anyone else does. Sorry you had to find this out the hard way. You probably have domain.com secreted in some hack you forgot that you did. Maybe one of these days when you do a nuke and repave you will remember to start a build sheet. Ted ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]