In the previous chapter we made sure that Postfix knows which emails it's allowed to receive. Now what to do with the email? It has to be stored to disk. Usually that's done by Postfix itself which comes with a very basic mail delivery agent (MDA) called "virtual" that you can use to save emails to virtual mailboxes on your hard disk. But as we will use Dovecot (for IMAP and POP3 access) anyway we can use its more featureful "local delivery agent" (also known as "Dovecot LDA"). To make Postfix use that agent you will have to add a service to your /etc/postfix/master.cf:
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}
(Note: the second line has to be indented by spaces!)
Restart Postfix:
$> postfix reload
Also make Postfix use that service for virtual delivery by adding these lines to your /etc/postfix/main.cf:
$> postconf -e virtual_transport=dovecot $> postconf -e dovecot_destination_recipient_limit=1
So far this will make Postfix pass on incoming emails to virtual users to the /usr/lib/dovecot/deliver program. Now it is time to configure Dovecot in the next chapter.