If you have .qmailadmain-hooks in either the /home/vpopmail/etc or
/home/vpopmail/domains/domain_name/ directories and the ownerships are
right then it should be working.

Unfortunately I don't know a good way to debug this.
Is there anyone else on the list who works with the hooks who can help?
Thanks,
Barry
> Yes, sure both .qmailadmin-hooks and make_dirs.sh are owned by
> vpopmail:vchkpw and mode of make_dirs.sh is 755.
>
> .qmailadmin-hooks seems not work and not execute make_dirs.sh even I
> insert something into make_dirs.sh like this:
>
> touch /tmp/test
>
> but nothing is created in /tmp.
>
> Since I direct use qmailadmin, not the plugin to squirrelmail, I think
> apache user is not related to this issue, right
> ? How can I know or Is there any way to create a log for me to inspect
> such kind of error ?
>
> Best Regards,
>
> Frankie
>
>> Hmmm. Since all the file locations are the same it is probably a rights
>> issue.
>>
>> Make sure that .qmailadmin-hooks and make_dirs.sh are owned by the
>> correct user and group. In many cases that would be oner vpopmail and
>> group vchkpw.
>>
>> Also, my http server is not running under user "apache" but as user
>> "vpopmail". This was necessary in order to run the vmailadmin plugin in
>> the Squirrelmail webmail client. It may be the reason it runs easily on
>> my server.
>>
>> Barry
>>
>> Frankie Wong wrote:
>>
>>>Hi,
>>>
>>>It doesn't work in my system even all script and file location exactly
>>> matching to your example.
>>>
>>>Any suggestions or hightlight ?
>>>
>>>Frankie
>>>
>>>
>>>
>>>>Hi,
>>>>
>>>>Here's my scripts. There is probably a better way to do this but it
>>>>works on our system.
>>>>
>>>>.qmailadmin-hooks:
>>>>--snip--
>>>>adduser /home/vpopmail/domains/make_dirs.sh
>>>>--snip--
>>>>
>>>>make_dirs.sh:
>>>>--snip--
>>>>#!/bin/bash
>>>>
>>>>NEWFOLDER=".Sent"
>>>>
>>>># From qmailadmin hooks
>>>>USERNAME=$1
>>>>DOMAIN=$2
>>>>PASSWORD=$3
>>>>FULLNAME=$4
>>>>
>>>>THEDIR=`cat /home/vpopmail/domains/$DOMAIN/vpasswd | grep $USERNAME |
>>>>awk -F":" '{print $6}'`
>>>>mkdir $THEDIR/Maildir/$NEWFOLDER >&/dev/null
>>>>mkdir $THEDIR/Maildir/$NEWFOLDER/new >&/dev/null
>>>>mkdir $THEDIR/Maildir/$NEWFOLDER/cur >&/dev/null
>>>>mkdir $THEDIR/Maildir/$NEWFOLDER/tmp >&/dev/null
>>>>echo INBOX$NEWFOLDER >> $THEDIR/Maildir/courierimapsubscribed
>>>>chown -R vpopmail.vchkpw $THEDIR/Maildir/ #only needed if script not
>>>> run
>>>>by vpopmail
>>>>chmod -R 700 $THEDIR/Maildir/$NEWFOLDER #only needed if script not run
>>>>by vpopmail
>>>>--snip--
>>>>
>>>>Good luck!
>>>>
>>>>Barry
>>>>
>>>>Frankie Wong wrote:
>>>>
>>>>
>>>>
>>>>>I will be pleased if you can send me your script in order to let me
>>>>> have a better reference for my own script
>>>>> design.
>>>>>
>>>>>Regards,
>>>>>
>>>>>Frankie
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>Hi,
>>>>>>
>>>>>>qmailadmin has "hooks" that will allow you to send info to other
>>>>>> places
>>>>>>when you add, delete or modify a user. Read the document
>>>>>>/var/src/qmailadmin-xxxxx/README.hooks for details.
>>>>>>
>>>>>>Basically, it'll tell you to create a .qmailadmin-hooks file, what to
>>>>>>put in it and the various places you may want to place the file.
>>>>>> Make
>>>>>>sure that .qmailadmin-hooks has the correct user and group ownership,
>>>>>> too.
>>>>>>
>>>>>>I use it to call a bash script. It could probably also call
>>>>>>/usr/lib/courier-imap/bin/maildirmake.
>>>>>>
>>>>>>If you want my script file let me know.
>>>>>>
>>>>>>Barry
>>>>>>
>>>>>>[EMAIL PROTECTED] wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>http://www.jerfu.com/toaster/FullToaster_1.0.6.html show me a way to
>>>>>>> alter vpopmail.c in order to create
>>>>>>> directory
>>>>>>>for spam email automatically. However, it is only for version
>>>>>>> 5.3.11. Is there any link that can show
>>>>>>>me related information about vpopmail 5.4.1 ?
>>>>>>>
>>>>>>>Regards,
>>>>>>>
>>>>>>>Frankie
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>>
>>>
>>
>
>