"Error: Unknown virtual host" trying to create new list from web UI
![](https://secure.gravatar.com/avatar/d40b752ab6f610466f4c2f15bbf3c594.jpg?s=120&d=mm&r=g)
Hi all,
I'm running mailman 2.1.x. I haven't had need to create a new list in years, but now I need to. Trying to do so from the web UI here: <https://mail.rogue-research.com/mailman/create>
results in: "Error: Unknown virtual host: mail.rogue-research.com".
After searching for this, I now have a partial understanding of the problem.
In my Defaults.py I see:
DEFAULT_EMAIL_HOST = 'foo.rogue-research.com' DEFAULT_URL_HOST = 'foo.rogue-research.com' DEFAULT_URL_PATTERN = 'http://%s/mailman/'
foo is the real hostname of the machine. I guess that's how it ended up there? After reading the comments in that file and FAQ 4.29, I *think* the correct solution is to append the following 5 lines to my mm_cfg.py:
DEFAULT_EMAIL_HOST = 'rogue-research.com' DEFAULT_URL_HOST = 'mail.rogue-research.com' DEFAULT_URL_PATTERN = 'https://%s/mailman/' VIRTUAL_HOSTS.clear() add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
Is that correct?
Many thanks,
Sean
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 7/29/20 10:24 PM, Sean McBride wrote:
After reading the comments in that file and FAQ 4.29, I *think* the correct solution is to append the following 5 lines to my mm_cfg.py:
DEFAULT_EMAIL_HOST = 'rogue-research.com' DEFAULT_URL_HOST = 'mail.rogue-research.com' DEFAULT_URL_PATTERN = 'https://%s/mailman/' VIRTUAL_HOSTS.clear() add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
Is that correct?
Yes, that looks good.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/d40b752ab6f610466f4c2f15bbf3c594.jpg?s=120&d=mm&r=g)
On Wed, 29 Jul 2020 22:42:23 -0700, Mark Sapiro said:
On 7/29/20 10:24 PM, Sean McBride wrote:
After reading the comments in that file and FAQ 4.29, I *think* the
correct solution is to append the following 5 lines to my mm_cfg.py:
DEFAULT_EMAIL_HOST = 'rogue-research.com' DEFAULT_URL_HOST = 'mail.rogue-research.com' DEFAULT_URL_PATTERN = 'https://%s/mailman/' VIRTUAL_HOSTS.clear() add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
Is that correct?
Yes, that looks good.
Thanks!
So that got me further. Then I got "We're sorry, we hit a bug!" The error logs showed a permission error. So I ran check_perms -f
and it found and fixed ~5000 permission errors that somehow existed.
But now I try to create the list again, but it says "Error: List already exists". I fear it's only half-created. Is the best thing to do now delete the list and recreate it?
(Congrats on having great docs BTW, they had just about all the info I needed!)
Cheers,
Sean
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 7/30/20 9:34 AM, Sean McBride wrote:
So that got me further. Then I got "We're sorry, we hit a bug!" The error logs showed a permission error. So I ran
check_perms -f
and it found and fixed ~5000 permission errors that somehow existed.But now I try to create the list again, but it says "Error: List already exists". I fear it's only half-created. Is the best thing to do now delete the list and recreate it?
I suspect the permissions issue may have been in doing the MTA task, so
if you have "MTA = 'Postfix'" in mm_cfg.py, your data/aliases(.db)
didn't get updated. You can run bin/genaliases
to fix that.
I think the list is OK. You should check that you have the directories and files
archives/private/LISTNAME/ archives/private/LISTNAME/index.html archives/private/LISTNAME.mbox/
and if archives are public a symlink
archives/public/LISTNAME -> archives/private/LISTNAME
If you have all that, you're list is fine. If not, you can
rm -r lists/LISTNAME
or
bin/rmlist -a LISTNAME
and start over.
(Congrats on having great docs BTW, they had just about all the info I needed!)
Thanks, and thanks for reading them.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
![](https://secure.gravatar.com/avatar/d40b752ab6f610466f4c2f15bbf3c594.jpg?s=120&d=mm&r=g)
On Thu, 30 Jul 2020 10:21:55 -0700, Mark Sapiro said:
I suspect the permissions issue may have been in doing the MTA task, so if you have "MTA = 'Postfix'" in mm_cfg.py, your data/aliases(.db) didn't get updated. You can run
bin/genaliases
to fix that.
I ran it and it output nothing.
I think the list is OK. You should check that you have the directories and files
archives/private/LISTNAME/ archives/private/LISTNAME/index.html archives/private/LISTNAME.mbox/
I had only index.html.
bin/rmlist -a LISTNAME
That did it! It recreated fine. Yay. Thanks.
I noticed that X-BeenThere on this new list is now foobar@rogue-research.com instead of foobar@mail.rogue-research.com which I sorta expected due to changing those host variables.
I guess I should now use that fix_url
command to make all my other lists match up. Is that a generally painless experience? :)
Thanks,
Sean
![](https://secure.gravatar.com/avatar/56f108518d7ee2544412cc80978e3182.jpg?s=120&d=mm&r=g)
On 7/30/20 11:56 AM, Sean McBride wrote:
I noticed that X-BeenThere on this new list is now foobar@rogue-research.com instead of foobar@mail.rogue-research.com which I sorta expected due to changing those host variables.
I guess I should now use that
fix_url
command to make all my other lists match up. Is that a generally painless experience? :)
If this list's email host and web page links are what you want, you only need to run
bin/withlist -a -r fix_url -- -v
and it will do all the lists and print what it did.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro
-
Sean McBride