1

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,

user74952
  • 71
  • 1
  • 1
  • 7

1 Answers1

0

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
datn
  • 158
  • 9