LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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-18-2013, 03:40 PM   #1
T-Dub116
Member
 
Registered: Aug 2013
Location: Dolyestown
Posts: 88

Rep: Reputation: Disabled
Sendmail - not sending


I want to send a log file using Sendmail, I have this working on another customer's server but I can not get it working on this customers server...

Script:

LOG=/appl/ai/summary.log
AI_LOG=/appl/ai/ai.log
EMAIL="`cat /appl/ai/email/emailall.txt`"
MAILSUBJECT="Simple Foods AI Summary"
#-----------------------------------------------------
tail -n 14 $AI_LOG |grep "Last AIMAGE NEW"|awk '{print "AI Last Rolled into back
up Server " $4 " " $5 " " $6 " " $7}' > $LOG
echo "=============================================================" >> $LOG
tail -n 14 $AI_LOG >> $LOG
echo "=============================================================" >> $LOG
echo "Last 96 AI Roll Forwards" >> $LOG
echo "=============================================================" >> $LOG
grep "Roll Forward" $AI_LOG |tail -n 96 >> $LOG

cat $LOG |mail -s "$EMAILSUBJECT" $EMAIL


Here are the log files so we know they exist

-rw-r--r-- 1 root root 6436 Dec 18 16:12 summary.log
-rw-r--r-- 1 root root 4414144 Dec 18 16:16 ai.log

-rw-r--r-- 1 root root 65 Dec 18 16:12 emailall.txt
vi /appl/ai/email/emailall.txt
************@gmail.com
****@********.com
****@*******.com

Log file:

vi /var/log/maillog

Dec 18 16:12:33 Simple_2 sendmail[18622]: rBILCXcU018622: from=root, size=6518,
class=0, nrcpts=3, msgid=<201312182112.rBILCXcU018622@Simple_2>, relay=root@loca
lhost
Dec 18 16:12:33 Simple_2 sendmail[18622]: rBILCXcU018622: to=*****@**********.com,
*****@**********.com,*****@**********.com, ctladdr=root (0/0), delay=00:00:0
0, xdelay=00:00:00, mailer=relay, pri=96518, relay=[127.0.0.1] [127.0.0.1], dsn=
4.0.0, stat=Deferred: Connection refused by [127.0.0.1]




Here is the log file of the system this is working on

Dec 18 16:17:22 BHLordsBackup sendmail[13090]: rBILHMqI013090: from=<root@localh
ost.localdomain>, size=6724, class=0, nrcpts=3, msgid=<201312182117.rBILHLLe0130
89@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=BHLordsBackup [127.0.0
.1]
Dec 18 16:17:22 BHLordsBackup sendmail[13089]: rBILHLLe013089: to=*****@**********.com,*****@**********.com,*****@**********.com, ctladdr=root (0/0), delay=00:
00:01, xdelay=00:00:00, mailer=relay, pri=96449, relay=[127.0.0.1] [127.0.0.1],
dsn=2.0.0, stat=Sent (rBILHMqI013090 Message accepted for delivery)
Dec 18 16:17:23 BHLordsBackup sendmail[13092]: STARTTLS=client, relay=mailin-01.
mx.aol.com., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=2
56/256
Dec 18 16:17:26 BHLordsBackup sendmail[13092]: rBILHMqI013090: to=<*****@**********.com>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:04, xdelay=
00:00:04, mailer=esmtp, pri=186724, relay=mailin-01.mx.aol.com. [205.188.155.110
], dsn=5.0.0, stat=Service unavailable
Dec 18 16:17:27 BHLordsBackup sendmail[13092]: STARTTLS=client, relay=foodconnex
.com., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Dec 18 16:17:28 BHLordsBackup sendmail[13092]: rBILHMqI013090: to=<*****@**********.com>,<*****@**********.com>, ctladdr=<root@localhost.localdomain> (0/0), delay
=00:00:06, xdelay=00:00:02, mailer=esmtp, pri=186724, relay=foodconnex.com. [68.
178.166.6], dsn=2.0.0, stat=Sent (Ok: queued as 66AD3198E7AF)
Dec 18 16:17:28 BHLordsBackup sendmail[13092]: rBILHMqI013090: rBILHSqI013092: D
SN: Service unavailable
Dec 18 16:17:29 BHLordsBackup sendmail[13092]: rBILHSqI013092: to=<root@localhos
t.localdomain>, delay=00:00:01, xdelay=00:00:00, mailer=local, pri=37944, dsn=2.
0.0, stat=Sent
 
