Re: [Mailman-Developers] Renaming a list

2017-10-24 Thread Aurelien Bompard
>
> > As I understand, AcceptableAliases are defined as regular expressions,
> > what if Mailman put the values that are a valid list name to
> > transport_maps? Converting regex to a listname doesn't sound like a
> > straight forward thing to me though.
>
> I think that's going to be too complex and error prone.
>

Agreed.


But, I think it should be up to the installation to configure their MTAs
> or whatever for this. I don't thing we should be trying to generate MTA
> configurations for alternate list names bases on acceptable_aliases.
>

Yeah, I'll just use a separate hash of renamed lists in Postfix.

Thanks.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


[Mailman-Developers] Renaming a list

2017-10-23 Thread Aurelien Bompard
Hey folks!

I wanted to rename a list (only the list_name, not the list_id) and I
figured I would make the transition smoother by adding an "AcceptableAlias"
with the old name. I did that and realized that the acceptable aliases are
not added to the postfix_lmtp file, as a result emails sent to the old
address are just bounced at the Postfix level.
Is this the intended behavior ?

BTW, changing the list_name attribute is sufficient to rename a list,
right? I didn't find anything else to change since everything seems to be
keyed to the list_id but I thought I'd check with you.

Thanks!

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Breaking mailmanclient into seperate modules

2017-06-09 Thread Aurelien Bompard
>
> One thing that I wanted to announce before I start is breaking up
> mailmanclient
> from one giant module (src/mailmanclient/_client.py) to seperate class
> based
> modules.


Yes please, I've been putting that off for a long time but I think it's
needed too.

A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] HyperKitty issues and MRs for 3.1

2017-05-23 Thread Aurelien Bompard
Hey! :-)

I hope you're having a great time at PyCon :-)


#104 - Server Error (500) upon login with duplicate email addresses
> (we're thinking maybe just turning that into a non-500 error?)
>

Not sure I can do much to prevent it, it doesn't seem to go through my code
at all. And since it's a database integrity problem, a 500 error seems more
appropriate.
Maybe add a FAQ in the docs?



> #127 - Server Error (500) upon signup
>

This is more of a documentation problem, there's one more command that
needs to be run after installing HyperKitty



> #128 - hyperkitty/setup.py should require Django<1.11
> (Assigned to a sprinter, should be easy)
>

Fixed already, thanks to the sprinter for closing the bug.

I'll work on the documentation issues, but it shouldn't block you from
releasing 3.1.


A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Multiple REST servers

2017-05-19 Thread Aurelien Bompard
> Could you open an issue on Core for this?

There you go: https://gitlab.com/mailman/mailman/issues/327

> Have you done any other analysis on where the bottlenecks are?  Is it CPU, db,
> I/O?

I haven't investigated properly but it seems to be the database (which
is on another host).

> Currently the REST server uses Python's stdlib wsgiref WSGIServer which I'm
> positive is not performant enough for your lists.  There are a couple of
> options that would be worth investigating.  I played with trying to use
> gunicorn, but deleted the branch a while ago (IIRC, there were problems and I
> didn't have time to investigate further).  At the very least, I want to look
> into asyncio-based REST server (e.g. aiohttp, uvloop), but maybe there are
> other parts of the stack we need to look at too.

Interesting. I wonder if we can have SQLAlchemy play well with
asyncio, I haven't tried that before.
There is still a gunicorn.py file in the contrib directory, but I
haven't tested it either.


Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


[Mailman-Developers] Recent changes in HyperKitty

2017-05-19 Thread Aurelien Bompard
Hey folks!

I thought I'd keep you posted on a rather big change that landed in
HyperKitty a couple weeks ago. It will be useful for those of you who
run the master branch. If you updated and HyperKitty started requiring
Redis or not updating some parts of the UI, that may be the reason.

I have added support for asychronous tasks. They bring a huge
performance boost but they need an additional step in the setup. The
relevant part of the documentation is:
http://hyperkitty.readthedocs.io/en/latest/install.html#asynchronous-tasks

There are two changes to the setup:

First, the configuration must be updated, there's one more line in the
INSTALLED_APPS and there an additional variable that must be defined
if you don't want to depend on Redis. Here's the diff proposed in the
example project directory:
https://gitlab.com/mailman/hyperkitty/commit/681170c6986b7bf3a2731845196f9393ea0c8e84#8e136c7b1cda5d4f447a88940dbacf003e1aa32f.
If you do this change (and run the django migrate command), you don't
need to install Redis. The task queue will be in Django's own
database.

Secondly, there is an additional command to run in the background:
django-admin qcluster --pythonpath /path/to/project --settings settings
or:
/path/to/project/manage.py qcluster
depending on how you choose to run Django commands

This command will start the workers that will process the work queue.
The work queue is (for now) mainly about updating the cache, that's
why you may see those weird inconstitancies in the UI.

Sorry for not communicating about this earlier.
If you have any questions, feel free to ask me.


Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


[Mailman-Developers] Multiple REST servers

2017-05-18 Thread Aurelien Bompard
Hey people!

We now have enough lists and activity that Mailman's REST API is
becoming a bottleneck, since it only answers one request at a time.
Is there a way to start mutiple REST runners? Or to make the REST
runner multithreaded?

Thanks!
Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Django-allauth branch

2016-08-16 Thread Aurelien Bompard
Here are the branches, so you don't have to go hunt for them:

- django-mailman3: https://gitlab.com/mailman/django-mailman3/tree/allauth
- hyperkitty: https://gitlab.com/mailman/hyperkitty/tree/allauth
- postorius: https://gitlab.com/abompard/postorius/tree/allauth

A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


[Mailman-Developers] Django-allauth branch

2016-08-16 Thread Aurelien Bompard
Hi folks!

As you probably know, Mozilla Persona is going away very soon, and we had
plans to migrate our web authentication to the django-allauth library so we
could support local accounts properly. These last weeks I've been working
on that and my work is almost complete.

I've done some preliminary tests in situ and I'd like to add more unit
tests, but I think the branch can be merged now so you guys can take it
into account when you write merge requests.
It's quite a big change: it introduces a new python package,
django-mailman3, in order to share code between HyperKitty and Postorius.
The Allauth library handles all the login and signup workflow, including
the verification of emails, it handles the login using social account
providers but it can also add those accounts to existing Django users, etc.
It's pretty neat.

I've also used its email verification system to replace Postorius' internal
verification workflow. Django-allauth supports multiple email addresses per
user with a verified flag, so I've setup some signal handlers to sync them
with Mailman's users and addresses. It will make things much easier for us.
A big part of the job was also to adapt the templates to our design.

The creation of django_mailman3 was also the opportunity to share more code
between HyperKitty and Postorius (there was already some duplicated code)
and work on the integration. I'm pretty happy with the result.

It's a pretty big change but we need to move away from Persona before it's
taken down and obviously before 3.1, so I think it's neccessary, and better
to have it sooner rather than later.
If there's no strong opposition I'll merge the branches later today or
tomorrow.

Cheers!
Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

[Mailman-Developers] Postorius and verified email addresses

2016-04-06 Thread Aurelien Bompard
Hey people,

Mailman has the notion of "verified" email addresses. When a user is
created / registered in Postorius, a Mailman user can be created. It's off
by default but it seems like a logical thing to do.
This user will be created when the client visits the user profile or
preferences pages anyway, because it needs it in Mailman at that point.

However, the address that the user is created with is not verified. It's a
good thing because Django, by itself, does not verify email addresses. The
social auth providers that we use do validate them, but not Django, and
when internal auth is involved then it's only Django.

In that case, how should this address be validated? Should Postorius
consider that the login system always validates addresses and set them as
verified in Mailman? Should it ask mailman to verify the email addresses
when it encounters a user's un-verified address? This does not seem
possible in REST at the moment (unless I missed it), and should be
protected against multiple checks.

Ideas?

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Mailman 3.0 on centos 7

2015-09-29 Thread Aurelien Bompard
Hey Fabian,

> Does anyone know where I can find more info on deploying mailman 3 on centos 
> 7 aside from the standard docs site?

I'm currently packaging Mailman3 and HyperKitty + Postorius for Red
Hat / CentOS 7. My packages are here:
https://repos.fedorapeople.org/repos/abompard/hyperkitty/el-7/x86_64/
and the repo file is here:
https://repos.fedorapeople.org/repos/abompard/hyperkitty/hyperkitty-el.repo
The repo contains all the dependencies too.

However, I'm updating the packages as I go, so they may be unstable,
contain unreleased patches and branches, etc. The SRPMs are there so
if you want to start with that and write your own, go ahead.
I hope it saves you some time.


Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Migration of header_filter_rules

2015-09-11 Thread Aurelien Bompard
> You're right that model classes should never be imported outside mailman/model
> although there are a few violations of this rule.  It's less hard-and-fast for
> tests since sometimes that's just the most convenient way to handle it.
> [...]

Great explanation, thanks.
I'll send a merge request right now because I won't be able to do the
interface dance this weekend, and you may want to check out the rest
of the code. I'll create the required sets and interfaces on Monday.

Have a fun NFL season start! May all teams win! ;-)

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Migration of header_filter_rules

