Friday 13 September 2019

mailman - mailman3 ui - 'postorius' where is my admin login info getting set?


After many trials and tribulations I have finally installed mailman3 and the Postorius UI for Ubuntu 14.04. I navigate to the 127.0.0.1:8000 just as directed, and the UI says "There are currently no mailing lists." which is correct. I don't have any set up. I visit the "login" link on the top right of the page where it prompts me for a username and password. I don't remember making these in the installation.


So my question is: Where is my login info stored for Postorius? Is there a default value for the login I should be entering?


I have yet to install hyperkitty, that's next on my list.


Just a heads up, I'm very python illiterate. Thanks in advance, Dominic.



Answer



I have completed the setup and would like to share an explanation to save people the time I expended digging around the web trying to install Mailman3.


I first tried to do the Mailmand Bundler install that was found here. Unfortunately, when I finished the install the first time I didn't have the Postorius UI as promised. So I then tried to install all of the components of mailman3 separately, which left me to my original question. I wiped everything and started from scratch and it worked. Here's how I got it all to work.


The most imperative aspect of this install is the two separate versions of python: 2.7 & 3.4. (You will need both installed for this). I had horrific troubles creating two virtualenv's and that was where 60% of my problems were. (Go easy on me, I'm python illiterate).


To create my 2.7 virutalenv (we'll refer to them as venv's), this is the command I used. It will create a folder named 'venv-2.7' that you will 'activate'. Once activated, this is responsible for installing the entire bundle except for the mailman core. (The bundler handles that 'exception' on it's own, so you dont have to worry about that).


virtualenv -p /usr/bin/python2.7 venv-2.7

The 3.4 venv was trouble for me because of my version of ubuntu (or at least that is what I was told when reading around the web). I found a set of commands here that helped me out tremendously. Creating my venv-3.4 went as so:


python3.4 -m venv --without-pip venv-3.4
source ./venv-3.4/bin/activate
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-3.4.4.tar.gz
tar -vzxf setuptools-3.4.4.tar.gz
cd setuptools-3.4.4
python setup.py install
cd ..
wget https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz
tar -vzxf pip-1.5.6.tar.gz
cd pip-1.5.6
python setup.py install
cd ..
deactivate

Your venvs should be set up now which is 90% of the battle.


Go ahead and grab the bundler.


git clone https://gitlab.com/mailman/mailman-bundler.git

Activate your 2.7 venv.


source venv-2.7/bin/activate

The rest of the instructions can be followed here. But I will copy and paste them from there for ease or incase the page moves in the future.


Stolen from the link I attached: In the bundler directory, open the mailman_web/development.py file, look for the SECRET_KEY parameter and set something random.


Then continue on... (You'll get a bunch of warnings, thats fine. As long as there are no errors).


pip install zc.buildout
buildout

Install less (I had to install sass too, so I included it).


sudo apt-get install node-less
sudo su -c "gem install sass"

Initialize Django's database.


./bin/mailman-post-update

Create a user to login as (I think this is specifically where my original question is answered and I just never reached this point).


./bin/mailman-web-django-admin createsuperuser   

Start mailman


./bin/mailman start

Start Django which is the total UI - Postorius and hyperkitty


./bin/mailman-web-django-admin runserver &

Extra: I received an error including something about COMPRESS_PRECOMPILERS when I first loaded the UI. I dug into mailman-bundler/mailman_web/development.py and found


COMPRESS_PRECOMPILERS = (
('text/less', 'lessc {infile} {outfile}'),
)

Remember when I said I was missing sass and was getting an error? I installed it and included it in this list, now I have:


COMPRESS_PRECOMPILERS = (
('text/less', 'lessc {infile} {outfile}'),
('text/x-scss', 'sass --scss {infile} {outfile}'),
)

All of this gave me a working mailman3. Hope it can help some of you out.


EDIT: I also updated virtualenv. I found the package on python's website. (I don't have enough rep to post a 3rd link to the package). But I downloaded it as so:


wget https://pypi.python.org/packages/source/v/virtualenv/virtualenv-13.1.2.tar.gz#md5=b989598f068d64b32dead530eb25589a

No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...