Results 1 to 4 of 4

Thread: Email delivery

  1. #1
    Join Date
    Feb 2003
    Location
    Maine
    Posts
    34

    Email delivery

    Hello,

    Couple of questions for the gurus.

    We have a domain on our server that uses a PHP script to send emails to another domain, not on our server. Planning on moving the second domain to our server as well, I set up the domain in WHM, but due to several issues the DNS was never modified at the registrar for the second domain.

    As a result, all email sent from the first domain to the second is being delivered locally (to the second domain I set up on our server), instead of being delivered to the server that it is currently on. I did modify MX in DNS for the second domain to point to the other server, however locally it is apparently not resolving to the new server.

    So, two questions:

    1. How can I get all email that was delivered locally (to the yet-unused domain) to the server the second domain is currently hosted on?

    2. How can I make our server resolve the appropriate address for the second domain instead of delivering mail sent locally to the local account for the second (un-transferred) domain?

    Hope that makes sense - any help is highly appreciated!
    Scriptalicous - Scripts with flavor.

  2. #2
    Join Date
    Sep 2004
    Location
    New Jersey
    Posts
    104
    Hi, Tekime. The problem is that by having the second domain defined on the server that's sending the mail it's causing the mail server there to believe that mail to that domain should be delivered locally. As a result it never gets to the point where it's going to check DNS since it's already been told it's local.

    What you're going to want to do is first transfer the mail that was accidentally delivered (assuming it was delivered and not bounced) to your server over to the correct server. There are many ways to do this depending on your exact situation. Are we talking about 1-2 mailboxes on your server that had mail incorrectly delivered to them, or a large number? Can you login to the correct mailboxes on the other server using IMAP for instance? If it's a small number of mailboxes and you have IMAP access to both then it's probably easiest to just set up IMAP accounts for both and just copy the emails back and forth. Do both domains use WHM? Maybe WHM gives you an easy way of transferring email between accounts, I dont know, I dont use WHM.

    After you have the email moved then just delete the second domain from your account entirely and it should begin delivering email correctly again now that it doesn't think it should deliver mail for the second domain locally.


    Brian
    Colynx, LLC. (http://www.colynx.com)
    Providing inexpensive Web, email, DNS hosting, and more. Now offering $8/yr domain registrations. Name your own price for hosting. Hosting should be on YOUR terms.

  3. #3
    Join Date
    Feb 2003
    Location
    Maine
    Posts
    34
    Hi Brian,

    Thanks a lot for the response. Fortunately they are limited to one account, so I'll probably just copy the emails over via IMAP as you suggested.

    I suspected the resolution was never checking DNS as you said, as other emails to the domain sent remotely work just fine. That said, do you think an IP->hostname addition to resolv.conf would force locally generated messages to be delivered to the correct mail server?

    Unfortunately the other domain uses another domain for mail handling, and no WHM/cPanel is available to simplify things. I have limited access to the other server, it is another host of our client's, and getting the appropriate information has proven a bit tough.

    Alas, I'll probably remove the account once email is transferred and then set it up again when it is absolutely assured that DNS will be updated at the registrar immediately. Wish I could get into their existing DNS server to modify TTL and expedite things a bit.

    Thanks again.

    Gabe
    Scriptalicous - Scripts with flavor.

  4. #4
    Join Date
    Sep 2004
    Location
    New Jersey
    Posts
    104
    Originally posted by Tekime
    do you think an IP->hostname addition to resolv.conf would force locally generated messages to be delivered to the correct mail server?
    That wouldn't help. Since the second domain is listed in the mail server config as a local domain it never even tries to access the resolver libraries, so resolv.conf or the hosts file wont even come into play. At the most basic level what you need to do is remove the second domain from the list of local domains in the mail server config on your server. I assume removing the domain from your control panel will accomplish that. The underlying method of removing the domain from the local list depends on what mail server software you use.

    Brian
    Last edited by Changeling; 07-06-2005 at 03:06 PM.
    Colynx, LLC. (http://www.colynx.com)
    Providing inexpensive Web, email, DNS hosting, and more. Now offering $8/yr domain registrations. Name your own price for hosting. Hosting should be on YOUR terms.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •