Re: mail confusion

From: Jay Moore (jaymo_at_mail.bokler.com)
Date: 11/06/05

  • Next message: Thorsten Leemhuis: "Re: Livna.org gone?"
    To: Derek Martin <code@pizzashack.org>
    Date: Sat, 05 Nov 2005 23:55:01 -0600
    
    

    On Sun, 2005-10-30 at 12:06 -0500, Derek Martin wrote:
    > 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. ;-)

    I don't believe you've got it, Derek. At any rate, none of the things
    you prescribed seem to make any difference. Here are some facts I should
    have provided in my OP:

    This host (aria) has a dynamic IP. It is on a private net, currently @
    192.168.1.207

    my /etc/hosts file:
    127.0.0.1 localhost localhost.localdomain aria.cullmail.com aria

    my /etc/resolv.conf file:
    ; generated by /sbin/dhclient-script
    search cullmail.com
    nameserver 207.203.159.252
    nameserver 205.152.0.5

    my /etc/sysconfig/network file:
    NETWORKING=yes
    # HOSTNAME=localhost.localdomain
    HOSTNAME=aria.cullmail.com

    I set up masquerading in /etc/mail/sendmail.mc, "re-compiled", re-
    started sendmail, re-booted, jumped up turned around three times with my
    left index finger on my nose while chanting "there's no place like home,
    there's no place like home". No dice... I even changed the .mc file so
    that *no reference* to localhost.localdomain existed in sendmail.cf
    (checked this w/ a grep).

    So here's the thing: Evolution is configured to use sendmail on this
    host... it works fine. However 'pine' and 'mail' cannot get anything
    except 'localhost.localdomain' when they send mail.

    Please clue me in if you can.

    Jay

    >
    > 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
    >

    -- 
    Jay Moore <jaymo@mail.bokler.com>
    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Thorsten Leemhuis: "Re: Livna.org gone?"

    Relevant Pages

    • Sendmail Config. question
      ... is about a month behind on patch levels (sendmail patch up-to-date). ... a problem removing the hostname from the 'FROM:' header of any email sent from ... Since I don't have DNS resolving this host (internal host, ...
      (SunManagers)
    • Re: sendmail/mail/Mail
      ... The host name is myhost. ... I realize I have to change the hostname to myhost.Acme.COM but I cant' change the hostname ... the mail command just calls sendmail, it has no means of setting from. ... removing the leading dnl and replacing mydomain.com with something that is internet-legal. ...
      (Fedora)
    • Re: sendmail/mail/Mail
      ... The host name is myhost. ... I realize I have to change the hostname to myhost.Acme.COM but I cant' change the hostname ... the mail command just calls sendmail, it has no means of setting from. ... In sendmail (and probably other MTA) you can also use address rewriting. ...
      (Fedora)
    • Re: bind9 + host command issue in FreeBSD-5.4
      ... Host cauexcnt001smtp.unibanco.com.br not found: 2 ... with the hostname itself by using 'host -t a', or by using dig as you did ... sendmail to raise "host name lookup failure" and not deliver the messages. ... possible that your system has IPv6 support enabled, ...
      (freebsd-net)
    • Re: domain name
      ... I never had a problem with the hostname. ... troubles when the host is a server on the 'Net with a static IP and ... Seems to me it should return "localhost" in that case, ... configuration internally consistent with a private configuration in ...
      (Debian-User)