Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Mailman synchronisation #105

Open
bhaettasch opened this issue Oct 5, 2016 · 4 comments
Open

Mailman synchronisation #105

bhaettasch opened this issue Oct 5, 2016 · 4 comments

Comments

@bhaettasch
Copy link
Member

Currently, staff and students have to be exported and subscribed to the mailing lists manually, which is error prone. Multiple times persons missed important mails since they were not put onto the correct mailing list in time. Thus it would be great if pyophase would use the mailman API to synchronize the mail addresses automatically.

For staff, a confirmation step like "approve tutor/orga" before subscribing would probably be wise.

@bhaettasch bhaettasch added this to the ophase-future milestone Oct 5, 2016
@ckleemann
Copy link
Contributor

ckleemann commented Oct 5, 2016

This would require a running mailman-api on the mailman host of the Fachschaft. There is a Debian package mailman-api available, which is not installed yet. As far as I can see there is no authentication in the api expect for the IP of the sending host. Which may not be sufficient enough for the mailman host.

@ckleemann
Copy link
Contributor

After having a look at django-mailman which is a python 2 implementation of a mailman client I can say writing a subscription is pretty simple. A HTML Prototype is the following:

<!DOCTYPE html>
<html>
<head>
<title>Simple Mailmain Subscription</title>
<meta charset="utf-8" />
</head>
<body>
<form action="http://example.com/mailman/admin/listname/members/add" method="POST" enctype="multipart/form-data">
<input type="text" name="subscribees" value="Jon Doe <[email protected]>">
<input type="text" name="adminpw" value="Password">
<input type="submit">
</form>
</body>
</html>

@ckleemann
Copy link
Contributor

ckleemann commented Oct 5, 2016

For now I would suggest the following solution:

Students

For Students the mass subscription dose not change, since all e-mail addresses are collected in one week. And the mass import might be more efficient than handling single registrations

Staff

For Staff a the Person model is extended and a new Mailinglist model is introduced

The baseUrl of the Mailman system is stored in the settings.py file

Extending the Person Model by the fields:

  • Orga_confirmed (OC): BooleanField
  • Tutor_confirmed (TC): BooleanField
  • Helper_confirmed (HC): BooleanField

The new Mailinglist model has the Fields:

  • Listname: CharField
  • List Description: CharField
  • List Admin Password: CharField
  • subscribe_Orga (O): BooleanField
  • subscribe_Tutor (T): BooleanField
  • subscribe_Tutor_for (TF): Many-To-Many with Group Categorie
  • subscribe_Helper (H): BooleanField

The mailman base url is stored into the settings.productive file

Logic

A Person get subscribed to the mailinglist if:

(O and OC) or (H and HC) or (T and TC and Person.Tutor_for in TF)

The subscription is done by the person.save() method.

@bhaettasch do you think that a unsubscribe also should be done automatically?

@bhaettasch
Copy link
Member Author

We might use the StaffFilterGroup feature introduced with 3387fdd which gives us those kinds of filtering functions. The code is not completely pushed to github yet.

Concerning unsubscribing: Maybe not automatically, but a dedicated action for that in the dashboard containing a preview of the persons that will be removed would be great.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants