>> checkvpw set a nice bunch of vars which i can use in the wrapper.
>> i would love to tweak bincimap using env-vars too but those $hex
>> varnames
>> (and values) are not very intuitive.
> Version 1.3

>> loading .bincimap from $HOME instead of $PWD is a kind of mandatory for
>> using it on vmailmgr, but who cares ;-) i'll use IMAPdir,path="" on
>> bincimap.conf and the wrapper will do the rest.
>>
> Which wrapper are you using and have you read Section 6 of
> http://lifewithbincimap.org/index.php/Main/LifeWithCheckpasswordAndFriends?

perl is too much :-)
time perl --version vs. time sh --version

what i did is to use vmailmgr's feature to _search_ for the maildir
argument. <url:http://www.vmailmgr.org/docs/configuration.html#SEC27>
it looks for the string "maildir", and if it can't find it checkvpw
rewrite the last argument.
i choose to use the first argument to be more sh friendly and cheaper.

Mailbox { depot="IMAPdir"; path="" }

( this is hand writter not pasted, it can contain deep errors )
--- from run script --
/opt/vmailmgr/bin/checkvpw \
/opt/bincimap/bin/vmailmgr_wrapper \
Maildir \
/opt/bincimap/bin/bincimapd

-- /opt/bincimap/bin/vmailmgr_wrapper --
#!/bin/sh
if [ "$VUSER" ]; then
  cd "$1"
else
  [ ! -d "$1"] && /var/qmail/bin/maildirmake "$1"
fi

if [ ! -d IMAPdir/INBOX ]; then
  mkdir -p IMAPdir/INBOX
  for x in new cur tmp; do
    ln -s $MAILDIR IMAPdir/INBOX/$x
  done
fi

cd "IMAPdir"; shift
exec "$@"
---

i'll optimize it but i have to check the real content of some env-vars
defined by checkvpw.

what vmailmgr consider $MAILDIR for vusers i want to turn it into $VHOME.
my final goal is to give vusers ftpacess, webspace in the virtual domain,
etc...

Reply via email to