Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
431 views
in Technique[技术] by (71.8m points)

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

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 requirements for new users is to require them to verify their email addresses.

There are no special programs on the Ubuntu box, instead the only thing I did on the actual server was re-format the entire hard drive from windows XP and installed Natty Narwhal on it, then install Apache and PHPMYADMIN.

I would like to have PHP to send out an email to both the user and the administrators as soon as somebody applies for membership. But I have no idea what I need to do to start.

Any ideas on what I need to set up first would be humbly appreciated; I am not looking for a step by step, just some tips to point me in the right direction.

-Duong Van

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...