Old 12-18-2013, 03:50 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Code tags

Last edited by Habitual; 12-18-2013 at 04:21 PM.
 
Old 12-20-2013, 02:57 AM   #3
kapilbajpai88
Member
 
Registered: Jul 2008
Location: Bangalore, India
Distribution: RHEL
Posts: 235

Rep: Reputation: 41
If the problem is still there, provide details like :
a) What Computer System
b) Which OS and version
c) Steps you tried (in brief)
d) Expected output (if any specific format)

Else,
please have this thread as solved.
 
1 members found this post helpful.
Old 12-24-2013, 10:18 AM   #4
T-Dub116
Member
 
Registered: Aug 2013
Location: Dolyestown
Posts: 88

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kapilbajpai88 View Post
If the problem is still there, provide details like :
a) What Computer System
b) Which OS and version
c) Steps you tried (in brief)
d) Expected output (if any specific format)

Else,
please have this thread as solved.
# cat /proc/version
Linux version 2.6.18-274.el5 (mockbuild@x86-002.build.bos.redhat.com) (gcc versi
on 4.1.2 20080704 (Red Hat 4.1.2-51)) #1 SMP Fri Jul 8 17:36:59 EDT 2011

# cat /etc/*-release
Red Hat Enterprise Linux Server release 5.7 (Tikanga)


Output expected is to receive an email, from the system's that this is working on this is what I get


AI Last Rolled into backup Server Mon Dec 23 12:45:01 =============================================================
PROGRESS Version 9.1E as of Tue Oct 12 14:40:19 EDT 2004

After-image dates for this after-image file: (1633)
Last AIMAGE BEGIN Wed Oct 30 15:03:47 2013 (1640)
Last AIMAGE NEW Mon Dec 23 12:45:01 2013 (1641)
This is aimage file number 5181 since the last AIMAGE BEGIN. (1642)
This file was last opened for output on Mon Dec 23 12:45:01 2013. (1643)

1150 notes were processed. (1634)
1 in-flight transactions. (3785)
122 transactions were started
121 transactions were ended
At the end of the .ai file, 2 of them were still active Roll Forward Successful: /appl/ai/ai131223130001-5181.ai =============================================================
Last 96 AI Roll Forwards
=============================================================
Roll Forward Successful: /appl/ai/ai131222131501-5086.ai Roll Forward Successful: /appl/ai/ai131222133001-5087.ai Roll Forward Successful: /appl/ai/ai131222134501-5088.ai Roll Forward Successful: /appl/ai/ai131222140001-5089.ai Roll Forward Successful: /appl/ai/ai131222141501-5090.ai Roll Forward Successful: /appl/ai/ai131222143001-5091.ai Roll Forward Successful: /appl/ai/ai131222144501-5092.ai Roll Forward Successful: /appl/ai/ai131222150001-5093.ai Roll Forward Successful: /appl/ai/ai131222151501-5094.ai Roll Forward Successful: /appl/ai/ai131222153001-5095.ai Roll Forward Successful: /appl/ai/ai131222154501-5096.ai Roll Forward Successful: /appl/ai/ai131222160001-5097.ai Roll Forward Successful: /appl/ai/ai131222161501-5098.ai Roll Forward Successful: /appl/ai/ai131222163001-5099.ai Roll Forward Successful: /appl/ai/ai131222164501-5100.ai Roll Forward Successful: /appl/ai/ai131222170001-5101.ai Roll Forward Successful: /appl/ai/ai131222171501-5102.ai Roll Forward Successful: /appl/ai/ai131222173001-5103.ai Roll Forward Successful: /appl/ai/ai131222174501-5104.ai Roll Forward Successful: /appl/ai/ai131222180001-5105.ai Roll Forward Successful: /appl/ai/ai131222181501-5106.ai Roll Forward Successful: /appl/ai/ai131222183001-5107.ai Roll Forward Successful: /appl/ai/ai131222184501-5108.ai Roll Forward Successful: /appl/ai/ai131222190002-5109.ai Roll Forward Successful: /appl/ai/ai131222191501-5110.ai Roll Forward Successful: /appl/ai/ai131222193001-5111.ai Roll Forward Successful: /appl/ai/ai131222194501-5112.ai Roll Forward Successful: /appl/ai/ai131222200001-5113.ai Roll Forward Successful: /appl/ai/ai131222201501-5114.ai Roll Forward Successful: /appl/ai/ai131222203001-5115.ai Roll Forward Successful: /appl/ai/ai131222204501-5116.ai Roll Forward Successful: /appl/ai/ai131222210002-5117.ai Roll Forward Successful: /appl/ai/ai131222211501-5118.ai Roll Forward Successful: /appl/ai/ai131222213001-5119.ai Roll Forward Successful: /appl/ai/ai131222214501-5120.ai Roll Forward Successful: /appl/ai/ai131222220001-5121.ai Roll Forward Successful: /appl/ai/ai131222221501-5122.ai Roll Forward Successful: /appl/ai/ai131222223001-5123.ai Roll Forward Successful: /appl/ai/ai131222224501-5124.ai Roll Forward Successful: /appl/ai/ai131222230001-5125.ai Roll Forward Successful: /appl/ai/ai131222231501-5126.ai Roll Forward Successful: /appl/ai/ai131222233001-5127.ai Roll Forward Successful: /appl/ai/ai131222234501-5128.ai Roll Forward Successful: /appl/ai/ai131223000002-5129.ai Roll Forward Successful: /appl/ai/ai131223001501-5130.ai Roll Forward Successful: /appl/ai/ai131223003002-5131.ai Roll Forward Successful: /appl/ai/ai131223004501-5132.ai Roll Forward Successful: /appl/ai/ai131223010002-5133.ai Roll Forward Successful: /appl/ai/ai131223011501-5134.ai Roll Forward Successful: /appl/ai/ai131223013001-5135.ai Roll Forward Successful: /appl/ai/ai131223014501-5136.ai Roll Forward Successful: /appl/ai/ai131223020001-5137.ai Roll Forward Successful: /appl/ai/ai131223021501-5138.ai Roll Forward Successful: /appl/ai/ai131223023001-5139.ai Roll Forward Successful: /appl/ai/ai131223024501-5140.ai Roll Forward Successful: /appl/ai/ai131223030001-5141.ai Roll Forward Successful: /appl/ai/ai131223031501-5142.ai Roll Forward Successful: /appl/ai/ai131223033001-5143.ai Roll Forward Successful: /appl/ai/ai131223034501-5144.ai Roll Forward Successful: /appl/ai/ai131223040001-5145.ai Roll Forward Successful: /appl/ai/ai131223041501-5146.ai Roll Forward Successful: /appl/ai/ai131223043001-5147.ai Roll Forward Successful: /appl/ai/ai131223044501-5148.ai Roll Forward Successful: /appl/ai/ai131223050001-5149.ai Roll Forward Successful: /appl/ai/ai131223051501-5150.ai Roll Forward Successful: /appl/ai/ai131223053002-5151.ai Roll Forward Successful: /appl/ai/ai131223054501-5152.ai Roll Forward Successful: /appl/ai/ai131223060001-5153.ai Roll Forward Successful: /appl/ai/ai131223061501-5154.ai Roll Forward Successful: /appl/ai/ai131223063001-5155.ai Roll Forward Successful: /appl/ai/ai131223064501-5156.ai Roll Forward Successful: /appl/ai/ai131223070001-5157.ai Roll Forward Successful: /appl/ai/ai131223071501-5158.ai Roll Forward Successful: /appl/ai/ai131223073001-5159.ai Roll Forward Successful: /appl/ai/ai131223074501-5160.ai Roll Forward Successful: /appl/ai/ai131223080002-5161.ai Roll Forward Successful: /appl/ai/ai131223081501-5162.ai Roll Forward Successful: /appl/ai/ai131223083001-5163.ai Roll Forward Successful: /appl/ai/ai131223084502-5164.ai Roll Forward Successful: /appl/ai/ai131223090001-5165.ai Roll Forward Successful: /appl/ai/ai131223091501-5166.ai Roll Forward Successful: /appl/ai/ai131223093001-5167.ai Roll Forward Successful: /appl/ai/ai131223094502-5168.ai Roll Forward Successful: /appl/ai/ai131223100001-5169.ai Roll Forward Successful: /appl/ai/ai131223101501-5170.ai Roll Forward Successful: /appl/ai/ai131223103001-5171.ai Roll Forward Successful: /appl/ai/ai131223104501-5172.ai Roll Forward Successful: /appl/ai/ai131223110001-5173.ai Roll Forward Successful: /appl/ai/ai131223111501-5174.ai Roll Forward Successful: /appl/ai/ai131223113001-5175.ai Roll Forward Successful: /appl/ai/ai131223114501-5176.ai Roll Forward Successful: /appl/ai/ai131223120001-5177.ai Roll Forward Successful: /appl/ai/ai131223121501-5178.ai Roll Forward Successful: /appl/ai/ai131223123001-5179.ai Roll Forward Successful: /appl/ai/ai131223124501-5180.ai Roll Forward Successful: /appl/ai/ai131223130001-5181.ai
 
