At my company we have an Internal MS Exchange 5.5 Machine that we use as our main mail server. We used to dial-up to our ISP from this machine every 30 minutes to download our emails but just recently added an Broadband connection so now have a permanent connection to the internet. WeÆve got a firewall and router in place and I am not going to go into configuring these fully here but basically you need TCP ports 25 and UDP 53 open for SMTP and Domain queries. The following describes how we implemented an SMTP RELAY server in our DMZ to collect mail from the Exchange server and send it to the outside world and vice versa for e-mails addressed to our company.
All the files except the mydomain.com.m4 file described here are located within the /etc/mail directory on a Red Hat Linux 8 distro machine and you mey need to modify these paths accordingly for your distro
The sendmail.mc file is the first file we need to look at when we configure sendmail. Modify the contents to look like the following:
The main line that we are interested in is the æDOMAIN(`mydomain.comÆ)dnl line. This line tells the M4 compile program to look into the æ/etc/share/sendmail-cf/domain directory for a configuration file named æmydomain.com.m4Æ .
Edit the file æ/etc/share/sendmail-cf/domain/mydomain.com.m4Æ and make it look like the following. If the file does not exist then create it. Obviously you can add other features as required. The ones I have used below suite my needs
Edit/create the file located in the /etc/mail directory and put the following entry only:
mydomain.com
The Access Database
Edit the access file so that it looks like below.
#localhost.localdomain RELAY
#localhost RELAY
#127.0.0.1 RELAY
mydomain.com RELAY
exchange server IP RELAY
Once you have completed the changes then you need to compile the access database. This can be done by using the command:
makemap hash /etc/mail/access < /etc/mail/access
Mailertables
Edit/create the file within the /etc/mail directory as shown below placing the IP address of the machine within the square brackets. We use an IP address as our Relay machine in the DMZ cannot query our Internal DNS Server.
mydomain.com esmtp:[ip address of machine]
Once all the files have been created you will need to compile the sendmail configuration using the command
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.