Re: [Mailman-Users] Lists created via web admin seem to beentirelyseparate from lists created from command line

2012-03-13 Thread Mark Leone

Web create is apparently creating lists because it either creates the
list or returns an error. If it succeeds, the list's
lists/LISTNAME/config.pck file is created somewhere.


You know the great thing about the Internet is that when you do 
something dumb, you get to share it with lots of other people, and have 
them join you in running in the circles you created. You cracked the 
code. I was hitting an entirely different web server. I set up Mailman 
and Postfix on my wife's Mac originally, and before I got the two 
working together I decided to host them on my Ubuntu system instead. I 
have two NAT'd ports for web access, going to the Mac and the Ubuntu 
system, and guess which one I was hitting until now. When I go to the 
right port, I see all the lists and users I created previously.


Sorry for the error, but at least I learned some things about 
Mailman-Postfix interop. And I appreciate your help.


-Mark
--
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Lists created via web admin seem to beentirelyseparate from lists created from command line

2012-03-13 Thread Mark Sapiro
On 3/13/2012 3:52 PM, Mark Leone wrote:
> 
> So then the remaining question is which mailman is postfix invoking? In the
> postfix log file, when an e-mail comes in, I see
> 
> Mar 13 17:24:59 mal-s5610f postfix/pipe[20980]: 1F8E618006D:
> to=, relay=mailman, delay=0.33,
> delays=0.12/0.01/0/0.2, dsn=2.0.0, status=sent (delivered via mailman
> service)
> 
> I don't think that tells us the location, so I then looked at the script
> being invoked via the master.cf entry (the unsupported file
> postfix-to-mailman.py). I'm not a python programmer, but I understand the
> basics. So I'm not sure I correctly resolved the location of the mailman
> executable. What I see is
> 
> import paths
> mm_pgm = os.path.join(paths.prefix, 'mail', 'mailman')


The paths.py that is being imported is in the same directory as
postfix_to_mailman.py, i.e., /usr/lib/mailman/bin/paths.py


> I don't see any reference to module paths in the python API, so I'm assuming
> that's a custom module, and that the line above is resolving the path
> mail/mailman relative to the path pointed to by the mailman config variable
> 'prefix'. If this is so, then that's 'var/lib/mailman' as that's the value
> set for 'prefix' in Defaults.py, and it's not overridden in mm_cfg.py. (As
> an aside, I put in some print and sys.stderr.write statements to get the
> value of paths.prefix, thinking they would show up in either postfix or
> mailman log files, but they do not.)


It's the value of prefix defined in /usr/lib/mailman/bin/paths.py, but
we know that's the same as used by bin/newlist.

We also know that Mailman and Postfix are working together. It's only
the web UI that's not working.


> So if my assumption above is correct, then both postfix and apache are
> pointing to the same instance of mailman. And when I create a list from the
> command line I use /var/lib/mailman/bin/newlist, which is a sym link to
> /usr/lib/mailman/bin/newlist, so this is also the same mailman instance.
> 
> So perhaps my assumption above can be corrected? One other thing I'm going
> to try is checking whether apache is configured to allow following of sym
> links for the ScriptAlias location. The wrapper executables there are not
> sym links, but they're pointing to the python scripts they execute via sym
> links, so perhaps I need the option enabled for following sym links.
> Otherwise the mystery remains.


Web create is apparently creating lists because it either creates the
list or returns an error. If it succeeds, the list's
lists/LISTNAME/config.pck file is created somewhere.

-- 
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan

--
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Lists created via web admin seem to beentirelyseparate from lists created from command line

2012-03-13 Thread Mark Sapiro
On 3/13/2012 3:52 PM, Mark Leone wrote:
> 
> This surprises me because when I create a list using the web interface, its
> file does not appear in /var/lib/mailman/lists (or anywhere). The list files
> only appear in that directory when I create them from the command line. But
> the above seems to indicate that the web app is pointing to the same mailman
> instance where the scripts eventually get written.


So are you even getting to the web server on this machine? Check your
DNS. Check the Apache logs on this machine to see if you are even
accessing this Apache.

-- 
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan

--
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Lists created via web admin seem to beentirelyseparate from lists created from command line

2012-03-13 Thread Mark Leone
> >
> >mailman   unix  -   n   n   -   -   pipe
> >   flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
> >   ${nexthop} ${user}
> >
> >Per man page for master(5) this is supposed to mean that executabe
> >'mailman' is present relative to the path specified by postfix param
> >queue_directory. The value of that variable (as determined by running
> >postconf queue_directory) is /var/spool/postfix. There is no
> executable
> >named 'mailman' at that location, so I'm not clear on how postfix is
> >invoking mailman on incoming mail, but that seems to be where the
> >problem lies.
> 
> 
> The above master.cf entry defines a 'mailman' transport that pipes mail
> to the script at /usr/lib/mailman/bin/postfix-to-mailman.py. Assuming
> that is how mail is being delivered to Mailman (you can verify this
> from the Postfix log entries), you should be able to see what
> installation it is pointing to be just reading it. I don't think I have
> ever seen the Debian/Ubuntu version of this (officially unsupported -
> how many times have I written that this week?) script, but the one I
> have has a configuration setting on the 4th line like
> 
> MailmanHome = "/var/mailman"; # Mailman home directory.
> 

