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
Solved

setup linux sendmail for mail relay backup

Posted on 2002-03-18
5
605 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Junk folder 23 184
Exchange 2013 Internal Relay Powershell Error 8 75
as logs exchange 2010 7 48
How to restrict users sending out emails to all 1 37
Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Familiarize people with the process of utilizing SQL Server views 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 Access…
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…

828 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