I have a domain with a small v-server configured for mail reception / delivery with Postfix and Dovecot. Since I'm a little bit paranoid, I used gocryptfs to encrypt local mail storage on disk. This leads to a problem: When the server-hoster decides to restart the server (which happens mostly during the night), mounting the encrypted file system requires entering a password. Due to security reasons, I do not want to store that password on the server, which means, I have to manually logon to the server, and enter the password.
This leads to an ugly side-effect: Due to the missing mount, dovecot cannot start until the password is entered. If someone tries to send me an email in this period of time, my postfix puts the incoming mail in queue, tries LMTP transport to dovecot a couple of times, and after the configured maximal_queue_lifetime
(which is quite short in my case, 1h only), a bounce message is being returned to sender.
What I want postfix to do instead, is to hold on to the mail, until it is able to deliver it to dovecot. A couple of ideas:
- increase queue lifetime (is this possible only for "incoming" emails, not for outgoing?)
- From reading & searching, I learned that it is possible to put a mail on hold (how ? is it possible to define a condition "if not exist unix-lmtp socket, put mail on hold" )
- Any other suggestions ?
Thanks for your help!