Linux help needed

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
hgm
Posts: 28405
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Linux help needed

Post by hgm »

The Linux machine (Ubuntu 9.04) on which I run my ICS seems to send e-mail every day to my provider (root@...), like

Code: Select all

Subject: Anacron job 'cron.daily' on Variant-ICS
Date: Sun, 25 Apr 2010 07:40:51 +0200
From: Anacron <root@...>
To: root@...


/etc/cron.daily/man-db:
/usr/bin/mandb: can't open /usr/share/man/man6/fairymax.6.gz: Permission
denied
run-parts: /etc/cron.daily/man-db exited with return code 2
Now the provider is getting a bit p*ssed by receiving such spam, and has ordered me to stop it. I am not expert enough on Linux to know how to do that, though. It seems that the anacron daemon runs into trouble with one of the scripts that is scheduled for daily execution, and sends an e-mail to root bout it. (Well, the fairymax.6.gz manual file had indeed a funny mode (700), which I changed now, so at least this error should no longer occur, but this was just the trigger, and not the basic problem that mail is apparently sent to a wrong address.)

The mail is not sent to the root account of my own machine, though, but to an external e-mail address. Where can I change that?
Rein Halbersma
Posts: 751
Joined: Tue May 22, 2007 11:13 am

Re: Linux help needed

Post by Rein Halbersma »

Gian-Carlo Pascutto
Posts: 1260
Joined: Sat Dec 13, 2008 7:00 pm

Re: Linux help needed

Post by Gian-Carlo Pascutto »

More fundamentally, change your network settings so your machine does not appear part of your ISP's domain but of a local one. (i.e. set to domain to "localdomain" or something, not ""xs4all.nl" or whatever)
CRoberson
Posts: 2094
Joined: Mon Mar 13, 2006 2:31 am
Location: North Carolina, USA

Re: Linux help needed

Post by CRoberson »

Also, you might consider installing a router with a firewall. Then, all you machines can have a local (in house) domain IP address.

This issue is that some things in UNIX send warning email to root@domain... As GCP stated, you shouldn't tell your machines they are on the providers domain with the exception of some mail parameters.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Linux help needed

Post by Sven »

Assuming your problem is not solved yet, answering the following might help me to help you:

1) Is it a local machine @home/@office, or do you have remote access only?

2) Is there any "MAILTO=..." setting present in /etc/cron.daily?

3) When logging in as the user for which that cron job is configured, is there any "MAILTO=..." present in the output of the command "crontab -l"?

4) Which user account owns the file /etc/cron.daily? (Probably "root"?)

5) Does that owner have a ".forward" file in its home directory? (For "root" usually there isn't a ~root/.forward file, but just to be sure ...)

6) To which mail address would your system try to send an email that is directed just to the user "root", without adding a domain extension? To avoid further spamming of your ISP, log in as root, temporarily cut the internet connection for that test, run a command like:

Code: Select all

echo test | mail -s test root
and check for any error messages and/or the contents of the mailbox of "root".

Sven