?
Solved

Backup mail servers

Posted on 2004-08-13
13
Medium Priority
?
327 Views
Last Modified: 2010-04-20
Hi,
   I use sendmail on all my mail servers at the moment but I'm not sure how to go about setting up a backup mail server. Basically I want this server to accept all mail for a given domain and when the primary server is back online - to forward all that email to the primary server. I don't want to have to check each email server to see if any mail has arrived.... is this easy to do?

Thanks in advance!
0
Comment
Question by:petepalmer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 2
  • +1
13 Comments
 
LVL 1

Assisted Solution

by:mcbastian
mcbastian earned 400 total points
ID: 11791588
a possible solution is to add a second MX-Record DNS. give it a higher MX-Value, so mail will only be sent to this server when server with lower MX-Value is not reachable.

on the second server, set up Obtuse's SMTPD. it is a store-and-forward-daemon for SMTP.
0
 
LVL 1

Author Comment

by:petepalmer
ID: 11792033
Unfortunately the other servers are running sendmail so I'd need to do it with sendmail rather than another product - at least for now :)
0
 
LVL 1

Assisted Solution

by:mcbastian
mcbastian earned 400 total points
ID: 11792139
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 1

Author Comment

by:petepalmer
ID: 11792181
That's the set up I have at the moment but I want to move everything to use proper back up mail servers as opposed to storing the email on a remote account and then collecting it with say procmail...


It's all I need to perfect this system lol
0
 
LVL 40

Assisted Solution

by:jlevie
jlevie earned 1200 total points
ID: 11792532
You'll need a secondary MX pointing at another Linux box running sendmail with essentially the same sendmail conf you use now. The exception will be that you'll want to tell the secondary mail server to forward all mail to the primary. There are several ways this can be done; explict forwards for each user in the aliases file, explicit forwards and/or catchalls in the virtusertable map, etc. As long as the secondary knows to forward all mail to the primary it'll do what you want.
0
 
LVL 1

Author Comment

by:petepalmer
ID: 11793817
I've already got the MX records setup and the seconary server will accept email for the domain. The problem is I don't know how to get sendmail to hold on to the email until the primary is back up and then to forward it on to there :)
0
 
LVL 40

Assisted Solution

by:jlevie
jlevie earned 1200 total points
ID: 11794189
If the secondary believes that all of the users are on the primary and that it is to forward mail to there it will hold the mail until the primary comes back up. The trick here is telling the secondary to forward the mail. Personally I prefer to explictly list each valid address and define the forward, using a alias map for a single domain or a virtusertable map when there's more than one domain involved.  Some spam engines like to target a secondary mail server and I'd rather have that server reject mail for non-existant accounts rather than accepting it and having the primary reject it.
0
 
LVL 6

Assisted Solution

by:de2Zotjes
de2Zotjes earned 400 total points
ID: 11801233
One minor addition...

If you do have an outage of your primary you can trigger the secondary to flush it's mailbuffers by sending an ETRN <domain>.

This will forward any delayed mail to your primary mail site.
0
 
LVL 1

Author Comment

by:petepalmer
ID: 11801451
Can you give an example of how to forward a domain from a secondary to a primary ?  That's the bit I don't know how to do :)

Could also do with an example for mapping just a single account to
0
 
LVL 6

Assisted Solution

by:de2Zotjes
de2Zotjes earned 400 total points
ID: 11801815
I am not sure I understand what you mean, but what I meant with the ETRN bit is the following:

>telnet <secondary> 25
[220 SMTP server]
>HELO <primary>
[250 ...]
>ETRN <primary>
[250(?)...] (can't test right now)
>QUIT

So you contact the secondary and you tell it to start sending buffered mail to the primary. You could even automate this using fetchmail
0
 
LVL 1

Author Comment

by:petepalmer
ID: 11802274
I don't know how to get the secondary to hold email until the primary is back online.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 1200 total points
ID: 11804515
The secondary will receive the mail for your domain if it believes it to be a mail server for that domain. And that will happen if the hostname of the secondary lies within the domain or the domain is explictly listed in local-host-names. However, since the user's accounts aren't on the secondary it will bounce the mail (unknown user) unless we tell the secondary what to do with those messages.

One way is with aliases file records, like:

user1:               user1@main.dom.tld
user2:               user2@main.dom.tld
...

Another is with virtusertable records like:

user1@dom.tld     user1@main.dom.tld
user2@dom.tld     user2@main.dom.tld
...

or using a catchall:

@dom.tld               %1@main.dom.tld

In all of those cases the secondary can "see" that the mail needs to be forwarded to the user account on mail.dom.tld. If it happens to be down the mail will set in queue until it can be delivered.
0
 
LVL 1

Author Comment

by:petepalmer
ID: 11804870
Although jlevie has given me the answer I wanted everyone contributed....so I've upped the points to 500, of which 200 is going to be given to jlevie's final answer. All previous answers will each receive 50 points....


Thanks all :)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Fine Tune your automatic Updates for Ubuntu / Debian
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month8 days, 14 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question