LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 12-17-2015, 06:50 AM   #1
barry.noble
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 myemail@domain.com

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
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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 sendmail.mc 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 sendmail.cf.
Note: The sendmail.cf 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
barry.noble
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!
 
  


Reply


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 gymiv@aol.com Linux - Newbie 1 12-20-2010 10:03 PM
[SOLVED] SendMail exterior Exchange Internal gymiv@aol.com 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:57 PM.

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