diff options
| author | bwarsaw | 2000-10-20 06:14:52 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-10-20 06:14:52 +0000 |
| commit | 5a3883383ade72c72de38a3e2417b42d30f5e5ce (patch) | |
| tree | 6f54703c83bc33cb5bd0627ece94cdf6ffee989b | |
| parent | 7e3bfa942c2da513877c479f782a06635dd6fc7a (diff) | |
| download | mailman-5a3883383ade72c72de38a3e2417b42d30f5e5ce.tar.gz mailman-5a3883383ade72c72de38a3e2417b42d30f5e5ce.tar.zst mailman-5a3883383ade72c72de38a3e2417b42d30f5e5ce.zip | |
SF Patch #101846 by Sean Reifschneider (modified by bwarsaw) to add
MTA_ALIASES_STYLE for the newlist script's output.
| -rw-r--r-- | Mailman/Defaults.py.in | 5 | ||||
| -rwxr-xr-x | bin/newlist | 25 |
2 files changed, 29 insertions, 1 deletions
diff --git a/Mailman/Defaults.py.in b/Mailman/Defaults.py.in index d90e4f4e1..c1a972410 100644 --- a/Mailman/Defaults.py.in +++ b/Mailman/Defaults.py.in @@ -178,6 +178,11 @@ SMTPPORT = 0 # default from smtplib # when DELIVERY_MODULE is 'Sendmail'. SENDMAIL_CMD = '/usr/lib/sendmail' +# Allow for handling of MTA-specific features (i.e. aliases). Most MTAs use +# "sendmail" (including Sendmail, Postfix, and Exim). Qmail uses the "qmail" +# style. +MTA_ALIASES_STYLE = 'sendmail' + # Set these variables if you need to authenticate to your NNTP server for # Usenet posting or reading. If no authentication is necessary, specify None # for both variables. diff --git a/bin/newlist b/bin/newlist index e3449bf81..277f1c814 100755 --- a/bin/newlist +++ b/bin/newlist @@ -45,7 +45,7 @@ from Mailman.Handlers import HandlerAPI from Mailman.Crypt import crypt -ALIASTEMPLATE = ''' +SENDMAIL_ALIAS_TEMPLATE = ''' Entry for aliases file: ## %(listname)s mailing list @@ -56,6 +56,29 @@ Entry for aliases file: %(owner2)s %(listname)s-admin ''' +QMAIL_ALIAS_TEMPLATE = """ +To create system aliases: + + echo '|preline %(wrapper)s post %(listname)s' >~alias/.qmail-%(listname)s + echo '|preline %(wrapper)s mailowner %(listname)s' >~alias/.qmail-%(listname)s-admin + echo '|preline %(wrapper)s mailcmd %(listname)s' >~alias/.qmail-%(listname)s-request + echo '&%(listname)s-admin' >~alias/.qmail-owner-%(listname)s + echo '&%(listname)s-admin' >~alias/.qmail-%(listname)s-owner + chmod 644 ~alias/.qmail-%(listname)s ~alias/.qmail-%(listname)s-admin + chmod 644 ~alias/.qmail-%(listname)s-request ~alias/.qmail-%(listname)s-owner + chmod 644 ~alias/.qmail-owner-%(listname)s +""" + +style = string.lower(mm_cfg.MTA_ALIASES_STYLE) +if style == 'qmail': + ALIASTEMPLATE = QMAIL_ALIAS_TEMPLATE +elif style == 'sendmail': + ALIASTEMPLATE = SENDMAIL_ALIAS_TEMPLATE +else: + print "Warning! I don't understand alias style:", mm_cfg.MTA_ALIASES_STYLE + print '(this will print sendmail style...)' + ALIASTEMPLATE = SENDMAIL_ALIAS_TEMPLATE + def getusername(): |