2015-09-11 Thread Aurelien Bompard
OK, I have something that follows these requirements (except the
site-defaults + site-config thing, currently site-wide checks take
precedence).
If you want to look at it :
https://gitlab.com/abompard/mailman/commits/import-header-matches

If you have some time Barry, I'd like your review on some things that
I'm not sure I'm doing right:
In the code and in the tests, I'm importing the new model object,
HeaderMatch. Is it OK? Should I go through the corresponding interface
instead? It looks like models are almost never imported from
throughout the code (except in the model module), and I don't know if
that's a best practice that should be followed here. If it is and you
have details on the reasoning, I'm interested :-)
Example : 
https://gitlab.com/abompard/mailman/commit/7a14a5f42af35185bee19b8e09c6e272fd85282e#4e170b02877ebb99f9ecbcd5fd2f6a50ee49827f_51_51

Thanks !
Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Migration of header_filter_rules

2015-09-10 Thread Aurelien Bompard
> It's probably going to require a separate table foreign
> keyed to the mailing list which contain a list of regexps and their actions,

Yeah, it's currently a python list pickled into the header_matches
field of a mailinglist, we can do better :-)

> Then this has to be exposed through the REST API so Postorius can present it 
> to the list
> admin.

Yes, and make edits.

> I'm not sure that the current semantics of header-match need to be preserved.
> If a list admin wanted one of their regexps to trigger the site-defined
> action, they could just choose it themselves.  I don't think we need to keep
> it for backward compatibility reasons, but we do need to migrate any existing
> header_checks to the new feature (i.e. for people upgrading from MM 3.0 to
> 3.1, as this will obviously be a 3.1-only feature).  I suggest using the
> config.antispam.jump_chain value as the default value for the new
> header_checks regexp value.

We could decide that the chain to be jumped to is nullable, in which
case the action would be defer, which would end up in the site-defined
chain like in the current model. Then the existing chain could just
use that and get the same behavior.

> You'll have to disentangle the site-wide header checks with the list-specific
> header checks, but maybe that can be done in the .get_links() method.
> Site-wide settings should take precedence.

Hmm, do you think so? I would have thought that list settings should
take precedence, since they are the most precise. A list could decide
to not filter the spam and deal with it in their own manner (holding
it instead of discarding it).

> Happy to talk more about implementation details, in whatever forum you want,
> but +1 on the feature.

Cool, I'll do it :-)

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

[Mailman-Developers] Migration of header_filter_rules

2015-09-08 Thread Aurelien Bompard
Hey all!

I'm hitting another issue in my migration from 2.1 to 3.x. In 2.1,
there was an option called "header_filter_rules" used mainly for spam
control, and advertised as such in the CGIs. These rules contained a
regex and an action to take on a match : defer, approve, reject,
discard, (un)subscribe, accept or hold.

In 3.x, this has been replaced by the list attribute "header_matches",
which is just a list of regexes. These list-specific regexes will be
added to the list of regexes in the antispam section of the
configuration file. If any of those matches, the action taken will be
the one set in the same section of the configuration file.

I'm having two issues with this. First, different list admins may want
different actions taken on spam, like discard, reject or hold. In 3.x
there's only one action possible.
Second, and that's the biggest problem for me, some of my lists admins
have been considering this feature as a generic filtering system
(because that's what it is in the end). Here are some of the usages
I've seen:
1. Have a rule that matches obvious spam ('^Subject: .*loan.*') and
discard those instead of rejecting
2. Have a rule that would accept an email based on the presence of a
header (X-Git-Module or Approved) and reject all other emails
3. On an automated list where commits are posted, have a series of
rules that would drop emails from the devel branches, accept emails if
they came from the right servers (Received header), and hold all the
rest
They refer to this feature as "regular Mailman filtering".

Use case 1 would need at least list-specific actions, use cases 2 and
3 would need rule-specific actions, like it is now in 2.1.

I don't think our current system of just collecting the header_matches
rules and applying a site-specific action is going to be enough in the
long run anyway, since list admins may want different actions taken on
their spam. For example a list about finance or pharmaceuticals may
want to hold and inspect what the spam detector flagged as spam,
because it's more likely to have false positives.
And if we're going to change this system, I'd suggest going all the
way to rule-specific actions, to ease migrations and give more
flexibility to list admins.

I'm willing to write this change, if you think it's a good idea. If
you think it should be handled differently, I'm all ears.

Thanks for your attention and input

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Merging users

2015-08-04 Thread Aurelien Bompard
 Actually merging two existing users is indeed a tricky thing because users
 link to so many other interesting bits and pieces.  Two separate users have
 two separate memberships, linked addresses, preferred addresses, and yes,
 preferences.  There are also the created_on, display_name, and (the mostly
 unused) password attributes.

 How deep does merging users go?

Abhilash's fix is good but I need to actually merge users, so here's
how I would do it.
https://gitlab.com/mailman/mailman/merge_requests/32
The change sits on top of Abhilash's, so there's no conflict.

I don't think I'm missing anything as far as users are concerned, but
please have a look :-)

Cheers,
Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

[Mailman-Developers] Merging users

2015-07-21 Thread Aurelien Bompard
Hey devs!

I'm hitting a problem when migrating from 2.1 to 3, but I think it's a
generic issue (or rather a missing feature) and I'd like to fix it.

If I try to associate an existing address to an existing user (without
this address obviously), the Mailman API will reply with a 400 error
User already exists. Postorius currently does not detect that and
just errors out with a 500 page (but that's not the issue here).

I think I need to merge the two users, and that's currently not
supported. I believe it would be a useful feature, so I'd like to
discuss it here. IMHO, the only tricky part would be to merge the
preferences associated with each user, but if I know which of my two
users has priority, I can just resolve the conflicts that way.
Am I missing something? Do you agree it would be a useful feature to have?

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] postorius login question

2015-06-08 Thread Aurelien Bompard
 Logging in via Email is probably broken in the Mailman 3.0 release.
 AFAIR it has been fixed the main trunk. We suggest people to use the
 Persona Login instead of the email.

I fixed it in HyperKitty and released a new tarballs a few days later,
it should be OK but it's not officially supported for 3.0. There are a
few missing features, like password reset, etc.
To login with the internal database, set USE_INTERNAL_AUTH to True in
your settings file.

I agree that the login with your email header can be misleading, it
made more sense with the old page layout, but not much now, I'll
remove it.


Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] MM 3: bundler; stuck on buildout phase...

2015-06-07 Thread Aurelien Bompard
 It is surprising, however, that the
 buildout just doesn't do the install itself.  Restarted the build
 and...

It should but there's a bug in the latest version of
python-social-auth that prevents the automatic install:
https://github.com/omab/python-social-auth/issues/623

For the time being, installing it via pip is the way to go.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] can not post to the list

2015-06-03 Thread Aurelien Bompard
 Probably last one is because of misconfiguration of
 api_key: SecretArchiverAPIKey ?

If the first URL does not match, it means that HyperKitty is not
activated in the virtualhost for 127.0.0.1.
You should get a message in HyperKitty's logs stating that the
connection was refused because the IP address is not allowed.
You have two options:
- activate HyperKitty for 127.0.0.1
- in HyperKitty's settings file (production.py), edit the
MAILMAN_ARCHIVER_FROM variable to allow you local IP. This IP address
must not change.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] right adding of mailman 3 conf lines to httpd.conf

