Linode Forum Index Linode Forum
Linode Community Forums
 


Looking for the absolute minimum

Click here to go to the original topic

 
       Linode Forum Index -> Email/SMTP Related Forum
Author Message
Ryan Williams



Joined: 23 May 2011
Posts: 5

Posted: Thu Feb 02, 2012 6:06 pm    Post subject: 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.
Back to top  
hybinet



Joined: 02 May 2008
Posts: 1058

Posted: Thu Feb 02, 2012 6:54 pm    Post subject:  

From http://forum.linode.com/viewtopic.php?t=7882
Code: 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".
Back to top  
Ryan Williams



Joined: 23 May 2011
Posts: 5

Posted: Fri Feb 03, 2012 9:36 pm    Post subject:  

Thank you, that worked wonderfully. :D
Back to top  
sleddog



Joined: 31 Aug 2008
Posts: 101

Posted: Fri Feb 03, 2012 11:41 pm    Post subject:  

exim4 is lighter memory-wise.... but hey, you're happy :)
Back to top  
penyaskito



Joined: 05 Feb 2012
Posts: 3

Posted: Sun Feb 05, 2012 1:23 pm    Post subject:  

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



Joined: 02 May 2008
Posts: 1058

Posted: Sun Feb 05, 2012 2:18 pm    Post subject:  

penyaskito wrote: 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.
Back to top  
penyaskito



Joined: 05 Feb 2012
Posts: 3

Posted: Sun Feb 05, 2012 2:24 pm    Post subject:  

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?
Back to top  
hoopycat



Joined: 30 Aug 2008
Posts: 1294
Location: Rochester, New York

Posted: Sun Feb 05, 2012 3:27 pm    Post subject:  

Anything in the logs? Does "mail your_email_address_here@example.com" get a message through? Did it land in your spam folder?
Back to top  
penyaskito



Joined: 05 Feb 2012
Posts: 3

Posted: Sun Feb 05, 2012 3:43 pm    Post subject:  

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


Quote: 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

Back to top  
hybinet



Joined: 02 May 2008
Posts: 1058

Posted: Sun Feb 05, 2012 6:33 pm    Post subject:  

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.
Back to top  
 
       Linode Forum Index -> Email/SMTP Related Forum
Page 1 of 1