OS X: sending mail to localhost

前端 未结 6 786
臣服心动
臣服心动 2021-02-04 20:07

For testing purposes I want send mail to my localhost user account rather than my webserver. I am unsure how to do this using mail.app. Any help would be appreciated.

6条回答
  •  梦如初夏
    2021-02-04 20:48

    @Tautologistics

    OSX does have a built-in MTA (SMTP server), to turn it on you can type:

    sudo launchctl start org.postfix.master   
    

    then you can send mail to localhost like you desire


    sample showing an SMTP server running from my machine running 10.6.1

    >telnet 127.0.0.1 25
    Trying 127.0.0.1...
    telnet: connect to address 127.0.0.1: Connection refused
    telnet: Unable to connect to remote host
    
    >sudo launchctl start org.postfix.master
    
    >telnet 127.0.0.1 25
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    220 machinename.example.com ESMTP Postfix
    

提交回复
热议问题