Re: [Mailman-Users] Switching a list to port 443

2018-03-07 Thread Lindsay Haisley
On Tue, 2018-03-06 at 19:25 -0800, Mark Sapiro wrote:
> Or you could just run the script at
>  under withlist for those
> lists you want to change.

Mark, there appears to be a bit of an issue with this script.  I've
changed the DEFAULT_URL_HOST to "www.fmp.com", and have recently added
add_virtualhost() call for this hostname as well, but after running
this script on several lists it seems that in some circumstances the
URL host is changed to a value of DEFAULT_URL_HOST which was in effect
when the list was created. Using fix_url has no such problems and seems
to fix everything.

I'm not entirely clear on this, and could tinker with it some more
(such as hacking the script to convert back to http) but I've resorted
to just editing mm_cfg.py and using fix_url which seems to do the right
thing.

Example ...

$ withlist -l -r https foo_members
Importing https...
Running https.https()...
Loading list foo_members (locked)
list: Foo_members: changed web_page_url to https://linode.fmp.com/mailman/
Finalizing

linode.fmp.com _was_ the DEFAULT_URL_HOST when the list was set up (but
not when 'withlist -r https ..' was run), but the list was explicitly
set up with newlist using a URL with "fmp.com" or "www.fmp.com" and
worked well. My wife admins the list and has had no problems. I would
_certainly_ have heard about it if she'd had to do a double login,
which would have been the case had "linode.fmp.com" been part of the
web_page_url when she worked on it.

Sorry I can't put more arms and legs on this problem. This is a
production server so the _real_ lists have to be converted quickly and
cleanly. I'll set up some test lists using my sandbox domain name and
see if I can pin the issue down. I didn't have add_virtualhost() method
calls for "fmp.com" and "www.fmp.com" _when the list was created_, so
the web_page_url may have been overwritten with the DEFAULT_URL_HOST in
effect at that time.

-- 
Lindsay Haisley   | "Real programmers use butterflies"
FMP Computer Services |
512-259-1190  |   - xkcd
http://www.fmp.com|

--
Mailman-Users mailing list Mailman-Users@python.org
https://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: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Switching a list to port 443

2018-03-07 Thread Mark Sapiro
On 03/07/2018 08:29 AM, Lindsay Haisley wrote:
> On Tue, 2018-03-06 at 19:25 -0800, Mark Sapiro wrote:
>> Or you could just run the script at
>>  under withlist for those
>> lists you want to change.
> 
> Mark, there appears to be a bit of an issue with this script.  I've
> changed the DEFAULT_URL_HOST to "www.fmp.com", and have recently added
> add_virtualhost() call for this hostname as well, but after running
> this script on several lists it seems that in some circumstances the
> URL host is changed to a value of DEFAULT_URL_HOST which was in effect
> when the list was created. Using fix_url has no such problems and seems
> to fix everything.


I don't think that has anything to do with the script itself. All the
script does is change any occurrence of 'http:' to 'https:' in a list's
web_page_url.

The most likely explanation for what you observed is you never ran
fix_url on the affected lists after you changed DEFAULT_URL_HOST to
"www.fmp.com" so their web_page_url attribute still had the prior domain.

-- 
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
https://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: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Switching a list to port 443

2018-03-07 Thread Lindsay Haisley
On Wed, 2018-03-07 at 08:40 -0800, Mark Sapiro wrote:
> The most likely explanation for what you observed is you never ran
> fix_url on the affected lists after you changed DEFAULT_URL_HOST to
> "www.fmp.com" so their web_page_url attribute still had the prior
> domain.

I suppose it's possible, and certainly it was a misconfig on my part to
_not_ have an add_virtualhost call for "www.fmp.com". The web_page_url
in effect, though, seems to have been the one set with 
--urlhost when newlist was invoked to create the list, and after
running https.py the absence of an appropriate add_virtualhost() came
to the fore and the web_page_url was rewritten using the old
DEFAULT_URL_HOST, even though I'd added a proper add_virtualhost() by
the time I ran https.py.

Interesting, but not serious since the issue was identified and
remedied here in pretty short order :)

-- 
Lindsay Haisley   |  "Humor will get you through times of no humor
FMP Computer Services |  better than no humor will get you through
512-259-1190  | times of humor."
http://www.fmp.com|- Butch Hancock

--
Mailman-Users mailing list Mailman-Users@python.org
https://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: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


[Mailman-Users] HELP! Just broke Mailman with a bogus list.

2018-03-07 Thread The Mailing List Server Admin

I just added a new list where I wanted to experiment with the
topics feature.  But after adding the list, the list_lists
utility no longer works:


