Search results for query "sapiro"
- 5617 messages

[MM3-users] Re: Multi-domain oddities in Hyperkitty and Postorius
by Jeremy Stanley
On 2023-01-30 12:08:10 -0800 (-0800), Mark Sapiro wrote:
[...]
> Domains can be created via Postorius or via the Mailman Core REST API that
> postorius uses or implicitly by the `mailman create` command when creating a
> list in a new domain. However, none of this can create a new site. You can
> do this through the Django admin site at sites/site/add/.
>
> See https://docs.djangoproject.com/en/4.1/ref/contrib/sites/ for methods you
> can use to do this programmatically.
Thanks, I'm still doing my best to wrap my brain around how Django
uses database migrations to create sites (seems like a very strange
use of a migration, I'm only accustomed to seeing them applied for
database schema updates). Once I work out how to script site
creation, I'm still not completely finding the explanations I need
for how to map them to domains in Mailman though.
The Mailman documentation about domains says "Domains are how
Mailman interacts with email host names and web host names" but
doesn't actually go on to say (that I can find anywhere) how it
actually associates them. I can see in the API docs that a POST to
the domains endpoint will create a new domain with a specific
mail_host FQDN, but there's some association somewhere of that to a
web host (Django site), right? How is that set or manipulated
through the API? Or is that something which has to be set directly
in Django's data structures instead?
To recap, on creation of a mailing list server I want to populate it
automatically with multiple lists on different domains and have
dynamic SITE_ID=0 domain guessing performed so that the correct site
name and list filtering is performed depending on which domain name
is used in a URL the client requests. I believe I need to have the
automation perform the following steps:
1. Instantiate the Mailman installation and run initial migrations
with SITE_ID=1 in order to avoid the problem mentioned in the docs
about not using SITE_ID=0 until the tables have been populated, then
switch the settings.py to use SITE_ID=0 once done.
2. Create the individual sites I need in Django (Mailman web hosts)
by creating and applying database migrations.
3. Create the individual domains I need in Mailman (Mailman mail
hosts) through its REST API.
4. "Somehow" tell Mailman (or Django?) which mail hosts correspond
to what web hosts.
As I said, I'm still trying to understand how to make step 2 happen
(Django has a steep learning curve for me), but beyond that I'm
unsure how to do step 4 at all. I can do all of this through the
WebUI of course, and have confirmed that it works as expected when I
do, I'm just trying to work out the automation so that our other
sysadmins don't have to perform these steps by hand the next time we
need to rebuild the server.
Thanks again for all the help so far, and for any additional insight
anyone may have into how I can correct my mental model of all this.
--
Jeremy Stanley
2 years, 3 months

[MM3-users] Re: List Migration from MM2.1 -> MM3
by Odhiambo Washington
On Mon, Aug 15, 2022 at 1:31 AM Mark Sapiro <mark(a)msapiro.net> wrote:
> On 8/14/22 11:04, Odhiambo Washington wrote:
> > So I thought I have everything running. Fresh install of MM3 on
> > Ubuntu-22.04.
> >
> > I have created a list in postorius - it has the same name as my old list
> in
> > MM2.
> >
> > [image: MM3.png]
>
> Your image didn't make it through content filtering.
>
The image only showed a listing of the MLs that I created via postorius.
>
> What is the fully qualified name of the list
>
skunkworks(a)lists.my.co.ke
> > mailman@lists:~$ /opt/mailman/mm/venv/bin/mailman import21
> skunkworks(a)lists.my.co.ke /var/list/lists/skunkworks/config.pck
> > Usage: mailman import21 [OPTIONS] LISTSPEC PICKLE_FILE
> > Try 'mailman import21 -h' for help.
> >
> > Error: No such list: skunkworks(a)lists.my.co.ke
>
> Apparently the list you created is not named skunkworks(a)lists.my.co.ke
Apparently so, because:
mailman@lists:~$ /opt/mailman/mm/venv/bin/mailman lists
No matching mailing lists found
mailman@lists:~$
Which is surprising, given this: https://imgur.com/a/LPrh42K
> > What am I missing?
>
> The Mailman 3 list skunkworks(a)lists.my.co.ke including that exact domain
> must exist in order to import to it. Try
>
> /opt/mailman/mm/venv/bin/mailman create skunkworks(a)lists.my.co.ke
root@lists:/home/wash# su - mailman
mailman@lists:~$ /opt/mailman/mm/venv/bin/mailman create
skunkworks(a)lists.my.co.ke
sh: 1: /usr/sbin/postmap: not found
sh: 1: /usr/sbin/postmap: not found
Traceback (most recent call last):
File "/opt/mailman/mm/venv/bin/mailman", line 8, in <module>
sys.exit(main())
File "/opt/mailman/mm/venv/lib/python3.10/site-packages/click/core.py",
line 1130, in __call__
return self.main(*args, **kwargs)
File "/opt/mailman/mm/venv/lib/python3.10/site-packages/click/core.py",
line 1055, in main
rv = self.invoke(ctx)
File
"/opt/mailman/mm/venv/lib/python3.10/site-packages/mailman/bin/mailman.py",
line 69, in invoke
return super().invoke(ctx)
File "/opt/mailman/mm/venv/lib/python3.10/site-packages/click/core.py",
line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/mailman/mm/venv/lib/python3.10/site-packages/click/core.py",
line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/mailman/mm/venv/lib/python3.10/site-packages/click/core.py",
line 760, in invoke
return __callback(*args, **kwargs)
File
"/opt/mailman/mm/venv/lib/python3.10/site-packages/click/decorators.py",
line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File
"/opt/mailman/mm/venv/lib/python3.10/site-packages/mailman/commands/cli_lists.py",
line 184, in create
mlist = create_list(fqdn_listname, owners)
File
"/opt/mailman/mm/venv/lib/python3.10/site-packages/mailman/app/lifecycle.py",
line 100, in create_list
call_name(config.mta.incoming).create(mlist)
File
"/opt/mailman/mm/venv/lib/python3.10/site-packages/mailman/mta/postfix.py",
line 93, in create
self.regenerate()
File
"/opt/mailman/mm/venv/lib/python3.10/site-packages/mailman/mta/postfix.py",
line 133, in regenerate
raise RuntimeError(NL.join(errors))
RuntimeError: command failure: /usr/sbin/postmap
/opt/mailman/var/data/postfix_lmtp, 127, Key has expired
command failure: /usr/sbin/postmap /opt/mailman/var/data/postfix_domains,
127, Key has expired
Now that wants Postfix, while I don't use Postfix, but Exim as the MTA.
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
2 years, 9 months

