[exim] Lost trying to apply rewrite rules

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Michael Hitchins
日付:  
To: exim-users
題目: [exim] Lost trying to apply rewrite rules
Unfortunately I assume this is a pretty common question to be asked around
here, if the problems I've encountered are anything to go by.

I'm trying to do a relatively simple rewrite. I've had it running in Exim
v3, but can't for the life of me get it working in v4.

I've tried checking this list for help, and I've spent hours looking at the
specification. This list's email protection mechanism make it pretty much
impossible to see what's happening with address rewrites due to all the x's,
and hasn't been helpful. The specification shows me what to do but not how
to make it work, driving me insane.

All I would like to do is scrub a subdomain out of the email address. This
is for an exchange server in the intranet. It uses @joblink.mjl.org.au and
I'd like all email going through the Exim gateway to be @mjl.org.au

FYI, I'm using Exim 4.43 in Gentoo.

From what I understand, the rule below should work

*@*.mjl.org.au $1@??? Ffrs

The million dollar question is, where do I put it in the config file to make
it work?
I've edited the sample config that came with exim, and at no point does it
have any notes on rewriting. I can't find it in Chapter 31, or 24, or in the
FAQ.

I've used it like this;

remote_smtp:
driver = smtp
return_path = *@*.mjl.org.au $1@??? F
headers_rewrite = *@*.mjl.org.au $0@??? frs

I found that Ffrs wouldn't work, so I used return_path. If I do an exim -brw
I don't get anything though, ie;

exim -brw melts@???
No rewrite rules are defined

If I comment out return_path and put the F at the end of header_rewrite, I
get;

exim -brw melts@???
2005-02-28 05:01:03 Exim configuration error in line 505 of
/etc/exim/exim.conf:
rewrite rule specifies a non-header rewrite - not allowed at transport
time -

I've only emailed this group as my last resort, I've honestly spent 2 hours
on this trying to find better documentation on why this won't work. I feel
uncertain about where to insert the rule in the config file (unlike the v3
config file that had it well labelled), and I feel even less certain that
single rule will exactly what I want. Any info, even if its just a link to a
tutorial I've missed would be greatly appreciated.

Thanks in advance,


Michael Hitchins