In https://unix.stackexchange.com/a/21336/99621 it says that if you do
echo 'body' | mail -s 'subject' myuser
It will send a mail message to the myuser
linux account on the local system that this user can check with the mail
command. I tried sending mail to my own user account by running that command and it executes without any problems (no output in terminal and 0 exit code).
But when I type mail
to check for mail, it says No mail for myuser
.
If I replace the above mail sending command with one that doesn't exist, such as notexistinguser
, the command still executes without any problems.
How can I send mail to a local Linux user account and check it? (I'm on a pretty minimal installation Archlinux.) I've also installed Postfix which is up and running with the default configuration, thought it might have interfered so I stopped it but still the same problem.