2

We are currently setting up a postlogin script to pass credentials to a script for syncing mail to another server cluster in preparation for a migration.

The server we are setting this up currently is running Dovecot 2.0.7 and is using the passwd driver in the userdb configuration. We have attempted to place the following code into the userdb configuration to no avail:

userdb {
  driver = passwd
  #args = plain_pass=%w
  #override_fields = plain_pass=%w
}

When attempting to enable either of the 2 lines that are commented, we were unable to use ${PLAIN_PASS} in the shell script as it is being seen as an empty string.

So far searching the dovecot mailing list and other forums have been unsuccessful in finding anything relating to this not working in our particular version, or any bug reports that were reported in versions similar to ours.

Any assistance or guidance in getting this working correctly would be greatly appreciated as we are currently stumped.

  • After enabling those commented lines, can you try passing plain_pass as argument to your script; something like /some/path/script.sh $PLAIN_PASS? – clement Dec 19 '14 at 13:15
1

After looking deeper through the change logs, it appears that override_fields and default_fields options were not added until Dovecot 2.1.0, so those options would not be available. There was also mention in another post (no longer have the link to it) that there was an issue with Dovecot 2.0.X clearing the variables prior to hitting the postlogin scripting portion, which was also corrected in 2.1.X. This would mean the args= statement would also not work.

The only solution that seems the best to implement to do postlogin scripting with passwords is up update Dovecot version 2.0.X to a newer version of at least 2.1.X in order to have the overrride_fields option available for use.

Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.