Re: [Exim] filter can't write to logfile

Page principale
Supprimer ce message
Répondre à ce message
Auteur: dman
Date:  
À: exim-users
Sujet: Re: [Exim] filter can't write to logfile
On Thu, Dec 27, 2001 at 03:28:21PM +0000, Philip Hazel wrote:
| On Sun, 23 Dec 2001, dman wrote:

|
| >     2001-12-22 22:25:54 16HzGs-0001Mj-00 == dsh8290@exim_qualified_domain
| >         D=userforward defer (-11): error in filter file:
| >             logwrite command not permitted when filter not running as user

|
| For security, Exim allows logwrite only when it knows it has changed uid
| to be the local user.


Ok, that makes sense.

| > With this message, exim is run from procmail which is run through my
| > .forward file by sendmail.

|
| ... which is a hacked-up environment for which Exim was not designed.


:-). I could probably hack it up some more to disable that check in
exim :-).

| The way these tests are done is different in Exim 4, but I cannot say
| offhand whether it would work in your situation or not.


I think that it is good enough if the current uid is the user's uid
and whether or not the uid has changed at all is irrelevant. (I hope
that's what version 4 does :-), I also expect/assume that sendmail
will execute procmail as my uid. In any case making exim suid me
should make that true regardless.)


| > Another not related question, can I use exim to add a Lines: header
| > (if it is not already there) like procmail is doing now?

|
| Exim can add headers via the headers_add option for transports and
| directors and routers.


Ok, thanks, I'll look there.

| Without knowing what a Lines: header contains, I cannot say whether you
| could add what procmail does.


The size of the message, so that mutt shows something other than '0'
:-).

I don't understand how/why it works, but someone on debian-user gave
it to me and it does work :

:0 Bfh
* H ?? !^Lines:
* -1^0
* 1^1 ^.*$
|formail -A "Lines: $="


-D

--

A)bort, R)etry, B)ang it with a large hammer