Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Mails sent using the mail clients are saved, but I want also that my system saves the sent mail using cron and the "mail" command to the "sent" box. Is this possible?

I use sendmail as mail server on Linux.

As an example I use:

echo "An example" | mail -s "Read this!" root

What if I want to read the message I sent, is it saved somewhere?

Thanks,

share|improve this question
add comment

1 Answer

If there is no explicit alias for root in /etc/aliases, then that mail is going to be saved to root's mail spool, accessible with the "mail" command run with no arguments. Mail for local users typically resides in /var/spool/mail/.

These days it's more common to send root mail away from the local machines and to, say, your email provider.

/etc/aliases:
root                 you@example.com

$ newaliases
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.