Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm running apache2 on Ubuntu Server 12.04 and I have my website up and running fine with 2 virtual hosts, and I was wondering how I can set up my server to also be a mail server, preferable for both domains (virtual hosts.) I have tried following postfix/dovecot guides but none of them seem to work, but that may be because I don't know which DNS records to modify, right now they're the default GoDaddy parked records, aside from @ and a few other CNAME records I changed for subdomains. If anyone could tell me what programs to install (or direct me to a tutorial) as well as what DNS records (MX,CNAME) to modify that would be awesome

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Apache is specifically a web server. And since it runs on port 80, you can use any other ports you like for other services. For example, you can install a DNS server like BIND which will occupy port 53. In your case of a mail server, you can install PostFix among others [link]. Setting up a mail server can be simple or complicated, depending on what kind of flexibility you desire. [This] is a tutorial for DoveCot, another mail delivery system. I would advise you to read how mail servers work, and specifically focus on making it as secure and lightweight as possible. For example, if incorrectly configured, one could hijack your server to send spam.

share|improve this answer
    
Which one would you recommend for simple, secure setup, DoveCot or PostFix? –  DontTurnAround Jan 2 '13 at 0:14
    
For beginners, definitely DoveCot. As you'll notice with PostFix, it has many many more configuration options. You can try both, even. But for you, I recommend DoveCot. –  ionFish Jan 2 '13 at 0:45
    
DoveCot includes IMAP and SMTP right? –  DontTurnAround Jan 2 '13 at 1:26
    
DoveCot has IMAP but you will need to find another authentication daemon for SMTP. PostFix is a good choice for it, tutorial here: exratione.com/2012/05/…. –  ionFish Jan 2 '13 at 1:32
    
Will hostname mail.example.com mess with apache2 at all? –  DontTurnAround Jan 2 '13 at 1:49

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.