Benches macOS

7

Setting up sendmail

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

I do pro bono web sites for charities. I have always tested new scripts on the target site. I just recently realized that Apache is installed on my Mac.

After a few hours of Googling I've manged to set up the Apache config file

"/private/etc/httpd/users/<user_acct>.conf"

enabling cgi, php, ... and run my local site from

"/Users/<user_acct>/Sites"

Now the question. After number of hours I've been unable to find any reliable information on setting up sendmail. All references would re appreciated.

G4 Tower Mac OS X (10.4.10)

7 replies

Sign in or join Beachball Help to reply.

  1. 0

    David Livesay

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    See man postfix. Postfix is the name of the mail system, and postfix is the control and configuration command.

    You'll need to set a root password to set up and run Postfix.

  2. 0

    Bill Scott

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Here are some notes on how I did it.

  3. 0

    RobertJ

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Bill, In the info you gave me I see this

    "Apple OS X since 10.3 comes with postfix, a more secure drop-in replacement for sendmail."

    Since I use sendmail on the servers I run websites at, I really need sendmail.

    I don't really want a full blown mail server; just a server to take sendmail commands from perl scripts and send out emails. My website scripts typically take POST information, filter it to make sure it is from a valid source, parse and reformat it, append it to a log file and then send the reformatted information to the appropriate person(s) via sendmail.

    Thanks,

    bob j

  4. 0

    RobertJ

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Since OSX now uses postfix, for testing:

    1 - Can I change the path in the perl files from "/usr/lib/sendmail" to "path to postfix"?

    2 - Use the standard Perl commands

    print MAIL "To: $TOn";

    print MAIL "From: $FROMn";

    print MAIL "Subject: $SUBJECTn";

    print MAIL "Content-type: text/plainnn";

    ..........

    with the pipe opened to postfix rather than sendmail on localhost?

    3 - Using Postfix Enabler configure postfix for outbound SMTP only through my ISP to accept the "print" info from my Perl script to verify the correctness of the parsed outbound email(s)?

  5. 0

    Charles Minow

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Since OSX now uses postfix, for testing:

    1 - Can I change the path in the perl files from

    "/usr/lib/sendmail" to "path to postfix"?

    You don't need to do that. There's actually a
    sendmail command there that's kind of a drop-in replacement. It's at
    /usr/sbin/sendmail, so there's an issue of paths you'd need to deal with in your scripts.

    2 - Use the standard Perl commands

    print MAIL "To: $TOn";

    print MAIL "From: $FROMn";

    print MAIL "Subject: $SUBJECTn";

    print MAIL "Content-type: text/plainnn";

    ..........

    with the pipe opened to postfix rather than sendmail

    on localhost?

    This works for me:

    <pre class="command">open (MAIL, "| /usr/sbin/sendmail -t") || print "Nothing happened.";</pre>

    (obviously followed by all the print to MAIL commands).

    charlie

  6. 0

    Bill Scott

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    What Charles said,

    i.e., sendmail in OS X is a wrapper executable for postfix, precisely your your benefit in situations such as this.

    If your other servers are running linux, I will bet it is the same with them.

  7. 0

    RobertJ

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Charles M and Bill S, thank you. The Apple forums and Mozilla provide unbelievable support!!!!