Hi - when you get a moment please check out http://drupal.org/project/mailman_groups

What I'd like to know is whether you'd be willing to help and support some links between the two - currently MG collaborates with UMR via undocumented internals - less than ideal.

Comments

andy inman’s picture

Probably should say specifically what I need:

* A documented function I can call to subscribe/unsubscribe.
This is because we provide a Group-to-MalingList synchronisation concept - joining the group subscribes you to the list. Leaving the group should unsubscribe you. No code changes required (other than providing a wrapper function, maybe), more a matter of defining the interface.

* For User mailman register to call a function I provide to determine if the user should have access to the list. If not then don't display it as available to subscribe. This requires some code changes, not a lot.

I'd be happy to provide a patch for both of these, just want to know if in principle you'd be willing integrate and support them (I mean support in terms of long term compatibility, not answering support questions!)

andy inman’s picture

Further info - this is from an email from me to the client who is sponsoring this development:

Right now, to gain access to a Group-related Mailing List, the user must be both a member of the Group AND assigned to a role which has access to that List (configured in the Access Control page). This is functional, but has two significant drawbacks:

* It's an administrative chore, because every time you create a new Mailing List you will need to give access to the relevant Role AND set the List-Group relationship.

* If you have 100 Mailing Lists then you will have a huge page for your Access Control page, since every single List appears there. Definitely not a fully-scaleable solution.

It seems to me that there should be an OR relationship - a user should be able to access a List if EITHER a member of the related Group OR given access via Access Control. Do you see what I mean, and do you agree? This would mean that in general, Group-related lists would not appear in the Access Control page.

I can't change the way it works right now, this is just for my discussion with the "User mailman register" developer - I'd need minor changes to that module in order to support the above functionality

samuelet’s picture

At this moment and till September i can't give you full support because i'm on holiday but,yes, i'll be glad to apply any functional patch or to help into this integration.

About subscribe/unsubscribe function, _user_mailman_register_subscribe should be sufficient.
It update "mailman manager" table (the drupal subscription status) and mailman status (via http request).

For what i remember now, its parameters are:
$account: the user drupal user object (i.e:global $user for current user)
$edit: An array which contains 'option'+the list to which sub/unsub (i.e: $edit['option1'] means the list with id 1 in the mailman manager table)
$deluser: should be true when user is deleted as it automatically delete its mailman subscription.
$umail: the new mail of the user. To set only for new users or when a user changes its mail because it syncronize the user mailman mail.

andy inman’s picture

Thanks for the reply. I'm about to go on holiday myself until September too so won't be doing anything more on this until then.

_user_mailman_register_subscribe should be sufficient

... after some time looking through your code I successfully used _user_mailman_register_subscribe_update function to subscribe (haven't got unsubscribe functionality implemented yet.) The _user_mailman_register seems to do some kind of re-sync of existing subscriptions, and among other things loads and parses all lists. I was concerned about unneccessary loading (with large numbers of lists.) I'm not clear as to why _user_mailman_register_subscribe does all that processing, and it didn't seem to be useful for a new subscription. Maybe I'm missing something - should I be _user_mailman_register_subscribe instead of the _update version?

Anyway, just wanted to get the ball rolling - I'll be back in touch in September - have a great holiday (as I aim to do!)

samuelet’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

andy inman’s picture

Just in case you've not spotted it: http://drupal.org/project/mailman_api

samuelet’s picture

Thanks for the note, but mailman_api seems to me less accurate than UMR in the comunication with the mailman server.
For example it does not care about wrong admin passwords nor for the different email parameter format used by newer mailman versions.