Re: mail confusion

From: Derek Martin (code_at_pizzashack.org)
Date: 10/30/05

  • Next message: Derek Martin: "Re: Linux killer!"
    Date: Sun, 30 Oct 2005 12:06:04 -0500
    To: jaymo@mail.bokler.com, For users of Fedora Core releases <fedora-list@redhat.com>
    
    

    On Sun, Oct 30, 2005 at 04:03:29AM -0600, Jay Moore wrote:
    > The problem is that the from: address "mail" is using is bogus:
    > "root@localhost.localdomain" Problem is that I don't know *where*
    > mail is getting this address. Following is the error message:

    Well, it's not exactly bogus... It's what your machine is configured
    to use. :)

    The problem is that the hostname of your system is
    localhost.localdomain as determined in /etc/hosts and/or
    /etc/resolv.conf and/or /etc/sysconfig/network, and smartd is running
    as root, so it will send mail out as root@localhost.localdomain. This
    is normal and expected.

    You need to do one of the following:

      - change the hostname of your machine to something in a real domain
      - configure sendmail to masquerade your hostname/domain AND get rid
        of root as an "exposed user"
      - stop trying to send mail to legitimate Internet hosts from an
        illegitimate Internet host. ;-)

    Probably the easiest thing to do is to change your hostname, but
    you'll have to pick some existing domain name to use. You'll need to
    change localhost.localdomain to your new hostname in all 3 of the
    locations I mentioned, except that you need to keep the following in
    /etc/hosts:

            127.0.0.1 localhost localhost.localdomain

    The entry for "localhost" is required for TCP/IP networking to work
    properly, and Red Hat has configured some of its software to use
    "localhost.localdomain" (which I always thought was brain-damaged), so
    you'll need that in there as well.

    Let's say you choose the name myhost.mydomain.com as your new host
    name. If you have a static IP address, you can just add a line to
    /etc/hosts with the new name and your IP:

            127.0.0.1 localhost localhost.localdomain
            10.0.0.1 myhost.mydomain.com myhost

    Otherwise if you get your Internet-facing IP address via DHCP, you'll
    want to add the name to the end of the 127.0.0.1 line, like this:

    127.0.0.1 localhost localhost.localdomain myhost.mydomain.com myhost

    After fixing the other two files, replacing any instances of
    localdomain with mydomain.com and instances of localhost.localdomain
    with myhost.mydomain.com, you should be all set.

    One other possibility is that you may have to change your sendmail
    configuration even if you do this. In /etc/mail/sendmail.mc, you may
    have a line that says this:

    LOCAL_DOMAIN(`localhost.localdomain')dnl

    You'll probably need to change that too, and then run "make" in
    /etc/mail, then restart sendmail. If you have that line in
    /etc/mail/submit.mc as well, you'll probably need to change it there
    too.

    HTH

    -- 
    Derek D. Martin
    http://www.pizzashack.org/
    GPG Key ID: 0x81CFE75D
    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Derek Martin: "Re: Linux killer!"

    Relevant Pages

    • Re: sendmail hangs with errors after setting hostname
      ... I would suggest setting the hostname as a different address from localhost. ... There are multiple instances of sendmail that run, as your rc.conf file has them enabled. ... # Script to start your chosen MTA, ...
      (freebsd-questions)
    • Re: sendmail problem
      ... what sendmail logged for connecting hostname ... localhost localhost.localdomain phoenix ... sendmail thinks that it's fully qualified hostname is ...
      (comp.mail.sendmail)
    • Re: Best way to send mail from sendmail server?
      ... >> localhost to the access DB and it works fine, but I'm wondering if this is ... >> sender domain from localhost to domain.com, ... Well unfortunately, 'hostname --fqdn' is a Linuxism, and I'm running Solaris. ... sendmail recognises my fqdn as its canonical domain name. ...
      (comp.mail.sendmail)
    • Re: hostname with DHCP
      ... This assumes that the DHCP server (in my case a Linksys router ... hostname to be 'eagle' and my registered domain is 'mydomain.com' ... The DHCP hostname configuration does not work out of the box ... in Solaris when the server does not provide a hostname. ...
      (comp.unix.solaris)
    • Re: localhost In Sendmail SMTP Greeting
      ... 220 localhost ESMTP SMTPProxy ... Sendmail is picking up your hostname from the /etc/hosts file. ... Break the localhost entry in half using the configured IP address for ...
      (comp.mail.sendmail)