I am trying to install postfix on Ubuntu with bellow tutorial

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-on-ubuntu-16-04

but while Initialize the Maildir and Test the Client i am getting below error

root@ubuntu-shm:~# ls -R ~/Maildir
ls: cannot access ’/root/Maildir’: No such file or directory

I havent created non root user.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
4 answers

I have got same issue.

sann@ububtu16Lamp:~# echo ‘init’ | mail -s 'init’ -Snorecord sann
Can’t canonicalize “/sann/Maildir”
sann@ububtu16Lamp:~# ls -R ~/Maildir
ls: cannot access ’/sann/Maildir’: No such file or directory

I am getting same error. wondering if anyone found a fix.
Thank you

I’m having similar issue. Please someone help.

I fixed this by opening my postfix main.cf file:

sudo nano /etc/postfix/main.cf

and adding the following to the end of the file:

home_mailbox = Maildir/

and restarting postfix.

sudo /etc/init.d/postfix reload
sudo systemctl restart postfix

At that point running

echo 'init' | mail -s 'init' -Snorecord my_username

returned

Can't canonicalize "/home/my_username/Maildir"

but when I ran

ls -R ~/Maildir

The mail directory was there!! Success!!
Hope this helps future mail pioneers.
~ Gifford

Submit an Answer