[kde-linux] Cron emails don't respect my MAILTO

Anne Wilson cannewilson at googlemail.com
Wed May 12 16:08:28 UTC 2010


On Tuesday 11 May 2010 22:13:40 Boyd Stephen Smith Jr. wrote:
> On Tuesday 11 May 2010 12:38:53 Anne Wilson wrote:
> > I set up a small rsync job to backup my kaddressbook contacts, using
> > SystemSettings.  I set a mailto, to direct the messages to my external
> > address, so that they would always  be on my mail server.  They are being
> > 
> >  sent to my laptop local mailbox (/var/spool/mail/anne).
> > 
> > I've used 'crontab -e' to check the job settings - the mailto looks
> > 
> >  correct.
> 
> It's MAILTO (all caps).  Lowercase won't work.
> 
> >  I've tried both with and without spaces around the "=" - can
> >  someone tell me which is correct?.
> 
> Either.  Any number of spaces adjacent to the '=' are dropped.  "MAILTO
> =  foo" as a line does the same thing as "MAILTO=foo".
> 
> >  /etc/aliases is set to send root mail
> >  to me, at my external address - but the job in question is running as
> >  anne, not as root, so that shouldn't matter.
> 
> Maybe.  Depending on the cron daemon, it may be delivering the mail itself
> instead of using your local MTA, I guess.  The documentation I'm looking at
> refers the the value of MAILTO as the "user" the report goes to, not the
> address -- so your cron daemon may be expecting a local user that it can
> deliver to directly.
> 
> I really don't think this is the issue though.  Do your MTA/MDA logs
> indicate the mail was received from cron and delivered?
> 
It was sent from root to me at my local domain address.  However, immediately 
preceding that there are messages that could be relevant.  I hadn't noticed 
these before, but obviously it's something that needs fixing, and I'd be 
grateful if you could advise me on this:

May 12 14:00:01 tecra-a11 postfix/sendmail[8372]: warning: the Postfix 
sendmail command has set-uid root file permissions
May 12 14:00:01 tecra-a11 postfix/sendmail[8372]: warning: or the command is 
run from a set-uid root process
May 12 14:00:01 tecra-a11 postfix/sendmail[8372]: warning: the Postfix 
sendmail command must be installed without set-uid root file permissions

> > I've completely run out of ideas for checking.  What else could be
> > causing
> > 
> >  the mailto to be ignored?
> 
> Please send output of (crontab -l | grep -Ev '^[[:space:]]*(#|$)'), feel
> free to drop any command lines, I just want to double-check your syntax on
> the environment setting lines.
> 
0 14 * * *      /home/anne/bup_contacts.sh
MAILTO=anne at lydgate.org

> It would be helpful to know what cron daemon you are using.  Ancient ones
> didn't support setting environment variables at all.  Perhaps there's a
> minimalist one out there that also doesn't support it and you somehow got
> that instead of a normal, full-featured one.  On Debian there's only one
> package that provides the "cron-daemon" virtual package, so this is also
> unlikely.

It appears that I'm using

cronie-1.4.4-1.fc13.i686 : Cron daemon for executing programs at set times

Anne
-- 
KDE Community Working Group
New to KDE Software? - get help from http://userbase.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-linux/attachments/20100512/aa4c4c9d/attachment.sig>


More information about the kde-linux mailing list