On Wed, 20 Jul 2022, Thomas Krichel via Exim-users wrote:
> I've been running Mailman with exim4 for about 20 years now!
> Yesterday, I upgraded my Debian to exim 4.96-3. Then I got hit by
> this mailman problem. Log entry
>
> | 2022-07-20 11:43:44 1oE87D-007hOf-2N ** nep-technicians@???
> | R=mailman_router T=mailman_transport: Tainted arg 2 for mailman_transport
> | transport command: 'nep-technicians'
>
> The list nep-technicians seems to exist
>
> root@darni ~ # exim -bt nep-technicians@???
> nep-technicians@???
> router = mailman_router, transport = mailman_transport
>
> Downgrading exim to 4.96-1 does not seem to fix the issue. Here
> is the transporter
>
> root@darni /etc/exim4 # cat ./conf.d/transport/14_exim4-config_mailman
> mailman_transport:
> driver = pipe
> command = MM_WRAP \
> '${if def:local_part_suffix \
> {${sg{$local_part_suffix}{-(\\w+)(\\+.*)?}{\$1}}} \
> {post}}' \
> $local_part
> current_directory = MM_HOME
> home_directory = MM_HOME
> user = MM_UID
> group = MM_GID
>
> just what the instruction say ... Here is my router
>
> root@darni /etc/exim4 # cat ./conf.d/router/114_exim4-config_mailman | grep -v ^\#
> mailman_router:
> driver = accept
> domains = +mm_domains
> require_files = MM_LISTCHK
> local_part_suffix_optional
> local_part_suffix = -admin : \
> -bounces : -bounces+* : \
> -confirm : -confirm+* : \
> -join : -leave : \
> -owner : -request : \
> -subscribe : -unsubscribe
> transport = mailman_transport
>
> Here is my template, again with comments left out for brefty
>
> root@darni /etc/exim4 # cat conf.d/main/template_14_exim4-config_mailman | grep -v ^\#
> MM_HOME=/var/lib/mailman
> MM_UID=list
> MM_GID=list
> domainlist mm_domains=lists.openlib.org
> MM_WRAP=MM_HOME/mail/mailman
> MM_LISTCHK=MM_HOME/lists/${lc::$local_part}/config.pck
>
> A manual check of MM_LISTCHK suggests that nep-techncians
> should be found since the config.pck is there.
>
> root@darni ~ # ls /var/lib/mailman/lists/nep-technicians/config.pck
> /var/lib/mailman/lists/nep-technicians/config.pck
>
> What more to check?
You have checked everything, but you need to use an untainted
value in command. Based on
echo /var/lib/mailman/lists/nep-technicians/config.pck |\
sed -e 's/\/config.pck\$//' -e 's/\/.*\///g'config.pck
(the order of the replacements matters)
could you try replacing your transport with:
mailman_transport:
driver = pipe
command = MM_WRAP \
'${if def:local_part_suffix \
{${sg{$local_part_suffix}{-(\\w+)(\\+.*)?}{\$1}}} \
{post}}' \
${sg{sg{$local_part}{\/config.pck$}{}}{.*\/}{}}
current_directory = MM_HOME
home_directory = MM_HOME
user = MM_UID
group = MM_GID
?
I don't have an exim config system with MM_LISTCHK
and I have never tested the sg function in an exim config before,
so this is unlikely to be exactly right.
--
Andrew C. Aitchison Kendal, UK
andrew@???