[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Exim4 and mailman



(No need to copy me, I'm subscribed to the mailing list.)

> Yes, Im reading through a guide how to set this up but am getting a little
> confused with what/where to add/edit my exim4.conf file. Do you purhaps have
> an example of what you added? I'm very new to exim and mailman :)

Sure.  Let me mention two things before you take my example to heart too
much...  First, I migrated this from exim 3 to exim 4 so maybe there is a
better way.  Also, the Debian exim 4 packages distribute the configuration
file into bits in a directory structure - for good reasons, I'm sure.  (For
example, if the mailmain maintainer gets on board then mailman could simply
install it's own bits in the to configuration heirarchy and it should work
out of the box.)  However, I had a fairly customized exim setup and needed
it working quickly, so I went the "monolothic file" route and have a
"/etc/exim4/exim4.conf"....  Having said all of that, here you go -
anything in "[]" is my comments to you and not actually in the file.

[beginning of /etc/exim/exim4.conf]
# All macro definitions have been gathered here to ensure
# they precede any references to them.

MAILMAN_HOME=/var/lib/mailman
MAILMAN_WRAP=MAILMAN_HOME/mail/wrapper
MAILMAN_UID=mail
MAILMAN_GID=list

[ skipping down to directors ]
######################################################################
#                      DIRECTORS CONFIGURATION                       #
#             Specifies how local addresses are handled              #
######################################################################
#                          ORDER DOES MATTER                         #
#   A local address is passed to each in turn until it is accepted.  #
######################################################################

# This allows local delivery to be forced, avoiding alias files and
# forwarding.

real_local:
  driver = accept
  check_local_user
  local_part_prefix = real-
  transport = local_delivery

# First we have mailman entries

# First 2 directors rewrite list-owner or owner-list to list-admin
# This is only done if the list exists.
# List existence checks are done by seeing if the file
# MAILMAN_HOME/lists//config.db
# exists.

list_owner_director:
  driver = redirect
  allow_defer
  allow_fail
  data = "${lc:$local_part}-admin@${domain}"
  local_part_suffix = "-owner"
  require_files = MAILMAN_HOME/lists/${lc::$local_part}/config.db
  retry_use_local_part

owner_list_director:
  driver = redirect
  allow_defer
  allow_fail
  data = "${lc:$local_part}-admin@${domain}"
  local_part_prefix = "owner-"
  require_files = MAILMAN_HOME/lists/${lc::$local_part}/config.db
  retry_use_local_part

##
## Next 3 directors direct admin, request and list mail to the appropriate
## transport.  List existence is checked as above.

list_admin_director:
  driver = accept
  local_part_suffix = -admin
  require_files = MAILMAN_HOME/lists/${lc::$local_part}/config.db
  retry_use_local_part
  transport = list_admin_transport

list_request_director:
  driver = accept
  local_part_suffix = -request
  require_files = MAILMAN_HOME/lists/${lc::$local_part}/config.db
  retry_use_local_part
  transport = list_request_transport

list_director:
  driver = accept
  require_files = MAILMAN_HOME/lists/${lc::$local_part}/config.db
  retry_use_local_part
  transport = list_transport

[ end of the mailman specific part of the directors ]

[ Next is the transport section, order here does not matter so I'm only
pasting in the relevant parts. ]

# Three transports for list mail, request mail and admin mail
# respectively
# Mailman is installed in MAILMAN_HOME
# Mailman is configured to be invoked as user exim
list_transport:
  driver = pipe
  command = MAILMAN_WRAP post ${lc:$local_part}
  current_directory = MAILMAN_HOME
  group = MAILMAN_GID
  home_directory = MAILMAN_HOME
  user = MAILMAN_UID

list_request_transport:
  driver = pipe
  command = MAILMAN_WRAP mailcmd ${lc:$local_part}
  current_directory = MAILMAN_HOME
  group = MAILMAN_GID
  home_directory = MAILMAN_HOME
  user = MAILMAN_UID

list_admin_transport:
  driver = pipe
  command = MAILMAN_WRAP mailowner ${lc:$local_part}
  current_directory = MAILMAN_HOME
  group = MAILMAN_GID
  home_directory = MAILMAN_HOME
  user = MAILMAN_UID

[ that's it for the exim4.conf file ]

In addition to the exim4.conf file, then you have to setup lists.  It's
been a while since I've down this, but I recall it being straightforward
simply following the docs.

Take care,
     Dale
-- 
Dale E. Martin, Clifton Labs, Inc.
Senior Computer Engineer
dmartin@cliftonlabs.com
http://www.cliftonlabs.com
pgp key available



Reply to: