Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Feb 02, 2012 7:06 pm 
Offline
Senior Newbie

Joined: Mon May 23, 2011 9:51 am
Posts: 10
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.


Top
   
 Post subject:
PostPosted: Thu Feb 02, 2012 7:54 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
From 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".


Top
   
 Post subject:
PostPosted: Fri Feb 03, 2012 10:36 pm 
Offline
Senior Newbie

Joined: Mon May 23, 2011 9:51 am
Posts: 10
Thank you, that worked wonderfully. :D


Top
   
 Post subject:
PostPosted: Sat Feb 04, 2012 12:41 am 
Offline
Senior Member

Joined: Sun Aug 31, 2008 4:29 pm
Posts: 177
exim4 is lighter memory-wise.... but hey, you're happy :)

_________________
sleddog


Top
   
 Post subject:
PostPosted: Sun Feb 05, 2012 2:23 pm 
Offline
Newbie

Joined: Sun Feb 05, 2012 2:21 pm
Posts: 3
And what could I do if I need to host multiple domains in one linode? I can have only one reverse DNS name.


Top
   
 Post subject:
PostPosted: Sun Feb 05, 2012 3:18 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
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.


Top
   
 Post subject:
PostPosted: Sun Feb 05, 2012 3:24 pm 
Offline
Newbie

Joined: Sun Feb 05, 2012 2:21 pm
Posts: 3
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?


Top
   
 Post subject:
PostPosted: Sun Feb 05, 2012 4:27 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Anything in the logs? Does "mail your_email_address_here@example.com" get a message through? Did it land in your spam folder?

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Sun Feb 05, 2012 4:43 pm 
Offline
Newbie

Joined: Sun Feb 05, 2012 2:21 pm
Posts: 3
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



Top
   
 Post subject:
PostPosted: Sun Feb 05, 2012 7:33 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group