One more sendmail Q:

Discussion in 'OT Technology' started by Joe_Cool, May 20, 2005.

  1. Joe_Cool

    Joe_Cool Never trust a woman or a government. Moderator

    Joined:
    Jun 30, 2003
    Messages:
    299,296
    Likes Received:
    558
    I'm going to automate some things, and have my system send me status messages on my cell phone. When I send mail from the command line like this:
    echo "blah blah blah" | mail -s "subject" [email protected]
    OR
    echo "blah blah blah" | /usr/sbin/sendmail -s "subject" [email protected]

    I get a message from [email protected] instead of [email protected]. I've got Masquerade set, but it makes no difference.

    Anybody know how to set that?
     
  2. ProFX

    ProFX New Member

    Joined:
    Apr 10, 2005
    Messages:
    266
    Likes Received:
    0
    Location:
    Melbourne, AU.
    Domain masquerading is the correct way to do it so I suggest yours isn't configured properly.

    This is what you need:
    FEATURE(always_add_domain)dnl
    FEATURE(`masquerade_entire_domain')dnl
    FEATURE(`masquerade_envelope')dnl
    FEATURE(`allmasquerade')dnl
    MASQUERADE_AS(`my-site.com')dnl
    MASQUERADE_DOMAIN(`my-site.com.')dnl
    MASQUERADE_DOMAIN(localhost)dnl
    MASQUERADE_DOMAIN(localhost.localdomain)dnl

    in sendmail.mc.

    Change my-site.com, localhost, and localhost.localdomain as required.

    Remember to run 'make' in /etc/mail and kill -1 your sendmail.
     
  3. Joe_Cool

    Joe_Cool Never trust a woman or a government. Moderator

    Joined:
    Jun 30, 2003
    Messages:
    299,296
    Likes Received:
    558
    :rant2:

    I'm obviously doing something wrong, because I did all of that and it's still doing the same thing. Maybe I'll just have to live with it. :hs:
     
  4. ProFX

    ProFX New Member

    Joined:
    Apr 10, 2005
    Messages:
    266
    Likes Received:
    0
    Location:
    Melbourne, AU.
    You could always install postfix ;)
     
  5. Joe_Cool

    Joe_Cool Never trust a woman or a government. Moderator

    Joined:
    Jun 30, 2003
    Messages:
    299,296
    Likes Received:
    558
    I've thought about it, but I have so much emotional investment in trying to learn sendmail now that I'd feel like a loser for giving up.
     
  6. Joe_Cool

    Joe_Cool Never trust a woman or a government. Moderator

    Joined:
    Jun 30, 2003
    Messages:
    299,296
    Likes Received:
    558
    Here's my sendmail.mc. Maybe somebody else can find the problem that I'm missing.

     
  7. ProFX

    ProFX New Member

    Joined:
    Apr 10, 2005
    Messages:
    266
    Likes Received:
    0
    Location:
    Melbourne, AU.
    Just another thought..

    What does your hosts file look like?
    You should have something like:

    127.0.0.1 megalon.straybullet.net localhost.localdomain localhost megalon straybullet.net

    The 'straybullet.net' bit is the important one for masquerading.
     
  8. ProFX

    ProFX New Member

    Joined:
    Apr 10, 2005
    Messages:
    266
    Likes Received:
    0
    Location:
    Melbourne, AU.
    Had another thought.. Postfix ;)

    It will require:
    masquerade_domains = straybullet.net
    in main.cf and a `postfix reload`
     

Share This Page