Re: [exim] Using $authenticated_id in router

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Peter Velan
Datum:  
To: exim-users
Betreff: Re: [exim] Using $authenticated_id in router
am 2006-06-01 11:02 schrieb Philip Hazel:
> On Wed, 31 May 2006, Peter Velan wrote:
>
>> But, in both cases variable "$authenticated_id is not set:
>
> Tony has identified what is happening. The comment in the code says
> this:
>
> /* A locally-supplied message is considered to be coming from a local user   
> unless a trusted caller supplies a sender address with -f, or is passing in the
> message via SMTP (inetd invocation or otherwise). */                    

>
>> But to get the job done, the question remains: How could I modify
>>
>> condition = $authenticated
>>
>> to make this condition true if mail comes from an authenticated user OR
>> from a local process?
>
> The trusted user doing local submission must specified the authenticated
> address using -oMai.
>
> I am not sure why this has ended up the way it has, but does make some sense.
> Trusted callers can inject messages with senders that are not
> themselves, so if they do so (using -f or -bs), Exim doesn't
> automatically assume a value for $authenticated_id.


Thanks! You have just confirmed what I have done yesterday - it was more
an accident, than professional engineering!

First I tried -oMai but without -f it does not work at all. Next I tried
-f - not with my original problem in mind, but to give the message a
real envelope-from. Later I added -oMai - this was the accident I
mentioned above :-) ... and bingo!

May I asume that -oMai requires -f to work properly?

Yesterday, I was too tired to run a local injection outside of my perl
script.

Thats how my perl script injects the message now:

open MAIL, "| /usr/sbin/exim4 -bm -oMai ai -t -oi -f '<x\@dom>'";
$mail->print( \*MAIL );
close MAIL;

Runs prefectly!

Thanks to all and warm greetings from (cold) Franconia,
Peter