2015-06-01 Thread Aurelien Bompard
 ValueError: Unable to configure handler 'file': [Errno 13] Permission
 denied: '/var/log/mailman-web/mailman-web.log'
 After I corrected permissions for log file mentioned I can access
 Postorius and Hyperkitty.
 Everything looks working, I will test in more details later.

Ah, right, the fact that you have to create the directory and set the
permissions for the production setup was not added in the README file.
I'll fix that.
I'm however surprised that you didn't get the error in your Apache
logs without uncommenting the ErrorLog directive. Do you have anything
in your apache error log?

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] can not post to the list

2015-06-01 Thread Aurelien Bompard
   File 
 /usr/local/src/mailman-bundler/venv-3.4/lib/python3.4/site-packages/mailman_hyperkitty/__init__.py,
 line 101, in list_url
 return self._get_url({mlist: mlist.fqdn_listname})
   File 
 /usr/local/src/mailman-bundler/venv-3.4/lib/python3.4/site-packages/mailman_hyperkitty/__init__.py,
 line 82, in _get_url
 result = requests.get(url, params=params)

That's Mailman core trying to talk to HyperKitty over http to get the
list archives URL. The URL it's trying to reach is set in the
deployment/mailman-hyperkitty.cfg.
My guess is that you need to update it because if HyperKitty is
running under Apache, the port is no longer 8000, it's 80 (so you can
remove it from the URL).
If that's the problem, I'll update the README file.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] mailman 3: http vs https

2015-06-01 Thread Aurelien Bompard
 2) To get rid of https.

 I choose last option and have moved Mailman 3 config lines to :80
 virtualhost, commented redirection too.

 Now I can see Postorius and Hyperkitty on http connection but I can't
 login - I've been redirecting to https pages right after login, which
 are not accessible.

If you don't want to use HTTPS, there's a USE_SSL variable in the
Django settings file that you need to set to False.
Otherwise, HyperKitty and Postorius will try to redirect you to HTTPS
on the login page and when you're logged in to prevent credentials and
session theft.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Installing Mailman3 with mailman bundler fails: Couldn't install: python-social-auth 0.2.9

2015-05-18 Thread Aurelien Bompard
 So the current python-social-auth is not buildout compatible?

It seems so, yeah. I did not investigate further to see what buildout
was choking on.

 Is it my turn to file a bug in the python-social-auth bug tracker?

That would be great! Thanks

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Installing Mailman3 with mailman bundler fails: Couldn't install: python-social-auth 0.2.9

2015-05-18 Thread Aurelien Bompard
Hey!

 No eggs found in
 /tmp/easy_install-LK6bYy/python-social-auth-0.2.9/egg-dist-tmp-FzLeGP (setup
 script problem?)

I'm getting the same error, this does not look like a problem in the
bundler but rather in the latest version of python-social-auth. It
works if you insert python-social-auth0.2.9 on line 48 in
buildout.cfg.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] error when trying to register via hyperkitty

2015-05-06 Thread Aurelien Bompard
Hello, and thanks for your report.

 When i try to signup via hyperkitty i get:

Using the internal auth/registration system isn't really tested 
supported, it's better to use the Persona button. However, that's a
real bug and I just pushed a commit to fix it:
https://github.com/hyperkitty/hyperkitty/commit/1068b3f04faed99a16521c75c13232698208e338

Thanks for reporting!

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Mailman 3 discussion

2015-04-21 Thread Aurelien Bompard
 Now there is no response from http://127.0.0.1:8000/mailman3
 at all... :(

 Just blank screen of links and 'Request sent' status.

Make sure you started the runserver command again. Does it output
something when you connect to the page?

A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] [hyperkitty-devel] Mailman Suite 3.0rc1 awaiting an upstream fix

2015-04-20 Thread Aurelien Bompard
 We are (as in Patrick is) currently working on getting a Fedora 22 builder 
 added
 to the jenkins instance so that we have a python 3.4 available for you folks 
 if
 you so desire :)


Fedora 21 has Python 3.4, so that would be enough.

A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] GSoC 15 - Interested in contributing to Hyperkitty

2015-03-26 Thread Aurelien Bompard
 In my proposal I suggested using any of several asynchronous job queue
 libraries, such as Celery or Huey. These all use redis as a back-end.
 Because I have no experience with asynchronous job queues, I'm not sure if
 this is too much baggage for our purposes. Maybe we just don't want the
 extra dependencies.

Yeah, we don't want to add another database or an AMQP server just for
that. We must keep it simple for admins to deploy.

 Regarding cron jobs, there's also django-background-task which is a simple
 django addon that might do what we need. Again, if we don't want/need the
 extra dependency, rolling our own cron job should be fairly
 straight-forward.

I'm already using the jobs infrastructure provided by the
django-extensions package:
http://django-extensions.readthedocs.org/en/latest/jobs_scheduling.html
I did consider django-background-task but django-extensions seemed
like a better fit, because django-background-task seems written for
delayed tasks, not periodic tasks (well, a task could call itself
again when done, but it seems like a hack). I'm not opposed to
switching to django-background-task if we use the delayed job
feature or if we need the extra flexibility of choosing exactly how
many seconds apart we want our tasks to run.

 If we choose to pre-build the mbox files, we can't simply have them
 served through the webserver, because some lists are private

 Then there is also an authentication step?

Yeah, we must use HyperKitty's authentication and check if the user is
allowed to see the archive. So the files can't be served by the
webserver like static files.

 I noticed on the test server
 that I can't actually look at any of the mailing lists because they're all
 private.

If you're looking at lists.stg.fedoraproject.org, it's currently very
outdated (still running the Python2-compatible branch of Mailman 3). I
have another test server with more current info if you want, but I
break it regularly. It's lists-dev.cloud.fedoraproject.org

 When we create the mbox file, do we simply note that an attachment existed
 (e.g. Attachment: myattachment.txt) or do we actually put the attachment
 in the mbox? AFAIK mbox is a plaintext format, so if the latter is the case
 then I'm not exactly sure how this would work...

We do put the attachment in the mbox, as a MIME component like in
every email. If you choose view source when looking at an email with
attachments, you'll see how it's done.

 Are there going to be any issues handling unicode foreign characters or
 with file locks? Right now it looks like we should only have one process
 handling the mbox, but is it possible that more than one could be spawned
 somehow?

No, mbox files are not designed for concurrent writes, so it's better
to have a single process write to them.

 Another possible nice-to-have feature I thought of yesterday is a
 download link that scripts can use to get archives (e.g.
 /download?year=xmonth=y). On the other hand, maybe this is just a
 security risk that has no actual use case, but I'd still like to have a
 second opinion on this.

Well, there still is the authentication issue.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] GSoC 15 - Interested in contributing to Hyperkitty

2015-03-25 Thread Aurelien Bompard
Hey David, here are my thoughs on the challenges:

 1) Determine which messages to include in the mbox.
 An entire list archive is clearly one choice, but is there also
 interest in generating mbox files for specific threads, list archieves
 between specific dates, etc.?

Hmm, depending on the architecture we choose, we may not have a lot of
options. I'd like to see at least whole-list and last 30 days
archives though, this last one being useful to those who want to use
their mail client and seed it with the latest discussion to reply
in-thread.

 2) For each message, append plaintext to mbox file.
 Is this the part where we risk blocking the UI? Certainly for
 hundreds of thousands of messages, this will be a computationally intensive
 step, so will this have to be run in a separate thread?

Yeah, with a lot of messages, and with possible attachments, we may be
creating hundred of megabytes or maybe gigabytes of data. This has to
be done outside of the webserver process, so we'll need something like
a task queue and a daemon process or a cron job. Or we could be
building and appending to the mbox files when new messages arrive,
which would take up more disk space but would be more fluid from a UI
point of view. It would also probably be much more resource-intensive
than a cron job, because the mbox files will be large and should be
gzipped, so it would be better to append a batch of emails than
opening and closing on each incoming email.
I'm leaning towards pre-rendering the mbox files in a regular cron job
and warning the user in the UI that the archive contains all email up
to the last hour, for example.
We can't use the prototype archiver because we need to filter the
messages content and escape email adresses to protect from spam
harvesters, like MM2.1 currently does.

 3) Present mbox file to user for download.
 I'm hoping this is a trivial step, but I'm not sure about some of the
 specifics. For example, is Hyperkitty only able to run on apache, or is the
 choice of web server entirely up to the web admin? How we ultimately serve
 the file will depend on these details.

