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

Top Page
Delete this message
Reply to this message
Author: Dean Brooks
Date:  
To: exim-users
Subject: Re: [Exim] rewrite rules, uucp bang conversion, and orbs
> On Sat, 22 Jan 2000, Randy Bush wrote:
>
> > so, where is the bit about how to restrict which rewrite rules are applied
> > to what mail?
>
> There currently isn't. The rewrite rules are applied to every message,
> on arrival. I intended them as a means of tidying up local addresses
> (e.g. turning ph@??? into P.Hazel@???, not as
> a means of routing, and I wasn't planning on supporting bang paths at
> all.


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.

I had the problem of inadvertantly leaving relaying open through
a rewrite rule that supported bang paths. However, I realized
that only our UUCP "user" would be injecting such messages (via
the uuxqt command) into our mail system. So, for example, a rewrite rule of:

^(.+)!(.+)@ourdomain.com$ "${if eq {$originator_uid}{5} {${2}@${1}} fail}"

...would rewrite the domain, but ONLY if the originator_uid was the UUCP
user.

If not, the replacement string would fail, and according to the documentation,
this causes the rewrite rule to be *skipped*, but the messages doesn't fail.

Seems to work quite nicely. I imagine that other conditions could be
set to give finer control, as long as the desired variable is available
for condition testing.

Regards, Dean

--
Dean A. Brooks                         Email: dean@???
IgLou Internet Services, Inc.          Voice: (502) 966-3848
Louisville, KY / USA                          (800) 436-4456