Solved

setup linux sendmail for mail relay backup

Posted on 2002-03-18
5
601 Views
Last Modified: 2013-12-17
I using an exchange server and I want setup the linux sendmail for relay backup. IF my exhange server is down, I want all the mail will send & store to the sendmail. After that, the sendmail will delvery the email back to exchange when the exchange is up and no mail lost.
0
Comment
Question by:kennycpu
  • 2
5 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 6876912
The Linux side of this is easy, the exchange side is, well, not so easy. You'll need a Linux system configured with enough room in /var/spool to be able to hold email for however long you'd exepect the exchange server to be down. Personally I configure Linux for this sort of application with separate /var and /var/spool file systems. That reduces the chances of boot problems in the event of an unexpected power down.

A normal sendmail configuration on the Linux box will typically be fine. You'll need to tell sendmail that it's to forward all email to exchange and there are several choices as to how to do that. You can create an alias for each user, like:

a-user:      a-user@exchange-srv.mydom.tld

or you could do the same thing with virtusertable. Either of those methods would require keeping the aliases or virtusertable file up to date w/respect to your user accounts on the exchange server. Those methods have the advantage of bouncing email at the relay for addresses that don't correspond to an active account. If you want to relay all mail, regardless of the address, to exchange use a virtusertable containing only:

@mydom.tld      %1@exchange-srv.mydom.tld

It's also possible to forward mail to the exchange server with mailertable.

On the exchange side you'll have to set up each account so that it can receive email addressed to user-name@mydom.tld and user-name@echange-srv.mydom.tld. Right now the first form of the address is probably active and you'll need to add the later. The reason for that is that the forward of the email by sendmail will result in the address being re-written from user-name@mydom.tld to user-name@exchange-srv.mydom.tld.

With all of that in place and tested you'll need to have the MX record for your domain changed to point to the Linux system. When that change takes affect Internet mail will flow to the Linux system and then be forwarded to exchange. If, for some reason, the exchange server is down sendmail will simply queue up incoming messages to be delivered later when the exchange server is back on line.

As a bonus, this setup is perfect for installing one of the anti-virus and/or anti-spam systems on the Linux box. And if you want to protect your exhange server for attacks originating from the Internet you can hide the exchange server from direct Internet access and configure exchange to route all outbound email thorugh the Linux mail relay.
0
 

Author Comment

by:kennycpu
ID: 6878982
Can I need to recompile the sendmail in RH 7.2? You means just to modify the record in virtualusertable for every exchange users. But I know many ISP can provide this services but I don't need tell him to add new user so I think it not need to add every exchange user in virtualusertable.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 50 total points
ID: 6879071
The Sendmail executable furnished with RedHat 7.2 is suitable as in. You may need to build a new sendmail.cf file, depending on hou you decide to implement the relay. As furnished, the Redhat sendmail.cf file includes support for virtusertable. One thing that you will need to do is to build a new cf file to allow SMTP connections, see the comments towards the end of /etc/mail/sendmail.mc. A full explanation is in the Release Notes on the 1st installation CD.

No, you don't have to have a record in virtusertable, if you don't mind the exchange server having to bounce email addressed to non-existant accounts. Go back and read my comment carefully. The virtusertable record like:

@mydom.tld     %1@exchange-srv.mydom.tld

says to take any inbound email addressed to some-user@mydom.tld and forward that to some-user@exchange-srv.mydomain.tld. The '%1' is replaced by what's to the left of the '@' in the inbound email.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

MS outlook is a premier email client that enable you to send and receive the e-mails with various file formats of attachments such as document files, media file, and many others formats. There is some scenario occurs when a receiver of an e-mail mes…
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.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now