Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 04-20-2009, 02:29 AM   #1
Senior Member
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,546

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


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

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

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


You too ?

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

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
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.

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.


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 > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:12 PM.

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