On Mon, 24 Feb 2003, Ralf G. R. Bergs wrote:
> the following rewriting rule is by far the easiest one I have in my config
> file, but still it doesn't work. :-((
>
> FETCHMAIL-DAEMON@??? "FETCHMAIL-DAEMON@<my-real-hostname>" fFSQ
>
> Here's the result of "exim -brw":
>
> Server:/etc/exim# exim -brw FETCHMAIL-DAEMON@???
> 2003-02-24 22:02:22 "FETCHMAIL-DAEMON@???" rewritten as "FETCHMAIL-
> DAEMON@<my-real-hostname>" by rule 1
Which release of Exim? With Exim 4 I get
2003-02-25 09:08:22 Exim configuration error in line 138:
rewrite rule has the S flag but is not a regular expression
> Why doesn't the above rule cause rewriting in the "from:" and "env-from:"
> cases? I've already tried to specify the address to be changed as a regex like
> this, but to no avail:
>
> \N^FETCHMAIL-DAEMON@Server\.WG$\N
>
> I guess I'm simply overworked. Can anyone help?
It's a casing problem. When Exim is processing addresses, it has
lowercased the domain. So you need a lowercase domain in the rewriting
rule. Or (?i) in the regex. Try
\N^FETCHMAIL-DAEMON@server\.wg$\N
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.