I remember Debian automatically sending mail to users (to report a failed sudo authentication attempt, for example). On Ubuntu is mail of some kind automatically set up? I created a cron job, and nothing is appearing in /var/spool/mail. If there's a standard/obvious way to set up mail in Ubuntu, what is it?
If you haven't done it yet you will need to install postfix (
Ubuntu has a policy of not listening on any network ports (not running any network services) by default. That means no mailserver. So, yes, you need to install one if you want one.
You can set up
After a moment, you'll be prompted to make some choices about how you want postfix installed. (If you make a mistake, you can get back here with
When prompted, choose "Local only" as your general configuration. When prompted for a system mail name, you can enter your machine's hostname (e.g.
With that done, do
Now you can install a mail client that understands how to read mail out of your maildir, such as mutt:
To configure mutt, create a file
In mutt, press m to compose an email. At the bottom of the screen, you'll be prompted for a recipient (you should be able to type user@hostname or just a user name) and subject, then your editor will pop up so you can type an email. Write something, save, exit, and press y to send. The user you sent to should have a Maildir appear in their home directory -- they can then use mutt (after creating a similar .muttrc) to read it!