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 launched a new VPS with CentOS 5. It's pretty skeletal, nothing setup.

I'm trying to configure my mail server to handle my email: contact@domainname.com

My DNS settings live on GoDaddy.com. I have set up a contact name under the MX settings (not sure if that is correct) that points to the mail server (mail.domainname.com). Is that correct? or should it point to smtp.secureserver.com?

So that's the first thing, the second is setting up my server to handle mail.

Should I be using postfix for my mail server? At that, I'm a bit confused on setting this up. I've set myhostname and mydomain but still no luck.

I'd appreciate any tutorials and help, thanks!

share|improve this question

2 Answers 2

up vote 2 down vote accepted

First off, the MX record should point to whatever server is listening for incoming SMTP traffic. If you're planning to have your VPS handle mail traffic, then the MX record should point to it.

Second, the job that you're considering using postfix for is called a Message Transport Agent (MTA). There are lots of options listed at that link; postfix is perfectly valid but may be a bit overwhelming for a first-timer.

I wonder though; are you trying to run a mail server for production use, or to learn how to set one up? There are lots of tutorials for setting up postfix if you're trying to build knowledge, but if you're planning to use this in production, you're probably better off going with a hosted solution like Google Apps or GoDaddy's email service. Mail is tricky and hard to do right.

share|improve this answer
    
My VPS is for my personal website but I do all of my client work on there, so I need a fully ready server. I have my personal domain email with a couple other ones for personal use tied to it, so that's really the only thing I need it for.. I am setting up a google apps account now, I forgot about this. Can I configure my server to send through google apps as well? –  Atticus Jul 21 '11 at 9:30
    
You really don't want to use Google's SMTP servers to send mail, since they need to be authenticated to and you'll have to store your username and password in plaintext somewhere on the server. I imagine the VPS provider has a SMTP server you can use? If so, then you can configure ssmtp to forward mail there. Also, if you're using Google Apps for email, then you'll want to point your domain's MX record at them. –  Handyman5 Jul 21 '11 at 17:32

You should probably start here. It's pretty comprehensive.

That said, running a mailserver can be a complex task, especially when it goes wrong. I would recommend you look at installing a control panel onto your VPS like cPanel or Plesk if you don't feel capable of managing your own mailserver manually (of course, if you do that you won't learn anything!).

share|improve this answer
    
thanks, looks like a helpful resource –  Atticus Jul 26 '11 at 3:23
    
Oh by the way, i have installed cPanel + WHM myself on the server, can that setup a mailserver for me? –  Atticus Jul 26 '11 at 3:24

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.