- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- How to configure sendmail relay server
Operating System - Linux
1819804
Members
3170
Online
109607
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2010 03:57 AM
тАО04-25-2010 03:57 AM
Greetings,
I need your help to configure a sendmail relay server on linux. My requirement is,
I have few linux servers say serverA, serverB and serverC ( where sendmail was installed). Now, I would like to make serverC as a relay server so all the emails sent from serverA, serverB ( or all the servers in this subnet) would send / direct emails to serverC and from where it would send emails to the exchange server and then will receive those emials to our outlook mailbox.
Could someone explain how to make this configuration on serverC?
I found some information on Google that I will need to go into /etc/mail/access on serverC and then edit as
serverA RELAY
serverB RELAY
10.8.16. RELAY
Is this ok? how does serverA, serverB knows that serverC is a relay or sent emails?
Appreciate your help on this
thanks
I need your help to configure a sendmail relay server on linux. My requirement is,
I have few linux servers say serverA, serverB and serverC ( where sendmail was installed). Now, I would like to make serverC as a relay server so all the emails sent from serverA, serverB ( or all the servers in this subnet) would send / direct emails to serverC and from where it would send emails to the exchange server and then will receive those emials to our outlook mailbox.
Could someone explain how to make this configuration on serverC?
I found some information on Google that I will need to go into /etc/mail/access on serverC and then edit as
serverA RELAY
serverB RELAY
10.8.16. RELAY
Is this ok? how does serverA, serverB knows that serverC is a relay or sent emails?
Appreciate your help on this
thanks
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2010 05:17 AM
тАО04-25-2010 05:17 AM
Re: How to configure sendmail relay server
Your /etc/mail/access configuration looks OK to me. But remember that usually you'll have to translate the human-readable /etc/mail/access file into a machine-readable /etc/mail/access.db (or something similar) to make the changes take effect.
Depending on the Linux distribution, this might happen automatically when you restart sendmail, or you might have to do it yourself. If there is a file named "Makefile" in the /etc/mail directory, this might be as simple as:
cd /etc/mail
make
If there is no /etc/mail/Makefile, you may have to learn how to use the "makemap" command; see "man makemap". Also search through your distribution documentation using keywords "sendmail" and "makemap".
To make serverA and serverB send everything to serverC instead of trying to deliver them directly to destination, you need to set a "smarthost" on serverA and serverB.
In /etc/mail/sendmail.cf file, there is a line that normally contains only the letters "DS" like this:
DS
To make serverC the smarthost for this server, you change this line to:
DSserverC.full.name.example
(i.e. "serverC.full.name.example" is supposed to be the fully-qualified domain name for serverC.)
In some Linux distributions, you are not supposed to edit /etc/mail/sendmail.cf directly: in those distributions, sendmail.cf is automatically rewritten each time Sendmail is patched or updated. In that case, there should be a sendmail.mc file that is used to generate the sendmail.cf. To add a smarthost configuration through sendmail.mc, add a line like this to sendmail.mc:
define(`SMART_HOST',`[serverC.full.name.example]')dnl
Note the special single quotes used with the parameters: the sendmail.mc processing is extremely strict about proper syntax.
Then find the command that regenerates the sendmail.cf based on sendmail.mc. It depends on distribution: it might be as simple as running "make" in the directory that contains the sendmail.mc, or it might be something like "m4 < sendmail.mc".
MK
Depending on the Linux distribution, this might happen automatically when you restart sendmail, or you might have to do it yourself. If there is a file named "Makefile" in the /etc/mail directory, this might be as simple as:
cd /etc/mail
make
If there is no /etc/mail/Makefile, you may have to learn how to use the "makemap" command; see "man makemap". Also search through your distribution documentation using keywords "sendmail" and "makemap".
To make serverA and serverB send everything to serverC instead of trying to deliver them directly to destination, you need to set a "smarthost" on serverA and serverB.
In /etc/mail/sendmail.cf file, there is a line that normally contains only the letters "DS" like this:
DS
To make serverC the smarthost for this server, you change this line to:
DSserverC.full.name.example
(i.e. "serverC.full.name.example" is supposed to be the fully-qualified domain name for serverC.)
In some Linux distributions, you are not supposed to edit /etc/mail/sendmail.cf directly: in those distributions, sendmail.cf is automatically rewritten each time Sendmail is patched or updated. In that case, there should be a sendmail.mc file that is used to generate the sendmail.cf. To add a smarthost configuration through sendmail.mc, add a line like this to sendmail.mc:
define(`SMART_HOST',`[serverC.full.name.example]')dnl
Note the special single quotes used with the parameters: the sendmail.mc processing is extremely strict about proper syntax.
Then find the command that regenerates the sendmail.cf based on sendmail.mc. It depends on distribution: it might be as simple as running "make" in the directory that contains the sendmail.mc, or it might be something like "m4 < sendmail.mc".
MK
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2010 06:27 PM
тАО04-25-2010 06:27 PM
Solution
Shalom,
sendmail.mc has a smart relay option which is pretty much self documented but requires m4 macro generation to generate a new sendmail.cf file.
Simple DS relay is possible by un-commenting the DS section of sendmail.cf and merely restarting the sendmail daemon.
For more see http://sendmail.org
SEP
sendmail.mc has a smart relay option which is pretty much self documented but requires m4 macro generation to generate a new sendmail.cf file.
Simple DS relay is possible by un-commenting the DS section of sendmail.cf and merely restarting the sendmail daemon.
For more see http://sendmail.org
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP