Baptiste Malguy
2009-Sep-03 10:35 UTC
[Dovecot] mail_uid and mail_gid are not set in environment (for expire-tool and so)
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 ?
Regards,
--
Baptiste MALGUY - http://www.malguy.net
PGP fingerprint: 49B0 4F6E 4AA8 B149 B2DF 9267 0F65 6C1C C473 6EC2
Pascal Volk
2009-Sep-03 10:57 UTC
[Dovecot] mail_uid and mail_gid are not set in environment (for expire-tool and so)
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
Timo Sirainen
2009-Sep-07 01:10 UTC
[Dovecot] mail_uid and mail_gid are not set in environment (for expire-tool and so)
This should fix it: http://hg.dovecot.org/dovecot-1.2/rev/eb22a456a625 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090906/8c24c065/attachment-0002.bin>
Maybe Matching Threads
- quota and lazy_expunge plugins both used: quotas go wrong with lazy_expunge'd mails
- doveadm doesn't seem to honor mail_location, mail_uid, mail_gid
- Usage of PROTECT_WITH_INDEX in R-exts
- Couldn't drop privileges: User is missing UID (see mail_uid setting)
- dovecot v1.2.10 + unknown mail_uid parameter