[MM3-users] Re: What to backup?
by Alain Kohli
Thanks for the great explanation, that helped a lot! I'll try to work on
that issue if I find some time. In the meantime it would be neat to try
to clean up the old messages right before the backup. How can you
distinguish messages that have been moderated already? I couldn't really
find that in the database or the models.
On 5/26/19 8:18 PM, Mark Sapiro wrote:
> On 5/26/19 7:00 AM, Alain Kohli wrote:
>> I have noticed that especially the var/messages directory has a rather
>> considerable size compared to the rest. What exactly is this for and
>> what would be the consequences if that was lost?
>
> When a message is held for moderator approval, a pickle of the message
> is stored in the var/messages directory and an entry pointing to it is
> made in the message table in the database. An entry is also made in the
> list's pending requests. These are required so the held message can be
> handled.
>
> There is an issue in that when these messages are handled these aren't
> removed. See <https://gitlab.com/mailman/mailman/issues/257>.
>
> Thus, most of what's in the var/messages directory is old, but there are
> also currently held messages there that would be lost.
>
> You could periodically remove older messages, but this would leave
> entries pointing to them in the message table in the database which
> could cause errors but probably not.
>
> The real solution is a fix for
> <https://gitlab.com/mailman/mailman/issues/257>.
>
>> And more generally, would not backing up var/ at all only result in the
>> loss of some short term data (e.g. messages that are held or currently
>> processed) or would long term data also be lost? Or in other words, what
>> exactly would be non-recoverable if that isn't backed up?
>
> That depends in part on what your backend database is. If it's SQLite,
> the database is probably in the var/data directory. If not, you need to
> be backing up the MySQL or postgreSQL mailman database.
>
> var/archives contains archived messages for the 'prototype' archiver and
> messages that are queued for hyperkitty.
>
> var/cache contains a cache of recently used templates.
>
> var/data may contain a SQLite database and may contain Postfix mappings.
> The Postfix mappings can be regenerated by the `mailman aliases` command.
>
> var/etc may contain your mailman.cfg if you don't point to a different one.
>
> var/lists contains accumulated messages for the next digest for your lists
>
> var/locks contains locks and should probably not be restored from a backup
>
> var/logs contains Mailman's logs.
>
> var/messages is discussed above.
>
> var/queue contains Mailman's current queues. Except for 'shunt' this is
> all things currently in process.
>
> var/templates may contain custom templates.
>
> Also, I didn't mention it before, but your Django settings.py and
> settings_local.py should also be backed up.
>
5 years, 11 months

