Postfix.py and aliases (#CREATED:xxx)

Bug #266326 reported by Eawf
2
Affects Status Importance Assigned to Milestone
GNU Mailman
New
Medium
Unassigned

Bug Description

CentOS4.2 Installed Mailman2.1.5 via YUM.
Postfix
Configured Automatic aliases file creation.

When creating list from ./newlist, no problems.
When creating list from web, got bug page, and
discovered an alias entry, "#CREATED:...".

While not being a Python programmer, glancing through
the Postfix.py file, it looks like when looping through
the STANZA section to create the aliases file, the
commented #CREATED: line isn't ignored, causing the
record to be created.

[http://sourceforge.net/tracker/index.php?func=detail&aid=1459022&group_id=103&atid=100103]

Revision history for this message
Mark Sapiro (msapiro) wrote :

Both bin/newlist and the Cgi create script invoke the exact
same Mailman/MTA/Postfix.py module to update the aliases.
The only difference is the user/group under which it runs.
Thus, this is most likely a problem with the 'mailman' group
not having write permission on data/aliases*. Both
data/aliases and data/aliases.db should be group owned by
the 'mailman' group and be group writable.

This may be FAQ 6.9 -
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq06.009.htp

If this is not a permissions issue, please post the
traceback from the "bug" from Mailman's error log.

Note that the "#CREATED:" line in the aliases file is a
comment and is intended to be there.

Revision history for this message
Eawf (eawf) wrote :

Interestingly, when I commented out both of the "CREATED:
print statements, the problem went away.

Only thing I can figure from that is that programmatically,
when creating the aliases file, the commented CREATED: line
is not being ignored or skipped over. Again, glancing
through the code I see checking for the STANZA lines, but
not the CREATED line.

Revision history for this message
Mark Sapiro (msapiro) wrote :

I think the line you're referring to is

    print >> fp, '# CREATED:', time.ctime(time.time())

Which occurs in two places, one for the 'aliases' file and
one for the 'virtual-mailman' file if any. It writes a line like

# CREATED: Wed Mar 29 19:31:24 2006

(with the current date and time) into the file. This line in
the 'aliases' or 'virtual-mailman' file begins with '#' and
thus is a comment in that file just as are the lines

# STANZA START: listname

preceding the # CREATED line and

# STANZA END: listname

following the actual data. Why is this "# CREATED: ..." line
a problem?

Going back to your original issue, what is the traceback
from the "bug" from Mailman's 'error' log?

I don't think this 'bug' has anything to do with the print
statements you commented or with the presence or absence of
the "# CREATED: ..." line in the resultant file.

The "# CREATED: ..." line is documentation. The code that
looks at the "# STANZA: ..." lines is figuring out what to
delete from the files when you delete a list.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.