Re: [Exim] BSMTP To: header rewritten, normal incoming mail …

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: D. North
CC: exim-users
Assumpte: Re: [Exim] BSMTP To: header rewritten, normal incoming mail does not
On Wed, 22 Jan 2003, D. North wrote:

> [and first: a Big Thanks to Philip for a _great_ piece of work!]


Thank you.

> I am trying to track down a behavior difference in exim's handling
> of a To: address in the rfc822 headers when the message is received
> via standard SMTP and when the message is received via batched SMTP.


BSMTP messages are treated as locally-supplied, non-SMTP messages (the
BSMTP syntax is just a convenient way of providing the envelope).

> Exim 3.36....


I think this won't have changed for Exim 4, which is where I'm checking
up on the details.

> An example follows:
> #!...as a trusted user...
> # /sbin/exim -oMr processed -bS
> MAIL FROM: <joe@???>
> RCPT TO: <someuser@???>
> DATA
> From: <joe@???>
> To: JOE
> Subject: atest
>
> testing
> .
> QUIT
>
> This results in a message arriving at destination with a
> header:
> To: JOE@???
>
> Where 'exim.test.com' is the name of the mail transport machine.


That is correct. Unqualified addresses are accepted in envelopes for
non-SMTP messages, and they get qualified, both in the envelope and in
the header lines, with the qualify_domain value, which defaults to the
host name.

> *However* if I telnet to port 25 on the machine running exim
> and go thru the same SMTP dialog, the message is delivered at
> destination with a header:
> To: JOE


That is also correct. Unqualified addresses are not accepted in
envelopes from remote hosts, and if there are any in the header lines,
they are left alone. (Yes, that's an invalid message, but there doesn't
seem much else one can do.)

> Now the $10 question is where did I goof to make exim behave
> differently in these two cases? Any pointers appreciated.


You didn't goof. That's just the way Exim works.

> Ideally, I'd like to get control of when and if this rewrite happens,
> BOTH for causing it to happen from the normal SMTP port, but
> also to disable it on BSMTP.


For the normal SMTP port, investigate sender_unqualified_hosts and
recipient_unqualified_hosts (or was it receiver_unqualified_hosts in
Exim 3?)

For BSMTP, why do you want to disable it? An unqualified address is not
valid. You really should qualify it with *something*. Investigate the
setting of qualify_domain and qualify_recipient.

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