[Dovecot] error 89 when loading plugin

John O'Brien john at whitesmiths.com
Mon Aug 2 13:42:29 EEST 2010


Pascal,

On 02/08/2010, at 2:22 AM, Pascal Volk wrote:

> On 08/01/2010 08:37 AM John O'Brien wrote:
>> Hi,
>> 
>> I'm very confused - that's not too difficult for me.
>> 
>> I have written a small plugin change_passwd_plugin.c
>> I would like this custom IMAP command to be available to all users.
>> 
>> The code contains the following.
>> 
>> void change_passwd_plugin_init(void)
>>    {
>> 	command_register("XCHANGEPASSWORD", cmd_xchangepasswd, 0);
>> 	str_append(capability_string, " XCHANGEPASSWORD");
>>    }
>> 
>> void change_passwd_plugin_deinit(void)
>>    {
>> 	command_unregister("XCHANGEPASSWORD");
>>    }
>> 
>> % nm
>> 0000000000000920 T change_passwd_plugin_deinit
>> 00000000000008ec T change_passwd_plugin_init
>> 0000000000201248 D change_passwd_plugin_version
>> 
>> dovecot.conf
>> mail_plugins = change_passwd_plugin
>> mail_plugin_dir = /usr/lib/dovecot/imap
>> imap_capability = XCHANGEPASSWORD
>> 
>> %ls -la /usr/lib/dovecot/imap
>> ls -la /usr/lib/dovecot/imap
>> total 28
>> drwxr-xr-x 2 root root  4096 Aug  1 16:03 .
>> drwxr-xr-x 3 root root  4096 Aug  1 10:51 ..
>> -rwxr-xr-x 1 root root 16969 Aug  1 16:03 change_passwd_plugin.so
>> 
>> 
>> During login I see the following
>> 
>> /var/log/maillog
>> Aug  1 16:13:00 development dovecot: IMAP(test): Loading modules from directory: /usr/lib/dovecot/imap
>> Aug  1 16:13:00 development dovecot: IMAP(test): Plugin change_passwd_plugin not found from directory /usr/lib/dovecot/imap
>> Aug  1 16:13:00 development dovecot: child 29715 (imap) returned error 89
>> 
>> I don't understand why I'm getting an "error 89" reported.
>> The login session is terminated by dovecot when the error occurs.
>> 
>> Any assistance or ideas would be appreciated.
>> 
>> Regards,
>> 
>> John
>> 
> 
> The name of the plungins is <plugin_name>_plugin.<ext>. To load a plugin
> use:
> 
> 	mail_plugins = plugin_name
> 
> Without the trailing _plugin.
> 
Thanks that works with 1.2
> 
> Which clients, except for telnet, supports the XCHANGEPASSWORD command?

Unfortunately we are prevented from telling you about the specific device because of a very strict NDA.
It is an NDA from a very litigious systems supplier from silicon valley, so we must be careful.

All I can say is that its a embedded system that has plenty of clients.
Access to some of the stored data is via an IVR style audio interface, access to which is controlled via a PIN code.
So think of this as the PIN code you need to enter if you were accessing your telephone banking service via an IVR.
The embedded client needs to be able to change this PIN code via IMAP.

As a result of a suggestion from Pascal late last week I spent today loading 2.0.rc3 and converting the plugin to the "new form".

What a nightmare.

Is there an easy way to have a plugin included in the configuration and built as part of the make and make install?
Everything has changed. I was previously happily generating a .so and putting it the right directory.
I know this is the wrong way to do it, but I was doing something like this.
#
# Build the XCHANGEPASSWORD custom IMAP command
# 
export DOVECOT=../../../../dovecot-2.0.rc3
gcc -fPIC -g -shared -Wall \
    -I$DOVECOT -I$DOVECOT/src/imap  -I$DOVECOT/src/lib  -I$DOVECOT/src/lib-auth -I$DOVECOT/src/lib-charset \
    -I$DOVECOT/src/lib-dict -I$DOVECOT/src/lib-dns  -I$DOVECOT/src/lib-dovecot  -I$DOVECOT/src/lib-imap \
    -I$DOVECOT/src/lib-index -I$DOVECOT/src/lib-lda -I$DOVECOT/src/lib-mail -I$DOVECOT/src/lib-master \
    -I$DOVECOT/src/lib-ntlm -I$DOVECOT/src/lib-otp -I$DOVECOT/src/lib-settings -I$DOVECOT/src/lib-sql \
    -I$DOVECOT/src/lib-storage  -DHAVE_CONFIG_H \
    change_passwd_plugin.c -o change_passwd_plugin.so

I'm trying to figure out how to build it under 2.0. The documentation assumes a degree of prior knowledge which I have not
been able to find.

I have built a test framework change_passwd_plugin.c which is 165 lines of C, its tiny.
Once I get the custom IMAP command been parsed I can then add support in to store the PIN data in a postgresql database table.
I was hoping to avoid having to learn too much about all this but it seems it can't be avoided.

Any suggestions would be greatly appreciated.

Best Regards,

John

> 
> 
> Regards,
> Pascal
> -- 
> The trapper recommends today: c01dcofe.1021318 at localdomain.org
> 



More information about the dovecot mailing list