Simple "mail" thinks I'm at localhost.localdomain

Discussion in 'Linux Networking' started by Ed Skinner, Sep 2, 2004.

  1. Ed Skinner

    Ed Skinner Guest

    Using simple "mail" in a script, it says I am
    "" (and the relaying system is rejecting the
    message) even though all other facets of the networking software appear to
    be properly configured. I wrote a couple of quickies and verified that
    gethostname(2) and so forth are all returning the configured values, not
    One final clue: I can use "nail" (not "mail") with a "-r
    " (using the correct values) and get the relay system to
    accept and forward the message.
    Anyone know where "mail" gets the host's name and domain? ("nail"
    will do the same if I omit the "-r " option.)
    Ed Skinner, Sep 2, 2004
    1. Advertisements

  2. Ed Skinner

    ynotssor Guest

    You need to configure sendmail properly. In your file, somewhere
    _above_ the MAILER() definitions:


    Rebuild the file and restart sendmail. Please see for further information, as
    well as reading the cf/README in your distribution.

    ynotssor, Sep 2, 2004
    1. Advertisements

    Hash: SHA1
    NotDashEscaped: You need GnuPG to verify this message

    Mail doesn't know anything about it, sounds like your MTA for any
    further help, you need to tell us which one you run or even
    better repost with full information to the proper ng
    comp.mail.sendmail, if you are running sendmail.

    Michael Heiming (GPG-Key ID: 0xEDD27B94)
    mail: echo | perl -pe 'y/a-z/n-za-m/'
    Version: GnuPG v1.2.4 (GNU/Linux)

    -----END PGP SIGNATURE-----
    Michael Heiming, Sep 2, 2004
  4. Ed Skinner

    Ed Skinner Guest

    Thanks Tony, that did it. I was not aware that "mail" is *supposed* to say
    the message is coming from "" and that the
    MTA (such as sendmail) is going to be doing the rewriting (as a
    masqueraded host) so my "blame" of "mail" for the problem was wrong. Lucky
    for me you understood my problem and gave the correct solution.
    Thanks again for your right-on answer!
    Ed Skinner, Sep 3, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.