HyperKitty runs on Django, which can be served by whichever
WSGI-compliant server the admin chooses (Apache's mod_wsgi, uWSGI,
gunicorn, etc.). If we choose to pre-build the mbox files, we can't
simply have them served through the webserver, because some lists are
private (only available to subscribers).

I hope that clearifies a bit.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] GSoC 15 - Interested in contributing to Hyperkitty

2015-03-24 Thread Aurelien Bompard
 I'm interested in contributing to the Hyperkitty archiver. Specifically,
 it looks like some requested features for Hyperkitty include rss syndication
 for entire mailing lists/specific users/specific threads, and the ability
 to view entire threads as plaintext and download that plaintext.

We don't have either feature yet, but I think RSS syndication would be
much too short for a GSOC project.
There's always been demand for a way to download a list archive as an
mbox file, and it's reasonably complicated if you want to avoid
blocking the UI, so this may be a good project similar to the
plaintext threads feature you mention.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Common use case archiving via configuration

2015-03-24 Thread Aurelien Bompard
 Would you mind if I used the Hyperkitty POST code as the basis for an example 
 POST archiver for Mailman?

Sure, no problem.
Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] How do I turn on/off moderation of subscription requests?

2015-03-23 Thread Aurelien Bompard
 Oops.  Looks like I'd forgotten to push them.  They should now be
 available in
 lp:~barry/mailman/subpolicy


Got it.
OK, the SubscriptionWorkflow seems correct in implementation but it has
almost no tests, so I'll write some.
But there's something else: the SubscriptionWorkflow class does not seem to
be used anywhere except in the current unit test. Am I missing something ?

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] How do I turn on/off moderation of subscription requests?

2015-03-23 Thread Aurelien Bompard
  Nope.  It needs to be hooked up.  The branch wasn't merged because it was
  incomplete.

Oh, and the _send_confirmation method is also not implemented. Could
you briefly explain how does the confirmation system work? (or point
me to the doc, I didn't find it)
Thanks

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] How do I turn on/off moderation of subscription requests?

2015-03-23 Thread Aurelien Bompard
 Nope.  It needs to be hooked up.  The branch wasn't merged because it was
 incomplete.

Ah alright, I'm just adding some tests but it would probably be better you
did the hooking up... (or I'll need a good amount of guidance)
Thanks
Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Small change to REST API for held subscription requests

2015-03-23 Thread Aurelien Bompard
 As for the `password` key: It's recognized by mailman.client and
 exposed within the mlist instance's `requests` property. But it's used
 nowhere in postorius and I would be surprised if it's used anywhere in
 hyperkitty (Aurélien...?). I guess it can go away.

No problem, I don't use pending mailing lists requests.

Aurélien.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Common use case archiving via configuration

2015-03-23 Thread Aurelien Bompard
 Aurelien I’d be interested to hear your thoughts on this topic.

Well, the implementation of the archiver for HyperKitty does POST to
archive emails :
https://github.com/hyperkitty/mailman-hyperkitty/blob/master/mailman_hyperkitty/__init__.py
However, there are a few things specific to HyperKitty:
- authentication is done via a shared API key, it was easier than HTTP
basic auth because those tokens are not passed to the WSGI application
by default (at least not in Apache's mod_wsgi):
https://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPassAuthorization
- when requesting a message URL, the server only replies with the
local part, the server name is taken from the configuration. The
reason is that the client usually talks over localhost, and we want
the front-facing server name.

Doing something more generic is possible but would be a bit harder,
and the current archiving plugin is still rather short.
I'm not sure we can design an HTTP API for every need at the moment.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] How do I turn on/off moderation of subscription requests?

2015-03-21 Thread Aurelien Bompard
 Have a look at the workflow illustrated in my crappy Dia file, which I
 think is an accurate
 representation of how the policy should work.


Hmm, could you point me to this Dia file please, I can't find it. Thanks!

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] How do I turn on/off moderation of subscription requests?

2015-03-20 Thread Aurelien Bompard
 Do you think I can help you work on that? Or would you prefer doing the
 initial branch resurrection?
 Anything I need to know before I start?


Alright, I resurrected your branch to the best of my understanding. I hope
it's more Lazarus than Reanimator.

  https://code.launchpad.net/~abompard/mailman/subpolicy

All tests pass, but there's still a missing part: the new attribute in the
MailingList table must still be actually written as a column, and an
Alembic migration script must be generated. I'm going to do that in the
next hours (or maybe on Monday), but in the meantime this branch only
contains your former code, with minor adaptations. Could you check it out?

Thanks!
Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

[Mailman-Developers] The bundler is back in the game

2015-03-18 Thread Aurelien Bompard
Hey people,

I am pleased to announce that the Mailman bundler tool is working again.
If you want to easily install Mailman + HyperKitty + Postorius, just follow
this tutorial:
  http://mailman-bundler.readthedocs.org
It is not very suitable for development though, because I get the code from
the PyPI releases, not from bzr/git.

Of course it also means that the latest HyperKitty release on PyPI is
compatible with Mailman 3 again. Which makes me very happy.

Please test it and report bugs!

Cheers,
Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Group Photo from PyCon Mailman sprint last year

2015-03-12 Thread Aurelien Bompard
 Aurélien Bompard - Postorius


Actually I'm working on HyperKitty.
Thanks for the pic !

A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Python 3

2015-01-06 Thread Aurelien Bompard
I must also consider how much work it would be to just port HyperKitty 
KittyStore to Python3.
All things considered, it may very well be faster and more reliable.
A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Python 3

2015-01-06 Thread Aurelien Bompard
  What if a site wanted to run them on different VMs for example?


Yeah, but certainly there should be a limit to that. What if a site wanted
to run each mailman runner on a different VM for example?
Oh well, I guess there's no other way. I hope it's not going to be a mess
to configure, I'd like to avoid having the admin set HK's base URL in 3
different places.

Another thing we shouldn't forget is that Hyperkitty or Postorius might
 not be the only apps living in a Django project. Some people might
 choose to integrate them into their long-running Django sites, with lots
 of Py2-app dependencies.


Very good point.

Thanks.
Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Python 3

2014-12-28 Thread Aurelien Bompard
 This was a design mistake, I think.


Yeah, I see that now. But at that time, if I had known that I had two more
years (and counting) before MM3 was released, I'd probably have made
different choices.
I hope I'm not making the same mistake again.

 As I mentioned, I think LMTP *could* work, but REST (inside HK) could
 work too.  Aurelien, what do you think?

I'd go with REST, it seems more flexible and we already have nice libraries
for it.

A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Python 3

2014-12-26 Thread Aurelien Bompard
 One of my top priorities has been to port Mailman 3 (core) to Python 3.
 This
 work is now complete, and ready to be merged into trunk.  No doubt bugs
 still
 lurk, but at least the entire test suite is passing.


Congrats !


* A few database columns have changed from LargeBinary to Unicode.  I have
 not
   yet figured out how to add the Alembic schema migrations to handle this,
 but
   I'll do so before the release.


This should be pretty easy, something like the following command should
work:
alembic -c src/mailman/config/alembic.cfg revision --autogenerate -m
python3 port

[...]  then I'll merge this to trunk and do a 3.0b5 release as a
 Python 3-only application.  Mailman 3 will not be bilingual so Python 2
 support will be dropped.


Wow. I am very surprised.
So we went from Python3 compatibility is not on the blocker list for
Mailman 3.0 to Mailman 3.0 will only work on Python 3.
That's quite a change.
This means I must now port HyperKitty and Kittystore to Python3, check that
we don't use Py2-only libraries, etc.
And mailman.client must be ported too, since it does import stuff from
mailman for testing purposes. I think Postorious is safe, but that must be
verified (I believe it imports the testing framework from mailman.client
and thus must be ported too).

And I thought the 3.0 release was almost there. I must say this is rather
discouraging.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Python 3

2014-12-26 Thread Aurelien Bompard
 I'm having some trouble with this because the system alembic doesn't have
 access to the mailman source tree, which it needs (you get import
 errors).  I
 tried to run alembic out of the .tox virtualenv, but that fails because the
 mailman config system needs to be initialized.


Right, I'm having issues too with the config file not being initalized.
I'll have a closer look.

Oh gosh, no!  I'm sorry I was imprecise, but I meant only that Mailman 3
 *core* would be Python 3.  I certainly would never make you guys do all
 that
 busy work without consulting you first.  So for the record, HyperKitty and
 Postorious can absolutely port on their own time frame, and that need not
 at
 all block a release of the full suite.  One of the advantages of accessing
 the
 core through the REST API is that it doesn't matter what clients like
 HyperKitty and Postorious are written in.


I'm not exclusively using the REST API though. I'm importing a couple
interfaces, mostly the archiver interface. I'm also using the custom
Message class a lot in the tests. And I'm importing a couple database types
for compatibility in my own schemas (Enum and UUID)
But I think the main problem is the import of mailman's config object in
the class that implements the IArchiver interface. I don't believe there's
another way to get the configuration.
And now that I think of it, the archiver interface will be imported by
Mailman core, and will thus run with a Python3 interpreter. As a result,
all of KittyStore must at least be Python3 compatible.

A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Python 3

2014-12-26 Thread Aurelien Bompard
 But there could be!  I took a very quick look at HK (but not KittyStore)
 and
 it doesn't look like you need much.  What if I added a REST API to access
 the
 core's system configuration settings?


That would work.


 Yep, I missed that.  Is it possible to feed HK messages out-of-process?
 E.g. via the command line?


Not now. Would an LMTP server be appropriate? If so, could Mailman's
internal LMTP server be split off into a Py2-compatible library?
What protocol would be best suited in your opinion?

A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Error installing mailman.client due to Aurélien

2014-12-11 Thread Aurelien Bompard
At first I thought I had introduced a regression but it's actually just
my name :-)
Don't blame me, I didn't choose it!

