Re: Setting up Mailman3 under Debian (using packages)

2022-07-08 Thread Matthias Scheler


Hello,

[Sorry for the delayed response. I only got around to try this out now.]

On Fri, Jul 01, 2022 at 09:35:33PM +0200, Pierre-Elliott Bécue wrote:
> > Using the Debian 10 packages I can get to a point where the web interface
> > is up and running and I get to a login prompt. But I have no idea how
> > to setup the admin account or how to change the admin password if
> > an admin account has automatically been created.
> >
> > Any advise would be appreciated.
> >
> > Thanks in advance
> 
> The web UI is a django application. During the installation of the
> mailman3-web package, you should have been prompted to give the
> postorius superuser password.

That doesn't happen on my system. I've completely wiped any traces
of Djano (including config) and installed "mailman3-full" which
also installed "mailman3-web". I got prompted twice for the database
that I want to use (I chose "sqlite" both times) but I was never
asked for a super password.

And the "python3-django-postorius" definitely got installed:

Setting up python3-django-mailman3 (1.2.0-3) ...
Setting up python3-django-postorius (1.2.4-1+deb10u1) ...
Setting up python3-django-hyperkitty (1.2.2-1+deb10u1) ...
Setting up mailman3-web (0+20180916-8) ...
dbconfig-common: writing config to 
/etc/dbconfig-common/mailman3-web.conf

> If you have deactivated debconf or provided an empty password, then no
> superuser has been created.

I've not deactivated "debconf" as the prompts for the database prove.
But there is no prompt for the super user password.

> In that case, you can use django-admin binary command to set a superuser
> password.
> 
> See /usr/share/doc/mailman3-web/README.Debian.gz for more intel.

Running "dpkg-reconfigure mailman3-web" manually gave me the dialog
for setting up the Postorius admin user.

Kind regards

-- 
Matthias Scheler  http://zhadum.org.uk/



Re: Setting up Mailman3 under Debian (using packages)

2022-07-01 Thread Andy Smith
Hi,

On Fri, Jul 01, 2022 at 07:23:18PM +0100, Matthias Scheler wrote:
> I'm trying to migrate the mailing lists on my server from legacy Mailan to
> Mailman 3 to be able to finally update the system from Buster to Bullseye.
> I've found guides how to migrate the configuration and lists but I haven't
> found a guide how to complete the basic installation on Debian.

I've just done this in the last couple of weeks in order to move
away from Mailman 2, but I did it to a new bullseye host.

Some thoughts and experiences:

- MM3 is a complex app with the web side being another complex
  Django app. I personally would not try to install this from
  packages onto Debian 10. I would go to Debian 11 first, because
  otherwise you are installing old stuff and guaranteeing more work
  for the near future. If anything is wrong you will probably be
  told to use a more up to date version. I doubt Debian's mm3
  maintainers have time to be backporting any non-security bug
  fixes.

  In order to move a list from MM2 to MM3 all you need is the
  config.pck and the mbox archive file. You don't need a running MM2
  install.

  It's easier to install onto a new host but if you are going to do
  it in place I think I'd take a backup and uninstall MM2 first,
  upgrade host to bullseye and get everything else sorted, then
  install MM3 and migrate lists in.

- Both mailman3 and mailman3web need a database. The Debian packages
  default to sqlite just to get something that works. This really
  isn't suitable for production use so first thing to do is install
  mariadb or postgres. Don't delay or you'll just have to redo your
  work.

- Debian packages use Whoosh for full text indexing. I am struggling
  with this right now as reindexing it all (which by default
  mailman3web does once per month, and you'll do after importing a
  list archive) takes many many hours and uses lots of memory.

  I had around 200k messages in my archives and it took well over 24
  hours at ~4G memory usage to initially index these messages. I
  just hit the monthly reindex job and I had to kill it after 2 days
  at 100% CPU and 4G memory use.

  I got rid of archives that were never looked at and this reduced
  my message count to ~6k. The monthly job for this has been running
  for 119 minutes so far.

  I've been advised to switch to Xapian instead of Whoosh.

- The documentation in /usr/share/doc/mailman3-web/README.Debian.gz
  and /usr/share/doc/mailman3/README.Debian is good and should be
  read.

- By default uWSGI will be used to connect web server (e.g. Apache
  or nginx) to mailman. I and at least one other person are
  currently seeing a slow memory leak in uWSGI:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014037

  Upstream Mailman3 project have recommended gunicorn instead. I
  haven't yet looked into this.

- The default templates for messages that will be automatically
  sent, e.g. subscription welcome, confirm subscribe, admin notice
  about pending moderation decisions, etc., only invite people to
  use email to interact with Mailman. i.e. they don't have web
  links in them, unlike with Mailman 2.

  This is because, unlike Mailman 2, Mailman 3 can't assume how your
  web interface works or even if you have one at all.

  If you have any even slightly non-technical users they will
  probably want web links, particularly if they have grown used to
  how Mailman 2 worked. You can override the default templates for
  your entire site by creating directory
  /var/lib/mailman3/templates/site/en/ and then putting files like
  "list:user:action:subscribe.txt" in it. The "en" is the language
  code, so use a different two-letter code if yours isn't English.

  The default content of these templates can be seen at:

https://gitlab.com/mailman/mailman/-/tree/master/src/mailman/templates/en

  You can also use list// directory for per-list overrides.

  Tags that you can use in templates:


https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/templates.html#templated-texts

I hope some of that helped.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: Setting up Mailman3 under Debian (using packages)

2022-07-01 Thread Pierre-Elliott Bécue

Matthias Scheler  wrote on 01/07/2022 at 20:23:18+0200:

>   Hello,
>
> I'm trying to migrate the mailing lists on my server from legacy Mailan to
> Mailman 3 to be able to finally update the system from Buster to Bullseye.
> I've found guides how to migrate the configuration and lists but I haven't
> found a guide how to complete the basic installation on Debian.
>
> Using the Debian 10 packages I can get to a point where the web interface
> is up and running and I get to a login prompt. But I have no idea how
> to setup the admin account or how to change the admin password if
> an admin account has automatically been created.
>
> Any advise would be appreciated.
>
> Thanks in advance

The web UI is a django application. During the installation of the
mailman3-web package, you should have been prompted to give the
postorius superuser password.

If you have deactivated debconf or provided an empty password, then no
superuser has been created.

In that case, you can use django-admin binary command to set a superuser
password.

See /usr/share/doc/mailman3-web/README.Debian.gz for more intel.

Cheers!
-- 
PEB


signature.asc
Description: PGP signature


Setting up Mailman3 under Debian (using packages)

2022-07-01 Thread Matthias Scheler


Hello,

I'm trying to migrate the mailing lists on my server from legacy Mailan to
Mailman 3 to be able to finally update the system from Buster to Bullseye.
I've found guides how to migrate the configuration and lists but I haven't
found a guide how to complete the basic installation on Debian.

Using the Debian 10 packages I can get to a point where the web interface
is up and running and I get to a login prompt. But I have no idea how
to setup the admin account or how to change the admin password if
an admin account has automatically been created.

Any advise would be appreciated.

Thanks in advance

-- 
Matthias Scheler  http://zhadum.org.uk/