Postfix and Dovecot both support the maildir format.
For postfix, disable the use of the spool directory with the ”mail_spool_directory = ” directive and enable maildir delivery with the ”home_mailbox = .maildir/” directive (the trailing / tells postfix to use maildir format).
For Dovecot, tell it to use maildir with the ”mail_location = maildir:~/.maildir” directive. This specifies the format (the maildir: part) and the location ”~/.maildir”
It is important to ensure that all programs are using the same location!