Looking for the absolute minimum

Hiya,

I've just gotten my Linode able to serve WordPress at last, having installed and configured the following: * Nginx

  • PHP

  • MariaDB As you can imagine the site is pretty much flying, however there's an important piece missing: email. Now, I always use Google Apps to handle this so I have absolutely no need for any kind of sending or receiving apart from applications that might want to do so (eg: WordPress).

What's the most barebone way of getting it so my software can send emails, without bogging things down with all the other stuff that usually goes with it? I'm looking for the most lightweight and easy-to-maintain route possible.

9 Replies

From http://forum.linode.com/viewtopic.php?t=7882

apt-get install postfix
postconf -e "inet_interfaces = loopback-only"
/etc/init.d/postfix restart 

You'll need to make sure that your hostname is a fully qualified domain name that actually points to your IP address, and that you have a valid reverse DNS entry for your domain. (Linode's default reverse DNS works fine.) You will also need to add SPF to your domain, in order to keep your e-mails out of the spam box. To add SPF, go to the DNS manager, and add a TXT record with the following value (without quotes): "v=spf1 a mx include:_spf.google.com ~all".

Thank you, that worked wonderfully. :D

exim4 is lighter memory-wise…. but hey, you're happy :)

And what could I do if I need to host multiple domains in one linode? I can have only one reverse DNS name.

@penyaskito:

And what could I do if I need to host multiple domains in one linode? I can have only one reverse DNS name.
Nothing, it doesn't matter whether you host 1 domain or 1000 domains.

As long as each of your domains has a valid SPF record, Gmail et al. don't care whether or not your reverse DNS belongs to the same domain. The reverse DNS just needs to be a valid FQDN that belongs to some domain. The default entry that Linode assigned to you would work just fine.

Ok.

I have installed postfix as above, included the TXT DNS record, and not receiving php mail() mails yet :/

Any hint for fixing it? Have I to do anything else on postfix?

Anything in the logs? Does "mail youremailaddress_here@example.com" get a message through? Did it land in your spam folder?

I get this when trying to mail with the mail command to an email account hosted elsewhere:

> This is the mail system at host MYLINODEHOST

I'm sorry to have to inform you that your message could not

be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can

delete your own text from the attached returned message.

Reporting-MTA: dns; MYLINODEHOST

X-Postfix-Queue-ID: 2AD7213644

X-Postfix-Sender: rfc822; MYACCOUNT@MYLINODEHOST

Final-Recipient: rfc822; MYEMAILACCOUNT

Action: failed

Status: 5.0.0

Diagnostic-Code: X-Postfix; MYEMAILACCOUNTHOSTNAME

Status 5.0.0 is "Can't deliver. Don't know why. Can't retry, either."

Possible reasons:

  • Your mail server's hostname (mailname) is not a valid FQDN.

  • Your reverse DNS is not a valid FQDN.

  • The other mail server is just being an arsehole.

  • Your domain SPF does not allow your server to send mail. (Maybe you have conflicting records, or the DNS change hasn't propagated yet?)

Can't say anything more specific unless you tell us your Linode's hostname, the domain in question, and which company your other e-mail account is hosted with. If you need to keep this info confidential, try Linode support.

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