[Mailman-Users] Mailman with multiple domains

2010-01-29 Thread Guy
Hi,

I've got Mailman up and running and looks good, but I'm not sure about
multiple domains.

mm_cfg.py contains this section:
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['lists.domain2.net']
add_virtualhost('lists.domain2.net', 'domain2.net')

Mail sent to mail...@lists.domain1.net (the default URL and email
hosts are lists.domain1.net) goes through fine, but
mail...@lists.domain2.net disappear once they are passed to mailman by
postfix.
There is nothing in the mailman log files for the attempted delivery
to lists.domain2.net.

I'm using the Ubuntu Karmic package of Mailman which includes
postfix-to-mailman.py, not sure if that effects this.

I believe that mailing lists exist across all virtual domains listed?
Is there any way to allow for the same mailing list on different
domains with one instance of mailman?
So I could have us...@lists.domain1.net AND us...@lists.domain2.net as
two separate lists.

Thanks
Guy

-- 
Don't just do something...sit there!
--
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] Private archive nightmare with vhosts

2010-01-29 Thread UGSD
Mark, 

 I made a 2.1.13 vhost patch a little differently. I made a bazaar 2.1.7
 branch, applied the 2.1.7 vhosts patch, committed the result, did a
 bzr merge from the 2.1.13 branch which produced 5 conflicts, the only
 significant ones being in Mailman/MTA/Utils.py and Mailman/Utils.py,
 and resolved the conflicts.
 
 I am testing with that. This patch is at
 http://www.msapiro.net/mm/2.1.13_vhost.patch if you're interested.
 It is essentially the 2.1.7 patch, but fixed to apply cleanly to
 2.1.13.
 

Thank you for taking a look at this. I really appreciate it.

 
 
 Yes. Really the MailList.Create() method should be patched, but the
 workaround is to add
 
 ACCEPTABLE_LISTNAME_CHARACTERS = '[-+_.=a-z...@]'
 
 to mm_cfg.py. This adds '@' to the default list of acceptable listname
 characters and allows list names with '@' to pass a new (since 2.1.7)
 check in MailList.Create().

Yep, i figured this one out. 

 
 As far as the problems with the archives are concerned, I've tested
 just a bit and I see the problem (but not the solution yet). I think
 part of the problem for me is that the host name in a
 listn...@hostname list cannot be the same as DEFAULT_URL_HOST. I have
 a DNS issue on my test machine that makes it difficult for me to add
 additional host names so that's hampering my testing at the moment.


I got around the DNS issue with /etc/hosts, may not work in your case, i guess




After not being able to create a list, I had another issue (not seen in 2.1.7), 
where the alias file was created in the form of 

lists.domain1.net=list-name-unsubscribe: |/path/to/mailman unsubscribe 
lists.domain1.net=list-name

which mailman did not understand and complained that 
lists.domain1.net=list-name not found.

The problem was in Mailman/MTA/Utils.py and _makealiases_mailprog() function, 
so i just modified it to accept another variable and use it

def _makealiases_mailprog(listname, at_name, internal_listname=None):  --- i 
added at_name

for ext in ('admin', 'bounces', 'confirm', 'join', 'leave', 'owner',
'request', 'subscribe', 'unsubscribe'):
aliases.append(('%s-%s' % (listname, ext),
'|%s %s %s' % (wrapper, ext, at_name)))  --- i 
added at_name


and then change Mailman/MTA/Postfix.py 

for k, v in makealiases(_generate_alias(mlist), listname,   --- added 
listname var here
internal_listname = listname):


This fixed the alias creation. I was able to subscribe to the list, however, i 
was not able to post to the list, because list names were still translated into 
lists.domain1.net=list-name. Tacked it down to the post script in scripts 
folder, and had to modify listname variable in mail()

try:
foo = sys.argv[1]
listname = foo.split('=')
listname.reverse()
listname = '@'.join(listname)

This change allowed me to post, but this is where i hit the same problems as i 
did originally with 2.1.7 install.

So i had to use my mod_rewrite trick, modify Mailman/Cgi/pryvate.py

host = os.environ.get('SERVER_NAME')  - needed to for Utils.maketext()

and 

list_name = listname.split(@)
m_list = list_name[0]
true_filename = os.path.join(
   mm_cfg.PRIVATE_ARCHIVE_FILE_DIR, host, m_list)

and then modify templates/en/private.html and change form action, it it allows 
me to  authenticate private archives.

FORM METHOD=POST ACTION=%(action)s...@%(host)s

 But the issue is more than that. At the moment, I have four lists - two
 lists.listname lists and two lists/msapiro.net/listname lists. All
 four of these appear on the overviews at
 http://msapiro.net/mailman/admin and
 http://msapiro.net/mailman/listinfo with link URLs like
 http://msapiro.net/mailman/admin/listname and
 http://msapiro.net/mailman/listinfo/listname, but only the
 lists/msapiro.net/listname list URLs work. The others give No such
 list listn...@msapiro.net.



