title: Postfix - recipient_delimiter to mail folder
body: <p>I am using postfix, the LDA is dovecot and i found the useful parameter <code>recipient_delimiter</code> in the man page of postfix.</p>
  
  <p>I would like to use mail addresses like <code>user+folder@domain.com</code> and the mail server should automatically move the mail into the appropriate folder. If the folder does not exist, it should get created.</p>
  
  <p>Dovecot can create automatically directories over the configuration files. I have found the following options for it: <a href="https://wiki.dovecot.org/MailboxSettings" rel="nofollow noreferrer">Mailbox Settings</a> and <a href="https://wiki2.dovecot.org/Plugins/Autocreate" rel="nofollow noreferrer">Autocreate Plugin</a></p>
  
  <p>So i could write a little bash scripts which reads the mail server logs, greps the mail addresses and either create the maildirectory via mkdir or via the dovecot configuration. But i do not believe that this is the correct solution for it, because:</p>
  
  <ol>
  <li>The first mail would not get catched because the mail folder
  does not exist at this time. But that is not the main problem, the mail could get moved via the script too.   </li>
  <li>There must be a better solution for that.</li>
  </ol>
  
  <p>I searched already on the web, but i could not find informations about that. Probably (for sure) i am using the false searching terms.</p>