Old 12-26-2013, 02:07 PM   #5
T-Dub116
Member
 
Registered: Aug 2013
Location: Dolyestown
Posts: 88

Original Poster
Rep: Reputation: Disabled
What files or setting can I compare from one Server to another in order to see why Servers BH is sending email out but Server Dandi is not...
 
Old 12-28-2013, 11:11 AM   #6
coldbeer
Member
 
Registered: May 2006
Location: Orion–Cygnus Arm, MWG
Distribution: Slackware, Ubuntu
Posts: 249

Rep: Reputation: 130Reputation: 130
Quote:
Originally Posted by T-Dub116 View Post
I want to send a log file using Sendmail, I have this working on another customer's server but I can not get it working on this customers server...


Log file:

vi /var/log/maillog

Dec 18 16:12:33 Simple_2 sendmail[18622]: rBILCXcU018622: from=root, size=6518,
class=0, nrcpts=3, msgid=<201312182112.rBILCXcU018622@Simple_2>, relay=root@loca
lhost
Dec 18 16:12:33 Simple_2 sendmail[18622]: rBILCXcU018622: to=*****@**********.com,
*****@**********.com,*****@**********.com, ctladdr=root (0/0), delay=00:00:0
0, xdelay=00:00:00, mailer=relay, pri=96518, relay=[127.0.0.1] [127.0.0.1], dsn=
4.0.0, stat=Deferred: Connection refused by [127.0.0.1]

Your sendmail daemon isn't running. sendmail cli is just a client. You've also got to configure your sendmail daemon to connect to a known mailhub prior to starting. You'll need to search the web for how to do that for your particular distro.
 
  


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] Sendmail sending OK, but it never arrives. bendib Linux - Networking 2 01-25-2010 11:35 PM
sending mail through sendmail vinaytp Linux - Newbie 8 11-11-2009 07:14 PM
Sendmail not sending the1sephiroth Linux - Server 5 06-24-2008 12:28 PM
Sendmail not sending mail tarheel92x Linux - Server 8 10-27-2006 04:44 AM
sendmail receives ok but not sending... latino Linux - Software 5 08-08-2003 11:29 AM

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

All times are GMT -5. The time now is 02:36 AM.

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