LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-16-2006, 10:19 PM   #1
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Rep: Reputation: 85
sendmail wont send mail


I never received this email. I tried many times. What is the problem?

Code:
chris@debian:~$ banner -w80 "linux" | sendEmail -t christopher.lemire@gmail.com -f root@chris1.myftp.org -u "tux"
Reading message body from STDIN because the '-m' option was not used.
If you are manually typing in a message:
  - First line must be received within 60 seconds.
  - End manual input with a CTRL-D on its own line.

Oct 16 21:40:51 debian sendEmail[24656]: Message input complete.
Oct 16 21:40:59 debian sendEmail[24656]: Email was sent successfully!
chris@debian:~$
Nothing is wrong with my sendmail configuration if you are thinking that. My script runs fine by cron to email me about my system updates, and I receive the emails. This is it.

Code:
chris@debian:~$ cat myapt
#!/bin/bash
if [ `whoami` != "root" ]; then
   echo "You must be root to execute this script."
   exit
fi
apt-get update
apt-get upgrade -y
echo "----------------------------------------------" >> /tmp/mylog
echo "Apt successfully updated the system:" >> /tmp/mylog
echo $(date) >> /tmp/mylog
echo >> /tmp/mylog
ls -luh /var/cache/apt/archives/ >> /tmp/mylog
echo >> /tmp/mylog
cat /tmp/mylog | sendEmail -t christopher.lemire@gmail.com -f root@chris1.myftp.org -u "Re: Apt successful system update" -q
cat /tmp/mylog | tee -a /var/log/pkgsbyapt
rm -f /tmp/mylog
apt-get clean
exit 0
chris@debian:~$

Last edited by fakie_flip; 10-17-2006 at 04:41 PM.
 
Old 10-16-2006, 11:24 PM   #2
jantman
Member
 
Registered: Nov 2005
Location: New Jersey, USA
Distribution: SuSE
Posts: 492

Rep: Reputation: 31
Quote:
Originally Posted by fakie_flip
Code:
If you are manually typing in a message:
  - First line must be received within 60 seconds.
  - End manual input with a CTRL-D on its own line.
Did you read the MAN file for sendmail?

And sendmail is a pain in the @$$, I'd recommend using MailX.
 
  


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
Mail Server Issues; Can't Send E-mail (using sendmail) Vegetarian Smoker Linux - Software 1 06-18-2006 02:16 PM
Sendmail cannot send mail rubenscript Linux - Networking 2 01-05-2006 04:38 AM
Qmail wont send mail to some addresses The_Nerd Linux - Software 5 01-03-2005 06:40 PM
Perl form wont send mail calmbomb Linux - Software 4 11-07-2004 10:08 AM
Can't send mail with Sendmail familyman Linux - Software 3 09-15-2004 10:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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