Re: [Exim] rewriting Sender: that doesn't have a domain

Pàgina inicial
Delete this message
Reply to this message
Autor: Marc MERLIN
Data:  
A: Philip Hazel
CC: exim-users
Assumpte: Re: [Exim] rewriting Sender: that doesn't have a domain
On Fri, Jul 28, 2000 at 10:16:08AM +0100, Philip Hazel wrote:
> On Thu, 27 Jul 2000, Marc MERLIN wrote:
>
> > I got this one to work (according to exim -brw):
> > ^([^@]+)                        $1@mydomain          s
> > (it doesn't work if I add a trailing '$' though)

> >
> > but if I telnet to port 25, send an Email with Sender: foo, it doesn't get
> > rewritten :-(
> >
> > What I am missing?
>
> It works for me.
>
> Did you remember to HUP the daemon after changing the configuration?


Yep :-)
(but I know why you asked :-D)

Ok, here are more details:
Here's my rewrite section:
----------------------------------------------------------------------------
# Some versions of netscape put a Sender field without a domain :-( -- Marc
^([^@]+)            $1@???        s


# Explicitely list domains that we want to rewrite, and rewrite everything
*@varesearch.com        $1@???        hE
*@*.su.varesearch.com        $1@???        hE
*@*.su.valinux.com        $1@???        hE
*@*.fr.valinux.com        $1@???        hE
*@*.sd.valinux.com        $1@???        hE
*@*.dsl.valinux.com        $1@???        hE


# This seems cool (checks if the user exists locally), see 
# http://www.exim.org/exim-html-3.10/doc/html/spec_32.html#SEC703
*@valinux.com            $1@${qualify_domain}    X
----------------------------------------------------------------------------


Here's the Email:
----------------------------------------------------------------------------
From: merlin@???
To: marc@???
Sender: merlin
Subject: test

test
----------------------------------------------------------------------------

And the debug (notice that Sender is untouched):
----------------------------------------------------------------------------
search_tidyup called
>>Original headers (size=75):

From: merlin@???
To: marc@???
Sender: merlin
Subject: test

marc@??? in *@varesearch.com? no (end of list)
marc@??? in *@*.su.varesearch.com? no (end of list)
marc@??? in *@*.su.valinux.com? no (end of list)
marc@??? in *@*.fr.valinux.com? no (end of list)
marc@??? in *@*.sd.valinux.com? no (end of list)
marc@??? in *@*.dsl.valinux.com? no (end of list)
marc@??? in *@valinux.com? no (end of list)
root@??? in *@varesearch.com? no (end of list)
root@??? in *@*.su.varesearch.com? no (end of list)
root@??? in *@*.su.valinux.com? no (end of list)
root@??? in *@*.fr.valinux.com? no (end of list)
root@??? in *@*.sd.valinux.com? no (end of list)
root@??? in *@*.dsl.valinux.com? no (end of list)
rewritten sender = root@???
rewrite_one_header: type=F:
From: merlin@???
merlin@??? in *@varesearch.com? no (end of list)
merlin@??? in *@*.su.varesearch.com? no (end of list)
merlin@??? in *@*.su.valinux.com? no (end of list)
merlin@??? in *@*.fr.valinux.com? no (end of list)
merlin@??? in *@*.sd.valinux.com? no (end of list)
merlin@??? in *@*.dsl.valinux.com? no (end of list)
rewrite_one_header: type=T:
To: marc@???
marc@??? in *@varesearch.com? no (end of list)
marc@??? in *@*.su.varesearch.com? no (end of list)
marc@??? in *@*.su.valinux.com? no (end of list)
marc@??? in *@*.fr.valinux.com? no (end of list)
marc@??? in *@*.sd.valinux.com? no (end of list)
marc@??? in *@*.dsl.valinux.com? no (end of list)
search_tidyup called
>>Final headers:

P Received: from root by mail.valinux.com with local (Exim 3.16 #1 (Debian))
    id 13K9cM-0002zQ-00
    for <marc@???>; Wed, 02 Aug 2000 18:16:14 -0700
F From: merlin@???
T To: marc@???
* Sender: merlin
  Subject: test
I Message-Id: <E13K9cM-0002zQ-00@???>
  Date: Wed, 02 Aug 2000 18:16:14 -0700


Data file written for message 13K9cM-0002zQ-00
----------------------------------------------------------------------------

and yet:
kenny:/var/spool/mail# exim -brw merlin
2000-08-02 18:23:24 "merlin@???" rewritten as "merlin@???" by rule 1
  sender: merlin@???
    from: merlin@???
      to: merlin@???
      cc: merlin@???
     bcc: merlin@???
reply-to: merlin@???
env-from: merlin@???
  env-to: merlin@???
2000-08-02 18:23:24 "merlin@???" rewritten as "merlin@???" by rule 8
       X: merlin@???



Any ideas?
(note that if I change the ^([^@]+) to rewrite to something else than
valinux.com, exim -brw does show the new domain)

Thanks,
Marc
--
Microsoft is to software what McDonalds is to gourmet cooking

Home page: http://marc.merlins.org/ (friendly to non IE browsers)
Finger marc_f@??? for PGP key and other contact information