summaryrefslogtreecommitdiff
path: root/Mailman/MTA/Utils.py
diff options
context:
space:
mode:
authorbwarsaw2002-08-09 17:55:34 +0000
committerbwarsaw2002-08-09 17:55:34 +0000
commitf2535a1d7da5c6f4e244ec1b5e2f29a529cc0754 (patch)
treef1b400ac1d92e527858e809cdaa6d59b0ba045f1 /Mailman/MTA/Utils.py
parent1990502afbbb85cf1c093dca84adb36d508acc18 (diff)
downloadmailman-f2535a1d7da5c6f4e244ec1b5e2f29a529cc0754.tar.gz
mailman-f2535a1d7da5c6f4e244ec1b5e2f29a529cc0754.tar.zst
mailman-f2535a1d7da5c6f4e244ec1b5e2f29a529cc0754.zip
Diffstat (limited to 'Mailman/MTA/Utils.py')
-rw-r--r--Mailman/MTA/Utils.py26
1 files changed, 25 insertions, 1 deletions
diff --git a/Mailman/MTA/Utils.py b/Mailman/MTA/Utils.py
index 073feb99b..f55a1ed3d 100644
--- a/Mailman/MTA/Utils.py
+++ b/Mailman/MTA/Utils.py
@@ -34,7 +34,7 @@ def getusername():
-def makealiases(listname):
+def _makealiases_mailprog(listname):
wrapper = os.path.join(mm_cfg.WRAPPER_DIR, 'mailman')
# Most of the list alias extensions are quite regular. I.e. if the
# message is delivered to listname-foobar, it will be filtered to a
@@ -53,3 +53,27 @@ def makealiases(listname):
aliases.append(('%s-%s' % (listname, ext),
'"|%s %s %s"' % (wrapper, ext, listname)))
return aliases
+
+
+
+def _makealiases_maildir(listname):
+ maildir = mm_cfg.MAILDIR_DIR
+ if not maildir.endswith('/'):
+ maildir += '/'
+ # Deliver everything using maildir style. This way there's no mail
+ # program, no forking and no wrapper necessary!
+ #
+ # Note, don't use this unless your MTA leaves the envelope recipient in
+ # Delivered-To:, Envelope-To:, or Apparently-To:
+ aliases = [(listname, maildir)]
+ for ext in ('admin', 'bounces', 'confirm', 'join', 'leave', 'owner',
+ 'request', 'subscribe', 'unsubscribe'):
+ aliases.append(('%s-%s' % (listname, ext), maildir))
+ return aliases
+
+
+
+if mm_cfg.USE_MAILDIR:
+ makealiases = _makealiases_maildir
+else:
+ makealiases = _makealiases_mailprog