Thanks for all the info. I've narrowed down the locations, but I'm still not
quite there.

I updated the locate database, and then using locate and find, I see that
the only place any lists are defined is at /var/lib/mailman/lists

The wrapper executables in  the directory pointed to by apache's ScriptAlias
for /mailman are pointing to /var/lib/mailman/scripts. However, that
location is actually a sym link pointing to /usr/lib/mailman/scripts (which
is where you said you expected them to be)

This surprises me because when I create a list using the web interface, its
file does not appear in /var/lib/mailman/lists (or anywhere). The list files
only appear in that directory when I create them from the command line. But
the above seems to indicate that the web app is pointing to the same mailman
instance where the scripts eventually get written.

So then the remaining question is which mailman is postfix invoking? In the
postfix log file, when an e-mail comes in, I see

Mar 13 17:24:59 mal-s5610f postfix/pipe[20980]: 1F8E618006D:
to=, relay=mailman, delay=0.33,
delays=0.12/0.01/0/0.2, dsn=2.0.0, status=sent (delivered via mailman
service)

I don't think that tells us the location, so I then looked at the script
being invoked via the master.cf entry (the unsupported file
postfix-to-mailman.py). I'm not a python programmer, but I understand the
basics. So I'm not sure I correctly resolved the location of the mailman
executable. What I see is

import paths
mm_pgm = os.path.join(paths.prefix, 'mail', 'mailman')

I don't see any reference to module paths in the python API, so I'm assuming
that's a custom module, and that the line above is resolving the path
mail/mailman relative to the path pointed to by the mailman config variable
'prefix'. If this is so, then that's 'var/lib/mailman' as that's the value
set for 'prefix' in Defaults.py, and it's not overridden in mm_cfg.py. (As
an aside, I put in some print and sys.stderr.write statements to get the
value of paths.prefix, thinking they would show up in either postfix or
mailman log files, but they do not.)

So if my assumption above is correct, then both postfix and apache are
pointing to the same instance of mailman. And when I create a list from the
command line I use /var/lib/mailman/bin/newlist, which is a sym link to
/usr/lib/mailman/bin/newlist, so this is also the same mailman instance.

So perhaps my assumption above can be corrected? One other thing I'm going
to try is checking whether apache is configured to allow following of sym
links for the ScriptAlias location. The wrapper executables there are not
sym links, but they're pointing to the python scripts they execute via sym
links, so perhaps I need the option enabled for following sym links.
Otherwise the mystery remains.

-Mark





--
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Lists created via web admin seem to beentirelyseparate from lists created from command line

2012-03-13 Thread Mark Sapiro
Mark Leone wrote:

>Yes the ScriptAlias is pointing to /usr/lib/cgi-bin/. At that location I 
>see the mailman executables which correspond to the various web 
>functions, as expected. I searched for other instances of these same 
>executables using locate,


Is your locate index up to date?

Search for files named config.pck. See if there is more than one lists/
directory containing things like lists/LISTNAME/config.pck.
Preferrably use 'find / -name config.pck'.


>and all I found was a location where three 
>executables with the same name (admin, confirm, and subscribe) at 
>/var/lib/mailman/scripts. I don't know if these locations are equivalent 
>or not.


The files in /usr/lib/cgi-bin/ are compiled binary wrappers (so they
can be SETGID) that do nothing more than validate the real GID and
then invoke the python script. I am however surprised that the scripts
are in /var and not /usr.

If you do 'strings' on the files in /usr/lib/cgi-bin/, you should see
the path to the scripts directory they're using. E.g.

[mark@sbh16 ~]$ strings mmp/cgi-bin/admin | grep scripts
/usr/local/mailman/scripts/


>These are the locations where the Ubuntu ppa installer placed them. I 
>realize this list is not the place to ask about Ubuntu-specific 
>installation, but I haven't received a reply on the Ubuntu forum so far.
>
>I need to see where postfix is pointing. As I understand it, it's the 
>"mailman" entry in postfix's master.cf that determines this. There I 
>have the entry as specified in the mailman documentation:
>
>mailman   unix  -   n   n   -   -   pipe
>   flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
>   ${nexthop} ${user}
>
>Per man page for master(5) this is supposed to mean that executabe 
>'mailman' is present relative to the path specified by postfix param 
>queue_directory. The value of that variable (as determined by running 
>postconf queue_directory) is /var/spool/postfix. There is no executable 
>named 'mailman' at that location, so I'm not clear on how postfix is 
>invoking mailman on incoming mail, but that seems to be where the 
>problem lies.


The above master.cf entry defines a 'mailman' transport that pipes mail
to the script at /usr/lib/mailman/bin/postfix-to-mailman.py. Assuming
that is how mail is being delivered to Mailman (you can verify this
from the Postfix log entries), you should be able to see what
installation it is pointing to be just reading it. I don't think I
have ever seen the Debian/Ubuntu version of this (officially
unsupported - how many times have I written that this week?) script,
but the one I have has a configuration setting on the 4th line like

MailmanHome = "/var/mailman"; # Mailman home directory.

-- 
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan

--
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org