Why can't receive Mail Delivery Status in root Maildir?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Why can't receive Mail Delivery Status in root Maildir?

elearn2014
To test for sending email after postfix installed.
echo "test" | mail  -s "test"  [hidden email]
Mail Delivery Status Report will be mailed to <root>.

The email was received in my gmail account.

mail
No mail for root
root@localhost:~# mail -f /var/mail/root
mail: /var/mail/root: No such file or directory
root@localhost:~# mail -f /root/Maildir
mail: /root/Maildir: Is a directory

"home_mailbox = Maildir/" in /etc/postfix/main.cf

Why can't receive  Mail Delivery Status in root Maildir?
 tree  /root/Maildir
/root/Maildir
├── cur
├── new
└── tmp

3 directories, 0 files

root@localhost:~# ls  -al   /root/Maildir
total 20
drwxr-xr-x 5 root root 4096 Oct  7 03:32 .
drwx------ 9 root root 4096 Oct  7 03:32 ..
drwx------ 2 root root 4096 Oct  7 03:32 cur
drwx------ 2 root root 4096 Oct  7 03:32 new
drwx------ 2 root root 4096 Oct  7 03:32 tmp





--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
Reply | Threaded
Open this post in threaded view
|

Re: Why can't receive Mail Delivery Status in root Maildir?

Ralph Seichter
On 07.10.17 09:50, elearn2014 wrote:

> Why can't receive  Mail Delivery Status in root Maildir?

I don't understand your question. What exactly seems to be your problem?
Also, please see http://www.postfix.org/DEBUG_README.html#mail

-Ralph
Reply | Threaded
Open this post in threaded view
|

Re: Why can't receive Mail Delivery Status in root Maildir?

Wietse Venema
In reply to this post by elearn2014
elearn2014:

> To test for sending email after postfix installed.
> echo "test" | mail  -s "test"  [hidden email]
> Mail Delivery Status Report will be mailed to <root>.
>
> The email was received in my gmail account.
>
> mail
> No mail for root
> root@localhost:~# mail -f /var/mail/root
> mail: /var/mail/root: No such file or directory
> root@localhost:~# mail -f /root/Maildir
> mail: /root/Maildir: Is a directory

Short answer: follow best practice, and alias mail for root to a
person (or persons, as the case may be).

Long answer: Postfix will not run any external commands (such as
procmail) as root.

        Wietse