Thank you for your answer

> .mailfilters is used by maildrop's embedded mode.  Those files should
> not be mixed with delivery mode instructions (the .mailfilter file),
AFAIK.

Okay, I use delivery mode, so it will not work.

>
> As far as I can tell, "include" doesn't support globs, either.

I have tested it with HOME and SIZE and both are available in the
included files (do you mean global variables?).

My solution is now:

.mailfilter

cc "|scripts/buildfilterlist"
include "mailfilters/list"

A directory "mailfilters" in the user's home which contain a lot of
preordered rulesets.

scripts/buildfilterlist

#!/bin/bash
ls -1 mailfilters/* | grep "^.*/[0-9]\{2,\}_.*" | sed -e 's/^/include
"/' | sed -e 's/$/"/' > mailfilters/list
chmod 600 mailfilters/list

The .mailfilter calls a Bash script, which builds a current list of
ruleset files, which the .mailfilter includes again.

So I can add/remove rulesets without changing some others on the system.
The solution is not for mailservers with a lot of incoming mails, but
our internal project mailserver gets less than 100 mails per day
automatically generated from a service.

There is space to optimize it, the grep command can be removed if you
store the list on another location and maybe the two sed commands can be
combined.

Best regards
Andre


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to