Koozali.org: home of the SME Server

backup mailserver for a friend

J-L Boers

backup mailserver for a friend
« on: May 06, 2001, 10:43:31 PM »
Hi all,
First off, I have searched the forums, but I am not sure I am wording things right.

Here's the situation....

I have a fully functioning e-smith box (4.1.2)running web/ftp/mail for my domain. I have a static IP and off-site dns. all is working well.
I setup a friends box the same way. his is identical except for the IP,domain etc.

Here's what I want to do:
When my e-smith box goes off-line, i want my mail to spool to his box, so when mine comes back on-line... i should get all the mail that i would have missed otherwise from his box. My adsl modem has a tendency to lock up occasionally requiring that i power cycle the adsl modem. once it is back up, my e-smith box continues operation as normal. the e-smith box never requires any intervention when this occurs.

I want to set up my friend's box the same way.

Could someone please tell me what I am asking about so I can do proper searches for it? and of course if someone already has this fail-over mail thing happening, give me their notes on what they did? I know it can be done by setting up another mx record with a higher number  (for example main = 10, backup = 30).

Thanks for the help.

J-L Boers
jl@boers.cc

Phil Routley

Re: backup mailserver for a friend
« Reply #1 on: May 07, 2001, 08:07:42 AM »
J-L Boers wrote:
>
> Hi all,
> First off, I have searched the forums, but I am not sure I am
> wording things right.
>
> Here's the situation....
>
> I have a fully functioning e-smith box (4.1.2)running
> web/ftp/mail for my domain. I have a static IP and off-site
> dns. all is working well.
> I setup a friends box the same way. his is identical except
> for the IP,domain etc.
>
> Here's what I want to do:
> When my e-smith box goes off-line, i want my mail to spool to
> his box, so when mine comes back on-line... i should get all
> the mail that i would have missed otherwise from his box. My
> adsl modem has a tendency to lock up occasionally requiring
> that i power cycle the adsl modem. once it is back up, my
> e-smith box continues operation as normal. the e-smith box
> never requires any intervention when this occurs.
>
> I want to set up my friend's box the same way.
>
> Could someone please tell me what I am asking about so I can
> do proper searches for it? and of course if someone already
> has this fail-over mail thing happening, give me their notes
> on what they did? I know it can be done by setting up another
> mx record with a higher number  (for example main = 10,
> backup = 30).
>
> Thanks for the help.
>
> J-L Boers
> jl@boers.cc

Hi,

I am also looking for a way of doing this, this is my solution, it may not be right as I am learning to,

I was going to get the isp that does my DNS records, to have a secondary mail dns record for my domain pointing to a friends mail server, then set up a vitual domain on the friends server to collect mail for that domain,as well .

I would expect this to work and would get the mail, but how to then have it redirected to your mail server when it is back on line I am unsure.

I hope this infomation is in some way of help.

PR

John Powell

Re: backup mailserver for a friend
« Reply #2 on: May 09, 2001, 02:55:10 AM »
Before I go any further, I should note I have not done this with e-smith, so this is only a clue for you.

Yes, Phil's response is the first step.  You need to have the DNS records for your domain set to have a secondary (lower priority) MX record pointing to your friend's machine (and vice-versa).  You should get the backend mechanics (below) running before doing the DNS/MX change.

The next step (much trickier as there is no admin screen in e-smith for this) is to configure the SMTP in your box to "accept for relay" mail destined for your friend's domain (and, of course, vice-versa on his box).  It probably is not all that difficult, I did this with sendmail quite easily some time back.

The rest is pretty automatic.  For example, if your machine is inaccessible (dsl down or whatever) incoming mail will go to your friend's machine.  His machine will store it and continuously try to deliver it to your box.  When your box becomes available again, your friend's box will succeed and deliver the mail.  There might be some delay (due to backoff algorithms) but it should get through within an hour or two (depenidng on how long you have been down).  Generally (configurable), it will try for 5 days before bouncing the mail back to the sender.

That should do it.  You can test it by setting your mail client to use your friend's box as it's SMTP and send yourself an email (and, once again, vice-versa).  You can test this "by hand" too by telnetting to port 25 on his box, but that involves knowledge of the SMTP protocol (surprisingly simple).  The manual method is preferred as you will see any errors (like "relaying denied").  See bottom of this note for a sample manual smtp session.

To be honest, I have lost track of how exactly the SMTP stuff is setup in e-smith since changes in 4.1.  It is now a somewhat complicated combination of obtuse and qmail, but I think obtuse is what you need to configure to allow the relaying.

Hope this helps!  JP

Sample manual SMTP session (telnet to port 25 on your firends machine).  Stuff preceded with a number are responses from the server.  Stuff NOT preceded by a number is what I entered:

220 www.e-smith.jrp2.dyndns.org SMTP daemon ready.
helo jrp2.net
250 www.e-smith.jrp2.dyndns.org pleased to meet you, jrp2.net
mail from:
250 sender is , sender OK
rcpt to:
250 recipient , recipient OK
data
354 OK End with .
just another test to ignore!

.
250 Message accepted for delivery
quit
221 Closing connection

The above sent a mail from lists@jrp2.net to vpcm@yahoo.com with the text "just another test to ignore".  It will not be a fully formatted email, but it should get through and will test the relaying config quite nicely.  If your relaying is NOT setup correctly you will get some type of error after the rcpt command.

raj

Re: backup mailserver for a friend
« Reply #3 on: May 12, 2001, 11:36:25 PM »
Here is a good free DNS server for you guys. http://www.zoneedit.com it handles up to 5 zones.

Raj