-----Original Message-----
From: David S. Madole [
mailto:david@madole.net]
Sent: 15 June 2007 01:13
To: 'gshine@???'; 'exim users'
Subject: RE: [exim] Rewrites not working
> From Shine, Gary on Friday, June 15, 2007 12:53 AM
>
> From David S. Madole on 15 June 2007 00:49
>
> > From Shine, Gary on Friday, June 15, 2007 12:42 AM
> >
> > > I believe you are perhaps looking for:
> > >
> > > *@domainx.co.uk $1@??? Ffrs
> >
> > Tried that too --
> >
> > Did not work.
> >
> > Is there a way to debug the re-writes?
>
> See the "-d" (debug) option in the command-line options section of the
> documentation, specifically the rewrite argument to it. Exim has
> excellent documentation and very complete.
>
> Do you mean /usr/exim/bin/exim -bt -d gary@???
No, but here is one of several possibilities:
# exim -d-all+rewrite -f gary@??? david@???
From: <gary@???>
To: <david@???>
Which gives as debug output:
LOG: address_rewrite MAIN
"gary@???" from env-from rewritten as "gary@???" by
rule 2
rewritten sender = gary@???
rewrite_one_header: type=F:
From: <gary@???>
LOG: address_rewrite MAIN
"gary@???" from from: rewritten as "gary@???" by
rule 2
newlen=27 newtype=F newtext:
From: <gary@???>
remainder:
rewrite_one_header: type=T:
To: <david@???>
Did you put the line in the correct place in the file i.e. in the rewrite
section? The above was produced with exactly the rewrite rule I gave you.
David
I get the below which kind of looks right- The mail arrives OK, but if I
click reply the reply to address is still domainx.co.uk rather than
domainy.co.uk?
Gary
\
# bin/exim -d-all+rewrite -f gary@??? gary@???
Exim version 4.67 uid=0 gid=1 pid=10370 D=1000000
Probably ndbm
Support for: iconv()
Lookups: lsearch wildlsearch nwildlsearch iplsearch dbm dbmnz
Authenticators:
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile autoreply pipe smtp
Fixed never_users: 0
Size of off_t: 4
configuration file is /usr/exim/configure
log selectors = 00000ffc 00212001
cwd=/usr/exim 5 args: bin/exim -d-all+rewrite -f gary@???
gary@???
trusted user
admin user
LOG: address_rewrite MAIN
"gary@???" from env-from rewritten as "gary@???" by
rule 1
rewritten sender = gary@???
rewrite_one_header: type=F:
From: gary@???
LOG: address_rewrite MAIN
"gary@???" from from: rewritten as "gary@???" by rule
1
newlen=36 newtype=F newtext:
From: gary@???
remainder:
data
.
LOG: MAIN
<= gary@??? U=root P=local S=341
>>>>>>>>>>>>>>>> Exim pid=10370 terminating with rc=0 >>>>>>>>>>>>>>>>
# Exim version 4.67 uid=101 gid=1100 pid=10393 D=1000000
Probably ndbm
Support for: iconv()
Lookups: lsearch wildlsearch nwildlsearch iplsearch dbm dbmnz
Authenticators:
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile autoreply pipe smtp
Fixed never_users: 0
Size of off_t: 4
configuration file is /usr/exim/configure
log selectors = 00000ffc 00212001
cwd=/var/spool/exim 4 args: /usr/exim/bin/exim -d=0x1000000 -Mc
1HzCVL-0002hG-Jr
trusted user
admin user
R: virtual_aliases for gary@???
LOG: MAIN
=> gary@??? <gary@???> R=dnslookup T=remote_smtp
H=smtpAVxIV.netlink.info [10.25.0.62]
LOG: MAIN
Completed
>>>>>>>>>>>>>>>> Exim pid=10393 terminating with rc=0 >>>>>>>>>>>>>>>>