Re: [vchkpw] more weirdness with vdelivermail and maildrop

2003-03-14 Thread Robin Bowes
Dave,

On Fri, March 14, 2003 2:24 am, Dave Weiner said:
 I've been playing with a squirrelmail plugin to let the user turn
 this all on or off.

I'd be *really* interested in seeing a squirrelmail plugin to do this. I
use squirrelmail filters at the moment and it's pretty sloow! I'm
looking into using maildrop instead but I am aware that that would mean
editing .mailfilter files - OK for me but my computer illiterate other
half and 11 year-old daughter might struggle!

Actually, thinking about it, not everybody using vpopmail uses
squirrelmail so this would be better as a separate tool, or possibly
integrated with qmailadmin.

Would it be possible to hack some code from courier into qmailadmin to
manage the maildrop filters?

R.
-- 
Robin Bowes | http://robinbowes.com



Re: [vchkpw] more weirdness with vdelivermail and maildrop

2003-03-14 Thread Jesse Guardiani
On Friday 14 March 2003 06:34, Robin Bowes wrote:
 Dave,

 On Fri, March 14, 2003 2:24 am, Dave Weiner said:
  I've been playing with a squirrelmail plugin to let the user turn
  this all on or off.

 I'd be *really* interested in seeing a squirrelmail plugin to do this. I
 use squirrelmail filters at the moment and it's pretty sloow! I'm
 looking into using maildrop instead but I am aware that that would mean
 editing .mailfilter files - OK for me but my computer illiterate other
 half and 11 year-old daughter might struggle!

 Actually, thinking about it, not everybody using vpopmail uses
 squirrelmail so this would be better as a separate tool, or possibly
 integrated with qmailadmin.

Not sure if you know this, but sqwebmail already has the ability to create
filters.


 Would it be possible to hack some code from courier into qmailadmin to
 manage the maildrop filters?

Sure, but I don't think that's a good place for the code. I think a PHP
script would be much more appropriate for general filter creation. I'm
surprised no-one has created one yet.

But, the problem is that you've got to have a way to make sure that the
filters are letting mail through. Either that, or you've got to create
your filters in a way that is foolproof (like, making sure the folder
actually exists before allowing the user to make a filter that drops
mail there. Or, making sure a defunct filter rule is deleted when the
user deletes a folder in their webmail client.)

With that in mind, it makes a lot of sense to put this functionality in
the webmail client. (But note that sqwebmail does NOT currently delete
a filter if it's corresponding folder is deleted.)



 R.

-- 
Jesse Guardiani, Systems Administrator
WingNET Internet Services,
P.O. Box 2605 // Cleveland, TN 37320-2605
423-559-LINK (v)  423-559-5145 (f)
http://www.wingnet.net

We are actively looking for companies that do a lot of long
distance faxing and want to cut their long distance bill by
up to 50%.  Contact [EMAIL PROTECTED] for more info.





Re: [vchkpw] more weirdness with vdelivermail and maildrop

2003-03-14 Thread Jesse Guardiani
On Friday 14 March 2003 10:28, Dave Weiner wrote:
 Jesse Guardiani wrote:
  Actually, thinking about it, not everybody using vpopmail uses
  squirrelmail so this would be better as a separate tool, or possibly
  integrated with qmailadmin.
 
  Not sure if you know this, but sqwebmail already has the ability to
  create filters.

 Yes I am, and it's client side filtering, and it's slow.  I much prefere
 server side filtering :)

Huh? sqwebmail uses maildrop. maildrop is server side. What are you talking about?



  Would it be possible to hack some code from courier into qmailadmin
  to manage the maildrop filters?
 
  Sure, but I don't think that's a good place for the code. I think a

 Personally, I don't think the sqwebmail code for doing maildrop filters is
 all that good.

I agree. It stinks. However, it can be improved.

My point was that the code for setting up maildrop filters is in the right
place. It's in sqwebmail, and as such it can be integrated with the setup and
removal of folders in sqwebmail.

But, of coarse, you might run into someone deleting a folder with IMAP.

Maybe a better solution would be to create a simple maildrop rule creation
script that makes use of the exception {} clause. Then, when a filtering
rule becomes defunct, we could display it grayed out or something to visually
show that it's defunct. Or maybe run a cron script that tests and deletes
defunct rules every few days or so.


  I think Mr. Sam designed the maildrop rule portion of
 sqwebmail for people like him (and us) -- sysadmins.  The average user is
 just *lost* when the see some of those options.

  PHP script would be much more appropriate for general filter
  creation. I'm surprised no-one has created one yet.
 
  But, the problem is that you've got to have a way to make sure that
  the filters are letting mail through. Either that, or you've got to
  create your filters in a way that is foolproof (like, making sure the
  folder actually exists before allowing the user to make a filter that
  drops
  mail there. Or, making sure a defunct filter rule is deleted when the
  user deletes a folder in their webmail client.)
 
  With that in mind, it makes a lot of sense to put this functionality
  in the webmail client. (But note that sqwebmail does NOT currently
  delete
  a filter if it's corresponding folder is deleted.)

 Correct -- this way, we can get a list of the folders.  I'm not certain if
 we can tie into the folder deletion routines of squirrelmail,

Don't see why not. You can always write a new API function if it doesn't let
you do it with the current API. The squirrelmail folks aren't likely to spit
in the face of a decent feature.


 but we sure
 as hell can put the delivery instructions inside exception { } so if the
 folder does go away, the mail will fall through and get picked up the the
 default delivery line :)

 Dave

