Re: [Exim] can I use exim filters if I'm not the admin?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: dman
CC: exim-users
Sujet: Re: [Exim] can I use exim filters if I'm not the admin?
On Thu, 6 Dec 2001, dman wrote:

> $ ypcat passwd | grep dsh8290
> dsh8290:##dsh8290:3283:150:Derrick S Hudson;951;wsen1;:/home/stu12/s18/dsh8290:/bin/csh
>
> $ egrep "^EXIM_[UG]ID" Local/Makefile
> EXIM_UID=3283
> EXIM_GID=150


Those values agree with the passwd file, BUT:

> 2001-12-06 22:24:06 16CBcE-0001BX-00 Unable to get root to set
>         uid 3283 and gid 6 for local delivery to dsh8290: uid=3283 euid=3283


Exim wants to set gid=6. That's the problem. Why is it trying to do
that? What have you got in your Exim configuration for the appendfile
transport? You need to have it want to use gid=150, I suspect.

> I found the place where directory_transport belongs. Now it delivers,
> but "~" is not expanded. I see now in the examples, I can use
> "$home". Why not "$HOME", which is more familiar to *nix users?


Because all Exim variables are in lower case. $HOME is a shell thing.

> Can
> I create my own variables? I am getting "unknown filtering command"
> messages with the syntaxes I tried.


No. RTFM (doc/filter.txt) for everything you can do in a filter.

> I'm glad the feature has already been included, but I think it is a
> bug that the default delivery fails when there is no reason to. Maybe
> it would be better if the filter part was factored out into a separate
> binary. The main exim binary can do the main MTA functions, and
> invoke the filter binary in much the same way procmail is (commonly)
> used today.


If you want to do that, use procmail. No need to re-invent the wheel.
Note that the facilities available are different when Exim is used as a
full MTA for a host (which is what it's designed for). In the
environment for which it was designed, an Exim filter can do "true
forwarding" (leaving the sender address unchanged), whereas something
running as a user process (such as procmail) can only resubmit the
message - thereby changing the sender. That is just one of the
differences.

> This would also allow people who only want filtering to
> ignore the rest of the MTA's capability.


Using an MTA just to do personal filtering is using a sledgehammer to
crack a nut.

> (then again, one could argue
> that delivery is not part of the MTA's responsibility at all, and all
> of the local delivery and filtering should be handled by separate MDA
> program)


People do argue that way. Exim has no problem with that approach. Build
it with only a pipe or lmtp transport and use them.

>     1)  Can I create and use variables of my own choosing in a filter
>         file?


No.

>     2)  Can I include another filter file?


No (though that is on the Wish List).

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.