~ubuntu-branches/ubuntu/hardy/mailman/hardy-updates

« back to all changes in this revision

Viewing changes to debian/README.Exim4.Debian

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-07-03 16:59:25 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060703165925-175ubna955u796c0
Tags: 0:2.1.8-1ubuntu1
* Merge to Debian; remaining Ubuntu changes:
  - debian/mailman.init: Create /var/{run,lock}/mailman.
  - debian/control: exim4 -> postfix.
* debian/control: Dependency fix: apache -> apache2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Here's a way to integrate mailman with Exim4 that will automatically
 
2
play nice with mailman's virtual domains support and VERP. It does not
 
3
require dedicating domain(s) to mailman.
 
4
 
 
5
Configure your Mailman (in /etc/mailman/mm_cfg.py) with:
 
6
 
 
7
MTA = 'Postfix'
 
8
POSTFIX_ALIAS_CMD = '/bin/true'
 
9
POSTFIX_MAP_CMD = 'chgrp Debian-exim'
 
10
 
 
11
and list all your Mailman domains in "POSTFIX_STYLE_VIRTUAL_DOMAINS".
 
12
 
 
13
Put this in your exim4 main configuration (if you use a split config,
 
14
for example /etc/exim4/conf.d/main/04_local_mailman_macros)
 
15
 
 
16
---------------------- BEGIN EXIM4 MAIN   ----------------------------
 
17
# Home dir for your Mailman installation -- aka Mailman's prefix
 
18
# directory.
 
19
MAILMAN_HOME=/var/lib/mailman
 
20
MAILMAN_WRAP=MAILMAN_HOME/mail/mailman
 
21
 
 
22
# User and group for Mailman, should match your --with-mail-gid
 
23
# switch to Mailman's configure script.
 
24
MAILMAN_USER=list
 
25
MAILMAN_GROUP=daemon
 
26
----------------------  END EXIM4 MAIN    ----------------------------
 
27
 
 
28
 
 
29
Put this in your exim4 router configuration (if you use a split
 
30
config, then for example /etc/exim4/conf.d/router/970_local_mailman)
 
31
 
 
32
---------------------- BEGIN EXIM4 ROUTER ----------------------------
 
33
# Messages get sent out with
 
34
# envelope from "mailman-bounces@virtual_domain"
 
35
# But mailman doesn't put such addresses
 
36
# in the aliases. Recognise these here.
 
37
mailman_workaround:
 
38
  domains = +local_domains
 
39
  require_files = MAILMAN_HOME/lists/$local_part/config.pck
 
40
  driver = accept
 
41
  local_parts = mailman
 
42
  local_part_suffix_optional
 
43
  local_part_suffix = -bounces : -bounces+* : \
 
44
           -confirm+* : -join : -leave : \
 
45
           -owner : -request : -admin
 
46
  transport = mailman_transport
 
47
  group = MAILMAN_GROUP
 
48
 
 
49
# Mailman lists
 
50
mailman_router:
 
51
  domains = +local_domains
 
52
  condition = ${lookup{$local_part@$domain}lsearch{MAILMAN_HOME/data/virtual-mailman}{1}{0}}
 
53
  require_files = MAILMAN_HOME/lists/$local_part/config.pck
 
54
  driver = accept
 
55
  local_part_suffix_optional
 
56
  local_part_suffix = -bounces : -bounces+* : \
 
57
                      -confirm+* : -join : -leave : \
 
58
                      -owner : -request : -admin
 
59
  transport = mailman_transport
 
60
  group = MAILMAN_GROUP
 
61
----------------------  END EXIM4 ROUTER  ----------------------------
 
62
 
 
63
Put this in your exim4 transport configuration (if you use a split
 
64
config, then for example /etc/exim4/conf.d/transport/40_local_mailman)
 
65
 
 
66
---------------------- BEGIN EXIM4 TRANSPORT -------------------------
 
67
mailman_transport:
 
68
  driver = pipe
 
69
  command = MAILMAN_WRAP \
 
70
            '${if def:local_part_suffix \
 
71
                  {${sg{$local_part_suffix}{-(\\w+)(\\+.*)?}{\$1}}} \
 
72
                  {post}}' \
 
73
            $local_part
 
74
  current_directory = MAILMAN_HOME
 
75
  home_directory = MAILMAN_HOME
 
76
  user = MAILMAN_USER
 
77
  group = MAILMAN_GROUP
 
78
  freeze_exec_fail = true
 
79
----------------------  END EXIM4 TRANSPORT  -------------------------
 
80
 
 
81
You are done!