You'd automate the network test on your primary server of course using something as simple as ping, or a bit more sophisticated using netcat.
I'm sure with a google search or a hunt on sourceforge you'd find a script that checked your mail service. Regards, Wayne Blick ----- Original Message ----- From: "Simon Jones" <[EMAIL PROTECTED]> To: <qmailtoaster-list@qmailtoaster.com> Sent: Friday, December 23, 2005 8:09 PM Subject: RE: [qmailtoaster] Backup MX > Thanks Wayne, > > That wouldn't work too well in my environment though as it would need > constant monitoring, we're an ISP so our 4 primary servers process around > 20GB of mail every day each, so its essential that a backup is be available > whenever needed, when I figure it out I'll post it to the list. > > Have a great Christmas :) > > Si. > > > -----Original Message----- > > From: Wayne Blick [mailto:[EMAIL PROTECTED] > > Sent: 22 December 2005 22:01 > > To: qmailtoaster-list@qmailtoaster.com > > Subject: Re: [qmailtoaster] Backup MX > > > > > > Perhaps you could just do a simple network test for server_a > > status. When it goes offline do "qmailctl start" on server_b. > > > > Alternatively, you could use the same approach but > > enable/disable port 25 on server_b as server _a goes off/on line. > > > > Regards, > > Wayne Blick > > > > > > ----- Original Message ----- > > From: "Simon Jones" <[EMAIL PROTECTED]> > > To: <qmailtoaster-list@qmailtoaster.com> > > Sent: Friday, December 23, 2005 3:50 AM > > Subject: RE: [qmailtoaster] Backup MX > > > > > > > Thanks Jake, > > > > > > Perhaps I didn't provide enough info: > > > > > > I have 2 mail servers: > > > > > > MX10 server_a > > > MX20 server_b > > > > > > If server_a is off line server_b will relay for server_a > > and queue the > > mail > > > until it is alive, this is OK. > > > > > > Because this is an established server it is known to relay > > for certain > > > domains, here's the problem, the server will currently > > accept mail for its > > > relay domains regardless of whether server_a is online, > > this is usually > > junk > > > mail so I'd like to check if server_a is alive before > > accepting mail, if > > it > > > is server_b will reject the message, if it is not server_b > > will queue the > > > message. > > > > > > Simon. > > > > > > > -----Original Message----- > > > > From: Jake Vickers [mailto:[EMAIL PROTECTED] > > > > Sent: 22 December 2005 16:22 > > > > To: qmailtoaster-list@qmailtoaster.com > > > > Subject: Re: [qmailtoaster] Backup MX > > > > > > > > Simon Jones wrote: > > > > > > > > >Hi, > > > > > > > > > >I have a backup server which will relay for customers if the > > > > primary MX > > > > >is unreachable, problem is we've been around for years > > so my backup > > > > >relays are known to relay for certain domains. I see a lot > > > > of bounced > > > > >mail in the logs. > > > > > > > > > >I would like to have qmail only accept mail for relaying if > > > > the higher > > > > >MX preferences are unreachable, for example is this server > > > > is MX 30 for > > > > >domain.com and the MX 10 is available the server should > > > > reject the message. > > > > > > > > > >Only if MX 10 and MX 20 are unreachable should the server > > > > accept mail. > > > > > > > > > >How can I do this? > > > > > > > > > >I have just switched to qmail from sendmail which I have so > > > > far found > > > > >to be easier to configure and much quicker, so apologies if > > > > this is a > > > > >dumb question! > > > > > > > > > > > > > > I'm not understanding quite what you're trying to do. Most of > > > > what you outlined should work as is. When my server, for > > > > example, tries to send you a message, it will look up the MX > > > > records in DNS, and then normally send to the 30 MX record. > > > > If the 30 is unavailable, it moves up to the 20 record, and > > > > eventually to the 10 if none of those are available. Or I > > > > could have it backward (goes to 10 first, then moves down). > > > > Windows does it one way, and Linux does it another. > > > > > > > > Anyway, the 30 record machine should get the mail, and then > > > > hold it while trying to deliver it to the 10 MX record every > > > > 5 minutes until the value in queuelifetime on that machine is > > > > reached - then it bounces it to the sender. If what you're > > > > asking is how to get the other MX record machine to accept > > > > the emails, the only thing you need to do is add the domain > > > > to the /var/qmail/control/rcpthosts file and it will accept > > > > emails for that domain, and try to deliver them to the 10 > > MX machine. > > > > Let me know if you were looking for some different information. > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > > For additional commands, e-mail: > > > > [EMAIL PROTECTED] > > > > > > > > --- > > > > > > > > > > > > -- > > > > No virus found in this incoming message. > > > > Checked by AVG Free Edition. > > > > Version: 7.1.371 / Virus Database: 267.14.1/207 - Release > > > > Date: 19/12/2005 > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > --- > > > > > > -- > > No virus found in this incoming message. > > Checked by AVG Free Edition. > > Version: 7.1.371 / Virus Database: 267.14.1/207 - Release > > Date: 19/12/2005 > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]