Bee
03-12-2002, 11:26 PM
After I set MX to forward all email to a 3rd party service, should I remove mail.domain.com from BIND?
![]() | View Full Version : rm mail.domain.com after MX? Bee 03-12-2002, 11:26 PM After I set MX to forward all email to a 3rd party service, should I remove mail.domain.com from BIND? allan 03-12-2002, 11:30 PM Originally posted by Bee After I set MX to forward all email to a 3rd party service, should I remove mail.domain.com from BIND? It won't hurt anything to leave it in there, however, I personally prefer to Felix Unger my zone files. It makes them easier to read. Bee 03-12-2002, 11:47 PM The reason I'm asking is because I suspect that it is causing a strange problem. Most of the time, my mail gets sent to the 3rd party service as it should because of the MX change. But sometimes it "leaked" back into my server. I could see it in /var/spool/mail. If removing mail.domain.com doesn't create a problem, I can go ahead and blow it away, then check to see if the problem is still there. Thanks! allan 03-12-2002, 11:57 PM Your problem probably has nothing to do with that mail record (though by all means kill it). Generally when you see problems like this they occur for one of two reasons: 1. If you have just made the change to the third party provider your records may not have fully propagated (not all caching servers will honor your TTL), so there may still be some caching servers that have old records. 2. Depending on the MTA in use, if a mail server is unreachable the MTA may try to forward the mail to the A record of the domain. Most likely, before you switched to the third party provider example.com and mail.example.com pointed to the same IP address. So, if some MTAs are having problems reaching your 3rd party mail server, they are just dropping the messages onto your server. Bee 03-13-2002, 12:37 AM Interesting. The problem seem to only happen when email is sent from a CGI script (using sendmail) running on the same server as the one receiving the mail. I know it's not the problem with the Perl script because the same code works fine in another application sending to the same email address. Email sent from an email client seems to work fine. Does that give you any clues? Ahmad 03-13-2002, 07:35 PM This is a problem in your MTA then. It still thinks that the address is a local address, so it delivers it locally without any DNS lookups. You have to remove the email domain from your MTA's local's list. This depends on the MTA you are using, but I don't know how this is done in any of them anyway. EDIT: you have to remove the email domain, not the email address. Bee 03-14-2002, 02:45 PM I'm new to web hosting, what is MTA? I'm using Ensim and I found a file at... /home/virtual/siteX/fst/etc/mail/local-host-names Inside is just one line: mydomain.com Should I just remove it? Comment it out? Do something else? Thanks! Ahmad 03-14-2002, 04:40 PM Originally posted by Bee I'm new to web hosting, what is MTA? I'm using Ensim and I found a file at... /home/virtual/siteX/fst/etc/mail/local-host-names Inside is just one line: mydomain.com Should I just remove it? Comment it out? Do something else? Thanks! is that your real domain in question, or the string 'mydomain.com'? Its probably your domain, and you should remove it from here. I think that this will solve your problem. MTA: Mail Transfer Agent, it is like exim, qmail, sendmail, postfix, ms exchange .. etc Your MTA will usually have a list of domains that are considered local. For those domains, it will just copy the message directly into the appropriate file or folder. No DNS lookups, no TCP connections. This is of course for efficiency reasons. Now if you had mail delivered to your own box, you probably have your domain set in your MTA as a local domain, so as you have moved it now, its no longer local, so you have to inform the MTA about that. You will probably also want to remove all references to your domain from your MTA, so that even if another host is getting the wrong MX records due to DNS problems and is delivering mail to your server, your MTA will refuse to accept them. Bee 03-14-2002, 04:47 PM I have removed beetown.com from... /home/virtual/siteX/fst/etc/mail/local-host-names I've also stop and restarted the server, not sure if I needed, did it anyway. Mail sent from CGI still gets back into the server (instead of going to where MX is pointing). Is there a waiting period (resolve) after I removed the domain from local-host-names? Does MTA get the list from the above files? Or are we talking about a different file? f5hosting.com 03-17-2002, 01:52 AM edit your /etc/localdomains and remove the domain from in there. It should send mail on to the third party then. |