Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i've got a web service up and running with apache on ubuntu server in a vps from a hosting company (long sentence:)).

i wonder when someone would like to set up a own mail server (postfix + dovecot)?

cause i just want to be able to:

  1. send emails (account activation etc) to my users with php - the emails have to appear to come from the website's domain

  2. receive emails from my users (customer support etc) using Apple Mail/Microsoft Outlook.

could this be accomplished with an email hosting company? are there situations i would benefit from setting up an own mail server on ubuntu?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

You don't need to set up your own mail server for that. The first can be mostly accomplished by setting headers as desired, and the second by using a service such as GMail's business offering.

share|improve this answer
    
what do you mean by setting headers as desired? and if i use gmail's business offering, could i use my own domain? –  ajsie Apr 5 '10 at 6:52
    
The $additional_headers argument of mail(). Consult GMail's business FAQ if you have questions about it. –  Ignacio Vazquez-Abrams Apr 5 '10 at 6:55
2  
Actually having your own email server can still be good for sending. Just not accepting - but dumping the emails to a local server means any issue with network latency etc. is responsibility of the mail server, not the website script. –  TomTom Apr 5 '10 at 6:57
1  
@tomtom. so in sum up: postfix good for sending not receiving, and dovecot just bad? –  ajsie Apr 5 '10 at 7:19

I would suggest you keep your mail out of the VPS or on a second VPS for security reasons. not being able to answer mails when a server goes down isn't an option. I'm a big fan of hosted emails, they do all the work for you and most of the time it is cheap. A second VPS cost at least 20$ per month while hosted emails cost a lot less.

share|improve this answer
1  
but if i want to be able to send mail from php script (in my first vps), then i have to set up a mail server (postfix) on either the same vps or another? or could one use an external smtp server (the sender's domain will be my own domain)? please shed a light on this –  ajsie Apr 5 '10 at 7:58
1  
You dont need any MTA (Mail Transfer Agent) such as Postfix, sendmail, Qmail, etc. Php mail() function will handle the outgoing of emails. I am not aware of any requirement for mail() to work­. You would install an MTA if you have local mailboxes. –  Embreau Apr 5 '10 at 21:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.