Mailing List Archive

keeping dups
Hi,

Currently having fun converting our config to v4, but stuck on one issue.

We have a local facility that requires exim to recognise mail to certain
patterns of local_part@gla.ac.uk, and deliver such messages to a single
remote address, whilst adding a header to record the original local_part
for each copy. Where a message is addressed to multiple instances of the
pattern, multiple deliveries to the remote address will occur, so its
important that duplicates are _not_ dropped.

In v3 this is accomplished with a smartuser specifying both a new_address
and a transport:

dups:
driver = smartuser
condition = <blah>
headers_add = "X-Stuff: ${local_part}"
new_address = name@somewhere.gla.ac.uk
transport = remote_smtp

Now, convert4r4 turns this into 2 new routers:

dups:
driver = redirect
condition = <blah>
headers_add = "X-Stuff: ${local_part}"
data = name@somewhere.gla.ac.uk
redirect_router = dups_part2
retry_use_local_part

dups_part2:
driver = accept
condition = ${if eq{$local_part@$domain}{name@somewh.gla.ac.uk}{yes}{no}}
transport = remote_smtp

The first router creates duplicates BUT they are promptly dropped, as this
is the way redirection works.

The v4 FAQ A0424 suggests routing the addresses directly to a transport
- but as I understand it, I can't change the address at the same time.
( which I want to do )

Am I missing something here ? Can this sort of thing be achieved in v4 ?

Thanks for any info!

Chris

--
Chris Edwards University of Glasgow Computing Service,
C.Edwards@compserv.gla.ac.uk Glasgow, Scotland. Phone: +44 141 330 4892.
Re: keeping dups [ In reply to ]
On Tue, 9 Jul 2002, Chris Edwards wrote:

> The v4 FAQ A0424 suggests routing the addresses directly to a transport
> - but as I understand it, I can't change the address at the same time.
> ( which I want to do )

That's true. I suppose I should think about this issue.

> Am I missing something here ? Can this sort of thing be achieved in v4 ?

The only way I can think of is to do a double-cycle through Exim. Route
each address to a pipe transport (adding the header). Make the pipe
transport obey the command

exim -f $sender_address new@ddress

That way, you'll get n different messages passed back into Exim. Then
route new@ddress to wherever you want.

Wheeler's Law Strikes Again ("an extra level of indirection solves many
problems").

--
Philip Hazel University of Cambridge Computing Service,
ph10@cus.cam.ac.uk Cambridge, England. Phone: +44 1223 334714.
Re: keeping dups [ In reply to ]
Philip Hazel wrote:

| The only way I can think of is to do a double-cycle through Exim. Route
| each address to a pipe transport (adding the header). Make the pipe
| transport obey the command
|
| exim -f $sender_address new@ddress

Aha - that'll be fine - thanks!

Chris

--
Chris Edwards University of Glasgow Computing Service,
C.Edwards@compserv.gla.ac.uk Glasgow, Scotland. Phone: +44 141 330 4892.