where is the system mail behaviour defined

Asked by Hans van den Bogert

my summary is perhaps a bit vague but here is more:

when I log in through a console (cntrl+alt+[1-6]) I get a message telling me I got mail, that's fine, 'cause I'm not a complete linux-noob so I issued the command:
$ mail

Now I see various mails complaining about trivial things like "samba had to restart due to segfaults", some kernel messages, mysql errors, etc

But where is this behaviour set/defined that the system can mail me when these errors occur?
syslog.conf doesn't hold any settings that are set that could cause the system to mail me.

It's purely an interest in linux that I want to know this, it's not bugging me or anything!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Theodotos Andreou (theodotos) said :
#1

You should install an MTA like exim, postfix or sendmail. Configure them for internet mail. If your ISP blocks mail to anywhere but their mail-server configure your mta to use as smarthost your ISPs outgoing mail-server.

Then configure the /etc/aliases file as follows"

root: <email address hidden>

Some MTAs may need the "newaliases" command to be ryn afterwards so that the changes take affect.

Revision history for this message
Hans van den Bogert (hbogert) said :
#2

I don't really understand what you're trying to explain. I just want to know why and how the system "mails" me about daemon warnings and such, and where to turn it off.

Revision history for this message
Theodotos Andreou (theodotos) said :
#3

You can only turn it off if you find the scripts that send the mail and disable this. If you just want to delete the file that contains the mail it is under /var/spool/mail/<username>/mbox.

Can you help with this problem?

Provide an answer of your own, or ask Hans van den Bogert for more information if necessary.

To post a message you must log in.