[Mailman-Users] updating aliases file.
britt
bolen at hcs.harvard.edu
Tue May 2 18:52:51 CEST 2000
On Tue, 2 May 2000, Krist van Besien wrote:
> Exim is not an option for me, I need to use sendmail. If there are better
> ways to integrate mailman with sendmail other then having a way to add
> lines to /etc/aliases I'd be glad to learn about them.
here...
run this patch in your mailman/bin directory and you'll have just what
you'll need. you'll need to run newaliases of course...
*** newlist Mon Apr 17 20:32:53 2000
--- newlist2 Sat Apr 15 19:09:42 2000
***************
*** 46,52 ****
ALIASTEMPLATE = '''
- Entry for aliases file:
## %(listname)s mailing list
## created: %(date)s %(user)s
--- 46,51 ----
***************
*** 115,121 ****
except Errors.MMBadEmailError:
usage(1, 'Bad owner email address: ' + owner_mail)
!
print ALIASTEMPLATE % {
'listname': listname,
'list' : "%-24s" % (listname + ":"),
--- 114,122 ----
except Errors.MMBadEmailError:
usage(1, 'Bad owner email address: ' + owner_mail)
! import sys
! tempout = sys.stdout
! sys.stdout = open("/etc/aliases", "a")
print ALIASTEMPLATE % {
'listname': listname,
'list' : "%-24s" % (listname + ":"),
***************
*** 126,131 ****
--- 127,134 ----
'date' : time.strftime('%d-%b-%Y', time.localtime(time.time())),
'user' : getusername(),
}
+ sys.stdout.close()
+ sys.stdout = tempout
if len(argv) < 5:
print ("Hit enter to continue with %s owner notification..."
B
-----------------------------------------------------------------------
Britt Bolen britt at bolen.com britt.bolen.com
More information about the Mailman-Users
mailing list