auth_mechanisms = plain login
auth_allow_cleartext = no

import_environment {
  SUBMISSION_TLS_CERT = %{env:SUBMISSION_TLS_CERT}
  SUBMISSION_TLS_KEY = %{env:SUBMISSION_TLS_KEY}
}

passdb lua {
  lua_file = /etc/dovecot/auth.lua
  use_worker = yes
}

userdb static {
  allow_all_users = yes
  fields {
    uid = 1000
    gid = 1000
    home = /srv/vmail/%{user | lower}
  }
}
