Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with Mail

Status
Not open for further replies.
Feb 5, 2001
26
US
Hi ya'll

Having a problem with mailing to root. I have a comand in the cron to perform a backup and mail the result to root. The cron command is ./dobackup | /usr/bin/mail "backup success" root where dobackup is the script to perform the backup.

The backup are taking place, and mail is drooping it in the /var/spool/mqueue directory. However I am getting a message -- Postmaster notify: Cannot deliver in 5 days

Can anyone help :)
 
Has it worked in the past ? If so, check the mail server you were using. If it never worked, you'll need to configure /etc/sendmail.cf and /etc/aliases.

Bill.
 
Yes it has worked in the past. I think it stopped mailing after a reboot. Mail is working for other users just not root.

Thanks for your help.

mike1
 
Confirm that you have a valid "root" alias in /etc/aliases.

If so, run "newaliases".

Bill.
 
Hi, Thanks again for your help, but I found the issue.
I checked the mqueue directory again, found a message stating that mail could not write to /usr/spool/mail/root: Permission Denied. I did a ls -al on the mail directory, and, sure enough, the root file belonged to the system group instead of the mail group with 664 permissions. A simple chgrp mail root did the trick.

But, thanks again :)
 
I think you must do [tt]mail -s &quot;Backup ended&quot; root < /dev/null[/tt] or something.

I hope it works...
Unix was made by and for smart people.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top