[exim] Seeking a new solution to a match_address issue in 4.…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Chris Siebenmann
Date:  
À: exim-users
CC: cks
Sujet: [exim] Seeking a new solution to a match_address issue in 4.77+
We're currently using Exim 4.76 on Ubuntu 12.04, where all of the
match_* operations applied string expansion to their second argument
as well as their first ones. In Exim 4.77, this changed. As it happens
we currently use this feature in order to optionally restrict who can
send email to local simple mailing lists[*].

What we currently do in our 'lists' router that handles and expands
these addresses is:

 address_data = \
  ${if or{{!exists{/cs/lists/$local_part..posters}} \
          {match_address{$return_path}{${run{/opt/mail/sbin/readposters /cs/lists/$local_part..posters}}}} \
         } \
    {128.100.3.125} fail}


/opt/mail/sbin/readposters is a program that safely reads the file
/cs/lists/<whatever>..posters as the owner of the file and turns
all address-like things in it into 'a:b:c:d:...' as match_address
requires. Because users own their own files in /cs/lists and can change
them whenever, this has to be done on the fly and as the user themselves.
(We then exploit that explicitly failed expansion of address_data causes
the entire router to fail to skip the entire router.)

This is clearly non-functional in Exim 4.77+ and we now need to find
another way to do this as we migrate to Ubuntu 14.04. Right now the only
real way I can think of is to replace the entire match_address portion
(at least) with a ${run ...} of an external program that does the address
matching as well as the reading that readposters currently does.

Can anyone think of a cleverer approach that keeps the address matching
in Exim, or is the external program doing all the work the best approach?

(This feature is reasonably popular with people here, so we can't just
take it out when we upgrade our mail machine to Ubuntu 14.04, which uses
Exim 4.82 and so won't work with the current setup.)

    - cks
[*: if people are curious or want more background, see:
    http://utcc.utoronto.ca/~cks/space/blog/sysadmin/SimpleEximMailingLists
]