[MM3-users] Re: Post-installation documentation?
by David Newman
On 11/25/21 1:16 PM, Mark Sapiro wrote:
> On 11/25/21 10:56 AM, David Newman wrote:
>>
>> Thanks for this. After setting these variables and restarting mailman3
>> and mailmanweb, the mailman user still cannot find a hyperkitty_import
>> command (neither can root, btw). Again, I installed MM3 and
>> Django/Postorius/Hyperkitty using the venv and web docs previously
>> referenced.
>
>
> Don't run mailman or django admin commands as root. This causes issues
> when files are created by root and can't be read by mailman.
Understood, thanks. I'd only tried root to determine if there was a
permissions issue, where hyperkitty_import really did exist but wasn't
available to the mailman user.
>
> What django admin command are you running?
As the mailman user, with venv activated:
(venv) mailman@lists:~$ hyperkitty_import -l testlist(a)lists.domain.com
/var/lib/mailman/archives/private/testlist.mbox/testlist.mbox
'testlist' and 'lists.domain.com' are redactions; they are correct in
the given command, but the command fails because the system can't find
hyperkitty_import.
(BTW
Also, because I'm looking to migrate from Mailman 2.1 installed from
Debian packages, all the 2.1 stuff is owned by the 'list' user. I'd
changed ownership of the above private archive to mailman:mailman for
the command not to complain about permissions.
> If you don't set
> DJANGO_SETTINGS_MODULE in the environment and you have activated your
> virtualenv and run `mailman-web` as the django admin command it will set
> /etc/mailman3/settings.py as the settings.
I'd run these two environment commands as the mailman user with
virtualenv activated:
export DJANGO_SETTINGS_MODULE=settings
export PYTHONPATH=/etc/mailman3/settings.py
Am I being overly literal here with 'settings' in that first command?
Asking because 'mailman-web check' runs clean before running these
commands and returns this error afterward:
ModuleNotFoundError: No module named 'settings'
Either way, the hyperkitty_import command still isn't found.
>> On the plus side, all lists now appear in the admin web page. However,
>> lists created from the admin page do not appear in a site list page,
>> even though all lists are in the same site/domain.
>
>
> By default, only lists that you are owner, moderator or subscriber for
> are shown. What if you click Filter by Role and select All?
Same result. In this case, the ID of the admin and list owner are the same.
>
>
>> Finally, how to make these exports permanent? I did not see this
>> covered in the migration doc above. This is on a Debian system where
>> the mailman user's shell is bash. Is this simply a matter of adding
>> environment variables in the mailman user's .bashrc file?
>
> You can do that but as I note above, if you run `mailman-web` you
> shouldn't need to. You can add a `source /opt/mailman/venv/bin/activate`
> command as mentioned at
> https://docs.mailman3.org/en/latest/install/virtualenv.html#activate-virtua….
Yes, this is what I have in mailman's .bashrc file. I'd followed that
venv doc for initial installation, and it activates the virtualenv
whenever launching a shell for mailman.
dn
3 years, 5 months

[MM3-users] Re: External MTA incoming mail: configuration
by Roland Giesler
On 2024/08/02 19:02, Mark Sapiro wrote:
> On 8/2/24 09:43, Roland Giesler via Mailman-users wrote:
>
>> Ah, so I just have to figure out why the LMTP runner is not running.
>
> Stop Mailman core and then start it. You must stop and then start as
> opposed to restart.
>
> If lmtp runner is not running after that check
> /var/log/mailman3/mailman.log for possible reasons. You can also check
> that log for reasons why it isn't currently running.
>
> You can also check /var/log/syslog* for events like out_of_memory that
> might have killed it.
I do now have the lmtp runner on port 8024.
# netstat -tunap | grep 8024
tcp 0 0 192.168.161.103:8024 0.0.0.0:*
LISTEN 46730/python3
In mailman.cfg I set it to listen on the LAN address instead of
172.0.0.1, since I'm expecting mails from my external MTA server.
In the logs of the MTA I see this however: warning: do not list domain
fast.za.net in BOTH virtual_mailbox_domains and relay_domains
Mailman creates these entries, but postfix doesn't like it. I don't see
any mail delivered to the mailman yet. Is this the problem?
In the MTA postfix main.cf:
relay_domains = hash:/etc/mailman3/data/postfix_domains
cat /etc/mailman3/data/postfix_domains
# AUTOMATICALLY GENERATED BY MAILMAN ON 2024-08-05 07:20:17
#
# This file is generated by Mailman, and is kept in sync with the binary
hash
# file. YOU SHOULD NOT MANUALLY EDIT THIS FILE unless you know what you're
# doing, and can keep the two files properly in sync. If you screw it up,
# you're on your own.
fast.za.net fast.za.net
and also
local_recipient_maps=$virtual_mailbox_maps,
hash:/etc/mailman3/data/postfix_lmtp
cat /etc/mailman3/data/postfix_lmtp
# AUTOMATICALLY GENERATED BY MAILMAN ON 2024-08-05 07:20:17
#
# This file is generated by Mailman, and is kept in sync with the binary
hash
# file. YOU SHOULD NOT MANUALLY EDIT THIS FILE unless you know what you're
# doing, and can keep the two files properly in sync. If you screw it up,
# you're on your own.
# Aliases which are visible only in the @fast.za.net domain.
test(a)fast.za.net lmtp:[192.168.161.103]:8024
test-bounces(a)fast.za.net lmtp:[192.168.161.103]:8024
test-confirm(a)fast.za.net lmtp:[192.168.161.103]:8024
test-join(a)fast.za.net lmtp:[192.168.161.103]:8024
test-leave(a)fast.za.net lmtp:[192.168.161.103]:8024
test-owner(a)fast.za.net lmtp:[192.168.161.103]:8024
test-request(a)fast.za.net lmtp:[192.168.161.103]:8024
test-subscribe(a)fast.za.net lmtp:[192.168.161.103]:8024
test-unsubscribe(a)fast.za.net lmtp:[192.168.161.103]:8024
Then there's:
virtual_mailbox_domains=sqlite:/etc/postfix/virtual-mailbox-domains.cf
cat /etc/postfix/virtual-mailbox-domains.cf
dbpath=/home/user-data/mail/users.sqlite
query = SELECT 1 FROM users WHERE email LIKE '%%@%s' UNION SELECT 1 FROM
aliases WHERE source LIKE '%%@%s' UNION SELECT 1 FROM auto_aliases WHERE
source LIKE '%%@%s'
When I run that query in sqlite3, it returns no records, so I'm not sure
how this is supposed to work. %s to me means that first argument, so is
this used in python and then %s is the argument sent to this query?
The bottom line of this all is that a new signup message that I reply to
is being received by box2.gtahardware,co.za, but not by mailman3 and I
cannot find the point where it fails in the logs.
9 months, 1 week

[MM3-users] Re: National language messages in mm3 notifications
by Ivan Kuznetsov
Hello
All works fine if all the site, mailing list and user languages are
equal. But I found at least two corner cases if languages are not same:
1) Site language is Russian. User default language is US English. User
subscribes to mailing list with non-English preferred language (Russian)
User greeting message have correct body encoding but garbled Subject:
header:
=================
Return-Path: <test-bounces(a)solvo.ru>
[...]
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: ????? ?????????? ? ?????? ???????? "Test"
From: test-request(a)solvo.ru
To: =?utf-8?b?0JjQstCw0L0g0JrRg9C30L3QtdGG0L7QsiAo0YLQtdGB0YIp?=
<ikuznetsov(a)solvo.ru>
X-No-Archive: yes
Message-ID:
<164370087756.3121264.15600221365450238466(a)mail-g3-vlan10.solvo.ru>
Date: Tue, 01 Feb 2022 10:34:37 +0300
Precedence: bulk
X-Mailman-Version: 3.3.5
List-Id: =?utf-8?b?0KLQtdGB0YLQvtCy0YvQuSDRgdC/0LjRgdC+0Lo=?=
<test.solvo.ru>
List-Help: <mailto:test-request@solvo.ru?subject=help>
List-Owner: <mailto:test-owner@solvo.ru>
List-Subscribe: <mailto:test-join@solvo.ru>
List-Unsubscribe: <mailto:test-leave@solvo.ru>
Welcome to the "Test" mailing list!
To post to this list, send your message to:
test(a)solvo.ru
[...]
=================
2) Site language is Russian. User default language is US English. User
subscribes to mailing list with preferred US English language.
Moderator notify message has Subject: garbled
=================
Return-Path: <test-bounces+kia=solvo.ru(a)solvo.ru>
[...]
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Subject: ????? ?????? ?? ???????? ?? ?????? ???????? Test ??
ikuznetsov(a)solvo.ru
From: test-owner(a)solvo.ru
To: =?utf-8?b?0JjQstCw0L0g0JrRg9C30L3QtdGG0L7Qsg==?= <kia(a)solvo.ru>
Message-ID:
<164370607233.3121263.10615836031266859672(a)mail-g3-vlan10.solvo.ru>
Date: Tue, 01 Feb 2022 12:01:12 +0300
Precedence: bulk
X-Mailman-Version: 3.3.5
List-Id: =?utf-8?b?0KLQtdGB0YLQvtCy0YvQuSDRgdC/0LjRgdC+0Lo=?=
<test.solvo.ru>
List-Help: <mailto:test-request@solvo.ru?subject=help>
List-Owner: <mailto:test-owner@solvo.ru>
List-Subscribe: <mailto:test-join@solvo.ru>
List-Unsubscribe: <mailto:test-leave@solvo.ru>
X-DrWeb-SpamScore: 315
X-DrWeb-SpamState: spam
X-DrWeb-SpamDetail:
gggruggvucftvghtrhhoucdtuddrgedvvddrgedvgdduvdeiucetufdoteggodetrfcurfhrohhfihhlvgemucfftfghgfeunecuuegrihhlohhuthemuceftddtnecuogetfedtuddqtdduucdludehmdenogfogedtledqfeefucdlfedttddmnecujfgurhepgggtgffuhffvkfffphejfedvtdfjsehtjeertddttddvnecuhfhrohhmpehtvghsthdqohifnhgvrhesshholhhvohdrrhhunecuggftrfgrthhtvghrnheptedvledvheefueekieektdeuueeiheekffehleeuffeiteeuteelheeggfeftdfg
X-DrWeb-SpamVersion: Vade Retro 01.422.42#126 AS+AV+AP Profile: DRWEB;
Bailout: 300
X-AntiVirus: Checked by Dr.Web [MailD: 11.1.12.2108031732, SE:
11.1.7.2106242330, Core engine: 7.00.52.08270, Virus records: 10792308,
Updated: 2022-Feb-01 07:11:29 UTC]
Message-ID-Hash: KFWOCUEE7SSJMLW222QGFECTNTBXYDEG
X-Message-ID-Hash: KFWOCUEE7SSJMLW222QGFECTNTBXYDEG
X-MailFrom: test-bounces(a)solvo.ru
X-DrWeb-SpamScore: 300
X-DrWeb-SpamState: spam
X-DrWeb-SpamDetail:
gggruggvucftvghtrhhoucdtuddrgedvvddrgedvgdduvdeiucetufdoteggodetrfcurfhrohhfihhlvgemucfftfghgfeunecuuegrihhlohhuthemuceftddtnecuogfogedtledqfeefucdlfedttddmnecujfgurhepgggtgffuhffvkfffphejfedvtdfjsehtjeertddttddvnecuhfhrohhmpehtvghsthdqohifnhgvrhesshholhhvohdrrhhunecuggftrfgrthhtvghrnheptedvledvheefueekieektdeuueeiheekffehleeuffeiteeuteelheeggfeftdfg
X-DrWeb-SpamVersion: Vade Retro 01.422.42#126 AS+AV+AP Profile: DRWEB;
Bailout: 300
X-AntiVirus: Checked by Dr.Web [MailD: 11.1.12.2108031732, SE:
11.1.7.2106242330, Core engine: 7.00.52.08270, Virus records: 10792308,
Updated: 2022-Feb-01 07:11:29 UTC]
Your authorization is required for a mailing list subscription request
approval:
For: =?utf-8?b?0JjQstCw0L0g0JrRg9C30L3QtdGG0L7QsiAo0YLQtdGB0YIp?=
<ikuznetsov(a)solvo.ru>
List: test(a)solvo.ru
=================
User greeting message has correct English body and garbled Subject as in
case 1
It seems that notifications Subject encoding is selected based on list
or user preferred language, but Subject text come from site-wide global
strings, translated to site language.
18.01.2022 20:08, Mark Sapiro wrote:
> On 1/18/22 5:31 AM, Ivan Kuznetsov wrote:
>> Hello
>>
>> There is a problem with moderator/administrator notifications used
>> national (non-acsii) characters in templates. Messages came with all
>> non-ascii chars changed to '?'
> ...
>> What am I missing in setup?
>
> Set the list's preferred language to Russian and possibly set
>
> default_language: ru
>
> in the [mailman] section of mailman.cfg.
>
--
С уважением, Иван Кузнецов
Руководитель технического отдела
Группа компаний "СОЛВО"
+7(812)60-60-555
+7(495)66-83-003
+7(921)740-72-61
http://www.solvo.ru
СОЛВО - Эталон Автоматизации Логистики
3 years, 3 months

