Re: [Exim] Weird behavious WRT Sender: header

Etusivu
Poista viesti
Vastaa
Lähettäjä: Dave C.
Päiväys:  
Vastaanottaja: exim-users
Aihe: Re: [Exim] Weird behavious WRT Sender: header


I've attached a very short patch which skips removing the "Sender:"
header if untrusted_set_sender is set..



On Wed, 28 Nov 2001, Dave C. wrote:

>
>
> Ok, the source doesnt lie, and it answers this question.
>
> if there is a Sender: header present in the incoming messages, it is
> removed (Its still in the -Mvh output, and I just figured out the "*"
> before it means it was 'removed'), presumably becuase exim is going to
> force insert a Sender: headers with the local users login info.
> Apparently the code that removes the Sender: header wasn't updated to
> allow for untrusted_set_sender.
>
> That doesnt make me happy though. This particular webserver is running
> suidCGI type scripts, but the local user logins dont corrospond to
> any valid email addresses. I just want to force a
>
> "Sender: <MAILER-DAEMON@???>"
>
> on all messages sent through this script..
>
>
> On Wed, 28 Nov 2001, Dave C. wrote:
>
> >
> >
> > I have exim 3.33 running on a freebsd box. There is a script being
> > called, which uses BSMTP to submit a message to exim.
> >
> > I have added no_local_from_check, and the script itself inserts a valid
> > Sender: header to the message. (This is coming from a www form, and the
> > From: may or may not be valid)
> >
> > In one specific case where the From: is invalid, and this server goes to
> > send this message to another Exim machine (also 3.33, on linux), the
> > remote server rejects the message 'no valid sender in any header' (i
> > have header verifications on and want to keep it that way). BUT, it
> > looks from the logs on the receiving server that the sending server is
> > stripping out the Sender: header I have inserted.
> >
> > If I make a telnet session to port 25 on that server, and insert a
> > message with the same invalid From: header, but include the same valid
> > Sender: header, it accepts the message fine.
> >
> > exim -Mvh on the message on the sending server DOES show the Sender
> > header in place and intact, it just doesnt seem to get sent with the
> > rest of the message. I modified the script to add an X-Sender: header
> > also, and it DOES go across.
> >
> > Any ideas?
> >
> >
>
>


--

--- src/accept.c.freebsd    Wed Nov 28 11:16:10 2001
+++ src/accept.c    Wed Nov 28 16:41:32 2001
@@ -1243,7 +1243,7 @@
     }
   else if (header_checkname(h, header_names[hn_sender].name,
     header_names[hn_sender].len))
-      h->type = (sender_local && !trusted_caller)? htype_old : htype_sender;
+      h->type = (sender_local && !trusted_caller && !untrusted_set_sender )? htype_old : htype_sender;
 
   else if (header_checkname(h, header_names[hn_from].name,
     header_names[hn_from].len))