F22 - ESMTP works from CLI but has problems with cron jobs

Philip Rhoades phil at pricom.com.au
Fri Sep 11 17:31:20 UTC 2015


People,

Firstly - I have uninstalled anacron.

ESMTP works on my new WS OK and delivers mail to my server on the LAN 
quite happily but if try a simple cron job - with NO redirection to 
output file, cron tries to mail me job done information but has problems 
with ESMTP.  If I use:

   crontab -e

and add:

   34 01 * * * echo $HOME

I get these errors in /var/log/messages:

   /bin/mktemp: failed to create directory via template 
���/.esmtp_queue/XXXXXXXX���: Permission denied

ie "$HOME" is empty - so in:

   /bin/esmtp-wrapper

I changed:

   qdir="$HOME/.esmtp_queue"

to:

   qdir="/home/phil/.esmtp_queue"

then the error I get is:

   crond: /usr/sbin/sendmail: line 43: /dev/stdin: Permission denied

Line 43 in the wrapper is:

   cat </dev/stdin >"$mdir/mail" || ret=1

Why is cron causing a problem where the CLI is fine?

Thanks,

Phil.
-- 
Philip Rhoades

PO Box 896
Cowra  NSW  2794
Australia
E-mail:  phil at pricom.com.au


More information about the users mailing list