Solved

Backup mail servers

Posted on 2004-08-13
13
325 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 100 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 100 total points
ID: 11792139
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
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 300 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 300 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 100 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 100 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 300 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Moving from Mcrypt to OpenSSL 18 75
Upgraded from Debian 7 to 8.7 and got black screen 20 121
The better OS Architecture 13 108
Trying to install php56 on CentOS 7 get GPG error 5 57
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

734 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