Re: [qmailadmin] spam assassin support
Hi David, I checked this out. Looks really nice. One thing I can't figure out is how to set the user_prefs directory. Do you know how to do that? On Tuesday 06 January 2004 10:33 pm, David Rodgers wrote: there is already an amazing tool for this it's called webuserprefs http://www.pipegrep.net/webuserprefs/ it can use flat local.cf files or a db for spamassassin prefs and manages its own auth via imap/pop3/squirrelmail if you use the mysql option you get the added benefit of not having to save the individual files for every user just one dump and you're all backed up. also of interest is that you can extend it's functionality pretty easily by adding panels to it. David Rodgers Ken Jones wrote: Not quite what I was looking for. I'm probably going to start working on some changes to add support for spam assassin, with a --enable-spamassassin option. Basicly to allow a user to change their user_prefs file so they can manage whitelisting and change their hit count. Probably it would be best to add it to a new devel version after 1.2 is released as stable. Does anyone have any suggestions? Ken Jones On Tuesday 06 January 2004 12:43 pm, Rick Widmer wrote: Kind of. --enable-modify-spam adds a Spam detection? checkbox at the bottom of the modify users page. If checked this changes the Standard delivery option from no .qmail file to one that contains the spam command. It changes the delivery line in Vacation delivery, and the Save a copy option of Forward to deliveries from a direct maildir delivery to the spam command. The default spam command is: |preline /usr/local/bin/maildrop /etc/mailfilter It can be set with --enable-spam-command Rick Ken Jones wrote: Is there currently any support for spam assassin in the latest qmailadmin releases? Ken Jones
Re: [qmailadmin] spam assassin support
Hi Rob, Looks like the patch is out of date. Last hunk fails to apply. Also, it looks like it's just the user.c changes. Are there changes to the mod_user.html template too? Ken Jones On Tuesday 06 January 2004 6:36 pm, Rob Genovesi wrote: Hey Ken, I posted a patch on sourceforge awhile back regarding spam assassin preferences. It's pretty hack-ish (not so good with C), but it might give you a few ideas. I made changes to mod_user to allow for different spam actions and hit count. I stopped working on this awhile ago when I got distracted with other projects ... Patch request ID: 09 cheers, Rob At 04:39 PM 1/6/2004 -0600, you wrote: Not quite what I was looking for. I'm probably going to start working on some changes to add support for spam assassin, with a --enable-spamassassin option. Basicly to allow a user to change their user_prefs file so they can manage whitelisting and change their hit count. Probably it would be best to add it to a new devel version after 1.2 is released as stable. Does anyone have any suggestions? Ken Jones On Tuesday 06 January 2004 12:43 pm, Rick Widmer wrote: Kind of. --enable-modify-spam adds a Spam detection? checkbox at the bottom of the modify users page. If checked this changes the Standard delivery option from no .qmail file to one that contains the spam command. It changes the delivery line in Vacation delivery, and the Save a copy option of Forward to deliveries from a direct maildir delivery to the spam command. The default spam command is: |preline /usr/local/bin/maildrop /etc/mailfilter It can be set with --enable-spam-command Rick Ken Jones wrote: Is there currently any support for spam assassin in the latest qmailadmin releases? Ken Jones
Re: [qmailadmin] spam assassin support
if you look in this block of the config.php file // user_prefs File Location // If you typed file for $prefs_source above, set this variable // to the location of the user_prefs file. If you included // authorization above, use the $auth_user variable to include // the user_prefs file for the user that logged in. // $user_prefs = /path/to/user_prefs; // $user_prefs = /home/$auth_user/.spamassassin/user_prefs; You can set it there by uncommeting the line right above and adjusting it to the path for your home directories to use it with vpopmail on virtual domains it's a little more tricky than this though ... you would have to log in with the whole email adress and split it to grab the domain or have it grab the domain from the url you referenced it with ... either way you would have to end with something like this $user_prefs = /home/vpopmail/domains/$domain/$auth_user/.spamassassin/user_prefs a much easier way is to use spamassassin with MySQL userprefs ... it works really well and as a side benefit their prefs easily replicate across many machine if you add a bunch more and it doesn't create a bunch of files and directorys to clutter up the place. notice the // $prefs_source = db; // $prefs_source= file; in the config ... just uncomment the one you want. locally I have about 10k user spread across 6 machines the only thing on my wish list is what I mentioned here already ... I would like to be able to specify 2 spam commands in qmailadmin 2 checkboxes one that could be labeled filter and one that could be labeled identify. this is so that my users could have the option of having their mail sent to a quarantine box and never recieving it in their inbox and one for people that just want the spam to be tagged and delivered so that they can split it out in mailfolders for themselves with rules on their mail client. David On Thu, 2004-01-08 at 11:04, Ken Jones wrote: Hi David, I checked this out. Looks really nice. One thing I can't figure out is how to set the user_prefs directory. Do you know how to do that? On Tuesday 06 January 2004 10:33 pm, David Rodgers wrote: there is already an amazing tool for this it's called webuserprefs http://www.pipegrep.net/webuserprefs/ it can use flat local.cf files or a db for spamassassin prefs and manages its own auth via imap/pop3/squirrelmail if you use the mysql option you get the added benefit of not having to save the individual files for every user just one dump and you're all backed up. also of interest is that you can extend it's functionality pretty easily by adding panels to it. David Rodgers Ken Jones wrote: Not quite what I was looking for. I'm probably going to start working on some changes to add support for spam assassin, with a --enable-spamassassin option. Basicly to allow a user to change their user_prefs file so they can manage whitelisting and change their hit count. Probably it would be best to add it to a new devel version after 1.2 is released as stable. Does anyone have any suggestions? Ken Jones On Tuesday 06 January 2004 12:43 pm, Rick Widmer wrote: Kind of. --enable-modify-spam adds a Spam detection? checkbox at the bottom of the modify users page. If checked this changes the Standard delivery option from no .qmail file to one that contains the spam command. It changes the delivery line in Vacation delivery, and the Save a copy option of Forward to deliveries from a direct maildir delivery to the spam command. The default spam command is: |preline /usr/local/bin/maildrop /etc/mailfilter It can be set with --enable-spam-command Rick Ken Jones wrote: Is there currently any support for spam assassin in the latest qmailadmin releases? Ken Jones -- Thanks, David Rodgers SCO aka The Santa Claus Operation If you believe in them you'll believe anything!
RE: [qmailadmin] spam assassin support
I just wanted to second this as a good way to handle the problem. I also run a lot of mail users and not all want to have the same spam filtering. This would give us the option to control it. I would also like to see a domain default option as well that would give us the ability to set the default at a domain level. Ross -Original Message- From: David Rodgers [mailto:[EMAIL PROTECTED] Sent: Thursday, January 08, 2004 9:19 AM To: Ken Jones; [EMAIL PROTECTED] Subject: Re: [qmailadmin] spam assassin support if you look in this block of the config.php file // user_prefs File Location // If you typed file for $prefs_source above, set this variable // to the location of the user_prefs file. If you included // authorization above, use the $auth_user variable to include // the user_prefs file for the user that logged in. // $user_prefs = /path/to/user_prefs; // $user_prefs = /home/$auth_user/.spamassassin/user_prefs; You can set it there by uncommeting the line right above and adjusting it to the path for your home directories to use it with vpopmail on virtual domains it's a little more tricky than this though ... you would have to log in with the whole email adress and split it to grab the domain or have it grab the domain from the url you referenced it with ... either way you would have to end with something like this $user_prefs = /home/vpopmail/domains/$domain/$auth_user/.spamassassin/user_prefs a much easier way is to use spamassassin with MySQL userprefs ... it works really well and as a side benefit their prefs easily replicate across many machine if you add a bunch more and it doesn't create a bunch of files and directorys to clutter up the place. notice the // $prefs_source = db; // $prefs_source= file; in the config ... just uncomment the one you want. locally I have about 10k user spread across 6 machines the only thing on my wish list is what I mentioned here already ... I would like to be able to specify 2 spam commands in qmailadmin 2 checkboxes one that could be labeled filter and one that could be labeled identify. this is so that my users could have the option of having their mail sent to a quarantine box and never recieving it in their inbox and one for people that just want the spam to be tagged and delivered so that they can split it out in mailfolders for themselves with rules on their mail client. David On Thu, 2004-01-08 at 11:04, Ken Jones wrote: Hi David, I checked this out. Looks really nice. One thing I can't figure out is how to set the user_prefs directory. Do you know how to do that? On Tuesday 06 January 2004 10:33 pm, David Rodgers wrote: there is already an amazing tool for this it's called webuserprefs http://www.pipegrep.net/webuserprefs/ it can use flat local.cf files or a db for spamassassin prefs and manages its own auth via imap/pop3/squirrelmail if you use the mysql option you get the added benefit of not having to save the individual files for every user just one dump and you're all backed up. also of interest is that you can extend it's functionality pretty easily by adding panels to it. David Rodgers Ken Jones wrote: Not quite what I was looking for. I'm probably going to start working on some changes to add support for spam assassin, with a --enable-spamassassin option. Basicly to allow a user to change their user_prefs file so they can manage whitelisting and change their hit count. Probably it would be best to add it to a new devel version after 1.2 is released as stable. Does anyone have any suggestions? Ken Jones On Tuesday 06 January 2004 12:43 pm, Rick Widmer wrote: Kind of. --enable-modify-spam adds a Spam detection? checkbox at the bottom of the modify users page. If checked this changes the Standard delivery option from no .qmail file to one that contains the spam command. It changes the delivery line in Vacation delivery, and the Save a copy option of Forward to deliveries from a direct maildir delivery to the spam command. The default spam command is: |preline /usr/local/bin/maildrop /etc/mailfilter It can be set with --enable-spam-command Rick Ken Jones wrote: Is there currently any support for spam assassin in the latest qmailadmin releases? Ken Jones -- Thanks, David Rodgers SCO aka The Santa Claus Operation If you believe in them you'll believe anything!
Re: [qmailadmin] spam assassin support
the only thing on my wish list is what I mentioned here already ... I would like to be able to specify 2 spam commands in qmailadmin 2 checkboxes one that could be labeled filter and one that could be labeled identify. this is so that my users could have the option of having their mail sent to a quarantine box and never recieving it in their inbox and one for people that just want the spam to be tagged and delivered so that they can split it out in mailfolders for themselves with es rules on their mail client. What does this do? Change the contents of the .qmail file? Does it have to be customized for each user? Can you send examples of the desired output in each state? Are you SURE no one will ever need more than two choices? Rick
Re: [qmailadmin] spam assassin support
I have 2 spam commands available to users currently and don't let them use qmailadmin for this reason. It is modified right now by our staff. in my perfect world clicking one of the check boxen would do this stick this in their .qmail file |preline /usr/local/bin/maildrop /home/vpopmail/etc/mailfilter-id ###mailfilter-id contents SHELL=/bin/bash VMAILDIR=$PWD/Maildir/ USERNAME=`echo ${PWD##*/}` USERHOST=`PWDTMP=${PWD%/*}; echo ${PWDTMP##*/}` # run through SpamAssassin (if less than the specified size) xfilter /usr/bin/spamc -u [EMAIL PROTECTED] # if it falls through to here, just put it in their inbox to $VMAILDIR # it scans for spam with spamc/spamd and then tags the message subject with a [SPAM!] prefix and sticks it into their regular maildir so that they can sort it or filter it easily and as they see fit. and the other would do this |preline /usr/local/bin/maildrop /home/vpopmail/etc/mailfilter-qa #mailfilter-qa contents### SHELL=/bin/bash VMAILDIR=$PWD/Maildir/ USERNAME=`echo ${PWD##*/}` USERHOST=`PWDTMP=${PWD%/*}; echo ${PWDTMP##*/}` # run through SpamAssassin (if less than the specified size) xfilter /usr/bin/spamc -u [EMAIL PROTECTED] # if it falls through to here, just put it in their inbox if (/^X-Spam-Flag: *YES/) { exception { to [EMAIL PROTECTED] } } else { exception { to $VMAILDIR } } ### it scans for mail with spamc/spamd and then if the spamflag comes back from spamc as yes it forwards it to a quarantine box that they can check via webmail instead of putting it in their maildir on a machine that way mail isn't just deleted but it doesn't end up being delivered to them at all. And if someone says they missed an important message they can still go back and forward a message back to their regular mailbox. I would just like qmailadmin to be able to toggle between these I call them filter and identify On Thu, 2004-01-08 at 16:32, Rick Widmer wrote: the only thing on my wish list is what I mentioned here already ... I would like to be able to specify 2 spam commands in qmailadmin 2 checkboxes one that could be labeled filter and one that could be labeled identify. this is so that my users could have the option of having their mail sent to a quarantine box and never recieving it in their inbox and one for people that just want the spam to be tagged and delivered so that they can split it out in mailfolders for themselves with es rules on their mail client. What does this do? Change the contents of the .qmail file? Does it have to be customized for each user? Can you send examples of the desired output in each state? Are you SURE no one will ever need more than two choices? Rick -- Thanks, David Rodgers SCO aka The Santa Claus Operation If you believe in them you'll believe anything!
Re: [qmailadmin] spam assassin support
David Rodgers wrote: too perfect :-) Ok, I think we have it. Out of respect for all of the fabulous work that has been done by so many volunteers to make this application multi-lingual I apologize for hard wiring english onto the Spam Disposition radio buttons. Disclaimer: You understand that applying these patches may make your dog quit loving your leg and your favorite body parts may fall off; you further agree that I don't know what I'm doing and if it works **it is sheer luck**. If you should choose to continue... Attached is a set of patches that will create .qmail files that may do what you want. They were diff'd against qmailadmin-1.2.0-rc1 (it was handy) files but it shouldn't be too difficult to apply to other releases. Here are the parts of the configure command that apply to this: ./configure \ --enable-modify-spam \ --enable-spam-command=|preline /usr/local/bin/maildrop \ --enable-spam-command-local=/home/vpopmail/etc/mailfilter-id \ --enable-spam-command-forward=/home/vpopmail/etc/mailfilter-qa Hope you have success with this. Mike Wright I have 2 spam commands available to users currently and don't let them use qmailadmin for this reason. It is modified right now by our staff. in my perfect world clicking one of the check boxen would do this In user.c there are four flags, V_USER0..V_USER3, that have corresponding hooks in the template html/user_mod.html. Does anybody know about these? Are these available for general usage? If so, this might be part of the solution. If one of these were uncommented on the html/user_mod.html page a deliver/quarantine flag could be passed without having to change much of anything. By combining that with (a somewhat modified) --enable-spam-command-[suffix] patch (offered on the list earlier) the problem is solved. I made a sample change to mod_user.html that offers this instead: Spam Check []Spam Disposition: ( ) Deliver (*) Quarantine Is this what you are looking for? I may be able to knock out a patch set tonight. (remember:( I'm not a c progger)) Mike Wright qmailadmin-1.2.0-rc1-dr.tar.gz Description: GNU Zip compressed data
Re: [qmailadmin] spam assassin support
It appears to work like a champ ... all I have to say is wow ... I have never had it this easy getting help from developers of ANYTHING in 7 years of doing this stuff WOW The attitude you guys have really IS what makes The Community that everyone talks about when they talk about open source software. David Rodgers [EMAIL PROTECTED] wrote: David Rodgers wrote: I have 2 spam commands available to users currently and don't let them use qmailadmin for this reason. It is modified right now by our staff. in my perfect world clicking one of the check boxen would do this In user.c there are four flags, V_USER0..V_USER3, that have corresponding hooks in the template html/user_mod.html. Does anybody know about these? Are these available for general usage? If so, this might be part of the solution. If one of these were uncommented on the html/user_mod.html page a deliver/quarantine flag could be passed without having to change much of anything. By combining that with (a somewhat modified) --enable-spam-command-[suffix] patch (offered on the list earlier) the problem is solved. I made a sample change to mod_user.html that offers this instead: Spam Check []Spam Disposition: ( ) Deliver (*) Quarantine Is this what you are looking for? I may be able to knock out a patch set tonight. (remember:( I'm not a c progger)) Mike Wright
Re: [qmailadmin] spam assassin support
On Tue, 06 Jan 2004 22:29:14 -0600 David Rodgers [EMAIL PROTECTED] wrote: DR how hard would it be to add a seconf spam command check box for DR DR instance one checkbox that made it use one filter and DR a different check box to use another? And third, and fourth, and so on? I guess there will be, one day, annother pannel to configure user preferences, and better, much better, not hacked around, way to integrate vpopmail, qmailadmin and spamassassin... -- Alex.
Re: [qmailadmin] spam assassin support
David Rodgers wrote: how hard would it be to add a seconf spam command check box for instance one checkbox that made it use one filter and a different check box to use another? Hi David, I hacked mine to have two --enable-spam-commands: --enable-spam-command-local and --enable-spam-command-forward. There was a little bit of work in user.c to allow it to insert the appropriate one into .qmail based on whether the Routing checkbox was for Standard delivery or Forward delivery and to fix the list of forwards (nforward) to play both ways (i.e. with/without and \n). The vast majority of the work is in all the files used to actually configure and build qmailadmin. I think I had to change five of them to get it to accept the new configure options and to pass them correctly. I'm not a c programmer but the code is written well enough for even me to follow and modify (good job, Tom). I don't really think anybody really wants to implement this in qmailadmin but if you don't mind hacking your own version I have a set of patches that, if you are interested, I will send you off-list. You might be able to apply them to your needs. fwiw, Mike Wright
Re: [qmailadmin] spam assassin support
Kind of. --enable-modify-spam adds a Spam detection? checkbox at the bottom of the modify users page. If checked this changes the Standard delivery option from no .qmail file to one that contains the spam command. It changes the delivery line in Vacation delivery, and the Save a copy option of Forward to deliveries from a direct maildir delivery to the spam command. The default spam command is: |preline /usr/local/bin/maildrop /etc/mailfilter It can be set with --enable-spam-command Rick Ken Jones wrote: Is there currently any support for spam assassin in the latest qmailadmin releases? Ken Jones
Re: [qmailadmin] spam assassin support
Not quite what I was looking for. I'm probably going to start working on some changes to add support for spam assassin, with a --enable-spamassassin option. Basicly to allow a user to change their user_prefs file so they can manage whitelisting and change their hit count. Probably it would be best to add it to a new devel version after 1.2 is released as stable. Does anyone have any suggestions? Ken Jones On Tuesday 06 January 2004 12:43 pm, Rick Widmer wrote: Kind of. --enable-modify-spam adds a Spam detection? checkbox at the bottom of the modify users page. If checked this changes the Standard delivery option from no .qmail file to one that contains the spam command. It changes the delivery line in Vacation delivery, and the Save a copy option of Forward to deliveries from a direct maildir delivery to the spam command. The default spam command is: |preline /usr/local/bin/maildrop /etc/mailfilter It can be set with --enable-spam-command Rick Ken Jones wrote: Is there currently any support for spam assassin in the latest qmailadmin releases? Ken Jones
Re: [qmailadmin] spam assassin support
Hey Ken, I posted a patch on sourceforge awhile back regarding spam assassin preferences. It's pretty hack-ish (not so good with C), but it might give you a few ideas. I made changes to mod_user to allow for different spam actions and hit count. I stopped working on this awhile ago when I got distracted with other projects ... Patch request ID: 09 cheers, Rob At 04:39 PM 1/6/2004 -0600, you wrote: Not quite what I was looking for. I'm probably going to start working on some changes to add support for spam assassin, with a --enable-spamassassin option. Basicly to allow a user to change their user_prefs file so they can manage whitelisting and change their hit count. Probably it would be best to add it to a new devel version after 1.2 is released as stable. Does anyone have any suggestions? Ken Jones On Tuesday 06 January 2004 12:43 pm, Rick Widmer wrote: Kind of. --enable-modify-spam adds a Spam detection? checkbox at the bottom of the modify users page. If checked this changes the Standard delivery option from no .qmail file to one that contains the spam command. It changes the delivery line in Vacation delivery, and the Save a copy option of Forward to deliveries from a direct maildir delivery to the spam command. The default spam command is: |preline /usr/local/bin/maildrop /etc/mailfilter It can be set with --enable-spam-command Rick Ken Jones wrote: Is there currently any support for spam assassin in the latest qmailadmin releases? Ken Jones
Re: [qmailadmin] spam assassin support
Ken Jones wrote: Not quite what I was looking for. I'm probably going to start working on some changes to add support for spam assassin, with a --enable-spamassassin option. I run the spamd spamassassin daemon and have the .qmail file invoke the spamc client. Here's what I provide to the ./configure --enable-spam-command option: |preline -d -f /usr/bin/spamc -d 127.0.0.1 -p 783 -u [EMAIL PROTECTED] -f |/usr/local/bin/tomaildir $HOME/`echo $EXT | /usr/bin/tr [A-Z] [a-z]`/Maildir/ I used bin/tr to make sure the account name was in lower case. I'm sure there's a cleaner way to do this ;) Basicly to allow a user to change their user_prefs file so they can manage whitelisting and change their hit count. There is a php script called WebUserPrefs which does exactly that and more. It is available at http://www.pipegrep.net/webuserprefs. I add a button to qmailadmin/html/mod_user.html to call it. Hope that's helpful, Mike Wright
Re: [qmailadmin] spam assassin support
On Jan 6, 2004, at 6:03 PM, [EMAIL PROTECTED] wrote: I run the spamd spamassassin daemon and have the .qmail file invoke the spamc client. Here's what I provide to the ./configure --enable-spam-command option: |preline -d -f /usr/bin/spamc -d 127.0.0.1 -p 783 -u [EMAIL PROTECTED] -f |/usr/local/bin/tomaildir $HOME/`echo $EXT | /usr/bin/tr [A-Z] [a-z]`/Maildir/ There is a patch to add SpamAssassin support vdelivermail on SourceForge that will probably go into the next development cycle. It calls spamc with the correct email address for the -u parameter. If Ken adds a page to QmailAdmin for users to manage their SA prefs, we can end up with strong SA support in vpopmail/qmailadmin. -- 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: [qmailadmin] spam assassin support
how hard would it be to add a seconf spam command check box for instance one checkbox that made it use one filter and a different check box to use another? Rick Widmer wrote: Kind of. --enable-modify-spam adds a Spam detection? checkbox at the bottom of the modify users page. If checked this changes the Standard delivery option from no .qmail file to one that contains the spam command. It changes the delivery line in Vacation delivery, and the Save a copy option of Forward to deliveries from a direct maildir delivery to the spam command. The default spam command is: |preline /usr/local/bin/maildrop /etc/mailfilter It can be set with --enable-spam-command Rick Ken Jones wrote: Is there currently any support for spam assassin in the latest qmailadmin releases? Ken Jones
Re: [qmailadmin] spam assassin support
there is already an amazing tool for this it's called webuserprefs http://www.pipegrep.net/webuserprefs/ it can use flat local.cf files or a db for spamassassin prefs and manages its own auth via imap/pop3/squirrelmail if you use the mysql option you get the added benefit of not having to save the individual files for every user just one dump and you're all backed up. also of interest is that you can extend it's functionality pretty easily by adding panels to it. David Rodgers Ken Jones wrote: Not quite what I was looking for. I'm probably going to start working on some changes to add support for spam assassin, with a --enable-spamassassin option. Basicly to allow a user to change their user_prefs file so they can manage whitelisting and change their hit count. Probably it would be best to add it to a new devel version after 1.2 is released as stable. Does anyone have any suggestions? Ken Jones On Tuesday 06 January 2004 12:43 pm, Rick Widmer wrote: Kind of. --enable-modify-spam adds a Spam detection? checkbox at the bottom of the modify users page. If checked this changes the Standard delivery option from no .qmail file to one that contains the spam command. It changes the delivery line in Vacation delivery, and the Save a copy option of Forward to deliveries from a direct maildir delivery to the spam command. The default spam command is: |preline /usr/local/bin/maildrop /etc/mailfilter It can be set with --enable-spam-command Rick Ken Jones wrote: Is there currently any support for spam assassin in the latest qmailadmin releases? Ken Jones