[MM3-users] Re: Creating superuser - problem with documentation or it's just me?
by Odhiambo Washington
On Mon, 27 Jul 2020 at 02:01, Mark Sapiro <mark(a)msapiro.net> wrote:
> On 7/26/20 9:39 AM, Odhiambo Washington wrote:
> > Hi,
> >
> > In my quest to create a superuser, I followed another HOWTO -
> > https://docs.mailman3.org/en/latest/devsetup.html
> >
> > (venv) [root@gw /opt/mailman/git/mailman-suite/mailman-suite_project]#
> > python manage.py migrate
> > Traceback (most recent call last):
>
> manage.py migrate (or django-admin migrate) is part if the
> mailman-post-update script. It doesn't work here because when you run it
> this way, it doesn't get your settings.py.
>
I have taken note of that. Thank you.
> ModuleNotFoundError: No module named '_sqlite3'
>
> And it's looking for sqlite3 because that's the default database.
> > *<==============================================================*
> > (venv) [root@gw /opt/mailman/git/mailman-suite/mailman-suite_project]#
> pip
> > install pysqlite3
>
> You don't need this. You need to run django-admin with the correct
> settings.
>
Thanks for clarifying.
> So I figured out that I need to put my own settings_local.py into the
> > directory and let the command rely on MySQL as the database backend since
> > by default, it uses sqlite3 backend.
> >
> > But the question then is WHY is this not documented on the above page???
>
>
> Because that's not relevant to what you are doing. You are trying to
> install Mailman for production, not development.
>
Okay. That is true.
> > How can I delete the superuser after creating it??
>
>
> The only django-admin or manage.py you should run is
> /opt/mailman/mm/bin/djhango-admin. You can run `django-admin
> createsuperuser` to create a superuser. If you want to delete one, you
> need to go to the Django admin web UI - should be
> http://your.server/admin - login as a superuser and go to the Users page
> and delete it. You should probably do this as a different superuser
>
The reason I asked for how to delete superuser came from the fact that from
the above confusion,
I needed to create a superuser.
So now I have tried to see if there is such option from django-admin, but:
(venv) [root@gw /opt/mailman/mm]# django-admin --help
Type 'django-admin help <subcommand>' for help on a specific subcommand.
Available subcommands:
[django]
check
compilemessages
createcachetable
dbshell
diffsettings
dumpdata
flush
inspectdb
loaddata
makemessages
makemigrations
migrate
runserver
sendtestemail
shell
showmigrations
sqlflush
sqlmigrate
sqlsequencereset
squashmigrations
startapp
startproject
test
testserver
*Note that only Django core commands are listed as settings are not
properly configured (error: Requested setting INSTALLED_APPS, but settings
are not configured. You must either define the environment variable
DJANGO_SETTINGS_MODULE or call settings.configure() before accessing
settings.).*
(venv) [root@gw /opt/mailman/mm]#
So is something wrong with my settings????
I do not see the command to create the superuser listed.
My settings_local.py has got only the bits from settings.py that I have
customized.
Thank you for your patience.
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", grep ^[^#] :-)
4 years, 9 months