Traceback (most recent call last):
  File "/home/mladmin/Util/MM2/list_lists", line 130, in 
main()
  File "/home/mladmin/Util/MM2/list_lists", line 100, in main
mlist = MailList.MailList(n, lock=0)
  File "/usr/local/mailman/Mailman/MailList.py", line 131, in
  __init__
self.Load()
  File "/usr/local/mailman/Mailman/MailList.py", line 698, in
  Load
self.CheckValues()
  File "/usr/local/mailman/Mailman/MailList.py", line 780, in
  CheckValues
for name, pattern, desc, emptyflag in self.topics:
ValueError: too many values to unpack


And when I tried to delete the list, I got a similar error:


$ ~mailman/bin/rmlist test.list.topics
Not removing archives.  Reinvoke with -a to remove them.
Traceback (most recent call last):
  File "/usr/local/mailman/bin/rmlist", line 161, in 
main()
  File "/usr/local/mailman/bin/rmlist", line 116, in main
mlist = MailList.MailList(listname, lock=0)
  File "/usr/local/mailman/Mailman/MailList.py", line 131, in
__init__
self.Load()
  File "/usr/local/mailman/Mailman/MailList.py", line 698, in
Load
self.CheckValues()
  File "/usr/local/mailman/Mailman/MailList.py", line 780, in
CheckValues
for name, pattern, desc, emptyflag in self.topics:
ValueError: too many values to unpack


I am assuming it is this last list that I added that is causing
the problem.  How can I back this out without using the rmlist
utility?

Using Mailman version: 2.1.20

--
  Cordially,
  the UNH Mailing List Server Admins
  Bill Costa, Adjunct Admin
  (603) 862-3056
--
Mailman-Users mailing list Mailman-Users@python.org
https://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: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] Switching a list to port 443

2018-03-07 Thread Mark Sapiro
On 03/07/2018 09:18 AM, Lindsay Haisley wrote:
> 
> I suppose it's possible, and certainly it was a misconfig on my part to
> _not_ have an add_virtualhost call for "www.fmp.com". The web_page_url
> in effect, though, seems to have been the one set with 
> --urlhost when newlist was invoked to create the list, and after
> running https.py the absence of an appropriate add_virtualhost() came
> to the fore and the web_page_url was rewritten using the old
> DEFAULT_URL_HOST, even though I'd added a proper add_virtualhost() by
> the time I ran https.py.


whatever did it, it wasn't the script at
. The only thing that script
does is change 'http:' to 'https:' in a list's web_page_url and report
the new value. It doesn't touch the domain.

-- 
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
https://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: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] HELP! Just broke Mailman with a bogus list.

2018-03-07 Thread Mark Sapiro
On 03/07/2018 10:31 AM, The Mailing List Server Admin wrote:
> I just added a new list where I wanted to experiment with the
> topics feature.  But after adding the list, the list_lists
> utility no longer works:
> 
>> Traceback (most recent call last):
>>   File "/home/mladmin/Util/MM2/list_lists", line 130, in 
>>     main()
>>   File "/home/mladmin/Util/MM2/list_lists", line 100, in main
>>     mlist = MailList.MailList(n, lock=0)
>>   File "/usr/local/mailman/Mailman/MailList.py", line 131, in
>>   __init__
>>     self.Load()
>>   File "/usr/local/mailman/Mailman/MailList.py", line 698, in
>>   Load
>>     self.CheckValues()
>>   File "/usr/local/mailman/Mailman/MailList.py", line 780, in
>>   CheckValues
>>     for name, pattern, desc, emptyflag in self.topics:
>> ValueError: too many values to unpack


It is not clear what went wrong or how or why, but there is bad data in
this list's topics attribute.

To "fix" the problem just move the lists/LISTNAME directory containing
the config.pck and perhaps a few other files out of the lists/ directory.

However, I would be interested in knowing what's wrong and how it
happened. Unfortunately, this issue probably prevents even running
withlist on this list. I.e., Mailman's 'bin/withlist LISTNAME' will
probably throw the same error.

You could help me however by sending me off list the
lists/LISTNAME/config.pck and lists/LISTNAME/config.pck.last files, and
also, if you can recall, telling what you entered in the list's topics
that precipitated this.

-- 
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
https://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: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


[Mailman-Users] User unknown error on gentoo

2018-03-07 Thread Alexander
Without including my domain explicitly under mydestination all virtual 
accounts work successfully, however mailman reports user unknown


Results in mailman list user unknown error
mydomain = XXX.com
mydestination = $myhostname, localhost.$mydomain, localhost

