Re: [Exim] Address Re-writing

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Phil White
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [Exim] Address Re-writing
<color><param>0100,0100,0100</param>Hello Philip. Thank you for the reply.


I have attatched the relevant debug info, but here is a more useful english
explanation.


You have an account with us. I allow you to send out and receive mail
through my box; but the service being used is actually a transparent
rewriting of YOUR address - You appear as one of my local users, as do
all the users you are mailing to through my machine. The benefits are that
firstly, you do not have to tamper with any of the settings in your mail
client, and secondly you are granted a pseudo-anonymous email account.


Hence, in my abortive attempt, I firstly (assuming that the headers are
rewritten in the order which they are specified, which I now don't think they
are) tried to rewrite the senders address from a remote address to a
local_part (through lsearch /tmp/aliases) Ffrs

and finally completed the process by rewriting the envelope_To: (which
works as expected).


Mississippi pie? ;-)


Am currently trying to see if a director with headers_remove, <FontFamily><param>Times New Roman</param><bigger>or a
transport using headers_rewrite will do what I want.<FontFamily><param>Arial</param><smaller>


Regards,


    Phil  



On 25 Jun 2001, at 20:57, Philip Hazel wrote:


<color><param>7F00,0000,0000</param>> On Mon, 25 Jun 2001, Phil White wrote:

>


> > *@freeport.itmagic.ltd.uk

${lookup{$sender_address}lsearch*{/tmp/aliases}\

> >         {$value}fail}@??? Ffrs  


> >


> > where the /tmp/users file is


> >    chemist@???:    localusername  


> >    *:                    postmaster  


> >


> > This doesn't work, on 2 counts.


> >


> > 1) The $sender_address is not being found in the user file, and defaults

to

> > postmaster each time.


> >


> > 2) exim -brw root@??? correctly reports the rewritten




> > headers (from, sender & reply). BUT, exim -d9 -bs ... gives the debug

info

>


> Please send me a complete -d9 output and complete rewrite rules. I

can't

> really follow what is going on from the snippet. (And I'm not entirely


> sure I understand what you are trying to achieve...)


> </color>





-------------- Enclosure number 1 ----------------
######################################################################
#                      REWRITE CONFIGURATION                         #
######################################################################
# Commented out examples are other attempts that failed!


#*@*    "${if eq {${domain}}{cadellin.itmagic.ltd.uk} \
#    {${lookup{$sender_address}lsearch*{/tmp/aliases}\
#    {$value}fail}@???}\
#    fail}" Ffrs


*@freeport.itmagic.ltd.uk {${lookup{$sender_address}lsearch*{/tmp/aliases}\
    {$value}fail}@???} Ffrs


*@freeport.itmagic.ltd.uk $1@??? T



-------------- Enclosure number 2 ----------------
Exim version 3.22 debug level 9 uid=0 gid=0
probably Berkeley DB version 1.8x (native mode)
Actual local interface address is 127.0.0.1 (lo)
Actual local interface address is 192.168.255.1 (eth0)
Caller is an admin user
Caller is a trusted user
originator: uid=0 gid=0 login=root name=root
sender address = NULL
SMTP>> 220 cadellin.itmagic.ltd.uk ESMTP server (Microsoft Exchange Internet Mail Service 5.5.2350.21) ready

smtp_setup_msg entered
SMTP<< helo localhost
SMTP>> 250 cadellin.itmagic.ltd.uk Hello root at localhost

SMTP<< mail from: phil@???
phil@??? in sender_reject? no (option unset)
phil@??? in sender_reject_recipients? no (option unset)
SMTP>> 250 <phil@???> is syntactically correct

SMTP<< rcpt to: root@???
SMTP>> 250 <root@???> is syntactically correct

SMTP<< data
SMTP>> 354 Enter message, ending with "." on a line by itself

search_tidyup called
>>Original headers (size=40):

from: phil@???
subject: helo

root@??? in *@freeport.itmagic.ltd.uk? yes (*@freeport.itmagic.ltd.uk)
"root@???" rewritten as "root@???"
phil@??? in *@freeport.itmagic.ltd.uk? no (end of list)
rewritten sender = phil@???
rewrite_one_header: type=F:
from: phil@???
phil@??? in *@freeport.itmagic.ltd.uk? no (end of list)
search_tidyup called
>>Final headers:

