Read mail on the local system

Author: name contact BSD flavour

Reviewer: name contact BSD flavour

Reviewer: name contact BSD flavour


Concept

Be aware that by default, system messages may be emailed to the root user on the local system and that a third-party MUA(((MUA))) may not be installed. Be able to both read and send mail using the built-in mail(1) command. Know the location of user mailbox(((mailbox))) files.

Introduction

cron job output is emailed. cron -l. see cron. see cron run.

(Maybe refer to section Configure the scripts that run periodically to perform various system maintenance tasks and/or section Configure an action to be scheduled by cron(8)).

location of mailboxes, /var/mail/... read mailboxes with mail -f

Examples

Show example of files that may indicate which MTA is in use. wrapper/alias file somewhere.

Refer to section Determine which MTA is being used on the system

Practice Exercises

write an email,

mail
mail root, or 'm root'
begin typing your message. Lets ask the admin what version of ssh we have
how to set subject? find out with ~? for help.
~s this is the subject
~e bring message to text editor (EDITOR), save
add someone to CC, see ~? it is ~c, so:
~c junioradmin
we are done here, ^d
EOT
&

reply to an email,

sudo mail -u root
list, reply to 1
~r read file into message
~!man ssh , to find out the switch to print ssh version,
~|ssh -V, output is put into current message
cc junioradmin
save

add new folder 'questions', add message 1 to folder 'questions'

More information

mail(1), /var/mail/\$USER, cron(8)

Mail Reference Manual