Re: [exim] Per-User Filter

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Rob Gunther
Dátum:  
Címzett: Exim Mailing List
Tárgy: Re: [exim] Per-User Filter
Thanks for the tip, with the user = command I was able to get EXIM to call
an external filter, but turns out I can't manipulate headers in there
either:

error in filter file: header addition and removal is available only in
system filters: near line 4 of filter file

I can successfully add/remove headers from the router OK, but I can't
manage the subject manipulation in there. I have seen several examples
where people create like new_subject then remove subject, then copy
new_subject into subject and delete new_subject header. They always do it
in a filter though, when I try it it is like I can't access new new_subject
header so I end up with a blank subject.

Robert G.


On Mon, Dec 30, 2013 at 10:06 PM, Dean Brooks <dean@???> wrote:

> On Mon, Dec 30, 2013 at 08:48:49PM +0800, Rob Gunther wrote:
> > I just learned about Exim's filtering language.
> >
> > I would like to implement a 'per-user' filter, on that runs from a
> redirect
> > router if some conditions are met.
> >
> > Problem is none of the users are actual local, there is no mailbox on the
> > server. The server is just a forwarder to other servers.
> >
> > When I try and allow_filter and include file = /some.filter it will fail
> > because it can't locate the local user.
>
> Just add the following to your existing redirect router and you should
> be good:
>
> user = <user that owns the filter file>
> group = <group that owns the filter file, optional>
> require_files = <filter filename>
> errors_to = ""
>
> The require_files is optional, but will quietly skip the router if
> the user's filter file doesn't exist. You would basically set this
> the same as the "file=" value if you want to use it.
>
> I also set errors_to="" so that if there are any syntax errors in
> the filter that they don't get sent back to the sender. You could
> also set that to hostmaster@yourdomain if you wanted the noise.
>
> Oh, and of course make sure your filtering redirect router occurs
> before your forwarding router in the config file.
>
> --
> Dean Brooks
> dean@???
>
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/
>