Re: [vchkpw] auto create dir for spam email
The error message still exist after I installed qmailadmin-1.2.1 that download from http://qmailadmin.sf.net. I am sure that it is not caused by the cache of my brower. Will it caused by some special default setting of Mandrake ? Regards, Frankie On Mar 7, 2004, at 10:03 AM, Frankie Wong wrote: On Mar 7, 2004, at 5:04 AM, Frankie Wong wrote: After I success to set automatically add spam directory by qmailadmin-hooks, I try to set automatically delete any user.pref file in the data directory of squirrelmail when del user in qmailadmin. However , error message appears in qmailadmin when del user: Error 8 Where the parameters are: /home/vpopmail/bin/deletedata.sh, deluser, test, test.com.hk, , Content-Type: text/htm My version is the updated one (1.2.1). Is there any setting I should highlight ? Regards, Frankie If you get that error message, then you aren't running 1.2.1. Find your qmailadmin binary (in the cgi-bin directory) and delete it. In your web browser, go to the qmailadmin URL and make sure you get a page not found error. Now, make and install 1.2.1. That error string was removed during the 1.2.0 pre-releases. And yes, you can use 1.2.1 instead of 1.2.0. -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/
Re: [vchkpw] auto create dir for spam email
Sorry, it is caused by a blank line at the beginning of script file. Best Regards, Frankie The error message still exist after I installed qmailadmin-1.2.1 that download from http://qmailadmin.sf.net. I am sure that it is not caused by the cache of my brower. Will it caused by some special default setting of Mandrake ? Regards, Frankie On Mar 7, 2004, at 10:03 AM, Frankie Wong wrote: On Mar 7, 2004, at 5:04 AM, Frankie Wong wrote: After I success to set automatically add spam directory by qmailadmin-hooks, I try to set automatically delete any user.pref file in the data directory of squirrelmail when del user in qmailadmin. However , error message appears in qmailadmin when del user: Error 8 Where the parameters are: /home/vpopmail/bin/deletedata.sh, deluser, test, test.com.hk, , Content-Type: text/htm My version is the updated one (1.2.1). Is there any setting I should highlight ? Regards, Frankie If you get that error message, then you aren't running 1.2.1. Find your qmailadmin binary (in the cgi-bin directory) and delete it. In your web browser, go to the qmailadmin URL and make sure you get a page not found error. Now, make and install 1.2.1. That error string was removed during the 1.2.0 pre-releases. And yes, you can use 1.2.1 instead of 1.2.0. -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/
Re: [vchkpw] auto create dir for spam email
After I success to set automatically add spam directory by qmailadmin-hooks, I try to set automatically delete any user.pref file in the data directory of squirrelmail when del user in qmailadmin. However , error message appears in qmailadmin when del user: Error 8 Where the parameters are: /home/vpopmail/bin/deletedata.sh, deluser, test, test.com.hk, , Content-Type: text/htm My setting of qmailadmin-hooks are as follows: .qmailadmin-hooks: adduser /home/vpopmail/bin/addspamdir.sh deluser/home/vpopmail/bin/deletedata.sh /home/vpopmail/bin/deletedata.sh: #!/bin/bash USERNAME=$1 DOMAIN=$2 if [ -e /var/www/data/[EMAIL PROTECTED] ]; then /bin/bash -c /bin/rm -rf /var/www/data/[EMAIL PROTECTED] fi The problem seems not come from the script because it still appear even if I remark all in deletedata.sh Any suggestions ? Regards, Frankie It works after I change the apache user from apache:apache to vpopmail:vchkpw. Regards, Frankie 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-x/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
Re: [vchkpw] auto create dir for spam email
My version is the updated one (1.2.1). Is there any setting I should highlight ? Regards, Frankie On Mar 7, 2004, at 5:04 AM, Frankie Wong wrote: After I success to set automatically add spam directory by qmailadmin-hooks, I try to set automatically delete any user.pref file in the data directory of squirrelmail when del user in qmailadmin. However , error message appears in qmailadmin when del user: Error 8 Where the parameters are: /home/vpopmail/bin/deletedata.sh, deluser, test, test.com.hk, , Content-Type: text/htm Upgrade to qmailadmin 1.2.0 or later, as mentioned in a previous email. http://qmailadmin.sf.net/ Hooks were majorly broken until 1.2.0-pre1. That error message was removed in the cleanup, so you're running old code. -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/
Re: [vchkpw] auto create dir for spam email
I tried it many times but it really works only after I change apache user to vpopmail:vchkpw under Mandrake 9.2. Regards, Frankie On Mar 6, 2004, at 8:23 PM, Frankie Wong wrote: It works after I change the apache user from apache:apache to vpopmail:vchkpw. That should be unnecessary, as qmailadmin is a suid binary and will run as user vpopmail:vchkpw on a properly configured system. If you can authenticate with qmailadmin, and list/add/delete users, then there should be no need to set apache to run as vpopmail:vchkpw. Please see my other email about upgrading qmailadmin to v1.2.0 or later. -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/
Re: [vchkpw] auto create dir for spam email
qmailadmin-1.2.1 was download from shupp.org. Should I turn back to version 1.2.0 ? Regards, Frankie My version is the updated one (1.2.1). Is there any setting I should highlight ? Regards, Frankie On Mar 7, 2004, at 5:04 AM, Frankie Wong wrote: After I success to set automatically add spam directory by qmailadmin-hooks, I try to set automatically delete any user.pref file in the data directory of squirrelmail when del user in qmailadmin. However , error message appears in qmailadmin when del user: Error 8 Where the parameters are: /home/vpopmail/bin/deletedata.sh, deluser, test, test.com.hk, , Content-Type: text/htm Upgrade to qmailadmin 1.2.0 or later, as mentioned in a previous email. http://qmailadmin.sf.net/ Hooks were majorly broken until 1.2.0-pre1. That error message was removed in the cleanup, so you're running old code. -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/
Re: [vchkpw] auto create dir for spam email
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-x/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
Re: [vchkpw] auto create dir for spam email
It works after I change the apache user from apache:apache to vpopmail:vchkpw. Regards, Frankie 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-x/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
[vchkpw] Re:?vchkpw]?uto?reate?ir?or?pam?mail
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-x/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
[vchkpw] Re:?vchkpw] Auto create dir for spam email
I have tried the follows but it can't work .qmailadmin-hooks: /adduser /home/vpopmail/domains/mkspamdirs.sh mkspamdirs.sh: USERNAME=$1 DOMAIN=$2 SPAMFOLDER=.Spam THEDIR=`/home/vpopmail/domains/$DOMAIN/$USERNAME` exec /usr/local/bin/maildirmake `$THEDIR/Maildir/$SPAMFOLDER` Please point out what error in my script because I am newbie to shell script. Regards, 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-x/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