On Fri, 21 Jan 2005 19:57:19 -0500, Sam Varshavchik wrote:
If neither wish has a reasonable solution: Does someone know of solutions
which somehow allow virtual users to create simple filter-rules, such as
"If from X, then put in Y"? (Such as is possible with Sieve scripts.)
sqwebmail has a maildrop-generating interface.
This works; thanks.
I did find the sqwebmail documentation rather unforgiving with regard to
filters in a virtual user setup. I've got it (sort of) working, but I'm
not sure it's the best way. Does the following sound right to you:
/etc/maildroprc:
=============================================
logfile "/var/log/maildrop/maildrop-log"
log "========"
exception {
include "$DEFAULT/.maildirfilter"
}
if (/^X-Spam-Flag:.*YES/)
{
log "(Spam)"
exception {
to "$DEFAULT.Spam/"
}
}
=============================================
(So: If the user has no maildirfilters which include a terminating clause
- like "to" - then the mail will optionally go to the Spam folder, or to
the general INBOX.)
And in /usr/lib/sqwebmail/etc/maildirfilterconfig :
=============================================
MAILDIRFILTER=.maildirfilter
MAILDIR=$DEFAULT
=============================================
This setup leaves one problem: When I use sqwebmail to remove all filters,
a filter actually remains:
/var/spool/maildirs/domain.foo/troels :
=============================================
#MFMAILDROP=2
#
# DO NOT EDIT THIS FILE. This is an automatically generated filter.
FROM='tro...@domain.foo'
import SENDER
if ($SENDER eq "")
{
SENDER=$FROM
}
to "$DEFAULT/."
=============================================
This "secret", remaining filter means that my global filter in
/etc/maildroprc doesn't reach the "general" Spam filter. Could sqwebmail
somehow be changed to remove the filter file if there are no filters left
in the web interface?