Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-17-2015, 06:50 AM   #1
LQ Newbie
Registered: Dec 2015
Posts: 2

Rep: Reputation: Disabled
Configuring sendmail to send directly to our MS Exchange Server (Internal use Only)

I am just configuring a Linux Server Fedora 22 and have got sendmail to work: This was easy, just
sudo apt-get install sendmail (followed by)sudo sendmailconfig
then something like echo "My test email being sent from sendmail" | /usr/sbin/sendmail

I did a test email and this came back to my corporate email account, however I noticed that it went outside first (12+ hops) and then must have been sent back (another 12 hops) to my corporate exchange server.

The requirement of the Linux box is just to send emails internally when a process is complete (basically tracking activity). Thus the question is how and what do I configure to send the emails directly to our internal exchange server using sendmail
Old 12-17-2015, 07:59 AM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,830
Blog Entries: 15

Rep: Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668
Typically we setup mail to "relay" to our MS Exchange server:

For Sendmail - To setup <myserver.mydomain> as relay:
a.) In /etc/mail uncomment the line below (remove "dnl" from start of line) in and add myserver.mydomain so it reads:
define(`SMART_HOST', `myserver.mydomain')dnl
b.) After that run "make -C /etc/mail" This will add "DSmyserver.mydomain" to
Note: The package must be installed for this work. The default sendmail package doesn't include the make ability.
c.) Run "service sendmail restart" after you've changed the above.

For the above to work your MS Admin must allow your host to relay as well.

Note that MS Exchange in the cloud (Office365) will show you multiple hops even if you are using an internal server for relay in a hybrid environment because it goes out to the cloud from your internal server.
1 members found this post helpful.
Old 12-18-2015, 03:50 AM   #3
LQ Newbie
Registered: Dec 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
OK, Thanks
I thought it might be this file that needed adapting. I will give it a go!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Sendmail DMZ Exchange 2007 internal Linux - Newbie 1 12-20-2010 10:03 PM
[SOLVED] SendMail exterior Exchange Internal Slackware 2 10-22-2010 11:27 AM
Sendmail to relay domain specific mail to internal MS Exchange 2003??? Wolfy Linux - Networking 4 06-22-2007 10:23 PM
Sendmail as SmartHost to route MS exchange 2003 Internal mail cksoo Linux - Enterprise 4 01-15-2007 10:34 AM
Configuring sendmail like Exchange gauge73 Linux - Networking 10 03-24-2006 02:54 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:33 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration