$ uname -a
Linux xxxx 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64 GNU/Linux
$ cat /etc/aliases
# See man 5 aliases for format
postmaster: root
root: root@xxxx.xxxx
email received by nobody.
$ sudo mail -f /var/spool/mail/nobody
"/var/spool/mail/nobody": 23 messages 1 new 19 unread
1 Anacron Tue Jan 9 00:07 20/823 Anacron job
'cron.daily' on xxxx
From: Anacron <root@xxxx.xxxx>
To: root@xxxx.xxxx
Subject: Anacron job 'cron.daily' on xxxx
Content-Type: text/plain; charset=UTF-8
Why is an email sent to root redirected to nobody?
$ sudo mail -f /var/spool/mail/root
/var/spool/mail/root: 0 messages
No email in root's mail box.
Send an email to root to test.
$ echo "This is the body of the email" | mail -s "This is the subject line" root
All of them can receive the email.
$ sudo mail -f /var/spool/mail/root
$ sudo mail -f /var/mail/root
$ sudo mail -f /root/Maildir
Only nobody can receive the email .
$ sudo mail -f /var/spool/mail/nobody
Log info in /var/log/mail.log
$ sudo cat /var/log/mail.log
Apr 27 17:48:43 xxxx postfix/pickup[7114]: 1FE0D2801E3: uid=1000 from=<debian9@xxxx.xxxx>
Apr 27 17:48:43 xxxx postfix/cleanup[7492]: 1FE0D2801E3: message-id=<20180427094843.1FE0D2801E3@xxxx.xxxx>
Apr 27 17:48:43 xxxx postfix/qmgr[1394]: 1FE0D2801E3: from=<debian9@xxxx.xxxx>, size=360, nrcpt=1 (queue active)
Apr 27 17:48:43 xxxx postfix/local[7494]: 1FE0D2801E3: to=<root@xxxx.xxxx>, relay=local, delay=0.21, delays=0.17/0/0/0.04, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
Apr 27 17:48:43 xxxx postfix/qmgr[1394]: 1FE0D2801E3: removed
Why does postfix redirect email from root to nobody?