[Exim] Exim 4 manualroute bug/feature

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Russell Wilton
Fecha:  
A: exim-users
Asunto: [Exim] Exim 4 manualroute bug/feature
Hi:
I'm running Exim 4.20 on RedHat 9, and have Mailman mailing list software
running as well. I also have a couple of other mail systems, some of which also
run Mailman. These systems all use the same local domain: 'uleth.ca'. I store
information about the lists on an LDAP server, including which machine is the
mailhost for the list.

Towards the end of my set of routers I have one that checks for '-admin'
style addresses and either passes to have is processed locally, or manualroutes
it to the proper host. It looks like this:

# This router routes uleth.ca and listserv.uleth.ca addresses to the
# mailhost specified in the LDAP entry for the address. If the entry
# is not found, or mailhost is the local machine, the router declines
# so that the next router can process the message. If the entry has
# a bad or missing mailhost value, the router defers and no more
# routers are tried.

mailman_hub:
   driver = manualroute
   transport = remote_smtp
   domains = uleth.ca : listserv.uleth.ca
   host_find_failed = defer
   local_part_suffix = -admin : -owner : -request : \
                       -bounces : -bounces+* : -confirm+* : \
                       -subscribe : -unsubscribe : -join : -leave
   local_part_suffix_optional
   address_data = LISTBYADDR
   route_data = ${if eq {${MHOST}}{$primary_hostname} {} {\
                  ${if ! eq {${MHOST}}{} {${MHOST} byname} {no-mailhost} }}}


LISTBYADDR is a macro to do the LDAP search. MHOST is a macro to extract the
mailhost name for the list.

This works as expected except for one thing: when it ships a message off to
another host, it sends it to $local_part@mailhost. Unfortunately $local_part
has had the suffix stripped at that point, so mail for 'list-admin' gets sent to
'list', causing mail loops and other general havoc.

Is there any option to either the router or the transport that will make it use
the original local_part instead of the truncated version? Or is there a better
way to do this? Any help greatly appreciated.

Russ

--
Russell D. Wilton                     E Mail: WILTON@???
Network Services Manager              Voice:   (403) 329-2525
University of Lethbridge              FAX:     (403) 382-7108
4401 University Drive   Lethbridge, Alberta, CANADA   T1K 3M4