Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Cool config for /etc/hosts ? (smtp not working)

    Good day all,

    I've spent quite a bit of time trying to get outgoing mail working so I can have logs emailed to me since this particular Linux box (NSLU2 slug, Debian Etch) is not normally accessed unless there is a problem. (The slug uploads my weather:

    Only needing a very simple & basic application for outgoing mail, I installed ssmtp and configured the mail hub. Never could get it to connect and actually send.

    Since the Linux box is on my local lan with a 192xx IP address and doesn't have a fully qualified domain name, I set the host name in /etc/hosts to since I think I remembered reading somewhere it really needs a domain name, bogus or not.

    Bottom line is I don't know why ssmtp didn't work, my only suspicion at this point is the host name, although I suppose the issue could be almost anything else.

    If anybody has mail actually working (all I care about is smtp) on a local box, I'd love to know how you set it up and your host name, etc.

    Thanks - John

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    the hills
    Is it configured to relay the mail through your ISP,
    or does it talk to other servers directly? If you are on
    a normal home internet connection with a dynamic address,
    many mail servers will refuse to communicate with you.

    The easiest thing is to send all mail through your account
    at your ISPs mail server. Also, if this box is intended to
    receive mail, your router will need to forward port 25
    traffic to it.

  3. #3
    I was going to use my web hosting provider's smtp server like I do for all of my other mail clients on my PCs. They (1and1) require authentication, so they aren't fussy about the originating IP.

    No - don't need to receive mail on the NSLU2 - just need to email certain events and logs.

    Thanks very much for trying to help

  4. $spacer_open
  5. #4
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    the hills
    What's in your ssmtp.conf?

  6. #5
    Whoo-hoo - got it working. I reinstalled ssmtp (exim4 uninstalled yet again) and took another crack at configuring ssmtp.conf. This time I got a reverse DNS lookup failure (progress actually!!) I think the difference was putting the login and password in the .conf file instead of trying to figure out how to do that when you do a manual ssmpt from a shell.

    When I changed the hostname to be my ISP's domain (, reverse DNS (DNS lookup) was happy and 1and1 accepted the mail.

    Thanks again rcgreen! Your question about my ssmtp.conf file prompted me again to give it another try!


    # /etc/ssmtp.conf -- a config file for sSMTP sendmail.
    # The person who gets all mail for userids < 1000 #root mail now comes to me
    # The place where the mail goes. The actual machine name is required
    # no MX records are consulted. Commonly mailhosts are named
    # The example will fit if you are in and you mailhub is so named.

    # Where will the mail seem to come from?
    #John's note - rewrite didn't work for me.
    # #reverse DNS fails unless I set this to my ISP's domain name

    FromLineOverride=YES #you can now set the From: to be anybody@anydomain.whatever

Posting Permissions

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