Re: [Exim] rewrite rules, uucp bang conversion, and orbs

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Philip Hazel
Data:  
Para: Randy Bush, Dean Brooks
CC: exim-users
Asunto: Re: [Exim] rewrite rules, uucp bang conversion, and orbs
On Mon, 24 Jan 2000, Randy Bush wrote:

> well, as some of us still have friends in difficult situations, though i
> wish it was not, i fear uucp support is still with us for a bit.


I sympathise, but when I wrote Exim I made a conscious decision to write
an Internet MTA and not to tangle with bang paths.

> so, is there a router/director solution?


It rather depends on the number of bang paths you want to support. If
there is only one, then all you have to do is to handle a "local"
address accordingly, with a director like this:

one_bang_path:
driver = smartuser
local_parts = a!b
new_address = b@a

but of course that "rewrites" only the envelope "To" address, not any
header lines, and not the envelope sender. However, a director like this
would ensure that no other bang paths were accepted if you have verify_
{sender,recipient} turned on, because they won't be recognized.

For a fixed number of paths you could turn local_parts into a lookup,
and either use

new_address = ${if match{$local_part}{^([^!]+!(.*)}{$2@$1}}

or look up the new address.

The most comprehensive option would be to write a director that checked
for a bang path anywhere in the headers, and if found, piped the message
off to some script that did all the rewriting, and then re-injected the
message. It would have to run as a trusted user in order to be able to
send the envelope sender on re-injection.

On Mon, 24 Jan 2000, Dean Brooks wrote:

> Well, you do have *some* control over what messages are affected
> by rewrite rules. The replacement string is expanded, so I frequently
> have used "${if" statements in them for UUCP conversions in combination
> with the "fail" directive.


Good point.

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