-- 
Jesse Guardiani, Systems Administrator
WingNET Internet Services,
P.O. Box 2605 // Cleveland, TN 37320-2605
423-559-LINK (v)  423-559-5145 (f)
http://www.wingnet.net

We are actively looking for companies that do a lot of long
distance faxing and want to cut their long distance bill by
up to 50%.  Contact [EMAIL PROTECTED] for more info.





Re: [vchkpw] more weirdness with vdelivermail and maildrop

2003-03-14 Thread Dave Weiner
Jesse Guardiani wrote:

 Huh? sqwebmail uses maildrop. maildrop is server side. What are you
 talking about? 

Just reading too fast, and parsed your sqwebmail as squirrelmail :)

Dave




Re: [vchkpw] more weirdness with vdelivermail and maildrop

2003-03-13 Thread Dave Weiner
Iain wrote:

 Well if I turn on logging in maildrop i see the following when i send
 to an alias. This is the same as what I see when I send to a non
 alias.

 Date: Thu Mar 13 16:21:38 2003
 From: Iain [EMAIL PROTECTED]
 Subj: test 3
 File: | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox
 (873)

Iain, can you run the follow query from inside mysql and email me the
results?


select * from valias where alias=iain and domain=voffice.myspinach.org;


Dave




Re: [vchkpw] more weirdness with vdelivermail and maildrop

2003-03-13 Thread Dave Weiner
Iain wrote:
 I'm pretty sure the alias line is fine:

 mysql select * from valias where alias = 'alias1' and domain =
 'test.rucc.net.au';
 ++--+---+
 alias  | domain   | valias_line   |
 ++--+---+
 alias1 | test.rucc.net.au | [EMAIL PROTECTED] |
 ++--+---+
 1 row in set (0.00 sec)

 mysql

 The aliases work fine without the maildrop filter. So i think it is
 something to do with the way maildrop is interacting with
 vdelivermail.

Very, very strange


 Do you have valias enabled on your system? Maybe you could try it and

Yes, as well as maildrop.  However, I call it from user's .qmail files, not
the .qmail-default

 see if you see the same behaviour. At least one other person on this
 list has indicated that they do.

 cheers, iain.


Dave




Re: [vchkpw] more weirdness with vdelivermail and maildrop

2003-03-13 Thread Iain
On Fri, 14 Mar 2003 10:09, Dave Weiner wrote:
  Do you have valias enabled on your system? Maybe you could try it and

 Yes, as well as maildrop.  However, I call it from user's .qmail files, not
 the .qmail-default

really. What version of vpopmail and maildrop are you using? Would you mind 
posting your maildrop filter?

thanks, Iain.




Re: [vchkpw] more weirdness with vdelivermail and maildrop

2003-03-13 Thread Dave Weiner
On Thursday 13 March 2003 20:54, Iain wrote:
 On Fri, 14 Mar 2003 10:09, Dave Weiner wrote:
   Do you have valias enabled on your system? Maybe you could try it and
 
  Yes, as well as maildrop.  However, I call it from user's .qmail files,
  not the .qmail-default

 really. What version of vpopmail and maildrop are you using? Would you mind
 posting your maildrop filter?

vpopmail 5.3.16, maildrop 1.3.8

The user's .qmail file just gets |maildrop put in it.  In ~vpopmail is this 
.mailfilter

#
# We need to know the actual dir for the vpopmail user
#
import EXT
import HOST
VHOME=`/var/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]

#
# Do we send the mail through spamc?
#

exception {
 include $VHOME/.spamc
}

#
# If there's a spamfolder file in the users directory
# it will have the rule to deliver to the SPAM folder
#
exception {
 include $VHOME/.spamfolder
}
#
# Include any other rules that the user might have from
# sqwebmail or other compatible program
#
exception {
include $VHOME/Maildir/.mailfilter
}
#
# Default delivery if all else fails
#
exception {
to $VHOME/Maildir/
}

if .spamc is present in the users directory, it will contain:

if ( $SIZE  262144 )
#
# Only filter if less than 256K
#
{
exception {
xfilter '/usr/bin/spamc -f -u [EMAIL PROTECTED]'
}
}

and if .spamfolder is present, it will contain:

if ( /^X-Spam-Flag: *YES/)
{
   exception {
 to $VHOME/Maildir/.SPAM/
   }
}

Maildir/.mailfilter is there for 2 things -- a place to put custom filtering 
rules (my partner and I are working on a SquirrelMail plugin to do this), and 
to give some support for people transitioning from or using sqwebmail

This setup gives us some nice flexibility -- to turn on spamassassin, I just 
have to drop the .spamc file in the user directory.  To deliver to a SPAM 
folder, just drop the .spamfolder into the user directory.  I've been playing 
with a squirrelmail plugin to let the user turn this all on or off.


 thanks, Iain.

You're welcome!

Dave