Servers and Services > Postfix

You may need to send an email using PHP. To do so you have to configure and start Postfix. An easy way getting Postfix to run is using the configuration tool built into MAMP PRO. A How-To with example code on sending email with Postfix can be found here.


  • Include Postfix service in GroupStart

    Check to include Postfix in the GroupStart. When activated Postfix will automatically start/stop when the Servers button is pressed.

  • Set domain of outgoing e-mails to

    Use the PHP function mail() for sending emails to your own email address (like This field to set the outgoing email domain. After starting your servers with this set, you will see your changes reflected in “/private/etc/postfix/”.

    ### MAMP Postfix Configuration - Start ###
    myorigin =
    myhostname = mailer.$myorigin
    smtpd_sender_restrictions = permit_inet_interfaces

  • Use a smart host for routing

    • Server name
      Fill in your server name for outgoing emails. This could be for instance “” (without quotes). Ask your provider if you are unsure about the server name.

    • Authentication
      • Unencrypted: Your user name and password will be sent unencrypted.
      • MD5 Challenge-Response: MD5 Challenge Response Authentication will be used.
    • User name
      Add the user name of your email user account.

    • Password
      Add the password for your email user account.

MAMP PRO will move your existing and files to “/private/etc/postfix/MAMP_backup” when you include Postfix using the GroupStart in MAMP PRO. When you stop uncheck GroupStart your original postfix files will be moved back to “/private/etc/postfix”.

  • Path to Postfix log file

    The path to your postfix log.