(Florian, can you fix that? And by the way my last name is Bompard,
without the A)

Thanks !
A.

2014-12-11 21:08 GMT+01:00 Andrew Stuart andrew.stu...@supercoders.com.au:

 Hello,

 Referring to transcript below, the word Aurélien seems to be causing a
 unicode error when setting up mailman client.

 When I cut it out, it works.

 thanks


 (venv2.7)ubuntu@server01:~$ bzr branch lp:mailman.client
 You have not informed bzr of your Launchpad ID, and you must do this to
 write to Launchpad or access private data.  See bzr help launchpad-login.
 Branched 58 revisions.
 (venv2.7)ubuntu@server01:~$ cd mailman.client/
 (venv2.7)ubuntu@server01:~/mailman.client$ ls
 bin  COPYING.LESSER  distribute_setup.py  Makefile  MANIFEST.in
 README.txt  setup.cfg  setup_helpers.py  setup.py  src  _static  template.py
 (venv2.7)ubuntu@server01:~/mailman.client$ python setup.py develop
 Traceback (most recent call last):
   File setup.py, line 40, in module
 'src/mailmanclient/NEWS.txt'),
   File /home/ubuntu/mailman.client/setup_helpers.py, line 138, in
 long_description
 if not value.endswith(NL):
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 162:
 ordinal not in range(128)
 (venv2.7)ubuntu@server01:~/mailman.client$ vi src/mailmanclient/NEWS.txt
 (venv2.7)ubuntu@server01:~/mailman.client$ cat src/mailmanclient/NEWS.txt
 ===
 NEWS for mailman.client
 ===

 1.0.0b1 (-xx-xx)

 * Addedd an improved test harness using WebTest. Contributed by Aurélien
 Abompard.


 1.0.0a1 (2014-03-15)
 

  * Initial release.
 (venv2.7)ubuntu@server01:~/mailman.client$ vi src/mailmanclient/NEWS.txt
 (venv2.7)ubuntu@server01:~/mailman.client$ cat src/mailmanclient/NEWS.txt
 ===
 NEWS for mailman.client
 ===

 1.0.0b1 (-xx-xx)



 1.0.0a1 (2014-03-15)
 

  * Initial release.
 (venv2.7)ubuntu@server01:~/mailman.client$
 ___
 Mailman-Developers mailing list
 Mailman-Developers@python.org
 https://mail.python.org/mailman/listinfo/mailman-developers
 Mailman FAQ: http://wiki.list.org/x/AgA3
 Searchable Archives:
 http://www.mail-archive.com/mailman-developers%40python.org/
 Unsubscribe:
 https://mail.python.org/mailman/options/mailman-developers/aurelien%40bompard.org

 Security Policy: http://wiki.list.org/x/QIA9
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] About Mailman's unicode-enabled Message subclass

2014-12-02 Thread Aurelien Bompard
Thanks to you all !

I've looked, again briefly because after a short time my head spun out
 of control, at trying to fix it by overriding additional methods like
 _get_params_preserve(), but I didn't get far.


Yeah, I tried that too, not much more luck...

 To be honest, mailman.email.message.Message should really go away.

I kinda think so too, so I tried removing the conversion to unicode in
get() and __getitem__(): I have about 20 failures in the whole test suite,
and a couple UnicodeWarnings from SQLAlchemy.
I'm going to try and fix these failures and the code that expects unicode
headers, and send you a MP How about that?

A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] About Mailman's unicode-enabled Message subclass

2014-12-02 Thread Aurelien Bompard
Hmm, that was easier than I thought :
https://code.launchpad.net/~abompard/mailman/bug-1060951/+merge/243401

All tests pass, and no unicode warning from SQLAlchemy in the tests.

A.

2014-12-02 11:42 GMT+01:00 Barry Warsaw ba...@list.org:

 On Dec 02, 2014, at 11:26 AM, Aurelien Bompard wrote:

 I kinda think so too, so I tried removing the conversion to unicode in
 get()
 and __getitem__(): I have about 20 failures in the whole test suite, and a
 couple UnicodeWarnings from SQLAlchemy.  I'm going to try and fix these
 failures and the code that expects unicode headers, and send you a MP How
 about that?

 +1; I look forward to seeing it.  I suspect those will be useful also with
 my
 experimental py3 branch. :)

 Cheers,
 -Barry
 ___
 Mailman-Developers mailing list
 Mailman-Developers@python.org
 https://mail.python.org/mailman/listinfo/mailman-developers
 Mailman FAQ: http://wiki.list.org/x/AgA3
 Searchable Archives:
 http://www.mail-archive.com/mailman-developers%40python.org/
 Unsubscribe:
 https://mail.python.org/mailman/options/mailman-developers/aurelien%40bompard.org

 Security Policy: http://wiki.list.org/x/QIA9

___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


[Mailman-Developers] About Mailman's unicode-enabled Message subclass

2014-12-01 Thread Aurelien Bompard
Hi * !

I'm trying to fix bug 1060951 (that I reported), and no matter how I poke
at it, I can't find the proper way to solve it, so I'd like to share my
thoughts with you.

https://bugs.launchpad.net/mailman/+bug/1060951

The issue is with our unicode-enabled subclass of Python's
email.message.Message class. Our subclass converts headers to unicode in
the get() and __getitem__() methods. However, when an email has an
attachment, one of the ways of representing the filename is to urlencode it
(RFC 2231). The urldecoding is thus done on an unicode string, which is
then passed to email.utils.collapse_rfc2231_value and decoded to unicode
again. Of course, this fails, an unicode string can't be decoded twice.

I tried re-implementing more of the original Message class to avoid this
second decoding, but then I get another problem: the filename has already
been urldecoded. Here's an example to make it clearer:

 m1 = email.message.Message()
 m1[content-disposition] = attachment;
filename*=UTF-8''d%C3%A9jeuner.txt
 m1.get_param(filename, header=content-disposition)
('UTF-8', '', 'd\xc3\xa9jeuner.txt')

If I use mailman's Message implementation, I get:

 m2 = mailman.email.message.Message()
 m2[content-disposition] = attachment;
filename*=UTF-8''d%C3%A9jeuner.txt
 m2.get_param(filename, header=content-disposition)
(u'UTF-8', u'', u'd\xc3\xa9jeuner.txt')

The only difference is that the resulting tuple contains unicode strings.
Now when I try to pass this result to email.utils.collapse_rfc2231_value,
like Message.get_filename() does:

 p1 = m1.get_param(filename, header=content-disposition)
 email.utils.collapse_rfc2231_value(p1)
u'd\xe9jeuner.txt'

 p2 = m2.get_param(filename, header=content-disposition)
 email.utils.collapse_rfc2231_value(p2)