[MM3-users] Re: Mailman3 without Hyperkitty in docker
by Abhilash Raj
Test email to check something, please ignore.
Abhilash
On Fri, Mar 1, 2019, at 5:19 PM, Abhilash Raj wrote:
>
>
> On Thu, Feb 28, 2019, at 10:18 PM, Danil Smirnov wrote:
>> Hi Abhilash,
>>
>> Thank you very much - the previous error is fixed now.
>>
>> But I have another one now, which causes the same 500 Server Error:
>>
>> bash-4.3# cat /opt/mailman-web-data/logs/uwsgi-error.log
>> *** Starting uWSGI 2.0.18 (64bit) on [Fri Mar 1 05:42:09 2019] ***
>> compiled with version: 6.3.0 on 01 March 2019 01:52:42
>> os: Linux-3.10.0-693.11.1.el7.x86_64 #1 SMP Mon Dec 4 23:52:40 UTC 2017
>> nodename: mailman-web
>> machine: x86_64
>> clock source: unix
>> detected number of CPU cores: 2
>> current working directory: /opt/mailman-web
>> detected binary path: /usr/local/bin/uwsgi
>> !!! no internal routing support, rebuild with pcre support !!!
>> setgid() to 101
>> setuid() to 100
>> chdir() to /opt/mailman-web
>> your memory page size is 4096 bytes
>> detected max file descriptor number: 1048576
>> building mime-types dictionary from file /etc/mime.types...1168 entry found
>> lock engine: pthread robust mutexes
>> thunder lock: disabled (you can enable it with --thunder-lock)
>> uwsgi socket 0 bound to TCP address 0.0.0.0:8080 fd 8
>> uwsgi socket 1 bound to TCP address 0.0.0.0:8000 fd 9
>> Python version: 3.6.8 (default, Jan 30 2019, 23:58:16) [GCC 6.3.0]
>> Python main interpreter initialized at 0x55a2df7f57e0
>> python threads support enabled
>> your server socket listen backlog is limited to 100 connections
>> your mercy for graceful operations on workers is 60 seconds
>> mapped 166752 bytes (162 KB) for 2 cores
>> *** Operational MODE: threaded ***
>> Traceback (most recent call last):
>> File "/usr/local/lib/python3.6/site-packages/django/utils/module_loading.py", line 20, in import_string
>> return getattr(module, class_name)
>> AttributeError: module 'django.contrib.auth.middleware' has no attribute 'SessionAuthenticationMiddleware'
>>
>> The above exception was the direct cause of the following exception:
>>
>> Traceback (most recent call last):
>> File "wsgi.py", line 38, in <module>
>> application = get_wsgi_application()
>> File "/usr/local/lib/python3.6/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
>> return WSGIHandler()
>> File "/usr/local/lib/python3.6/site-packages/django/core/handlers/wsgi.py", line 136, in __init__
>> self.load_middleware()
>> File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 34, in load_middleware
>> middleware = import_string(middleware_path)
>> File "/usr/local/lib/python3.6/site-packages/django/utils/module_loading.py", line 24, in import_string
>> ) from err
>> ImportError: Module "django.contrib.auth.middleware" does not define a "SessionAuthenticationMiddleware" attribute/class
>> unable to load app 0 (mountpoint='') (callable not found or import error)
>> *** no app loaded. going in full dynamic mode ***
>> *** uWSGI is running in multiple interpreter mode ***
>> spawned uWSGI master process (pid: 1)
>> spawned uWSGI worker 1 (pid: 37, cores: 2)
>> --- no python application found, check your startup logs for errors ---
>> --- no python application found, check your startup logs for errors ---
>> --- no python application found, check your startup logs for errors ---
>> --- no python application found, check your startup logs for errors ---
>> --- no python application found, check your startup logs for errors ---
>> --- no python application found, check your startup logs for errors ---
>> --- no python application found, check your startup logs for errors ---
>> --- no python application found, check your startup logs for errors ---
>> --- no python application found, check your startup logs for errors ---
>> --- no python application found, check your startup logs for errors ---
>> --- no python application found, check your startup logs for errors ---
>> --- no python application found, check your startup logs for errors ---
>>
>> As per my investigation, this error possibly caused by Django upgrade:
>>
>> *The SessionAuthenticationMiddleware class is removed. It provided no functionality since session authentication is unconditionally enabled in Django 1.10.*
>>
>> See https://docs.djangoproject.com/en/2.0/releases/2.0/
>>
>> After I've removed the line
>> https://github.com/maxking/docker-mailman/blob/master/postorius/mailman-web…
>> from settings.py, the container is finally working.
>>
>> I've placed PR in github:
>> https://github.com/maxking/docker-mailman/pull/314
>
> Thank you for your contributions!
>
> I have merged your pull request and it should now be out (hopefully!).
>
>>
>> Thank you for your help.
>>
>> Danil
>>
>>
>> пт, 1 мар. 2019 г. в 04:33, Abhilash Raj <maxking(a)asynchronous.in>:
>>>
>>>
>>> On Thu, Feb 28, 2019, at 5:19 PM, Abhilash Raj wrote:
>>> > On February 27, 2019 11:53:34 PM PST, Danil Smirnov <danil(a)smirnov.la> wrote:
>>> > >Hi Mark,
>>> > >
>>> > >Actually all this stuff happens inside the container after it's started
>>> > >and
>>> > >initialized without errors. I didn't amend the image anyhow.
>>> > >
>>> > >Also I have the configuration based on docker-compose.yaml provided in
>>> > >the
>>> > >repository which works just fine for mailman-web image.
>>> > >
>>> > >The very same config with postorius image (+ UWSGI_STATIC_MAP param)
>>> > >fails
>>> > >with 500 error...
>>> > >
>>> > >Now answering your questions:
>>> > >
>>> > >ср, 27 февр. 2019 г., 22:56 Mark Sapiro <mark(a)msapiro.net>:
>>> > >
>>> > >> do you have django-q in INSTALLED_APPS in your Django settings and
>>> > >what
>>> > >> is set for Q_CLUSTER?
>>> > >>
>>> > >
>>> > >I've checked settings.py inside the container and I haven't found any
>>> > >of
>>> > >the mentioned configurations there.
>>> > >
>>> > >Does the manage.py that's being run here point to the right
>>> > >settings.py?
>>> > >>
>>> > >
>>> > >No clue.
>>> > >
>>> > >Also I wonder why we have some Hyperkitty-related cronjobs in non-HK
>>> > >configured image?
>>> > >
>>> > >https://github.com/maxking/docker-mailman/blob/master/postorius/mailman-web…
>>> >
>>> > Because I am a dum dum ;-)
>>> >
>>> > Will work on removing those crons and stuff. Would be nice if you
>>> > opened an issue on Github so that I don't forget.
>>>
>>> Should now be fixed in the latest image.
>>>
>>> >
>>> > >Danil
>>> > >
>>> > >
>>> > >
>>> > >> --
>>> > >> Mark Sapiro <mark(a)msapiro.net> The highway is for gamblers,
>>> > >> San Francisco Bay Area, California better use your sense - B.
>>> > >Dylan
>>> > >> _______________________________________________
>>> > >> Mailman-users mailing list -- mailman-users(a)mailman3.org
>>> > >> To unsubscribe send an email to mailman-users-leave(a)mailman3.org
>>> > >> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
>>> > >>
>>> > >_______________________________________________
>>> > >Mailman-users mailing list -- mailman-users(a)mailman3.org
>>> > >To unsubscribe send an email to mailman-users-leave(a)mailman3.org
>>> > >https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
>>> >
>>> >
>>> > --
>>> > Sent from my Android device with K-9 Mail. Please excuse my brevity.
>>>
>>> --
>>> thanks,
>>> Abhilash Raj (maxking)
>
> --
> thanks,
> Abhilash Raj (maxking)
>
>
--
thanks,
Abhilash Raj (maxking)
6 years, 2 months

