0

I'm currently experimenting with working with Outlook.com for an email server, and have MX records set up to point there and the like. How can I configure systems like postfix to use external servers for mail? When I try to use functions like PHP's mail() for example, the server logs return this line, obviously because user isn't a user on my system, but rather is on an external mail server.

ABBAB100B92: to=<[email protected]>, relay=local, delay=0.06, delays=0.04/0.01/0/0.01, dsn=5.1.1, status=bounced (unknown user: "user")

Might it be easier to run a mail server right off of the VPS I'm hosting my website on, so that everything stays local? Or is that not a very good idea?

System is an Ubuntu 12.04.3 LTS

1 Answer 1

1

For Postfix, you need to set relayhost in your configuration, and some other options as well. There are many articles online explaining how to do this, for example this one.

Might it be easier to run a mail server right off of the VPS I'm hosting my website on, so that everything stays local?

I don't think that would be easier.

Or is that not a very good idea?

No, it's not, because email coming directly from your server will probably have a higher probability of being classified as spam based on its IP address than email coming from a reputable provider such as Outlook.com.

6
  • Right. I was able to set up the relay properly, however, in this particular case when I'm using a contact form, when the email is relayed through outlook, the from address is stripped because of the SMTP server. What I end up receiving is something like: To: [email protected] From: [email protected] Is there any way to preserve this info? I was able to to it when email was hosted on my server before moving to a VPS. Commented Dec 30, 2013 at 6:44
  • @NoelForte ah, yes, both Outlook.com and GMail rewrite FROM addresses for anti-spam reasons. You could add an additional header I suppose. Commented Dec 30, 2013 at 7:20
  • What if I just set up an email server directly on my server? I know you said this isn't easier, and has potential to be blacklisted, but don't PTR Reverse DNS Records and SPF Records, as well as SSL Certs help prevent blacklisting? Commented Dec 30, 2013 at 21:14
  • Yes, good points. OK, maybe that would be better for this use case. Commented Dec 30, 2013 at 21:16
  • One more question: Would you recommend using a separate VPS for email? Or is it better to run email and apache off of one box? Commented Dec 30, 2013 at 21:39

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.