0

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!

Martin
  • 1,869
  • 6
  • 16
  • Why on earth have you set the queue lifetime to one hour?!? Undo that immediately. [Here is why.](https://serverfault.com/q/735269/126632) I wouldn't let this setting ever be less than 3 days. Five is better. – Michael Hampton Jul 17 '20 at 14:30
  • I followed a tutorial, which told me to do so. I never thought about this setting again, because everything worked as it should, until I recently changed the setup... – Martin Jul 17 '20 at 14:43
  • Oh God, more bad advice from tutorials on the Internet. Not your fault, there's just a bunch of garbage out there. I'm so tempted to start writing my own... – Michael Hampton Jul 17 '20 at 14:46
  • As I think about it, your advice is the solution... and my problem up there is also a good reason why this setting should be at least 3d... Thank you! – Martin Jul 17 '20 at 15:03

0 Answers0