As suggested here 
(https://forums.gentoo.org/viewtopic-t-134833-start-0.html) I added the 
domain explicitly

mydomain = XXX.com
mydestination = $myhostname, localhost.$mydomain, localhost, XXX.com

Now mailman works, but all virtual users are rejected with unknown user

Any suggestion on how to support both vitual users and mailman lists.

So far I have included the following settings and verified the content 
of hte alias databases is correct:


alias_database = hash:/etc/mail/aliases, hash:/var/lib/mailman/data/aliases
alias_maps = hash:/etc/mail/aliases, hash:/var/lib/mailman/data/aliases
virtual_alias_maps = pgsql:/etc/postfix/pgsql_virtual_alias_maps.cf, 
hash:/var/lib/mailman/data/virtual-mailman


Thanks in advance

--
Mailman-Users mailing list Mailman-Users@python.org
https://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: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] User unknown error on gentoo

2018-03-07 Thread Mark Sapiro
On 03/07/2018 09:26 PM, Alexander wrote:
> Without including my domain explicitly under mydestination all virtual
> accounts work successfully, however mailman reports user unknown
> 
> Results in mailman list user unknown error
> mydomain = XXX.com
> mydestination = $myhostname, localhost.$mydomain, localhost
> 
> As suggested here
> (https://forums.gentoo.org/viewtopic-t-134833-start-0.html) I added the
> domain explicitly
> mydomain = XXX.com
> mydestination = $myhostname, localhost.$mydomain, localhost, XXX.com
> 
> Now mailman works, but all virtual users are rejected with unknown user
> 
> Any suggestion on how to support both vitual users and mailman lists.


Please post the output from 'postconf -n'. Also specific Postfix log
messages might be helpful. as well as a sample of the content of
/var/lib/mailman/data/virtual-mailman

If XXX.com is a virtual_alias_domain or a virtual_mailbox_domain, it
shouldn't be in my_destination.

If you have XXX.com in virtual_alias_domains and your list addresses are
mapped from lisn...@xxx.com to listname in virtual-mailman, it should
work. What is the Postfix error message in this case?

-- 
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
https://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: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] User unknown error on gentoo

2018-03-07 Thread Alexander
On 08/03/2018 13:53, Mark Sapiro wrote:> On 03/07/2018 09:26 PM, 
Alexander wrote:

>> Without including my domain explicitly under mydestination all virtual
>> accounts work successfully, however mailman reports user unknown
>>
>> Results in mailman list user unknown error
>> mydomain = XXX.com
>> mydestination = $myhostname, localhost.$mydomain, localhost
>>
>> As suggested here
>> (https://forums.gentoo.org/viewtopic-t-134833-start-0.html) I added the
>> domain explicitly
>> mydomain = XXX.com
>> mydestination = $myhostname, localhost.$mydomain, localhost, XXX.com
>>
>> Now mailman works, but all virtual users are rejected with unknown user
>>
>> Any suggestion on how to support both vitual users and mailman lists.
>
> Please post the output from 'postconf -n'. Also specific Postfix log
> messages might be helpful.

postconf -n |grep mailman
alias_database = hash:/etc/mail/aliases, hash:/var/lib/mailman/data/aliases
alias_maps = hash:/etc/mail/aliases, hash:/var/lib/mailman/data/aliases
virtual_alias_maps = pgsql:/etc/postfix/pgsql_virtual_alias_maps.cf, 
hash:/var/lib/mailman/data/virtual-mailman


postconf -n |grep virtual
virtual_alias_maps = pgsql:/etc/postfix/pgsql_virtual_alias_maps.cf, 
hash:/var/lib/mailman/data/virtual-mailman

virtual_gid_maps = static:1001
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = pgsql:/etc/postfix/pgsql_virtual_domains_maps.cf
virtual_mailbox_limit = 5120
virtual_mailbox_maps = pgsql:/etc/postfix/pgsql_virtual_mailbox_maps.cf
virtual_transport = virtual
virtual_uid_maps = static:1001

> as well as a sample of the content of 
/var/lib/mailman/data/virtual-mailman# STANZA START: mailman

# CREATED: Thu Feb 22 22:07:59 2018
mail...@xxx.com  mail...@xxx.com
mailman-ad...@xxx.com    mailman-ad...@xxx.com
mailman-boun...@xxx.com  mailman-boun...@xxx.com
mailman-conf...@xxx.com  mailman-conf...@xxx.com
mailman-j...@xxx.com mailman-j...@xxx.com
mailman-le...@xxx.com    mailman-le...@xxx.com
mailman-ow...@xxx.com    mailman-ow...@xxx.com
mailman-requ...@xxx.com  mailman-requ...@xxx.com
mailman-subscr...@xxx.com    mailman-subscr...@xxx.com
mailman-unsubscr...@xxx.com  mailman-unsubscr...@xxx.com
# STANZA END: mailman

# STANZA START: 704staff
# CREATED: Thu Feb 22 22:07:59 2018
704st...@xxx.com  704st...@xxx.com
704staff-ad...@xxx.com    704staff-ad...@xxx.com
704staff-boun...@xxx.com  704staff-boun...@xxx.com
704staff-conf...@xxx.com  704staff-conf...@xxx.com
704staff-j...@xxx.com 704staff-j...@xxx.com
704staff-le...@xxx.com    704staff-le...@xxx.com
704staff-ow...@xxx.com    704staff-ow...@xxx.com
704staff-requ...@xxx.com  704staff-requ...@xxx.com
704staff-subscr...@xxx.com    704staff-subscr...@xxx.com
704staff-unsubscr...@xxx.com  704staff-unsubscr...@xxx.com
# STANZA END: 704staff

>
> If XXX.com is a virtual_alias_domain or a virtual_mailbox_domain, it 
shouldn't be in my_destination.XXX.com is used for both local system 
accounts as well as virtual accounts.


virtual_mailbox_domains contains XXX.com.

> If you have XXX.com in virtual_alias_domains and your list addresses are
> mapped from lisn...@xxx.com to listname in virtual-mailman, it should
> work. What is the Postfix error message in this case?

The bounce back reports:
<704st...@xxx.com>: unknown user: "704st...@xxx.com"

And the log reports:
postfix/virtual[16361]: 45CCE460281: to=<704st...@xxx.com>, 
relay=virtual, delay=0.16, delays=0.09/0.01/0/0.07, dsn=5.1.1, 
status=bounced (unknown user: "704st...@xxx.com")






>

--
Mailman-Users mailing list Mailman-Users@python.org
https://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: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org


Re: [Mailman-Users] User unknown error on gentoo

2018-03-07 Thread Mark Sapiro
On 03/07/2018 11:34 PM, Alexander wrote:
> On 08/03/2018 13:53, Mark Sapiro wrote:> On 03/07/2018 09:26 PM,

>> as well as a sample of the content of
> /var/lib/mailman/data/virtual-mailman# STANZA START: mailman
> # CREATED: Thu Feb 22 22:07:59 2018
> mail...@xxx.com  mail...@xxx.com
> mailman-ad...@xxx.com    mailman-ad...@xxx.com
> mailman-boun...@xxx.com  mailman-boun...@xxx.com
> mailman-conf...@xxx.com  mailman-conf...@xxx.com
> mailman-j...@xxx.com mailman-j...@xxx.com
> mailman-le...@xxx.com    mailman-le...@xxx.com
> mailman-ow...@xxx.com    mailman-ow...@xxx.com
> mailman-requ...@xxx.com  mailman-requ...@xxx.com
> mailman-subscr...@xxx.com    mailman-subscr...@xxx.com
> mailman-unsubscr...@xxx.com  mailman-unsubscr...@xxx.com
> # STANZA END: mailman
> 
> # STANZA START: 704staff
> # CREATED: Thu Feb 22 22:07:59 2018
> 704st...@xxx.com  704st...@xxx.com
> 704staff-ad...@xxx.com    704staff-ad...@xxx.com
> 704staff-boun...@xxx.com  704staff-boun...@xxx.com
> 704staff-conf...@xxx.com  704staff-conf...@xxx.com
> 704staff-j...@xxx.com 704staff-j...@xxx.com
> 704staff-le...@xxx.com    704staff-le...@xxx.com.
> 704staff-ow...@xxx.com    704staff-ow...@xxx.com
> 704staff-requ...@xxx.com  704staff-requ...@xxx.com
> 704staff-subscr...@xxx.com    704staff-subscr...@xxx.com
> 704staff-unsubscr...@xxx.com  704staff-unsubscr...@xxx.com
> # STANZA END: 704staff


I think this is the issue. It appears you have set

VIRTUAL_MAILMAN_LOCAL_DOMAIN = 'XXX.com'

in mm_cfg.py. This is wrong. It is usually OK to not set this in
mm_cfg.py and leave it at the default None, but if you have to set it,
you need to set it to something in mydestination such as 'localhost'.
I.e. it MUST be a local domain, not a virtual domain.

-- 
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
https://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: 
https://mail.python.org/mailman/options/mailman-users/archive%40jab.org