On Thu, 2006-10-26 at 12:39 -0400, John Simpson wrote:
> On 2006-10-26, at 0359, Jérôme MOLLIER-PIERRET wrote:
> > John Simpson a écrit :
> >>
> >> also, what if a user (i.e. the owner of one specific mailbox)
> >> wants to create their own .mailfilter file, either directly or
> >> using some kind of web interface which gives them a set of options
> >> and writes a .mailfilter file based on their choices? i would
> >> search for "/home/vpopmail/domains/.mailfilter-userid" before the
> >> file names you're already checking for.
> >
> > This case is not implemented in the patch, and therefore because it
> > is not simple to handle ".qmail-*" style for maildrop. But it
> > should be very easy to do this in maildrop "style" in the main or
> > referal .mailfilter file.
> >
> > For the web interface, i agree ... it would be very nice. But there
> > is lot of job to do before :)))
>
> that's what i was thinking- at some point in the future, somebody
> (maybe myself, if i ever get some free time) (yeah, right) will want
> to write a web interface which gives individual mailbox owners the
> ability to either edit their own .mailfilter file, or choose from a
> list of options which will cause the web back-end to create or modify
> a per-mailbox .mailfilter file, maybe using some kind of templates to
> support each available option.
Horde has a module that allows for mailfiler file modification, but I
haven't looked into it. It uses FTP to put it in the user's mailbox.
Also, There's an FTP Server called Pure-FTPd that can auth against
MySQL, and use that home folder as the user's FTP folder (this I've used
to give my mail users an FTP option) - so something is out there to
implement. I just don't trust my users with, IMHO essentially, shell
access.
> i just don't like seeing patches which lock out future possibilities.
> flexibility is a good thing.
>
> other than that, your patch looks like a good idea.
I don't know what everyone else is doing, but my .qmail-default looks
like this:
|maildrop /home/vpopmail/domains/havokmon.com/mailfilter
| /usr/home/vpopmail/bin/vdelivermail
'' /usr/home/vpopmail/domains/havokmon.com/rick
And my mailfiler is essentially:
SHELL="/bin/sh"
VHOME=`/usr/local/vpopmail/bin/vuserinfo -d [EMAIL PROTECTED]
if (/^X-Spam-Status: Yes*/)
{
# Delete messages with a score of 10 or higher, filter all other
# spam messages into a spam folder
/^X-Spam-Status: yes, (hits|score)=![:digit:]+\.[:digit:]+!.*/
if ( $MATCH2 >= 10.0 )
{
exception {
EXITCODE = 99
to "/dev/null"
exit
}
}
else
{
# then try delivering it to a Spam folder
exception {
EXITCODE = 99
to "$VHOME/Maildir/.Spam/"
exit
}
}
}
exit
I forget exactly what option does it - it's either the EXITCODE with
exit, and or the exception{} blocks, but my .qmail-default is processeed
entirely.
It took a bit of searching to get that to work - it was a few years
ago...
Rick