[Klug-general] Cron job

Alan Buchel alan at communitytechnology.org.uk
Tue Apr 14 15:54:12 UTC 2009


OK top-post it is you win ;)

sounds like root is aliased somewhere else, possibly your primary system 
user? look at /etc/alias, you might find:

root at 205:/# cat /etc/aliases
root:	nathan (or something)
.......

Take the alias out, or

su nathan -

and look at mail again.


Nathan Friend wrote:
> SUSE Enterprise 10.
> Oops maybe there is no MTA is running
> 
> echo "test" | /usr/bin/mail -s "subject" root
> 
> returned me to the prompt with no error, but enter 'mail' and get no 
> mail for root
> 
> 
> On Tue, Apr 14, 2009 at 3:07 PM, Alan Buchel 
> <alan at communitytechnology.org.uk 
> <mailto:alan at communitytechnology.org.uk>> wrote:
> 
>     Nathan Friend wrote:
>      > Took out the ; and added -b "Some text"  same result.  Also tried
>     with
>      > no luck:
>      >
>      > echo "Moodle db backup failed" | /bin/mail -s "Moodle db backup
>     failed" root
>      >
>      > On Tue, Apr 14, 2009 at 1:44 PM, Mike Evans <mike at tandem.f9.co.uk
>     <mailto:mike at tandem.f9.co.uk>
>      > <mailto:mike at tandem.f9.co.uk <mailto:mike at tandem.f9.co.uk>>> wrote:
>      >
>      >     oh and further to my earlier - you need a body of the mail -
>     is that
>      >     what the ; is attempting to terminate?  Not sure it will
>      >
> 
>     which distro?
> 
>     Test any command first outside the script, for instance get this working
>     before incorporating into script.
> 
>     echo "body" | /usr/bin/mail -s "subject" root
> 
>     make sure some sort of MTA is running on that system - sendmail is
>     simple or postfix which will need a little config.
> 
> 
>     _______________________________________________
>     Kent mailing list
>     Kent at mailman.lug.org.uk <mailto:Kent at mailman.lug.org.uk>
>     https://mailman.lug.org.uk/mailman/listinfo/kent
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Kent mailing list
> Kent at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/kent



More information about the Kent mailing list