[MM3-users] Re: hyperkitty failed to create a thread
by tlhackque
On 11-Feb-19 17:08, Marvin Gülker wrote:
> Hi,
>
> Am 11. Februar 2019 um 13:20 Uhr -0800 schrieb Mark Sapiro:
>> I downloaded the February mbox from
>> <https://wlug.mailman3.com/hyperkitty/list/wlug@lists.wlug.org/export/wlug@l…>
>> and imported it to a test list with 'django-admin hyperkitty_import and
>> see the same issue.
> Here's the Hyperkitty Mbox for my affected mailinglist:
> <https://lists.secretchronicles.org/hyperkitty/list/tsc-devel@lists.secretch…>
>
> Maildir from my local machine as received from Mailman via e-mail:
> <https://files.guelker.eu/misc/tsc-devel.tar.gz>
>
>> Examination of the mbox shows for the first message [...]
>> Note the folding of the header and the double angle brackets.
> I can confirm that I see this behaviour for my affected mailinglist as
> well. The Message-ID header is broken over two lines with double angle
> brackets in the Hyperkitty MBox linked above:
>
> Message-ID: <
> <153582973006.27514.7508703206376217479(a)alexandria.secretchronicles.org>>
>
> However, the original message as it was delivered by Mailman to me does
> not have such a weird message-id header:
>
> Message-ID:
> <153582973006.27514.7508703206376217479(a)alexandria.secretchronicles.org>
>
> In this message, the header is broken exactly as shown above after the
> colon of "Message-ID:". Maybe some problem with parsing long Message-ID
> headers, or ones folded over multiple lines?
>
> With regard to bug reporting on gitlab.com: I already have accounts on a
> ton of sites, and at some point I'd actually like to stop creating new
> ones all the time...
>
> Marvin
>
The double angle brackets are a problem.
The folding is legal. Any whitespace in a header (not inside tokens,
such as quoted strings, of course) can be replaced by a <CR><LF><one
whitespace character> So
Message-ID: <glorp>
is identical to
Message-ID:
<glorp>
(See RFC2822 3.2.3 for a more precise explanation)
A message-ID within <<>> is not valid; whatever generated it has a bug.
RFC2822 grammar
message-id = "Message-ID:" msg-id CRLF
in-reply-to = "In-Reply-To:" 1*msg-id CRLF
references = "References:" 1*msg-id CRLF
msg-id = [CFWS] "<" id-left "@" id-right ">" [CFWS]
id-left = dot-atom-text / no-fold-quote / obs-id-left
id-right = dot-atom-text / no-fold-literal / obs-id-right
no-fold-quote = DQUOTE *(qtext / quoted-pair) DQUOTE
no-fold-literal = "[" *(dtext / quoted-pair) "]"
specials = "(" / ")" / ; Special characters used in
"<" / ">" / ; other parts of the syntax
"[" / "]" /
":" / ";" /
"@" / "\" /
"," / "." /
DQUOTE
atext = ALPHA / DIGIT / ; Any character except controls,
"!" / "#" / ; SP, and specials.
"$" / "%" / ; Used for atoms
"&" / "'" /
"*" / "+" /
"-" / "/" /
"=" / "?" /
"^" / "_" /
"`" / "{" /
"|" / "}" /
"~"
atom = [CFWS] 1*atext [CFWS]
dot-atom = [CFWS] dot-atom-text [CFWS]
dot-atom-text = 1*atext *("." 1*atext)
6 years, 3 months

