HOWTO: send email from my VPS but receive at Google?

I am running a website on Linode and want to send out message to users – Django app. Few hundred emails a day. I will not receive a lot of emails -- but if any, Ideally I want to receive them via gmail / google apps.

What is minimum I need to set up on my Linode VPS to send emails.

Many Thanks

Bos

2 Replies

The way email works, sending and receiving are totally unrelated. Anyone with a mail server software can send emails pretending to be from your domain (which is why there's so much spam), but receiving is strictly tied to your domain's MX records.

1. Install Postfix, e.g. apt-get install postfix

2. Edit /etc/postfix/main.cf and disable connections from outside

inet_interfaces = loopback-only

3. Send emails from your Linode!

4. Point your domain's MX records to Google's mail servers

5. Receive emails at Google!

Thanks for help – all is working now:

This is what I did:

  • On debian -- Exim 4.69 was installed, so using that

  • Run "sudo dpkg-reconfigure exim4-config"

to set up the basics

  • was already able to send mails using

"mail test@gmail.com"

  • but also set up my SPF in DNS TXT just to be sure

Not sure what pro / con of Exim vs Postfix is but OK for now.

Regards

Bos

:D

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct