--- mailman-2.1.23/Mailman/MTA/Postfix.py.orig 2016-08-27 09:04:42.000000000 -0400 +++ mailman-2.1.23/Mailman/MTA/Postfix.py 2016-09-15 07:48:35.203119439 -0400 @@ -47,6 +47,7 @@ def _update_maps(): msg = 'command failed: %s (status: %s, %s)' acmd = mm_cfg.POSTFIX_ALIAS_CMD + ' ' + ALIASFILE + dbfile = ALIASFILE + '.db' status = (os.system(acmd) >> 8) & 0xff if status: errstr = os.strerror(status) @@ -59,7 +60,12 @@ errstr = os.strerror(status) syslog('error', msg, vcmd, status, errstr) raise RuntimeError, msg % (vcmd, status, errstr) - + # set permissions to g+w on aliases.db on 1st run + # should get ignored from web interface + username = pwd.getpwuid(os.getuid())[0] + if username == "mail": + if os.path.exists(dbfile): + os.chmod(dbfile, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP) def makelock():