TypeError: decoding Unicode is not supported

And if I suppress the final decoding from what's already a unicode string,
I get
u'd\xc3\xa9jeuner.txt'

And, as you can see, the original u'd\xe9jeuner.txt' is not the same as
u'd\xc3\xa9jeuner.txt' (the second one is encoded twice).

In the end, our subclass of Message can't extract non-ascii filenames.
The bug 1060951 contains a testcase for this, it's a replacement for the
src/mailman/email/tests/test_message.py :
https://bugs.launchpad.net/mailman/+bug/1060951

I'm really interested in any insight on this issue. Thanks for reading all
that :-)

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

[Mailman-Developers] Changing the default_moderation_action has no effect on existing members

2014-11-25 Thread Aurelien Bompard
Hi *,

I'd like to discuss the algorithm we use to enforce a list's default
moderation action. Here's what I understand:
- the list's default_moderation_action setting is stored in the database
and can be changed via the REST interface
- when a new member is created, its moderation_action is imported from the
list's default_moderation_action depending on its role (see
model/member.py:84)
- this member's moderation_action is stored in the database
- it's the member's moderation_action that is used in the moderation rule
(rules/moderation.py:52)

As a result, unless I'm missing something changing, the list's
default_moderation_action has no effect on existing members. Do I
understand correctly?

I suggest we leave the member's moderation_action on None when it's
created, and modify the moderation rules to go look for the list's default
setting if the member's value is None.
How about that ? Other suggestions?

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Want Mailman 3 suite to release faster? Here's some bugs you can help with!

2014-11-12 Thread Aurelien Bompard
Very cool, I'll have a look!

A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] mailman-bundler-3.0b2 Login methods

2014-11-10 Thread Aurelien Bompard
Hey!

Indeed I'm the HyperKitty dev, and I wrote mailman-bundler too. Sorry I
couldn't reply earlier.


 Yes it reloaded to '/archives/' correctly. But the new page seems
  NOT logged in. The Login button is still there, and the
  administrative options don't appear.


Please check your webserver logs for any 500 error. Also please check that
you have setup the BROWSERID_AUDIENCES variable in the configuration file
(there is a link in a comment right above the variable with instructions on
how to configure it).

Also, we should definitely make it easier to hop from the archives to
 the admin pages and vice versa.


There should be a link to Postorious in the top menu bar in HyperKitty now.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] MM3 Sqlite to PostgreSQL migration?

2014-11-04 Thread Aurelien Bompard
Hey Guillaume,

The new SQLAlchemy backend has just been merged as you've probably seen. It
should upgread seamlessly from the previous Storm backend, but nothing has
been done to make transition from SQLite to PostgreSQL possible.
If I were you I would take the following steps:
1. upgrade to the new SQLAlchemy-based branch and let mailman do the
migration
2. set your mailman config to point to the PostgreSQL DB
3. start mailman to have it create the DB schema
4. now run an SQLAlchemy-based script that would migrate the data of each
table from SQLite to PostgreSQL

Step 4 is of course the most complicated, but you can iterate on each table
using the metadata instance. Use 'Metadata.sorted_tables' to iterate in the
proper order (based on foreign key references). You should only have to
create one connection for each DB, run 'Metadata.reflect()' on each,
iterate on the SQLite tables and insert in the PostgreSQL.

Let me know if that works. Good luck, Jim ;-)

Aurélien



2014-11-01 18:36 GMT+01:00 Guillaume Libersat gliber...@sigill.org:

 Hi,

 We are currently running a MM3 instance in production with a SQLite
 backend (at ulists.org). It was at first a test, but a lot of people
 have already started to use the service and now we are kind of stuck
 (but happy ;-) ).

 First, I've seen a lot of DBLock issues in the logs and I think there
 also is a race condition happening with Held Messages that leads to
 subsequents 500 until you manually copy fake email files (If I'm
 correct, the held message file is deleted, then the SQL query is made
 but fails. The result is a system in an inconsistent state: there's a
 held message in DB, but no more on disk).

 Second, I've tried to manually migrate to PostgreSQL but did not succeed
 because of a lot typing issues and differences between these two databases.
 Barry told me there's an SQLAlchemy port that is soon to be released, at
 least in alpha stage. Do you think it could help to achieve such a
 migration? I'm willing to help testing this new backend and, if someone
 can guide me with the MM stuff, write migration scripts.

 Thanks and again, MM3 is really an awesome suite of software! :)

 Guillaume
 ___
 Mailman-Developers mailing list
 Mailman-Developers@python.org
 https://mail.python.org/mailman/listinfo/mailman-developers
 Mailman FAQ: http://wiki.list.org/x/AgA3
 Searchable Archives:
 http://www.mail-archive.com/mailman-developers%40python.org/
 Unsubscribe:
 https://mail.python.org/mailman/options/mailman-developers/aurelien%40bompard.org

 Security Policy: http://wiki.list.org/x/QIA9

___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] mailman.client and UUIDs for user.user_id

2014-10-30 Thread Aurelien Bompard
 So Aurelien and Florian, what do you think?  Should we use the hex
 representation of the UUID and should I keep backward compatibility.


If we can't see any valid reason for converting to ints today, I would
personally vote for not converting in the REST API, and for mailman.client
to return the UUID object (not the hex string), because I think a python
client library should expose python idoms and objects when possible.
If we do that, keeping backwards compatibility could be useful indeed, and
you can start from my change here:
http://bazaar.launchpad.net/~abompard/mailman.client/uuids/revision/58

But FYI, I have already adapted my code in HyperKitty to do the conversion
to UUIDs, so I really don't mind if we keep the status quo. Let's just do
what's best in the long run.

A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] mailman.client and UUIDs for user.user_id

2014-10-29 Thread Aurelien Bompard
Hi Florian!

I think mailmanclient should not expose a different value as the REST
 API does (the fact that it's an int representation of a uuid isn't
 exactly obvious from the outside, so a non-explicit conversion could
 potentially lead to some confusion).


Hmm, to me the current situation is more confusing, since the user_id
property I get from the REST API is different from the one I find in the
database.
I guess it depends on the reason the UUID is serialized. If it's to avoid
being messed up during the transport, it's a transport issue and I think
the library should convert it back (but the original ascii string should
not be a problem so it's probably not that.
Anyone remembers why the REST API exposes the int value instead of the
string? It happened in commit 7043 but the reason is not given in the
commit message.


 But how about we add a `uuid` property to the user object which
 exposes the original uuid value?


Not sure that's useful, converting it back to an UUID is easy enough (
uuid.UUID(int=value) )

A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] mailman.client and UUIDs for user.user_id

2014-10-29 Thread Aurelien Bompard
 If the user_id value changes depending on whether
 you are using the API directly via HTTP or through mailmanclient, that
 might be hard to understand.


Ah, very good point. I'll do the conversion myself then I guess.

A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Hyperkitty - archive URLs - month with leading zero

2014-10-27 Thread Aurelien Bompard
Hey Tobias,
Sorry for not replying to your email but I did read it.

having a two digit month in the URL would bring it closer to the ISO 8601
 format.


Using leading zeros in URLs is something I had already noticed and wanted
to do, but I guess I never wrote it down when I thought about it and thus,
forgot it ;-)
FYI it's already possible to use leading zeros in the URLs, they are just
not generated that way by the UI.
I'll make sure I write it down this time, thanks for your email.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

[Mailman-Developers] mailman.client and UUIDs for user.user_id

2014-10-27 Thread Aurelien Bompard
Hey folks,

Mailman stores user_ids as UUIDs in the database, and they are converted on
the fly to integers by the REST API.
However, the mailmanclient library do not convert them back to UUID. Do you
think this is something that it should do, or should I handle this
conversion in my own code?

FYI, I'm attaching a very simple patch which does this conversion in
mailmanclient (4 lines changed).

Aurélien
=== modified file 'src/mailmanclient/_client.py'
--- src/mailmanclient/_client.py	2014-04-22 12:35:29 +
+++ src/mailmanclient/_client.py	2014-10-27 15:35:08 +
@@ -27,6 +27,7 @@
 
 import re
 import json
+from uuid import UUID
 
 from base64 import b64encode
 from httplib2 import Http
@@ -644,7 +645,7 @@
 
 @property
 def addresses(self):
