[Nix-dev] Crontab and mail / ssmtp troubles

Luca Bruno lethalman88 at gmail.com
Wed Oct 15 22:12:39 CEST 2014


There was some discussion about this. The problem is probably a missing
/var/spool for each user, or anyway something about permissions. I've
tracked down the issue once but never worked on it since I wasn't directly
interested on it.

On Wed, Oct 15, 2014 at 10:07 PM, M. P. Ashton <data at imap.cc> wrote:

> I'm having trouble getting a rather simple crontab running on a new
> NixOS installation.
>
> The crontab is supposed to run a shell script in a user account. It
> doesn't work. So I tried just having it run "echo test". That got me
> this in the journal:
>
> Oct 15 15:54:01 bode cron[22272]: (mpashton) CMD (echo test)
> Oct 15 15:54:01 bode cron[22271]: (mpashton) MAIL (mailed 5 bytes of
> output but got status 0x0001
>                                   )
>
> Sadly I can't see cron's mail output, because mail doesn't work either.
> I installed ssmtp using networking.defaultMailServer.directDelivery =
> true, but none of my mail programs, like mutt and mail, seem to be able
> to find sendmail. For example:
>
>    [mpashton at bode:~]$ echo "Hi there" |mail -s "Test subject"
>    data at gtf.org
>    Cannot open mailer: No such file or directory
>
> I can force Mutt to see sendmail by putting this in .muttrc:
>
>    set sendmail="sendmail";
>
> Then it works fine and I can send mail successfully. So, obviously Mutt
> is pointing to something like /usr/sbin/sendmail by default. Maybe
> crontab is too? But I would have thought this would be patched already.
>
> Crontab is below. Notice I tried adding paths -- this did not help.
>
> Thanks to anyone who can offer advice here!
>
> --Michael
>
> * * *
>
> SH=/run/current-system/sw/bin/sh
> MAILTO=data at gtf.org
> PATH=/run/current-system/sw/sbin
>
> 10 02 * * * echo test
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>



-- 
www.debian.org - The Universal Operating System
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141015/094b39d9/attachment-0001.html 


More information about the nix-dev mailing list