[Bug 250362] mail/mailman3: zope.interface>=5.0 is required

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Dec 13 14:40:29 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250362

Henri Hennebert <hlh at restart.be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hlh at restart.be

--- Comment #19 from Henri Hennebert <hlh at restart.be> ---
After (In reply to Dan Langille from comment #6)

After installing mail/mailman3 and complementing ports as by Dan, here is my
route:

mv /usr/local/mailman /usr/local/mailman2

to be safe:

cd /usr/local
tar cvzf mailman2 mailman2.tgz
chflags schg mailman2.tgz

then

[root at tignes local]# mkdir mailman
[root at tignes local]# chown mailman:mailman mailman
[root at tignes local]# su -l mailman
[mailman at tignes ~]$ pwd
/usr/local/mailman
[mailman at tignes ~]$ ls -a
.       ..
[mailman at tignes ~]$ mailman info
GNU Mailman 3.3.1 (Tom Sawyer)
Python 3.7.9 (default, Oct 26 2020, 11:47:54) 
[Clang 10.0.1 (git at github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611a
config file: None
db url: sqlite:////usr/local/mailman/data/mailman.db
devmode: DISABLED
REST root url: http://localhost:8001/3.1/
REST credentials: restadmin:restpass
[mailman at tignes ~]$ ls -l 
total 45
drwxr-xr-x   2 mailman  mailman   2 Dec 13 14:36 archives
drwxr-xr-x   2 mailman  mailman   2 Dec 13 14:36 cache
drwxr-xr-x   2 mailman  mailman   3 Dec 13 14:36 data
drwxr-xr-x   2 mailman  mailman   3 Dec 13 14:36 etc
drwxr-xr-x   2 mailman  mailman   2 Dec 13 14:36 lists
drwxr-xr-x   2 mailman  mailman   2 Dec 13 14:36 locks
drwxr-xr-x   2 mailman  mailman   7 Dec 13 14:36 logs
drwxr-xr-x   2 mailman  mailman   2 Dec 13 14:36 messages
drwxr-xr-x  14 mailman  mailman  14 Dec 13 14:36 queue
drwxr-xr-x   2 mailman  mailman   2 Dec 13 14:36 templates
[mailman at tignes ~]$ cat etc/mailman.cfg 
# AUTOMATICALLY GENERATED BY MAILMAN ON 2020-12-13 13:36:01 UTC
#
# This is your GNU Mailman 3 configuration file.  You can edit this file to
# configure Mailman to your needs, and Mailman will never overwrite it.
# Additional configuration information is available here:
#
# https://mailman.readthedocs.io/en/latest/src/mailman/config/docs/config.html
#
# For example, uncomment the following lines to run Mailman in developer mode.
#
# [devmode]
# enabled: yes
# recipient: your.address at your.domain
[mailman at tignes ~]$ cat <<EOF >>etc/mailman.cfg 
> [webservice]
> hostname: 127.0.0.1
> port: 8001
> use_https: no
> admin_user: restadmin
> admin_pass: restpass
> api_version: 3.1
> EOF

--- I replace localhost by 127.0.0.1 because I am running with
--- ip6addrctl_policy="ipv6_prefer" in /etc/rc.conf.local and
--- mailman seems to listen on ipv4 only and if i want to
--- be able to user mailmanclient without undue delay...

mailman at tignes ~]$ exit
logout
[root at tignes local]# service mailman start
Starting Mailman's master runner
Generating MTA alias maps

Then I install mail/py-mailmanclient, www/py-django, devel/py-pip.

And then, to avoid modifying the /usr/local/lib/python3.7:

[root at tignes local]# su -l mailman
[mailman at tignes ~]$ pip install postorius
Defaulting to user installation because normal site-packages is not writeable
Collecting postorius
  Downloading postorius-1.3.3.tar.gz (2.7 MB)
     |################################| 2.7 MB 4.9 MB/s 
Collecting django-mailman3>=1.3.3
  Downloading django-mailman3-1.3.4.tar.gz (390 kB)

...

Successfully built postorius django-mailman3 django-allauth cmarkgfm
Installing collected packages: defusedxml, python3-openid, oauthlib,
requests-oauthlib, pyjwt, django-allauth, django-gravatar2, django-mailman3,
webencodings, bleach, cmarkgfm, readme-renderer, postorius
  WARNING: The script pyjwt is installed in '/usr/local/mailman/.local/bin'
which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this
warning, use --no-warn-script-location.
Successfully installed bleach-3.2.1 cmarkgfm-0.5.0 defusedxml-0.6.0
django-allauth-0.44.0 django-gravatar2-1.4.4 django-mailman3-1.3.4
oauthlib-3.1.0 postorius-1.3.3 pyjwt-1.7.1 python3-openid-3.2.0
readme-renderer-28.0 requests-oauthlib-1.3.0 webencodings-0.5.1

[mailman at tignes ~]$ fetch
https://gitlab.com/mailman/postorius/-/archive/master/postorius-master.tar.gz?path=example_project
[mailman at tignes ~]$ tar xvzf postorius-master.tar.gz\?path\=example_project 
x postorius-master-example_project/
x postorius-master-example_project/example_project/
x postorius-master-example_project/example_project/.gitignore
x postorius-master-example_project/example_project/README.rst
x postorius-master-example_project/example_project/__init__.py
x postorius-master-example_project/example_project/logs/
x postorius-master-example_project/example_project/logs/.keep
x postorius-master-example_project/example_project/mailman.cfg
x postorius-master-example_project/example_project/manage.py
x postorius-master-example_project/example_project/settings.py
x postorius-master-example_project/example_project/test_settings.py
x postorius-master-example_project/example_project/urls.py
x postorius-master-example_project/example_project/wsgi.py
[mailman at tignes ~]$ mv postorius-master-example_project/example_project
postorius
[mailman at tignes ~]$ cd postorius
[mailman at tignes postorius]$ 

--- In settings.py I set
--- MAILMAN_REST_API_URL = 'http://127.0.0.1:8001'
--- POSTORIUS_TEMPLATE_BASE_URL = "http://127.0.0.1:8000"
--- same reason as above.

[mailman at tignes postorius]$ python manage.py migrate
Operations to perform:
  Apply all migrations: account, admin, auth, contenttypes, django_mailman3,
openid, postorius, sessions, sites, socialaccount
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying account.0001_initial... OK
  Applying account.0002_email_max_length... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK

...

  Applying sites.0002_alter_domain_unique... OK
  Applying socialaccount.0001_initial... OK
  Applying socialaccount.0002_token_max_lengths... OK
  Applying socialaccount.0003_extra_data_default_dict... OK

[mailman at tignes postorius]$ python manage.py createsuperuser
Username (leave blank to use 'mailman'): 
Email address: postmaster at restart.be
Password: 
Password (again): 
This password is too short. It must contain at least 8 characters.
This password is too common.
Bypass password validation and create user anyway? [y/N]: y
Superuser created successfully.

[mailman at tignes postorius]$ python manage.py runserver
INFO: Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
December 13, 2020 - 14:19:12
Django version 2.2.17, using settings 'settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

And now I have access to the web interface:

http://127.0.0.1:8000

Then I create a list and then convert the mailman2 config with:

[mailman at tignes postorius]$ cd
[mailman at tignes ~]$ mailman import21 xxxx at example.com
/usr/local/mailman2/lists/xxxx

And now I can wait for the official ports with mail mailman running...


Henri

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list