[MM3-users] Re: FYI: Django security releases issued: 4.0.6 and 3.2.14
by David Newman
On 7/7/22 3:35 PM, Mark Sapiro wrote:
> On 7/7/22 3:09 PM, David Newman wrote:
>>
>> I *think* the command runs if I escape the hyphen:
>>
>> root@somehost:/opt/mailman/venv/lib/python3.9/site-packages# grep -r
>> '\-jango' /opt/mailman/venv/lib/python3.9/site-packages/
>>
>> But then that doesn't return anything.
>
> Yes, escaping the hyphen is the correct thing to do. You could also try
> something like
> ```
> grep -r '.-jango' /opt/mailman/venv/lib/python3.9/site-packages/
> ```
> but that will also return nothing.
>
> See
> https://stackoverflow.com/questions/67613777/pip-ignoring-invalid-distribut…
> https://stackoverflow.com/questions/68880743/why-do-i-get-this-when-using-p…
> and perhaps other hits from
> https://www.google.com/search?q=pip+warning+ignoring+invalid+distribution
>
> Look for
> ```
> ls -la /opt/mailman/venv/lib/python3.9/site-packages/~jango*
> ```
> i.e. `~jango` rather than `-jango`
Interesting -- that does produce two directories with names starting
with a tilde:
/opt/mailman/venv/lib/python3.9/site-packages/~jango:
total 100
drwxr-xr-x 19 root root 4096 Jul 7 10:56 .
drwxr-xr-x 188 mailman mailman 12288 Jul 7 12:38 ..
drwxr-xr-x 3 root root 4096 Jul 7 10:56 apps
drwxr-xr-x 3 root root 4096 Jul 7 10:56 bin
drwxr-xr-x 7 root root 4096 Jul 7 10:56 conf
drwxr-xr-x 18 root root 4096 Jul 7 10:56 contrib
drwxr-xr-x 11 root root 4096 Jul 7 10:56 core
drwxr-xr-x 6 root root 4096 Jul 7 10:56 db
drwxr-xr-x 3 root root 4096 Jul 7 10:56 dispatch
drwxr-xr-x 5 root root 4096 Jul 7 10:56 forms
drwxr-xr-x 3 root root 4096 Jul 7 10:56 http
-rw-r--r-- 1 root root 800 Jul 7 10:56 __init__.py
-rw-r--r-- 1 root root 211 Jul 7 10:56 __main__.py
drwxr-xr-x 3 root root 4096 Jul 7 10:56 middleware
drwxr-xr-x 2 root root 4096 Jul 7 10:56 __pycache__
-rw-r--r-- 1 root root 4896 Jul 7 10:56 shortcuts.py
drwxr-xr-x 5 root root 4096 Jul 7 10:56 template
drwxr-xr-x 3 root root 4096 Jul 7 10:56 templatetags
drwxr-xr-x 3 root root 4096 Jul 7 10:56 test
drwxr-xr-x 3 root root 4096 Jul 7 10:56 urls
drwxr-xr-x 4 root root 4096 Jul 7 10:56 utils
drwxr-xr-x 6 root root 4096 Jul 7 10:56 views
/opt/mailman/venv/lib/python3.9/site-packages/~jango-3.0.14.dist-info:
total 500
drwxr-xr-x 2 root root 4096 Jul 7 10:56 .
drwxr-xr-x 188 mailman mailman 12288 Jul 7 12:38 ..
-rw-r--r-- 1 root root 36843 Jul 7 10:56 AUTHORS
-rw-r--r-- 1 root root 83 Jul 7 10:56 entry_points.txt
-rw-r--r-- 1 root root 4 Jul 7 10:56 INSTALLER
-rw-r--r-- 1 root root 1552 Jul 7 10:56 LICENSE
-rw-r--r-- 1 root root 13231 Jul 7 10:56 LICENSE.python
-rw-r--r-- 1 root root 3625 Jul 7 10:56 METADATA
-rw-r--r-- 1 root root 415583 Jul 7 10:56 RECORD
-rw-r--r-- 1 root root 7 Jul 7 10:56 top_level.txt
-rw-r--r-- 1 root root 92 Jul 7 10:56 WHEEL
Going back to the original warning:
(venv) mailman@somehost:/home/dnewman$ pip show mailman-web
WARNING: Ignoring invalid distribution -jango
(/opt/mailman/venv/lib/python3.9/site-packages)
Name: mailman-web
..
The warning goes away after moving those two tilde directories out of
the way. Is it safe to delete them?
Thanks again.
dn
2 years, 10 months