Re: [EXIM] router to send mailing list mail by smarthost

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Ben Smithurst
CC: exim-users
Sujet: Re: [EXIM] router to send mailing list mail by smarthost
On Fri, 26 Jun 1998, Ben Smithurst wrote:

> This one's been bugging me for a few days now so I thought I'd ask you
> lot...


Ben,

You do seem to be very good at finding untidy corners of Exim. That is
fine by me - it's very helpful having people who do that.

> mailinglist:
>   driver = domainlist
>   transport = remote_smtp
>   condition = "${if eq {$sender_ident}{majordom} \
>               {${if eq {$received_protocol}{local} \
>               {${if match {$original_local_part}{.*-outgoing} \
>               {true}{false}}}{false}}}{false}}"
>   route_list = "* post.mail.demon.net bydns_a"

>
> Where `original_local_part' should be something like
> `embrace-outgoing' because the address being routed has been expanded
> from that, hasn't it?


Indeed, but way back in the mists of time when original_local_part was
invented, I managed to implement it for directors and transports and
forgot that it might also be useful in routers. They never got updated
from the days when the only two similar variables were $domain and
$local_part. A stupid oversight. The patch below for the beta 1.950
release fixes this very old problem.

-- 
Philip Hazel                   University Computing Service,
P.Hazel@???          New Museums Site, Cambridge CB2 3QG,
ph10@??? (sic)       England.  Phone: +44 1223 334714




*** exim-1.950/src/route.c  Thu Jun 25 09:23:28 1998
--- route.c     Mon Jun 29 10:22:43 1998
***************
*** 480,487 ****
    expansions. Afterwards unset them, just in case. Also, unset the rewrite
    flag; routers must explicitly request rewriting. */


!   deliver_domain = addr->route_domain;
!   deliver_localpart = addr->local_part;
    addr->rewrite_headers = FALSE;


    /* Do file existence tests - must do after setting expansion values
--- 480,486 ----
    expansions. Afterwards unset them, just in case. Also, unset the rewrite
    flag; routers must explicitly request rewriting. */


!   deliver_set_expansions(addr);
    addr->rewrite_headers = FALSE;


    /* Do file existence tests - must do after setting expansion values
***************
*** 540,547 ****
      break;
      }


! deliver_domain = NULL;
! deliver_localpart = NULL;

    /* If succeeded while verifying but fail_verify is set, convert into
    a failure. */
--- 539,545 ----
      break;
      }


! deliver_set_expansions(NULL);

    /* If succeeded while verifying but fail_verify is set, convert into
    a failure. */





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