?
Solved

setup linux sendmail for mail relay backup

Posted on 2002-03-18
5
Medium Priority
?
613 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
[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
  • 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 200 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

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

As cyber crime continues to grow in both numbers and sophistication, a troubling trend of optimization has emerged over the last year.
This article outlines some of the reasons why an email message gets flagged as spam on a recipient's end.
In this video we show how to create a Distribution Group 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 Recipients >>…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Suggested Courses

777 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