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,

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
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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