[Dovecot] mail_uid and mail_gid are not set in environment (for expire-tool and so)

Pascal Volk user+dovecot at localhost.localdomain.org
Thu Sep 3 13:57:18 EEST 2009


On 09/03/2009 12:35 PM Baptiste Malguy wrote:
> Hello,
> 
> I've just subscribed to the list, as a recent user of Dovecot (1.2.4 by
> now).
> 
> I eventually missed a point, so I tried to find other doc or comments about
> my issue, but failed to. If the following has already been discussed, please
> simply reply with a URL to the corresponding thread or doc ;-)
> 
> Now that I have covered my ass, here is the problem I meet.
> 
> In dovecot.conf, I have the following:
>   mail_uid = vmail
>   mail_guid = vmail
> which is confirmed with 'dovecot -n'
> 
> I have a script my-expire-tool-test containing:
>   #!/bin/sh
>   set
> which basically only display environment variables.
> 
> When I run :
>   /usr/sbin/dovecot --exec-mail ext my-expire-tool-test
> I do not see any variable MAIL_UID nor MAIL_GID. As a consquence, when I run
>   /usr/sbin/dovecot --exec-mail ext my-expire-tool
> with my-expire-tool containing:
>   #!/bin/sh
> 
>   # This script is a workaround for Dovecot 1.2 having issue to load modules
> when running expire-tool.
>   # More information: http://wiki.dovecot.org/Plugins/Expire, search Dovecot
> v1.2
> 
>   MAIL_PLUGINS=${MAIL_PLUGINS//antispam/}
>   MAIL_PLUGINS=${MAIL_PLUGINS//imap_acl/}
>   MAIL_PLUGINS=${MAIL_PLUGINS//imap_quota/}
>   MAIL_PLUGINS=${MAIL_PLUGINS//mail_log/}
> 
>   exec /usr/lib/dovecot/expire-tool "$@"
> 
> It politely tells me:
>   Error: userdb(user at domain) didn't return uid and mail_uid not set
> 
> Actually, this is this message error that lead me to check the environment
> variables. Then I also checked the source code, and run:
>   grep -r  env_put .  | grep -i mail_
> 
> No trace of mail_uid nor mail_gid. Did I find a bug or did I miss a point ?
> 

Hi,

sorry I'm not absolutely  sure, but I believe
<http://wiki.dovecot.org/UserDatabase/Static> may help you.


Regards,
Pascal
-- 
The trapper recommends today: deadbeef.0924612 at localdomain.org


More information about the dovecot mailing list