To enable postfix, run
postconf -e "home_mailbox = Maildir/" systemctl restart postfix
You can do it by editing /etc/postfix/main.cf
vi /etc/postfix/main.cf
Add
home_mailbox = Maildir/
if home_mailbox entry already in main.cf file, then modify instead of adding a new entry.
Virtual Mailbox
If you are using virtual mailbox, make sure you spedify folder in your virtual_mailbox_maps.
Here is what i have in main.cf
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
in /etc/postfix/vmailbox
root@ip-172-26-9-39:~# cat /etc/postfix/vmailbox [email protected] serverok.in/boby/ root@ip-172-26-9-39:~#
if you miss / at end of the line, mail will get stored in mailbox format even if you specify home_mailbox = Maildir/
Verify Maildir
Create a user
useradd -m -s /bin/bash incoming
Sent a mail to the user
telnet localhost 25 ehlo localhost mail from: root@localhost rcpt to: incoming@localhost data Subject: Testing mail Testing mail . quit
Login as the user
sudo - incoming
Check the mail
MAIL=/home/incoming/Maildir mail
You will see the mail. Only recent version of mail command support Maildir. If you are using older version, it won’t work. If you are using recent version of Linux, you will be fine.
See Postfix
Leave a Reply