Find the answer to your Linux question:
Results 1 to 7 of 7
Hi, I have recently had to take on the administration of our Linux servers after the previous guy left with very short notice. I haven't had a lot of experience ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2013
    Posts
    4

    Mail going to wrong server


    Hi,

    I have recently had to take on the administration of our Linux servers after the previous guy left with very short notice.
    I haven't had a lot of experience with Linux so i'm been dropped in the deep end a little so please bare with me.

    We have a live server that runs Centos, it is being used to host 60+ websites and email for those sites.

    I have an issue that some emails that are being sent direct from the server i.e. root(at)servername are going to our old SMTP server which has recently been decommissioned.

    When running the mail command to send an email it comes through to our old server and doesn't go anywhere because it no longer works.

    How can I change this so emails go to our new server instead?

    Cheers,

  2. #2
    Linux User
    Join Date
    Dec 2009
    Posts
    264
    I guess you already have already corrected the MX, CN and/or A entries in the DNS Servers

  3. #3
    Just Joined!
    Join Date
    Jun 2013
    Posts
    4
    The records seem to all be pointing to the correct places

  4. #4
    Linux User
    Join Date
    Dec 2009
    Posts
    264
    Quote Originally Posted by mattrla View Post
    The records seem to all be pointing to the correct places
    Is there a pattern from which Server to which domain there's a problem?
    Like from Server A to Domain B, C or D
    Or all Mails to Domain A from different Servers?

    here's some more info:
    On each Server you will find a file:
    /etc/hosts
    In this file you can add IPs for Servers that will overrule the DNS Names.

    Second thought is that you have a cache Problem with the DNS ... in that case you should check the config of the Server which try send the mail, and test the Name-Servers they are using.

    You will find the configured name Server Address in: /etc/resolv.conf

  5. #5
    Just Joined!
    Join Date
    Jun 2013
    Posts
    4
    Hi,
    The issue is sending emails from our live webserver to our primary domain i.e. send an email from root(at)servername to matt@domain.com

    There is nothing in the host files overriding the anything. We host our own public DNS servers which are being used for the MX/DNS records and these are all configured fine and working.
    When doing an nslookup for the mx record on the web server it comes back with the correct destination

    The resolv.conf looks fine too
    Cheers

  6. #6
    Linux User
    Join Date
    Dec 2009
    Posts
    264
    ok ... so we have two faktors we may check ...
    1. the mail-service
    2. web script

    ... you can try send a mail from the command line ...

    mail -s Test address@domain.com < /dev/null

    When this one works you will need to look into the web-skripts

  7. #7
    Just Joined!
    Join Date
    Jun 2013
    Posts
    4
    Hi,

    Thanks for all your help on this so far but I think I have found where the issue is. There was a relay rule in /etc/postfix/transport which was relaying it to an old MX record, onces removing this it seemed to work fine again

    Cheers for everything

Posting Permissions

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