2

Until half an hour ago mail command worked as expected.

Now it says no mail for root.

But I can still see and read my mail in /var/spool/mail/root.

I don't believe I've changed any settings. I'm using postfix 2.10 if that is relevant.

Update 1 Output of echo "testing" | postfix -v root@localhost

postfix: name_mask: all
postfix: name_mask: subnet
postfix: inet_addr_local: configured 2 IPv4 addresses
postfix: inet_addr_local: configured 2 IPv6 addresses
postfix: been_here: 127.0.0.0/8: 0
postfix: been_here: 172.30.0.0/24: 0
postfix: been_here: [::1]/128: 0
postfix: been_here: [fe80::]/64: 0
postfix: mynetworks: 127.0.0.0/8 172.30.0.0/24 [::1]/128 [fe80::]/64 
postfix/postfix-script: error: unknown command: 'root@localhost'
postfix/postfix-script: fatal: usage: postfix start (or stop, reload, abort, flush, check, status, set-permissions, upgrade-configuration)

Update 2 The werid thing now is that mail works, but reads from centos rather than root

I don't want to paste the aliases file because the only way I know how to format it here will take me forever. BUT, after running the cat command, at the bottom of the output I see You have mail in /var/spool/mail/centos. Which I don't see when I open the file with vim.

6
  • What does echo "testing" | postfix -v root@localhost say?
    – Wesley
    Dec 25, 2014 at 21:23
  • How about cat /etc/aliases now?
    – Wesley
    Dec 25, 2014 at 21:36
  • You sure there wasn't a security update that got applied?
    – Wesley
    Dec 25, 2014 at 22:07
  • Yes. I think I'm starting to get a clue. It might be that the DNS records have finally started to propagate properly. (changed them recently)
    – Anton
    Dec 25, 2014 at 22:10
  • I face the same question. The mail -u root works, while mail shows "No mail for root". It dues to su command, and su - works.
    – jifeng.yin
    Feb 16, 2017 at 2:57

0

Browse other questions tagged .