-   Linux - Server (
-   -   user crontab and msmtp packages not working together ? (

frenchn00b 04-20-2009 02:29 AM

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

MensaWater 04-20-2009 11:10 AM

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.

All times are GMT -5. The time now is 01:31 AM.