[EXIM] Rewriting headers resolved by DNS

Top Page
Delete this message
Reply to this message
Author: Jor-el
Date:  
To: exim-users
Subject: [EXIM] Rewriting headers resolved by DNS

Hi,

        I have a system which is on a local domain (megadodo.umb) which is
connected through the internet via dialup. In order to get my Envelope

>From header rewritten correctly (for external mails only), I followed the

solution in Q1003 of the FAQ : set up a second exim daemon to handle all
external mails.

        Since I was unable to get the 'domains' option working with the
lookuphost driver for a router, here is what I did to get the addresses of
remote users on the megadodo.umb domain resolve correctly :


(From the primary exim.conf file)

qualify :
        driver = domainlist
        route_list = "^[A-Za-z0-9]*$ $domain.megadodo.umb"


local_net :
        driver = domainlist
        domains = "*.megadodo.umb"
        transport = local_net_smtp
        route_list = * $domain byname
        host_find_failed = fail_soft
        self = send


internet :
        driver = domainlist
        transport = remote_smtp
        route_list = * localhost byname
        self = send
end


The transport section of the same file looks like :

local_net_smtp :
        driver = smtp


remote_smtp :
        driver = smtp
        service = 26
end


        The second exim daemon is run on port 26.


        Now, here is some test output from exim :


pgmr$/usr/sbin/exim -C /etc/exim.conf -bt -d11 ken@zaphod
Exim version 2.05 debug level 11 uid=500 gid=101
probably Berkeley DB version 1.8x (native mode)
Actual local interface address is 127.0.0.1
Actual local interface address is 192.168.0.1
user name "Kenneth Stephen" extracted from gecos field "Kenneth
Stephen,,,"
Address testing: uid=0 gid=101 euid=8 egid=8
Testing ken@zaphod
address ken@zaphod
local_part=ken domain=zaphod
domain is not local
>>>>>>>>>>>>>>>>>>>>>>>>

routing ken@zaphod, domain zaphod
qualify router called for ken@zaphod
route_domain = zaphod
routelist_item = ^[A-Za-z0-9]*$ $domain.megadodo.umb
after handling route_lists items, matched = 1
original hostlist=$domain.megadodo.umb options=
expanded hostlist="zaphod.megadodo.umb" options=
qualify router passed, rewriting zaphod as zaphod.megadodo.umb
local_net router called for ken@zaphod
route_domain = zaphod.megadodo.umb
routelist_item = * $domain byname
after handling route_lists items, matched = 1
original hostlist=$domain options=byname
expanded hostlist="zaphod" options=byname
Actual local interface address is 127.0.0.1
Actual local interface address is 192.168.0.1
fully qualified name = zaphod.megadodo.umb
zaphod.megadodo.umb 192.168.0.2 -1
routed by local_net router:
deliver to ken@zaphod
transport: local_net_smtp
host zaphod.megadodo.umb [192.168.0.2]
ken@zaphod
deliver to ken@zaphod via domain zaphod.megadodo.umb
router = local_net, transport = local_net_smtp
host zaphod.megadodo.umb [192.168.0.2]
search_tidyup called

        And here are the headers of a mail sent from
pgmr@??? (having an external account of ksteph1 and
received by ken@zaphod :


>From pgmr@??? Mon Jul 5 14:54:46 1999

Return-Path: <pgmr@???>
Received: from marvin.megadodo.umb (marvin [192.168.0.1])
        by zaphod.megadodo.umb (8.8.5/8.8.5) with ESMTP id OAA10032
        for <ken@zaphod>; Mon, 5 Jul 1999 14:54:46 -0500
Received: from pgmr by marvin.megadodo.umb with local-smtp (Exim 2.05 #1
(Debian))
        id 111Etw-0000KS-00; Mon, 5 Jul 1999 14:59:40 -0500
Date: Mon, 5 Jul 1999 14:59:40 -0500 (CDT)
From: Kenneth Stephen <pgmr@???>
To: jorel@???
cc: Coding <coder@???>, ken@???
Subject: Will you wont you
Message-ID: <Pine.LNX.3.96.990705145856.1267A-100000@???>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


Will you wont you will you wont you work?

        The same mail, when reveived by jorel@??? shows up as :


jorel@??? :

Received: from pop4.ibm.net
        by fetchmail-4.6.4 POP3
        for <jorel/localhost> (single-drop); Mon, 05 Jul 1999 15:01:26 CDT
Received: from out2.ibm.net [165.87.194.229] by in3.ibm.net id
931204485.84162-1 ; 
Mon, 05 Jul 1999 19:54:45 +0000
Received: from marvin.megadodo.umb (mail@??? 
[32.100.167.113]) by out2.ibm.net (8.8.5/8.6.9) with ESMTP id TAA214978
for 
<jorel@???>; Mon, 5 Jul 1999 19:54:43 GMT
Received: from localhost (marvin.megadodo.umb) [127.0.0.1] (mail)
        by marvin.megadodo.umb with esmtp (Exim 2.05 #1 (Debian))
        id 111Etw-0000KV-00; Mon, 5 Jul 1999 14:59:40 -0500
Received: from pgmr by marvin.megadodo.umb with local-smtp (Exim 2.05 #1
(Debian))
        id 111Etw-0000KS-00; Mon, 5 Jul 1999 14:59:40 -0500
Date: Mon, 5 Jul 1999 14:59:40 -0500 (CDT)
From: Kenneth Stephen <pgmr@???>
To: jorel@???
cc: Coding <coder@???>, ken@zaphod
Subject: Will you wont you
Message-ID: <Pine.LNX.3.96.990705145856.1267A-100000@???>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: ksteph1@???


Will you wont you will you wont you work?



        Notice that in this mail above, the ken@zaphod address has not
been expanded to ken@???, even though the output of 'exim
-bt' shows that exim has resolved it correctly. How can I fix this?


Thanks in advance,
Jor-el








--
*** Exim information can be found at http://www.exim.org/ ***