P Received: from root (helo=localhost)
    by cadellin.itmagic.ltd.uk with local-smtp (Exim 3.22 #4)
    id 15hzV0-0000pQ-00
    for root@???; Fri, 14 Sep 2001 21:23:42 +0100
F from: phil@???
  subject: helo
I Message-Id: <E15hzV0-0000pQ-00@???>
* X-rewrote-original-recipient: root@???
B Bcc:
  Date: Fri, 14 Sep 2001 21:23:42 +0100


Data file written for message 15hzV0-0000pQ-00
Writing spool header file
Size of headers = 323
LOG: 0 MAIN
<= phil@??? U=root P=local-smtp S=339
SMTP>> 250 OK id=15hzV0-0000pQ-00

smtp_setup_msg entered
SMTP<< quit
SMTP>> 221 cadellin.itmagic.ltd.uk closing connection

exec /usr/local/sbin/exim -d9 -Mc 15hzV0-0000pQ-00      
search_tidyup called
Exim version 3.22 debug level 9 uid=8 gid=12
probably Berkeley DB version 1.8x (native mode)
Actual local interface address is 127.0.0.1 (lo)
Actual local interface address is 192.168.255.1 (eth0)
Caller is an admin user
Caller is a trusted user
set_process_info:  3189 delivering specified messages
delivering message 15hzV0-0000pQ-00
set_process_info:  3189 delivering 15hzV0-0000pQ-00
Opened spool file 15hzV0-0000pQ-00-H
user=root uid=0 gid=0 sender=phil@???
sender_local=0 resent=no ident=root
Non-recipients:
Empty Tree
---- End of tree ----
recipients_count=1
body_linecount=1 message_linecount=9
running system filter as uid=0 gid=12 euid=8 egid=12
Filter: start of processing
search_open: lsearch "/var/lib/mail/virtual"
search_find: file="/var/lib/mail/virtual"
  key="itmagic.ltd.uk" partial=3074
LRU list:
  7/var/lib/mail/virtual
  End
internal_search_find: file="/var/lib/mail/virtual"
  type=lsearch key="itmagic.ltd.uk"
file lookup required for itmagic.ltd.uk
  in /var/lib/mail/virtual
lookup failed
trying partial match *.itmagic.ltd.uk
internal_search_find: file="/var/lib/mail/virtual"
  type=lsearch key="*.itmagic.ltd.uk"
file lookup required for *.itmagic.ltd.uk
  in /var/lib/mail/virtual
lookup failed
trying partial match *.ltd.uk
internal_search_find: file="/var/lib/mail/virtual"
  type=lsearch key="*.ltd.uk"
file lookup required for *.ltd.uk
  in /var/lib/mail/virtual
lookup failed
trying to match *
internal_search_find: file="/var/lib/mail/virtual"
  type=lsearch key="*"
file lookup required for *
  in /var/lib/mail/virtual
lookup failed
search_open: lsearch "/var/lib/mail/virtual"
  cached open
search_find: file="/var/lib/mail/virtual"
  key="root@???" partial=3074
LRU list:
  7/var/lib/mail/virtual
  End
internal_search_find: file="/var/lib/mail/virtual"
  type=lsearch key="root@???"
file lookup required for root@???
  in /var/lib/mail/virtual
lookup failed
trying partial match *.root@???
internal_search_find: file="/var/lib/mail/virtual"
  type=lsearch key="*.root@???"
file lookup required for *.root@???
  in /var/lib/mail/virtual
lookup failed
trying partial match *.itmagic.ltd.uk
internal_search_find: file="/var/lib/mail/virtual"
  type=lsearch key="*.itmagic.ltd.uk"
file lookup required for *.itmagic.ltd.uk
  in /var/lib/mail/virtual
lookup failed
trying partial match *.ltd.uk
internal_search_find: file="/var/lib/mail/virtual"
  type=lsearch key="*.ltd.uk"
file lookup required for *.ltd.uk
  in /var/lib/mail/virtual
lookup failed
trying default match *@cadellin.itmagic.ltd.uk
internal_search_find: file="/var/lib/mail/virtual"
  type=lsearch key="*@cadellin.itmagic.ltd.uk"
file lookup required for *@cadellin.itmagic.ltd.uk
  in /var/lib/mail/virtual
lookup failed
trying to match *
internal_search_find: file="/var/lib/mail/virtual"
  type=lsearch key="*"
file lookup required for *
  in /var/lib/mail/virtual
lookup failed
Filter: end of processing
Delivery address list:
  root@??? 
locked /var/spool/exim/db/retry.lockfile
LOG: 0 MAIN
  failed to open DB file /var/spool/exim/db/retry: Invalid argument

>>>>>>>>>>>>>>>>>>>>>>>>

Considering: root@???
cadellin.itmagic.ltd.uk in local_domains? yes (matched cadellin.itmagic.ltd.uk)
cadellin.itmagic.ltd.uk in percent_hack_domains? no (end of list)
unique = root@???
root@???: queued for directing
>>>>>>>>>>>>>>>>>>>>>>>>

directing root@???
calling system_aliases director
df_lookup entered: search type = lsearch
system_aliases director: lsearch key=root
file="/etc/aliases"
search_open: lsearch "/etc/aliases"
search_find: file="/etc/aliases"
key="root" partial=-1
LRU list:
7/etc/aliases
7/var/lib/mail/virtual
End
internal_search_find: file="/etc/aliases"
type=lsearch key="root"
file lookup required for root
in /etc/aliases
lookup failed
system_aliases director declined for root:
calling aliases director
df_lookup entered: search type = lsearch
aliases director: lsearch* key=root
file="/home/cadellin.itmagic.ltd.uk/etc/aliases"
search_open: lsearch "/home/cadellin.itmagic.ltd.uk/etc/aliases"
aliases director skipped: file failed to open and optional flag set
cadellin.itmagic.ltd.uk in "freeport.itmagic.ltd.uk"? no (end of list)
freeport director skipped: domain mismatch
calling localuser director
queued for local_delivery transport: local_part=root domain=cadellin.itmagic.ltd.uk
errors_to=NULL
domain_data=NULL local_part_data=NULL
localuser director succeeded for root
>>>>>>>>>>>>>>>>>>>>>>>>

After directing:
  Local deliveries:
    root@???
  Remote deliveries:
  Failed addresses:
  Addresses to be routed:
  Deferred addresses:
search_tidyup called

>>>>>> Local deliveries >>>>>>

locked /var/spool/exim/db/retry.lockfile
LOG: 0 MAIN
failed to open DB file /var/spool/exim/db/retry: Invalid argument
delivering root@??? as root using local_delivery:
uid=0 gid=0 home=/root current=/root
auxiliary group list: <none>
set_process_info: 3190 delivering 15hzV0-0000pQ-00 to root using local_delivery
appendfile transport entered
appendfile: mode=600 notify_comsat=0 quota=0
file=/var/spool/mail/root format=unix
prefix=From ${if def:return_path{$return_path}{MAILER-DAEMON}} ${tod_bsdinbox}\n
suffix=\n
locking by lockfile fcntl
lock name: /var/spool/mail/root.lock
hitch name: /var/spool/mail/root.lock.cadellin.itmagic.ltd.uk.3ba2674e.00000c76
lock file created
mailbox /var/spool/mail/root is locked
writing to file /var/spool/mail/root
writing data block fd=6 size=50 timeout=0
writing data block fd=6 size=534 timeout=0
writing data block fd=6 size=1 timeout=0
appendfile yields 0 with errno=0 more_errno=0
journalled root@???
local_delivery transport returned OK for root@???
post-process root@??? (0)
root@??? succeeded: adding to nonrecipients list
LOG: 0 MAIN
=> root <root@???> D=localuser T=local_delivery
search_tidyup called
set_process_info: 3189 tidying up after delivering 15hzV0-0000pQ-00
Processing retry items
Succeeded addresses:
root@???: no retry items
Failed addresses:
Deferred addresses:
end of retry processing
LOG: 0 MAIN
Completed
end delivery of 15hzV0-0000pQ-00
search_tidyup called