4 messages in net.sourceforge.lists.courier-maildrop[maildropl] Re: Virtual users and saf...
FromSent OnAttachments
Troels ArvinJan 21, 2005 4:32 am 
Rolan YangJan 21, 2005 9:31 am 
Sam VarshavchikJan 21, 2005 4:57 pm 
Troels ArvinJan 22, 2005 1:52 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[maildropl] Re: Virtual users and safety; checking syntaxActions...
From:Troels Arvin (tro@arvin.dk)
Date:Jan 22, 2005 1:52:55 pm
List:net.sourceforge.lists.courier-maildrop

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?