Now i was able to see the private archive table of contents, but none of the 
links were functional, so clicking on a link pointing to

http://lists.domain1.net/private/list-n...@lists.domain1.net/2010-January/thread.html
 reloads the page, adding another 2010-Janury in the browser address bar


http://lists.domain1.net/private/list-n...@lists.domain1.net/2010-January/2010-January/thread.html
http://lists.domain1.net/private/list-n...@lists.domain1.net/2010-January/2010-January/2010-January/thread.html

and so on. Unfortunately i haven't been able to get around this issue yet.

 
 
 I will continue to look at this, but if your testing turns up anything,
 let us know.
 

Thanks again, Mark!

-Igor
--
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: 

Re: [Mailman-Users] Mailman with multiple domains

2010-01-29 Thread UGSD

 I believe that mailing lists exist across all virtual domains listed?
 Is there any way to allow for the same mailing list on different
 domains with one instance of mailman?
 So I could have us...@lists.domain1.net AND us...@lists.domain2.net as
 two separate lists.

Currently, out of the box, Mailman shares namespace between virtual domains, so 
you can not
have us...@lists.domain1.net and us...@lists.domain2.net. However, there is a 
vhost patch that 
would allow you to do that, but it would require couple of modifications and 
some apache rewrite rules.

This patch mostly works. Mostly, because there is an issue with viewing 
private, password protected archives,
which i haven't been able to find a work-around for.

For more information check out this thread (it has somewhat detailed 
instructions):

http://mail.python.org/pipermail/mailman-users/2010-January/068543.html


- Igor
--
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] Mailman with multiple domains

2010-01-29 Thread Mark Sapiro
Guy wrote:

I've got Mailman up and running and looks good, but I'm not sure about
multiple domains.

mm_cfg.py contains this section:
POSTFIX_STYLE_VIRTUAL_DOMAINS = ['lists.domain2.net']
add_virtualhost('lists.domain2.net', 'domain2.net')


First of all, the domain(s) in POSTFIX_STYLE_VIRTUAL_DOMAINS are the
email domains, not the web domains ('domain2.net' in this case)


Mail sent to mail...@lists.domain1.net (the default URL and email
hosts are lists.domain1.net) goes through fine, but
mail...@lists.domain2.net disappear once they are passed to mailman by
postfix.


If you are actually mailing to mail...@lists.domain2.net as opposed to
mail...@domain2.net, your add_virtualhost should have
'lists.domain2.net' as it's second argument.


There is nothing in the mailman log files for the attempted delivery
to lists.domain2.net.


What about in Postfix logs?


I'm using the Ubuntu Karmic package of Mailman which includes
postfix-to-mailman.py, not sure if that effects this.


In that case, POSTFIX_STYLE_VIRTUAL_DOMAINS is irrelevant. Do you have
both lists.domain1.net  and lists.domain2.net mapped to the mailman
transport in your transport_maps database?


I believe that mailing lists exist across all virtual domains listed?
Is there any way to allow for the same mailing list on different
domains with one instance of mailman?
So I could have us...@lists.domain1.net AND us...@lists.domain2.net as
two separate lists.


Not with Standard Mailman 2.1.x and not with postfix_to_mailman.py

-- 
Mark Sapiro m...@msapiro.netThe 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] Private archive nightmare with vhosts

2010-01-29 Thread Mark Sapiro
UGSD wrote:

I got around the DNS issue with /etc/hosts, may not work in your case, i guess


Yeah, I can do that too. I've actually created another domain that way,
but I havent gotten back to debugging yet.


After not being able to create a list, I had another issue (not seen in 
2.1.7), where the alias file was created in the form of 

lists.domain1.net=list-name-unsubscribe: |/path/to/mailman unsubscribe 
lists.domain1.net=list-name

which mailman did not understand and complained that 
lists.domain1.net=list-name not found.

The problem was in Mailman/MTA/Utils.py and _makealiases_mailprog() function, 
so i just modified it to accept another variable and use it


I'm not sure where the '=' comes from, and I don't know if this is the
issue, but Mailman/MTA/Utils.py is one of two modules that had a real
conflict when I merged the patches with 2.1.13. The attached
MTA_Utils.py.patch.txt patch is (I think) the proper fix. The secton
at @@ -48,13 +54,12 @@ is where the problem was.

-- 
Mark Sapiro m...@msapiro.netThe highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan

diff -ruN -x'.bzr*' mailman-2.1.13/Mailman/MTA/Utils.py 
vhost/Mailman/MTA/Utils.py
--- mailman-2.1.13/Mailman/MTA/Utils.py 2009-12-22 10:00:43.0 -0800
+++ vhost/Mailman/MTA/Utils.py  2010-01-28 14:16:45.046875000 -0800
@@ -23,6 +23,10 @@
 from Mailman import mm_cfg
 
 
+_extensions = ('admin', 'bounces', 'confirm', 'join', 'leave', 'owner',
+   'request', 'subscribe', 'unsubscribe', )
+
+
 
 def getusername():
 username = os.environ.get('USER') or os.environ.get('LOGNAME')
@@ -35,7 +39,9 @@
 
 
 
-def _makealiases_mailprog(listname):
+def _makealiases_mailprog(listname, internal_listname=None):
+if not internal_listname:
+internal_listname = listname
 wrapper = os.path.join(mm_cfg.WRAPPER_DIR, 'mailman')
 # Most of the list alias extensions are quite regular.  I.e. if the
 # message is delivered to listname-foobar, it will be filtered to a
@@ -48,13 +54,12 @@
 #
 # We escape a few special characters in the list name in the pipe command
 # to avoid characters that might split the pipe into two commands.
-safename = re.sub('([;|`$])', r'\\\1', listname)
+safename = re.sub('([;|`$])', r'\\\1', internal_listname)
 #
 # Seed this with the special cases.
 aliases = [(listname,  '|%s post %s' % (wrapper, safename)),
]
-for ext in ('admin', 'bounces', 'confirm', 'join', 'leave', 'owner',
-'request', 'subscribe', 'unsubscribe'):
+for ext in _extensions:
 aliases.append(('%s-%s' % (listname, ext),
 '|%s %s %s' % (wrapper, ext, safename)))
 return aliases
@@ -71,8 +76,7 @@
 # Note, don't use this unless your MTA leaves the envelope recipient in
 # Delivered-To:, Envelope-To:, or Apparently-To:
 aliases = [(listname, maildir)]
-for ext in ('admin', 'bounces', 'confirm', 'join', 'leave', 'owner',
-'request', 'subscribe', 'unsubscribe'):
+for ext in _extensions:
 aliases.append(('%s-%s' % (listname, ext), maildir))
 return aliases
 
--
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

[Mailman-Users] New mailing list moderation in cPanel ?

2010-01-29 Thread John Fitzsimons

I just made a new mailing list. Moderation of posts seems to be set
as the default, but I am pretty sure that I didn't set that up
anywhere. The member list doesn't show the moderation flag ticked.

In the Privacy options I have By default, should new list member
postings be moderated?  set to No.

I am obviously missing something obvious. Would someone here please
direct me to where member moderation is set/un set in cPanel please ?

Thanks.

Regards, John.
--
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] New mailing list moderation in cPanel ?

2010-01-29 Thread Mark Sapiro
John Fitzsimons wrote:

I am obviously missing something obvious. Would someone here please
direct me to where member moderation is set/un set in cPanel please ?


What is the exact reason for the held post(s)?

-- 
Mark Sapiro m...@msapiro.netThe 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] New mailing list moderation in cPanel ?

2010-01-29 Thread John Fitzsimons
On Fri, 29 Jan 2010 16:37:44 -0800, Mark Sapiro wrote:
 
John Fitzsimons wrote:

I am obviously missing something obvious. Would someone here please
direct me to where member moderation is set/un set in cPanel please ?

What is the exact reason for the held post(s)?

Post by non-member to a members-only list

I hadn't expected that message as I was sure that the person who
posted was already a member. 

Looks like she was a bit fast in posting. Things seem okay now. Thank
you for your help.  :-)


Regards, John.
--
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] New mailing list moderation in cPanel ?

2010-01-29 Thread Stephen J. Turnbull
John Fitzsimons writes:

  Post by non-member to a members-only list
  
  I hadn't expected that message as I was sure that the person who
  posted was already a member. 

The person may have been, but she may have been posting from a
different address.

  Looks like she was a bit fast in posting.

That's the most likely reason, I guess.  But for future reference,
remember that Mailman 2 has no notion of member, only subscribed
address.  Mailman 3 will surely have some way for members to specify
alternative addresses.

And possibly, some way to guess certain variants.  Eg, if
turnb...@sk.domain.tld is subscribed, then
turnb...@shako.sk.domain.tld probably is the same person.  But
Mailman 2 doesn't have it.

I chose that example (real but obfuscated) for a reason.
Specifically, the second variant is today used only by spammers; I
haven't sent a message with that From since 1995, and I doubt it's
been used as Sender more than a very small handful of times since
2000.  So this would have to be an aid to moderators/list owners, not
something one automates.

(I've reported this as a feature request:
https://bugs.launchpad.net/mailman/+bug/514625.)
--
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