Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: routing email question
PostPosted: Sun May 06, 2012 7:01 pm 
Offline
Senior Member

Joined: Thu Nov 12, 2009 3:27 pm
Posts: 57
Website: http://www.mtgames.org/
WLM: ai5hf@hotmail.com
AOL: btakillermich11
Location: Baton Rouge, Louisiana
Hi all,
I just set up a dedicated linode for handling my email for all my domains. However, now I have a problem: If an application on one of my other servers (say apache or cron) wants to send an email, it can't (as far as I know) because it is not on the email server. Is there any way around this? I would like to forward email from these other two servers I have, both running apache, and some running other services to my email server.
Any help is appreciated.
Thanks,
-Michael.

_________________
http://mtgames.org/
"A world that contained a creature as amazing as that bumblebee was a world he wanted to live in." -- Christopher Paolini, Brisingr.
"The songs of the dead are the lamentations of the living." -- Christopher Paolini, Eldest.


Top
   
 Post subject:
PostPosted: Sun May 06, 2012 8:26 pm 
Offline
Junior Member

Joined: Sun May 06, 2012 2:30 pm
Posts: 25
Location: San Diego, California
I'd look into some sort of mail proxy to forward the connections via a private Linode IP which the mailserver listens on.

I believe nginx is capable of such, but I'm not sure what else is.. probably even postfix if you configured it right.


Top
   
 Post subject:
PostPosted: Sun May 06, 2012 9:02 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
You can install mailservers on your other servers that pass all mail to your main mailserver for delivery. How this is configured depends on which MTA you are using.

If you do not want to run mailservers on your other servers, you could also use something like msmtp to send mail to your main mailserver. While this often initially appears simple and attractive, it has disadvantages. If your mailserver is down or not responding, the message will be dropped instead of being queued for future delivery. Also, msmtp does not listen on port 25 for mail - it only accepts mail via standard input, so applications must be designed for that. Third, the web page sending mail will pause until the message is delivered to the main mailserver (or delivery fails), which may take some time if it is busy or down.


Top
   
 Post subject:
PostPosted: Mon May 07, 2012 9:47 pm 
Offline
Senior Member

Joined: Thu Nov 12, 2009 3:27 pm
Posts: 57
Website: http://www.mtgames.org/
WLM: ai5hf@hotmail.com
AOL: btakillermich11
Location: Baton Rouge, Louisiana
Hi,
I am using postfix on my main mailserver, and hope to use postfix on my other servers as well, just for consistancy. Any idea how I could do that with this configuration?
Thanks,
-Michael.

_________________
http://mtgames.org/

"A world that contained a creature as amazing as that bumblebee was a world he wanted to live in." -- Christopher Paolini, Brisingr.

"The songs of the dead are the lamentations of the living." -- Christopher Paolini, Eldest.


Top
   
 Post subject:
PostPosted: Mon May 07, 2012 9:52 pm 
Offline
Junior Member

Joined: Sun May 06, 2012 2:30 pm
Posts: 25
Location: San Diego, California
These guides seem to explain how to setup postfix to relay to your mail server..

http://www.howtoforge.com/postfix_relay ... mailserver

http://www.howtoforge.com/how-to-relay- ... fix-server

Hopefully they are of some help, let us know how it goes.


Top
   
 Post subject:
PostPosted: Tue May 08, 2012 4:24 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
Those would work, although if you are not running Dovecot or Cyrus on your main mailserver there is another option.

I will call your server with the main mailserver Linode M, and your other servers Linode 1, Linode 2, Linode 3...

On Linode M, edit your Postfix main.cf to include:
Code:
mynetworks = 127.0.0.0/8, Linode M IP, Linode 1 IP, Linode 2 IP, Linode 3 IP...

This will cause those servers to be considered trusted senders allowed to relay mail.

Set up Linodes 1, 2, 3... as null clients. Edit main.cf on these servers to include:
Code:
relayhost = Linode M hostname or IP
inet_interfaces = loopback-only
local_transport = error:local delivery is disabled

This configures these machines to relay all mail through Linode M. You could set myorigin = $mydomain so people won't try to reply to these machines, which don't accept outside mail. However, this can make it more difficult to figure out exactly which machine cron and system messages are coming from.

Note that if you want this mail to be transferred over the private network (assuming all your Linodes are in the same datacenter), you can specify private IP addresses above instead of the public ones.

You may also have to set up a non-local alias (edit /etc/aliases and run newaliases) on Linodes 1, 2, 3... for root so that delivery of cron and system messages isn't attempted locally.


Top
   
 Post subject:
PostPosted: Wed May 09, 2012 9:40 pm 
Offline
Senior Member

Joined: Thu Nov 12, 2009 3:27 pm
Posts: 57
Website: http://www.mtgames.org/
WLM: ai5hf@hotmail.com
AOL: btakillermich11
Location: Baton Rouge, Louisiana
Hi,
That last message works like a charm -- Thanks!
-Michael.

_________________
http://mtgames.org/

"A world that contained a creature as amazing as that bumblebee was a world he wanted to live in." -- Christopher Paolini, Brisingr.

"The songs of the dead are the lamentations of the living." -- Christopher Paolini, Eldest.


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


Who is online

Users browsing this forum: No registered users and 3 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