[Nix-dev] Crontab and mail / ssmtp troubles

M. P. Ashton data at imap.cc
Thu Oct 16 02:32:01 CEST 2014


Thanks, I'll try to find that discussion.

This was on the stable branch; maybe it's different in the git head?

On Wed, Oct 15, 2014, at 04:12 PM, Luca Bruno wrote:
> 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


More information about the nix-dev mailing list