Where's the mail? No <user> directory in /var/mail
I've got Linux Mint 9 as my desktop system, and yesterday I installed Ubuntu Server 10.04 as a file server and backup storage.
I've read (and been told in forums) that I should have received system mail in the /var/mail/<user> directory - but in both systems the /var/mail/ directory is empty. I set up smartmontools on Ubuntu Server with a configuration option to send me a test mail each time it starts, but again I have received no mail. Has the sending of system mail been removed from recent linux releases, or is there something wrong with the both of my systems? Do I need to configure something to make it work? |
Quote:
So, first thing if you THINK there should be mail for you: Find out what MTA/MDA is installed on your system. Popular choices are postfix, exim or sendmail. All of them are heavily configurable. /var/mail/$user is the /traditional/ location for mailboxes in mbox format, but it is not obligatory. Many mail systems nowadays use something like $HOME/.mail/ instead and there are several newer formats like e.g. mdir or maildir. As soon as you know which MTA/MDA is installed on your system, you can examine its configuration to find out. |
Quote:
Quote:
Searching further I discovered that postfix writes logs into /var/log/, and looking at the mail.err log file showed a couple of different errors. Still more searching on those errors led me to find that there are some longstanding configuration problems that can happen with postfix (https://bugs.launchpad.net/ubuntu/+s...fix/+bug/42947 and http://ubuntuforums.org/archive/index.php/t-6392.html). I didn't find any explanation for the bugs, but by following the suggested fixes I got my mail working. I assumed that Linux Mint, being derived from Ubuntu, would use the same system, but postfix isn't installed on Mint so maybe it uses a different system, or maybe none at all. It's after midnight here so I'm not doing any more searching tonight to find out. |
Hello genogebot, may i know how you got your mail working? I mean, the steps. I tried to install and configure postfix, but it ain't working.
Thanks. |
|
Quote:
Quote:
Quote:
|
... and it turns out the /var/mail/<user> entry is a file, not a directory. It's a text file in which new mail is appended to the file. Presumably there are utilities to read and manage this file, but I'm just opening it in a text editor and deleting the contents when I've read it.
|
That's NOT a good idea. If you want to read mail from an mbox file directly, use for example mutt. As an alternative, there are several IMAP servers available that can serve mail from mbox files, for example dovecot.
|
But, how do you know your mail is working? For me, at the last step i reloaded postfix, as given in the link above:
Code:
xanios@ubuntu:~$ sudo /etc/init.d/postfix reload Code:
myhostname = ubuntu |
Quote:
Quote:
Quote:
|
Oh i see. Too bad my linux (ubuntu 9.10) doesn't support smartmontools.
|
Quote:
From the Wikipedia entry for smartmontools (http://en.wikipedia.org/wiki/Smartmontools) : Quote:
Quote:
|
Hi,
Ya. i typed this to see if the "drive supports SMART" Code:
xanios@ubuntu:~$ sudo smartctl -i /dev/sda |
Quote:
|
Oh i see. No wonder.
|
All times are GMT -5. The time now is 12:55 AM. |