Sendmail in OS X

Discussion in 'Mac Apps and Mac App Store' started by acidity, Nov 1, 2006.

  1. acidity macrumors regular

    Joined:
    Sep 7, 2006
    #1
    Hello

    Being a command line user, I want to use the *nix command line MAIL tool as my university Linux box but I will have to configure it to use a correct SMTP server to send mails (which is why I generally use the mail command).

    Doing some googling says that sendmail comes inbuilt with Mac OS X specifically I am referring to the article at http://www.bombich.com/mactips/sendmail.html but I am not able to find SENDMAIL as suggested in it.

    Now I dont remember if I unchecked the option when I installed OS X for the first time and it just happens that I dont have the original OS X CD bundled with my MacBook as I dont seem to find it :( So is there anything different with my installation of OS X or I had decided not to install it?

    So what are my options???
     
  2. frankblundt macrumors 65816

    frankblundt

    Joined:
    Sep 19, 2005
    Location:
    South of the border
    #2
    OSX now comes with Postfix for that job - i think there's still a workaround built in so that when you call sendmail from PHP for example it goes to Postfix.

    You can either enable Postfix yourself by altering the conf file (if i could find the guide i used I'd post the link but... - there we go) or use Postfix Enabler
     
  3. jhu macrumors 6502a

    jhu

    Joined:
    Apr 4, 2004
    #3
    sendmail has had a history of security issues, although i haven't been following it lately and don't know if that's still true.
     
  4. acidity thread starter macrumors regular

    Joined:
    Sep 7, 2006
    #4
    Sorry for the late reply but been a little busy with other work. Got a chance to work on this today.

    I downloaded the postfix tar from http://www.david-reitter.com/software/osxpostfix.html#tiger and followed the steps and have done most of the thing successfuly but I have one doubt:

    In one of the steps it says:

    PHP:
    Postfix more or less runs out of the boxYou may want to configure a static name for your hostThis can be done by editing the main.cf file:
    sudo pico /etc/postfix/main.cf
    And bingo I find the folder postfix in etc directory but I never installed or copied it. Does postfix comes bundled with Mac OS X????

    Doing a list of files of the tar files shows:

    PHP:
    Postfix/
    Postfix/Postfix
    Postfix
    /StartupParameters.plist
    So I am sure the files were not in the .tar that I downloaded?
     
  5. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #5
    Post two tells you that it already comes with it installed. It just needs setting up.
     
  6. yellow Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #6
    Yeah.. reading is fundamental. :)

    OP, Postfix was introduced as the defacto SMTP server in Panther (10.3).
    If you're using 10.3+ then it's Postfix, as noted. 10.2- then it's Sendmail.
     
  7. Westside guy macrumors 601

    Westside guy

    Joined:
    Oct 15, 2003
    Location:
    The soggy side of the Pacific NW
    #7
    Postfix provides a "sendmail" command (on your Mac it should be at /usr/sbin/sendmail), so it works with apps that are specifically looking for sendmail.

    If you're a *nix command line user, you should already know that you don't have to do ANYTHING to use your local "sendmail" for sending outgoing mail - it will work out-of-the-box. Any problems you run into are likely exterior, such as an ISP that blocks port 25 traffic. The only time you should have to do configuration is if you want to run your own mail server for processing and/or distributing incoming mail (which you don't).

    And, as others have pointed out, OS X comes with Postfix - so you don't need to install anything.
     
  8. acidity thread starter macrumors regular

    Joined:
    Sep 7, 2006
    #8
    Thanks. I should have read that line.....

    But there is no sendmail in /usr/local/sbin. I guess I had decided not to install it while configuring OS X for the first time.

    Now I will get back to configuring Postfix. This is the first time I am actually doing something like that :)
     
  9. yellow Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #9
    That's because (as posted) it's in /usr/sbin/, not /usr/local/sbin/. ;)

    Code:
    yellow% whereis sendmail
    /usr/sbin/sendmail
     

Share This Page