Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm not a server admin, so these might be dumb questions...

I have a client I'm building a web app for, who asked me to set up a mail server on the VPS it's hosted on to send emails rather than send them through their server.

Since we're both sending emails from, there's no way to receive emails on the server I set up, right?

Will I still be able to use techniques like setting up a reverse PTR record or using DKIM if the DNS for points to the other email server?


share|improve this question
up vote 0 down vote accepted

You can set up an outgoing server. MX is for incoming only, and does not require a PTR record. However, you may want to consider setting up as a satellite and sending all mail through the central server. This can be done with SMTP auth over TLS if you need to traverse the Enternet.

If you do decide to send email directly. These are the basic things you need to do for an outgoing server (

  • Define a name for the outgoing server (
  • Get both the PTR (pointer) and A (address) setup in DNS. (May be different DNS admins.)
  • Configure the server to send to the Internet.
  • Ensure your sender addresses are configured to receive email via the MX. These can be routed to your server if needed. (Usually done via aliases.) You will need a route to the server.
  • (Optional) Get SPF setup for the server. needs to list, by IP address or name. This is in addition to their own server. should be listed as a sender for itself.
  • (Optional) Get DKIM data for the server set up in DNS. Should use your own keys and selectors.
  • Test your setup and start sending email.

An alternative for email to this server is to use a subdomain ( This will need an MX record. In that case I would consider using the same name for the SMTP server. Setting up to recieve email is significantly more difficult than sending.

share|improve this answer

First of all, the question which mail server will receive emails for that domain is determined by the MX records in the DNS settings. OTOH, if you want your sending server to be recognized without problems, it should have correct reverse DNS set up, otherwise many mail servers around the world will not accept incoming email from it. This effectively means that the PTR record should resolve to a host name which, if resolved itself, points to the same IP address.

Having said all of this: if you are not a server admin, I would seriously recommend AGAINST you setting up a mail server for anybody. Running a mail server is not something you do in your spare time. It requires quite a bit of knowledge, skill and time to keep it up to date and configured in such a manner that it performs and doesn't get compromised. Rather get them a hosted mail server somewhere else.

Of course, if you are willing to put the time in (and hopefully you are able to bill your client for it), then by all means go ahead. Pick your favourite MTA and I am sure all of us here will be able to help you get it set up properly and safely.

share|improve this answer
Thanks for answering. I probably should have been more precise with my first question. If the company server sends emails from and my server does to, the MX records can only point to one of those servers right? If this is the case and the MX points to the other server, can I have a PTR for my server? I would think not because it has to resolve to a host name which should resolve to the other ip address. – Kevin Sep 8 '10 at 22:52
You can have multiple MX records. However, any mail server with a MX record in the DNS should be configured to receive mail for that domain, otherwise you will eventually lose messages. The question of PTR records is independent from the MX records. – wolfgangsz Sep 9 '10 at 8:14

Your Answer


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.