-return _Addresses(self._connection, self.user_id)
+return _Addresses(self._connection, self.user_id.int)
 
 @property
 def display_name(self):
@@ -668,7 +669,7 @@
 @property
 def user_id(self):
 self._get_info()
-return self._info['user_id']
+return UUID(int=self._info['user_id'])
 
 @property
 def created_on(self):
@@ -708,7 +709,7 @@
 @property
 def preferences(self):
 if self._preferences is None:
-path = 'users/{0}/preferences'.format(self.user_id)
+path = 'users/{0}/preferences'.format(self.user_id.int)
 self._preferences = _Preferences(self._connection, path)
 return self._preferences
 

___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] listarchiver table missing from postgresql schema

2014-07-18 Thread Aurelien Bompard
Got hit by that too, I just created a merge request with the missing file :
https://code.launchpad.net/~abompard/mailman/pgsql_upgrade/+merge/227289
Could anyone have a quick look at this?

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Disabling SELinux

2014-06-19 Thread Aurelien Bompard
For your information, I have written a small SELinux module for Mailman3,
it's included in my Fedora RPM and works fine. In the future (when MM3 is
out), I'll ask for integration in the core policy.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

[Mailman-Developers] Moderating subscriptions

2014-06-02 Thread Aurelien Bompard
Hey y'all,

In Mailman 3, I'm trying to create a list that would require its
moderators to approve subscriptions. In the Mailman doc, this is
commonly referred to as a closed list. However, I can't find a way
to create such a list, nor the database field which would mark it as
such.
I've also seen the hold_subscription() function in app.moderator which
seems to handle subscriptions that require moderation, but this
function does not seem to be used anywhere.
It feels like I'm missing a piece of the puzzle here, could somebody
point me to it?
Thanks!

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Mailman-Suite demo server

2014-05-05 Thread Aurelien Bompard
 Currently there is no links to migrate between postorius(the mailman3 web
 ui) and hyperkitty(the archiver).

Yeah, and that's something I'll fix as soon as I'm done squashing the
main bugs I have in my pile.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Bug in mailman-bundler

2014-04-28 Thread Aurelien Bompard
Hey Abhilash!

 I was trying out mailman-bundler and have setup a demo here [1]. I notice
 that with 'USE_SSL=True' in development.py deployment settings, there is a
 redirect loop while logging in[2]. I had to disable it to deploy.

Hmm, this parameter should be ignored if DEBUG is True. But you're
right, I had already seen this happen on Florian's install, so I'll
just disable it in deployment.py just to be sure.

 (The demo server still needs to be hooked up with postfix).

Yes, and the bundler generates configuration examples for Postfix, so
it should be rather easy.

 Also maybe you can configure your launchpad repo of mailman-bundler to
 handle bug reporting? I saw that it needs to be enabled for individual
 repositories.

Right, I missed that. Done now, thanks.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Deploying postorius and mailman-bundle

2014-04-28 Thread Aurelien Bompard
 While I was trying to deploy using nginx and
 uwsgi/gunicorn I found that they expect the script to have .py extension
 and not .wsgi. All new django versions currently create a wsgi.py file along
 with the  project itself. So I was thinking we should change that in our code 
 too.

OK, this file is actually generated by the djangorecipe Buildout
recipe, but fortunately there's a configuration option for the script
name. I'll fix it.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Deploying postorius and mailman-bundle

2014-04-28 Thread Aurelien Bompard
OK, fixed and pushed. I've added instructions for running via Gunicorn
in the README, can you check them?
Thanks!

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

[Mailman-Developers] Mailman3: creating a user from an existing address

2014-04-25 Thread Aurelien Bompard
Hey people,

I'm trying to create a User in Mailman 3 from an existing Address. If
I were using the Python interface, that would be very easy: just
create the user with no address and then link the existing address to
it.
However, I'm using the REST interface. In
mailman.rest.users.AllUser.create(), there's a try/except block which
explicitely looks for this case and raises an HTTP 400 error. Looking
at the test_existing_user_error() test case, it's apparently to
prevent creating a user twice, which is not my use case.
Are you OK if I hack the code to automatically link to an existing
address while still erroring-out if the user already exist?
Or would it be better to allow linking to an existing address from the REST API?

Cheers,
Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Mailman3: creating a user from an existing address

2014-04-25 Thread Aurelien Bompard
 So the address is currently unlinked?  And you don't want to link it to an
 existing user, but to a new user you're about to create?

Exactly. The address is unlinked and unverified. I'd like to create a
user for it.

 Sketching out an approach:
 [...]

Interesting. I'll look into that at some point, but I have a few more
urgent things to do, so if someone wants to beat me to it feel free...
;-)

A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Mailman3: creating a user from an existing address

2014-04-25 Thread Aurelien Bompard
 Can you open a bug?

Done: https://bugs.launchpad.net/mailman/+bug/1312884 :-)

A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


[Mailman-Developers] MM3: message held reason

2014-03-17 Thread Aurelien Bompard
Hey!

On Mailman3, every message held notification has XXX as the
reason. This comes from the HoldChain class in mailman/chains/hold.py,
where XXX is hardcoded.
I'd like to fix that. I think there could be a list in the message
metadata to which each matching rule would add a short description of
why it matched, like we currently have a list of matching rules in the
msgdata['rule_hits'] variable.
I'll make sure to mark these descriptions as i18n strings.

Are you OK with that? Any trap I'm not seeing?

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Moderation rules priority

2014-03-12 Thread Aurelien Bompard
OK, I've opened a bug on Launchpad to attach my very basic
implementation (plus a unit test). It's just 3 lines, it does not
implement Stephen's suggestion (which is probably better but involves
some refactoring). Here is the ticket:
https://bugs.launchpad.net/mailman/+bug/1291452
I've tested it on my setup, it works as expected.

Aurélien

2014-03-12 1:43 GMT-03:00 Stephen J. Turnbull step...@xemacs.org:
 Aurelien Bompard writes:

   I'd like to discuss what happens when an email is sent by both a
   member and a nonmember in Mailman3. How is that possible? Very easy,
   here's my use case : I have my own domain, say example.com, and for
   convenience and portability I choose to use Gmail as a
   server/storage/interface. My main adress is al...@example.com and I
   redirect it to al...@gmail.com, while I set a default identity in
   gmail to al...@example.com which will set the proper From header.
   However, for spam detection and spoofing reasons, gmail adds a Sender
   header with al...@gmail.com. My outgoing emails thus have both a From
   and a Sender header, and in this case email clients only display the
   From header (except Outlook, but eh...)

 Your outgoing emails also have an envelope sender, which might be
 different from both of the above.

   Mailman now: when I subscribe to a list, I use my regular address,
   al...@example.com. But the message.senders property will contain both
   addresses because of the Sender header. The email goes through the
   MemberModeration rule, which finds my subscribed address and, by
   default, associates the defer action.
   The email then goes through the NonMemberModeration rule, which finds
   my Gmail address and sets the action to hold (it ignores my main
   address because it's a member already).
  
   What do you think about all that? Do you agree there's actually an
   issue there?

 Yes.

   Any idea how to solve it? For example, make the NonMember rule exit
   if a member is found amongst the senders (which would simply be
   equivalent to making it yield to the Member rule). Bad idea?

 Offhand I'd say that having both a Member rule and a NonMember rule is
 a bad idea.  There should be one conceptual test: can we identify a
 member as the originator of this post?  Having Member and NonMember
 rules that can both succeed is not coherent.

 I think that what should happen here is that the Member rule should
 try to identify the originator, and the NonMemberModeration (if in
 effect) should just check for a member_identified property.  The
 member_identified property could be a Boolean or actually contain a
 list of members (list because it's not obvious what to do if each of
 From, Sender, and envelope sender corresponds to a different member;
 that would probably be a policy issue).

 I don't really see how order dependence can be avoided without
 violating DRY all over the place.

 Alternatively, NonMemberModeration might not be a rule, but rather a
 chain.  Perhaps that's the most elegant solution, as order dependence
 between chains is necessary.



___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


[Mailman-Developers] URLs in notification messages

2014-03-11 Thread Aurelien Bompard
Hey there!

I have a question about emails generated by Mailman3. This is an
example of a message held notification (your message awaits
moderator approval). According to the template, Mailman inserts a
cancel link at the end of the email:

If you would like to cancel this posting, please visit the following URL:
https://example.com/confirm/t...@example.com/longhash

I wonder where this link is supposed to lead. I did not find such an
endpoint in Postorius, and the Mailman REST API is not public anyway.
Am I missing something?

Thanks!
Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] URLs in notification messages

