Re: sendmail vs exim -f command

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Philip Hazel
Fecha:  
A: mark david mcCreary
Cc: exim-users
Asunto: Re: sendmail vs exim -f command
On Thu, 27 Mar 1997, mark david mcCreary wrote:

> Thank you for the very explicit suggestions, very quickly.


That seems like a useful cue for me to announce to the list that I am
taking holiday for the whole of next week. After today, I won't be back
till April 7th - when no doubt there will be a zillion messages
waiting...


> Yes, when executing Exim from the command line with the -f parameter, it
> works as expected. That is, if the user is trusted by exim, the envelope
> FROM is the value in the -f parameter. If not a trusted user, then the
> user name is placed in the envelope FROM.


That does seem to suggest that the problem is not with trusted users and -f.

> Sender: domain-name-request@???


OK, the original sender address came in correctly via -f, apparently,

> Data file written for message 0wAFJC-0007dG-00
> Writing spool header file
> LOG: MAIN
> <= mdm@??? U=announce P=local S=1027


but by the time the message was written to the spool file, things had
changed.

Ah! I know what it is! Look at this bit of log...

procmail: Unlocking "dist.lock"
>From mdm@??? Thu Mar 27 13:33:38 1997

Subject: test message to the masses

That suggests to me that the message that procmail is passing over to
Exim starts off

>From mdm@??? Thu Mar 27 13:33:38 1997

Subject: test message to the masses

Note that initial "From " line. Such a line will override the sender
address. Here is a quote from the source of Exim:

    /* It turns out that smail, and presumably sendmail, accept leading
    lines of the form                      


    From ph10 Fri Jan  5 12:35 GMT 1996           


    in messages. The "mail" command on Solaris 2 sends such lines. I cannot
    find any documentation of this, but for compatibility it had better be
    accepted. Exim restricts it to the case of non-smtp messages, and  
    treats it as an alternative to the -f command line option. Thus it is
    ignored except for trusted users or filter testing. Otherwise it is taken
    as the sender address. */                                                 


Oh dear. I don't want to take this out, as I'm sure it will break
something. Can you configure smartlist not to send such lines? Or to
send them with the sender address that you require? If not, I suppose I
could provide an option that you could set to disable this
functionality. In the mean time, you can clobber it by changing line 752
of accept.c (in release 1.61) which currently reads

      if (trusted_caller || filter_test != NULL)


The comment quoted above is a few lines further up the source. Just
change that line to read

      if (FALSE)


so that it never takes any notice of the "From " line.

A Happy Easter, Passover, or whatever your holiday is, to all readers...

Philip

--
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714