Re: [exim] rewriting delivery addresses via shell script

Startseite
Nachricht löschen
Nachricht beantworten
Autor: chris burgess
Datum:  
To: exim-users
Betreff: Re: [exim] rewriting delivery addresses via shell script
I think what I'm trying to achieve is a lot simpler than I was expecting :)
However, my rewrite config doesn't quite do it yet, and I can't see why it
doesn't match, based on the examples in the rewrite docs.

I am testing the following rewrite rule:

*@*FAKELOCAL* $1@$2 Tcb

(added in /etc/exim4/conf.d/rewrite/35_exim4-fakedomain_rewriting - debian
exim4-heavy + split configs)

chris@vmroa:/etc/exim4$ sudo exim4 -brw test@???.999
  sender: test@???.999
    from: test@???.999
      to: test@???.999
      cc: test@???.999
     bcc: test@???.999
reply-to: test@???.999
env-from: test@???.999
  env-to: test@???.999


chris@vmroa:/etc/exim4$ sudo exim4 -d -brw test@???.999
Exim version 4.63 uid=0 gid=0 pid=9230 D=fbb95cfd
Berkeley DB: Sleepycat Software: Berkeley DB 4.3.29: (September  6, 2005)
Support for: crypteq iconv() IPv6 PAM Perl GnuTLS move_frozen_messages
Content_Scanning Old_Demime
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb
dsearch ldap ldapdn ldapm mysql nis nis0 passwd pgsql sqlite
Authenticators: cram_md5 cyrus_sasl plaintext spa
Routers: accept dnslookup ipliteral iplookup manualroute queryprogram
redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 8
changed uid/gid: forcing real = effective
  uid=0 gid=0 pid=9230
  auxiliary group list: <none>
seeking password data for user "uucp": cache not available
getpwnam() succeeded uid=10 gid=10
configuration file is /var/lib/exim4/config.autogenerated
log selectors = 00000ffc 00189001
cwd=/etc/exim4 4 args: exim4 -d -brw test@???.999
trusted user
admin user
changed uid/gid: privilege not needed
  uid=104 gid=105 pid=9230
  auxiliary group list: 105
seeking password data for user "mail": cache not available
getpwnam() succeeded uid=8 gid=8
user name "root" extracted from gecos field "root"
originator: uid=0 gid=0 login=root name=root
address match: subject=test@???.999 pattern=*@+local_domains
abc.com.fakelocal.999 in "@:localhost:my.local.domain"? no (end of list)
abc.com.fakelocal.999 in "+local_domains"? no (end of list)
test@???.999 in "*@+local_domains"? no (end of list)
address match: subject=test@???.999 pattern=*@my.local.domain
abc.com.fakelocal.999 in "my.local.domain"? no (end of list)
test@???.999 in "*@my.local.domain"? no (end of list)
  sender: test@???.999
address match: subject=test@???.999 pattern=*@+local_domains
abc.com.fakelocal.999 in "@:localhost:my.local.domain"? no (end of list)
abc.com.fakelocal.999 in "+local_domains"? no (end of list)
test@???.999 in "*@+local_domains"? no (end of list)
address match: subject=test@???.999 pattern=*@my.local.domain
abc.com.fakelocal.999 in "my.local.domain"? no (end of list)
test@???.999 in "*@my.local.domain"? no (end of list)
    from: test@???.999
      to: test@???.999
address match: subject=test@???.999 pattern=*@*FAKELOCAL*
abc.com.fakelocal.999 in "*FAKELOCAL*"? no (end of list)
test@???.999 in "*@*FAKELOCAL*"? no (end of list)
      cc: test@???.999
address match: subject=test@???.999 pattern=*@*FAKELOCAL*
abc.com.fakelocal.999 in "*FAKELOCAL*"? no (end of list)
test@???.999 in "*@*FAKELOCAL*"? no (end of list)
     bcc: test@???.999
address match: subject=test@???.999 pattern=*@+local_domains
abc.com.fakelocal.999 in "@:localhost:my.local.domain"? no (end of list)
abc.com.fakelocal.999 in "+local_domains"? no (end of list)
test@???.999 in "*@+local_domains"? no (end of list)
address match: subject=test@???.999 pattern=*@my.local.domain
abc.com.fakelocal.999 in "my.local.domain"? no (end of list)
test@???.999 in "*@my.local.domain"? no (end of list)
reply-to: test@???.999
address match: subject=test@???.999 pattern=*@+local_domains
abc.com.fakelocal.999 in "@:localhost:my.local.domain"? no (end of list)
abc.com.fakelocal.999 in "+local_domains"? no (end of list)
test@???.999 in "*@+local_domains"? no (end of list)
address match: subject=test@???.999 pattern=*@my.local.domain
abc.com.fakelocal.999 in "bushi.net.nz"? no (end of list)
test@???.999 in "*@my.local.domain"? no (end of list)
env-from: test@???.999
address match: subject=test@???.999 pattern=*@*FAKELOCAL*
abc.com.fakelocal.999 in "*FAKELOCAL*"? no (end of list)
test@???.999 in "*@*FAKELOCAL*"? no (end of list)
  env-to: test@???.999
search_tidyup called

>>>>>>>>>>>>>>>> Exim pid=9230 terminating with rc=0 >>>>>>>>>>>>>>>>