2014-03-11 Thread Aurelien Bompard
OK, thanks for the explanation Barry

A.
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


[Mailman-Developers] Moderation rules priority

2014-03-11 Thread Aurelien Bompard
Hey!

I'd like to discuss what happens when an email is sent by both a
member and a nonmember in Mailman3. How is that possible? Very easy,
here's my use case : I have my own domain, say example.com, and for
convenience and portability I choose to use Gmail as a
server/storage/interface. My main adress is al...@example.com and I
redirect it to al...@gmail.com, while I set a default identity in
gmail to al...@example.com which will set the proper From header.
However, for spam detection and spoofing reasons, gmail adds a Sender
header with al...@gmail.com. My outgoing emails thus have both a From
and a Sender header, and in this case email clients only display the
From header (except Outlook, but eh...)

Mailman now: when I subscribe to a list, I use my regular address,
al...@example.com. But the message.senders property will contain both
addresses because of the Sender header. The email goes through the
MemberModeration rule, which finds my subscribed address and, by
default, associates the defer action.
The email then goes through the NonMemberModeration rule, which finds
my Gmail address and sets the action to hold (it ignores my main
address because it's a member already).

What do you think about all that? Do you agree there's actually an
issue there? Any idea how to solve it? For example, make the NonMember
rule exit if a member is found amongst the senders (which would simply
be equivalent to making it yield to the Member rule). Bad idea?

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Problem with runner logger with unicode

2013-12-03 Thread Aurelien Bompard
So, if I understand correctly, Storm add to its exception the error
message it gets from PostgreSQL, which is a bytestream (encoded in
UTF-8 on your system). But Mailman sends its logs to the logger as
unicode, thus the exception must be converted to unicode, and that's
where the UnicodeDecodeError is raised.
What can we do? Should we try to decode the Storm exception using the
default system encoding before sending it to the logger?

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


[Mailman-Developers] HyperKitty : VCS change

2013-01-09 Thread Aurelien Bompard
Hello Mailmaners,

The HyperKitty project was historically using Bazaar as it VCS, and
was hosted on fedorahosted.org. An essential component was split off
(KittyStore), which was initially source-controlled with Git and
hosted on Github.
I'm trying to bring back some coherence into this, and considering
switching all the components to Git on fedorahosted.org.
The reason for this choice is that me and the other two most frequent
contributors are much more skilled with git than with bzr.

We're concerned however by the uncomfortableness it may cause you, the
Mailman community, if/when you want to contribute to HyperKitty.
Barry, Terry, Florian, would that be a problem ? Others ?
Of course I'm ready to merge patches sent by email or bugtracker, but
that's a little more friction.

It's not a speak now or forever hold your peace moment, but this
unnecessary complexity is tiring day-to-day, so I'd rather sort that
out quickly-ish.

Thanks !

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
http://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Adding keys in the configuration file

2012-09-17 Thread Aurelien Bompard
Hi Mailmaners,

Here's a version of the external configuration files patch. As Barry
suggested, it adds a configure entry in the archiver's section,
which can point to an ini-compatible configuration file (ConfigParser
is used) for additional archiver-specific configuration.
I've migrated the existing archiver config to separate files too. The
stock files are shipped in the config directory, and can be overrided
by a configuration file of the same name in $ext_dir.
I've tried to keep the ini-file loading method generic, in case we
want the same feature somewhere else.

Please tell me what you think of it, if and where it needs some more work.

Aurélien


mailman3-externalconfig.patch
Description: Binary data
___
Mailman-Developers mailing list
Mailman-Developers@python.org
http://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Re: [Mailman-Developers] Adding keys in the configuration file

2012-09-17 Thread Aurelien Bompard
 Is there any chance you could push this to Launchpad as a branch?

Sure. I've pushed it to Launchpad and filed a merge proposal.

Cheers,
Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
http://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Adding keys in the configuration file

2012-09-14 Thread Aurelien Bompard
 Yeah, sorry I'm not familiar enough with HyperKitty to know how you get
 messages *into* it. ;)

Don't be sorry for not knowing *everything* ;-)

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
http://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


[Mailman-Developers] Adding keys in the configuration file

2012-09-13 Thread Aurelien Bompard
Hi people,

I'm working on HyperKitty, and I've understood that I need to add this
section to mailman.cfg to enable it :

  [archiver.hyperkitty]
  class: hyperkitty.lib.archiver.Archiver
  enable: yes
  base_url: http://hyperkitty.example.com

That works well. However, I need another key to specify the location
to HK's configuration file (Django's settings.py). I've tried simply
adding the key, but it's not picked up by the configuration class,
probably because of the schema validation.
Is there a way I could add this configuration key ? Maybe via another
section, or another file ?

Thanks !

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
http://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Adding keys in the configuration file

2012-09-13 Thread Aurelien Bompard
 Why do you think that the configuration of HK should be a part of the MM core?

I didn't intend to put all of HK's config in mailman.cfg of course.
But I'm supposed to reference a class in the archiver.hyperkitty
section, which will be imported on startup, so it must be on the same
host.
Since there are already archiver-specific configuration keys there,
like a command to run or an email address to forward to, I supposed it
would be OK to add a conffile key that I could use.

So what's the best way ? Add a conf_file key to schema.cfg ?
Something else, maybe more extendable ?

Thanks.
Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
http://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Adding keys in the configuration file

2012-09-13 Thread Aurelien Bompard
Sorry I messed up with a list-reply, so you people missed Richard's reply.

 What concerns me is that MM core should not depend on Django in order to run.
 The Archive interface needs to accept the message and place it in the store.

MM won't depend on Django, only if the HK section in mailman.cfg is enabled.
I can't just send the message to the store however, since the
IArchiver interface also has methods to get the list and message's
final archive URL, and that's dependent on the frontend. The store
does not know how the frontend is installed (at the root URL, on
/hyperkitty, on /archives, etc.).
Those methods are run before the message is stored in order for their
result to be added to the message headers, so I can't even get it from
the archive_message call.

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
http://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9


Re: [Mailman-Developers] Adding keys in the configuration file

2012-09-13 Thread Aurelien Bompard
 You had mentioned a reference to the Django settings for HK.

Yes, my idea was to have something like that in the mailman.cfg file :

  [archiver.hyperkitty]
  enabled: yes
  class: hyperkitty.archiver.Archiver
  base_url: http://archives.example.com
  conf_file: /path/to/django/app/settings.py

Only the conf_file key is invalid at the moment. It references the
path to a Django settings file, but that's all.
The Archiver class will then use this value to import the settings and
go on with its job. That's the only place where there will be an
import from the django namespace.

 Even if HK is enabled, django should not get imported into the MM space.

I'm not sure I understand that. You mean in the same process memory ?
Then I'm limited to some kind of client-server architecture, which I
fear will have performance issues since we're passing every messages
around. Or am I missing something ?

 The proper way to handle the issue of URLs would be to have the MM core query 
 the UI for them.

Well, I thought that's what it did currently. It imports a HK-specific
class, which loads Django's settings to build the proper URL fragment
when the appropriate method is called. What kind of query do you mean
?

 However, I have yet to convince Barry that the present model (where, at 
 present, MM is the only part allowed to be authoritative over ANY information 
 that it uses) is inappropriate.
 So, for the present, we need to have a proxy for the UI and a section of the 
 configuration that specifies the values for the parameters which it supplies.
 IMHO, we should actually treat it as multiple proxies so that we can handle 
 the more generic configuration in a consistent manner.

I'm kinda lost here. I sort of understand that you're in favor of
making the configuration file more extendable to fit the extension's
needs, which would solve my problem. Mailman can't know in advance
what kind of configuration values an extension needs, so in my opinion
the conf file should either allow extensions to put arbitrary keys
there (in sub-sub-sections for example), or let the admin specify the
path to another configuration file, which would be extension-specific.

Anything I'm missing ? Barry, any comments ?

Thanks for your input !

Aurélien
___
Mailman-Developers mailing list
Mailman-Developers@python.org
http://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9