LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-20-2009, 02:29 AM   #1
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,546

Rep: Reputation: 51
user crontab and msmtp packages not working together ?


Hello,

Have you also troubles with user crontab and msmtp packages to be working together ?

1/
configure well your msmtp to send email
check it
echo "test yes" | mutt robert
it works, OK,
let's continue

2/
example, as user, edit crontab
with
Code:
crontab -e
put this
Code:
0 8    * * *   echo "test yes" | mutt robert
3/ wait and check your mail box

NOTHIGN

You too ?

--
I used :
nbsmtp and it is working
seems that there is BUGS somewhere
 
Old 04-20-2009, 11:10 AM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,028
Blog Entries: 5

Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
cron runs a minimal shell not the one you inherit when you type on command line.

Put in full path to echo command and to mutt command and it will likely work. e.g.

Code:
0 8    * * *   /bin/echo "test yes" | /usr/bin/mutt robert
Also note that most Bourne based shells have an "echo" built in and they do different things. For your example I imagine the /bin/echo will work fine.

Finally: There could be issues with quoting as it is being processed by cron and then by the shell whereas your command line is only going to the shell directly. I doubt that is an issue in your example though but it is something to keep in mind for more complicated command lines.
 
  


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
mutt and msmtp not emailing mahmoud Linux - Software 2 12-29-2008 09:29 AM
cmdline: Sending email without mutt and with msmtp something? frenchn00b Linux - Newbie 3 03-02-2008 02:11 AM
user crontab bujecas Linux - General 1 09-15-2006 06:49 AM
Msmtp+Mutt password prompt pete1234 Linux - General 0 07-17-2006 11:24 AM
Crontab not working for user mago Slackware 5 04-03-2006 10:48 PM


All times are GMT -5. The time now is 10:10 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration