LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-18-2012, 12:26 PM   #1
jag7720
Member
 
Registered: Aug 2003
Posts: 53

Rep: Reputation: 15
email without local mta daemon running


We have an exchange server that will accept connections from our linux servers and will send email from them.

I am able to telnet to the exchange server on port 25 and do a helo test and send an emial. Also, we have a java based app on the linux server that can send mail successfully and the only config for it is the IP of the exchange server.

I'd like to write some scripts that will send me an email when what I need to know about happens.

I can't run sendmail daemon or any other MTA daemon for that matter on the linux servers.

Is there a way that I can send an email from my linux servers from the cli or script that will specify the exchange server as the relay?


Oh, and I am stuck using mail or mailx. I can't install any other software.

I've tried the "-S smtp=xxx.xxx.xxx.xxx" in mailx as I have seen suggested but it doesn't like the "-S".

thanks for the help
 
Old 07-18-2012, 03:14 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Check out.. http://motersho.com/blog/index.php/2...p-device-file/

You can also, if you are able to, install an MTA like qmail and smart host the email messages to the exchange server for actual delivery. qmail would only handle the email creation and queue management on the linux server.
 
Old 07-18-2012, 03:22 PM   #3
jag7720
Member
 
Registered: Aug 2003
Posts: 53

Original Poster
Rep: Reputation: 15
Thanks for the reply. I am able to do the first part of that page manually... but the rest of it seems overly complicated to accomplish a simple

Code:
mailx  -s "test from smtp #1" user@domain.com
There has to be a setting somewhere to tell sendmail where to relay to
 
Old 07-18-2012, 06:19 PM   #4
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Hi,

I don't really know how or what, I'm almost sure that where is "mail" command there is "sendmail" behind it,
si I did search for some "sendmail relay"
and it points out some of possible examples:
- Configure sendmail for SMTP relay with your ISP
- configure sendmail to relay mail to exchange server
- Using Sendmail to relay all mail to my Exchange Server
- SENDMAIL as an SMTP RELAY SERVER that can send email to internet
- How To Relay Email On A Postfix Server

I hope something will be helpful
 
Old 07-18-2012, 06:38 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Quote:
I can't run sendmail daemon or any other MTA daemon for that matter on the linux servers.
I'd be amazed if there isn't already an MTA like sendmail running.
Its pretty much the std install to have one so that the system can talk to itself eg if cron has an issue, it would try to email the local user and/or root.
Of course, it may(!) only be able to msg itself ie no outgoing traffic allowed, but that's just a cfg setting.

You can check using these cmds (at least for sendmail on RHEL/Centos)
Code:
tail /var/log/maillog

mailq -Ac

mailq -Lq
Here's a way to cfg it to use a specific eg Exchange server, without using DNS http://www.walkernews.net/2010/12/31...x-without-dns/

Last edited by chrism01; 07-18-2012 at 06:40 PM.
 
  


Reply



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] What is the default email (MTA) for RHEL6 vwtech Linux - Software 3 01-17-2011 01:26 PM
Default non-local MTA ? philforrest Linux - Software 2 08-25-2008 10:13 PM
How do I turn off the sendmail MTA daemon? zwyrbla Slackware 2 10-09-2004 01:25 AM
Sendmail MTA daemon Linux~Powered Linux - Software 3 01-25-2004 12:39 PM
recommended email (mta) for stable? Tisch Debian 5 01-12-2004 03:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:15 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