Setting up a Ubuntu/Apache/PHP machine to send email

后端 未结 5 1770
没有蜡笔的小新
没有蜡笔的小新 2020-12-02 16:58

I am working for a small Ho Chi Minh City company whose only server was just one old small computer. Now just a few months later, we are expanding rapidly and one of the req

5条回答
  •  无人及你
    2020-12-02 17:55

    sudo apt-get install sendmail will install a copy of sendmail that listens locally. If you install that, then php can use the built in mail() function. There also won't be a risk of becoming a remote relay if you install like this as well.

    If you plan on sending mail out to other internet domains, you will need to make sure the IP address of the machine sending mail has a reverse DNS entry (PTR record) set up as well. Most large ISP's will reject your mail if your IP does not have a PTR record or one that points to a generic host (e.g. 1.2.3.3.domain.isp.com). It should reverse to something like mail.yourdomain.com

提交回复
热议问题