?
Solved

Setting up secondary mail server

Posted on 2003-03-12
9
Medium Priority
?
1,285 Views
Last Modified: 2013-12-17
This is not a Sendmail question, it is a Linux mail server question.
I work at a little ISP, at present we have two servers, both working well:
1. RH 8 + Postfix + MySQL + Courier-imap + sqwebmail + Bind
2. RH 8 + Apache + PHP 4.3.0 + Bind

and DNS is setup like this
MX 10 server1
MX 100 server2
In server #2 there is no mail server program yet.

I've tried to use PHP's "mail" function in server2 but as I have no SMTP server it didn't work.
So I wanted to install some kind of mail server, and use it also as a secondary server if server1 fails. My aim is that no mail get lost.

Question 1:
Can I setup Postfix as a "catchall" server? (so if server1 fails server2 gets every mail and then when server1 is fixed I guess I can deliver mail back with fetchmail)
Or should I duplicate server 1 maildir and database structure?

Question 2:
Is there a simpler solution?

Thanks



0
Comment
Question by:clau
[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
  • 4
  • 3
  • 2
9 Comments
 
LVL 3

Accepted Solution

by:
naccad earned 1000 total points
ID: 8122870
all you need to do is set relay_domains in main.cf
to the domain name of your ISP.

Actually if you do mail hosting on server1, you can
set server2 to be a backup for all these domains:

relay_domains = mydomain.com, hosted1.com, hosted2.com...etc

tc
-nick
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 8122914
You'll  need mail server software on the secondary mail server in order to queue the email.  Postfix can serve that purpose.

The question, however, is more a matter of how to appropriately configure postfix to queue the mail for the other server.

In sendmail, you'd set up the secondary MX (like you've done), and then you'd add the host to a file called 'relay-domains'.  It would appear that the similar configuration item in postfix  (based on the documentation at postfix.org) is called 'mynetworks'.
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 8122925
P.S. in answer to the part of the question as to whether or not you'd have to set up all the email accounts, etc., the answer is no - it's not going to be emailed locally - it's going to be queued for delivery to the main server.
0
What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

 

Author Comment

by:clau
ID: 8126875
Ok, so if server1 breaks the mail will stay queued in server2 till server1 is repaired?
I must be sure to set maximal_queue_lifetime very high.

naccad: if server2 is a backup for the domain, will it store every mail coming to server1? Please tell me what 'backup' means when talking about mail servers.
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 8126922
clau -

If server1 breaks (working again, from my knowledge of sendmail, not postfix), the email queues at server2.  With sendmail, when server1 comes back up again, you issue a set of commands (usually through a perl script) to retreive the email via ETRN.  With sendmail, a sample perl script is provided;  I would search the postfix site to see if there is a similar type of program there as well.
0
 

Author Comment

by:clau
ID: 8127158
Ok, so if server1 breaks the mail will stay queued in server2 till server1 is repaired?
I must be sure to set maximal_queue_lifetime very high.

naccad: if server2 is a backup for the domain, will it store every mail coming to server1? Please tell me what 'backup' means when talking about mail servers.
0
 
LVL 3

Expert Comment

by:naccad
ID: 8127578
ok.. a backup mail server, or a secondary MX is a mail server
that will just queue the emails locally until the primary
MX comes back online. it will not deliver it to local users
because by definition a backup MX has no local users.

Most ISPs will offer this for you, worldcom/uunet will
allow u to put mail.uunet.com (or something) as secondary
MX for backups.

by default, sendmail will queue the email fro 4 days, in
my experience more than enough to get the primary up and
running.

most will use SMTP to relay the emails after the primary
comes back up, some will use UUCP or FTP or whatever, SMTP
is prolly the easiet.

hope that helps
tc
-nick

0
 

Author Comment

by:clau
ID: 8131323
Thanks to periwinkle too. Both were of great help, but naccad answered first (and with Postfix configuration).
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 8131499
clau -

Glad to help - and you're correct, naccad deserved the points!
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
Suggested Courses

770 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