Find the answer to your Linux question:
Results 1 to 8 of 8
Hi All, When I send an email via the "mail" command, the person who recives the email gets the from address as "xxx@localhost.localdomain" I can't seem to find where you ...
  1. #1
    Just Joined!
    Join Date
    Apr 2008
    Posts
    2

    localhost.localdomain when sending email

    Hi All,

    When I send an email via the "mail" command, the person who recives the email gets the from address as "xxx@localhost.localdomain"

    I can't seem to find where you can change this? Is it a host entry? Because i changed it there and when I send out emails I am getting errors because of Loop-back.

    Any ideas, if and where I change this in the sendmail configuration?

    I am using CentOS 4.

    Thanks

  2. #2
    Just Joined!
    Join Date
    Apr 2007
    Location
    Louisville, KY USA
    Posts
    12
    Try this:
    Add the following line to /etc/sysconfig/network
    HOSTNAME="YourHostName"
    Restart your network: service network restart

  3. #3
    Just Joined!
    Join Date
    Apr 2008
    Posts
    2
    the host entry that i want to use is already in that file.

  4. #4
    Just Joined!
    Join Date
    Jan 2007
    Posts
    12
    what mail system are you using to send mail?

    is it sendmail? Qmail? or PHP/Web based mail using sendmail

  5. #5
    Just Joined!
    Join Date
    Jan 2007
    Posts
    38
    I use Sendmail.

  6. #6
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    What's the Dj macro set to in your sendmail.cf? Have you got a domain defined in /etc/resolv.conf? And which email client are using?

  7. #7
    Just Joined!
    Join Date
    Jan 2007
    Posts
    12
    OK Easiest way would be be to define a DNS Entry for your server!

    Code:
    yourserver.xx. IN MX 10 mail.yourserver.xx.
    
    mail.yourserver.xx. IN A xxx.xxx.xxx.xxx
    Then in your mail server set the hostname to mail.yourserver.xx.

  8. #8
    Just Joined!
    Join Date
    Jan 2007
    Posts
    38
    Quote Originally Posted by azlinux View Post
    OK Easiest way would be be to define a DNS Entry for your server!

    Code:
    yourserver.xx. IN MX 10 mail.yourserver.xx.
    
    mail.yourserver.xx. IN A xxx.xxx.xxx.xxx
    Then in your mail server set the hostname to mail.yourserver.xx.
    Ok, i added domain to the resolv.conf:

    vi /etc/resolv.conf

    ; generated by /sbin/dhclient-script
    domain mydomain.co.uk
    nameserver 192.168.1.11

    Not quite sure how you edit what you are saying AZLINUX, could you perhaps make it a bit clearer for a simple mind like mine :P

Posting Permissions

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