Re: exim4 untainting and mailman does not work

Thomas Krichel via Exim-users <[email protected]>
Newsgroups gmane.mail.exim.user
Message-ID <[email protected]>
  Marc MERLIN via Exim-users writes

> I understand why tainting and the basics, but in the case of the mailman
> transport I wrote 20+ years ago, it is safe and I'd like to untaint
> local_part.  

  You should not be running Mailman21. It is no longer being
  supported. You need to move on to Mailman3.

  But I confess: I am a fellow sinner. I run Mailman21 with

root@darni ~ # aptitude show exim4 | grep Version
Version: 4.98.2-2

  which I believe is post tainting. So it should be possible to have a
  fix for your issue. I use the split configuration.  Let me share
  what I hope are the salient files.

root@darni /etc/exim4 # grep -lir mailman .
./conf.d/main/template_14_exim4-config_mailman
./conf.d/router/114_exim4-config_mailman
./conf.d/transport/14_exim4-config_mailman
root@darni /etc/exim4 #

  Let's look at them.

root@darni /etc/exim4 # cat ./conf.d/main/template_14_exim4-config_mailman 
#
# https://help.ubuntu.com/community/Mailman
#
# start
# Home dir for your Mailman installation -- aka Mailman's prefix
# directory.
# By default this is set to "/usr/local/mailman"
# On a Red Hat/Fedora system using the RPM use "/var/mailman"
# On Debian using the deb package use "/var/lib/mailman"
# This is normally the same as ~mailman
MM_HOME=/var/lib/mailman
#
# User and group for Mailman, should match your --with-mail-gid
# switch to Mailman's configure script.  Value is normally "mailman"
MM_UID=list
MM_GID=list
#
# Domains that your lists are in - colon separated list
# you may wish to add these into local_domains as well
domainlist mm_domains=lists.openlib.org
#
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#
# These values are derived from the ones above and should not need
# editing unless you have munged your mailman installation
#
# The path of the Mailman mail wrapper script
MM_WRAP=MM_HOME/mail/mailman
#
# The path of the list config file (used as a required file when
# verifying list addresses)
MM_LISTCHK=MM_HOME/lists/${lc::$local_part}/config.pck
root@darni /etc/exim4 #


root@darni /etc/exim4 # cat conf.d/router/114_exim4-config_mailman 
mailman_router:
   driver = accept
   local_parts = dsearch,filter=dir;MM_HOME/lists
   require_files = MM_HOME/lists/$local_part_data/config.pck
   local_part_suffix_optional
   local_part_suffix = -bounces : -bounces+* : \
                       -confirm+* : -join : -leave : \
                       -owner : -request : -admin
   domains = +mm_domains
   transport = mailman_transport
root@darni /etc/exim4 #


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}}' \
           ${lc:$local_part_data}
  current_directory = MM_HOME
  home_directory    = MM_HOME
  user              = MM_UID
  group             = MM_GID
root@darni /etc/exim4 #

  I hope this helps. If not, I'm happy try to show you more but
  wait for your suggestions as to what you want me to exhibit.

  Cheers!

-- 
  Written by Thomas Krichel http://openlib.org/home/krichel on his 22060th day.

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   [email protected]
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.