On 27 May 2003, Paul Warren wrote:
> I want a director to pass messages to a transport such that $local_part
> contains a string corresponding to a local username and
> $local_part_suffix corresponds to anything that was appended to the
> username.
That should happen automatically if you use the suffix feature.
> I want the transport to pass the message to a pipe that will then pass
> it back to Exim using bsmtp *with the original envelope recipient in
> tact*.
Then you must pass both parts of the original recipient to the pipe, and
have it re-create the joined name.
> It seems that this is hard to do, because using the localuser director
> with the suffix optional implicitly strips the suffix from the
> "local_part".
If you set the suffix option, it does just that - which is what you said
you wanted to happen in your first paragraph above. (i.e. I don't think
I understand your problem properly).
> > > spam_check_transport:
> > > driver = pipe
> > > bsmtp = one
> > > pipe = /some/command -u ${local_part}
You will need to pass $local_part_suffix to the pipe, as well as the
local part. And then ensure that /some/command reconstructs the correct
recipient address when it re-submits the message.
Ah. I think I see the difficulty. In the BMSTP that is passed, you will
just get the stripped local part. Your command will have to fix that up
before re-submitting.
> Is there any way round this? Would the situation be better with Exim 4?
I cannot remember Exim 3 details any more, but I don't think this has
changed significantly .... checks code ....
It would be exactly the same with Exim 4. In fact, there is a record of
a bug fix for 4.14 to ensure that the affixes get stripped when using
the smtp and lmtp transports, to bring them into line with the other
transports.
I have made a note to say what happens more clearly in the manual (it
does say it, but in a rather throwaway sentence).
It would not be a huge modification to provide an option (for Exim 4) to
restore the affixes, because this is all handled by a central function
now. I have put it on the Wish List.
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book: http://www.uit.co.uk/exim-book