Dovecot Pre-Login Scripting
Jeremy Hayden
jeremyhayden at airstreamcomm.net
Tue Dec 9 15:25:35 UTC 2014
Hello,
We are in the process of migrating users from one system that is currently
not hosted by our company, to our dovecot 2.2.10 installation. We are
planning on doing the dovecot dsync command for copying users mail over to
the new installation, but the one snag we are running into is ensuring we
are able to get the users credentials stored in our system.
We are migrating the email from a Gmail ISP account to our installation as
they are discontinuing their support next year. The setup is a multistep
process we are hoping to accomplish. When a connection is started to our
cluster, it will first check the database to see if the credentials match,
if not it will verify against Gmail's servers. If the Gmail test is
successful, it would pass the credentials to a script to store them for
future login attempts. Once the authentication is verified and stored
locally, we would run a post-login script to run dsync to copy the mail down
to the new system.
The problem we are running into is efficiently and appropriately hooking
into the dovecot authentication process. We are unable to find anything
regarding PreLogin Scripting to contrast the PostLoginScripting we are
currently using, and the only other thing we are currently seeing as a
possible option is running a custom authentication socket or password
imap-login to a script. This seems like it would be a resource nightmare
depending on the server load and are hoping for a more elegant option to be
unveiled.
Any other options or suggestions are welcome. We are also wondering, if we
have to go with the custom authentication setup, if there are any examples
out there to base our scripts off in setting it up.
Thank you,
Jeremy
More information about the dovecot
mailing list