Backup Central

☰ Menu

Updated Joomla/Mailman bridge

The goal of this component was to first get the logged in user’s email address, then get a list of public mailman mailing lists that they could subscribe to. It lists all publicly available lists, with a preselected button based on whether or not they’re already subscribed to that given list. It allows them to subscribe via regular or digest mode.

They select what list(s) they want, and what mode they want, and click “Subscribe,” and magic happens. They get subscribed, the web page tells them what happened, and they get an email telling them what happened.

Download the Joomla 1.5 version here. (It is not a native 1.5 component. It requires Legacy Mode to be enabled to work.)

If you want to see how it works, you’re welcome to sign up to my site, http://www.backupcentral.com/, and log in. You’ll then see a menu item called “Mailing Lists.” Click that and you’ll see how it works. Feel free to subscribe to and post to the mailing list called Testy.

Thank you very much to Stefan Haller who took my raw component and created an admin interface to it.

Install instructions:

1. Install the component via standard install procedures.2. Point your admin browser to Components -> Mailman2 -> Config, and change the five or six config variables.

3. Make a menu item under your user menu a. It should be of “Link URL” type b. It should point to /index.php?option=com_mailman2 c. It should only be available to registered, logged in users4. That’s it!

FAQs:

Does this require command line access to the Mailman commands?

No.

The component is installed and I configured it in the admin screen, but when I run it, I see “Warning: Invalid argument supplied for foreach() in /home/accname/public_html/components/com_mailman2/mailman2.php on line 203” What’s up with that?

So far everyone who has had this error has not put the right values in the configuration screen. The most common misconfiguration mistake is to leave the http:// in the domain name you’re using to admin Mailman. If your domain admin interface is http://mydomain.com, you should enter just domain.com as the value for the admin domain.

What about the 1.0 version. Where did it go?

You can download the Joomla 1.0 version of the component here . (This version is no longer maintained or supported. You should seriously think about updating Joomla!)

Good luck. I’d love to see how well you get on with it.

We’re still open to suggestions and welcome anyone who would like to contribute to the work.

----- Signature and Disclaimer -----

Written by W. Curtis Preston (@wcpreston). For those of you unfamiliar with my work, I've specialized in backup & recovery since 1993. I've written the O'Reilly books on backup and have worked with a number of native and commercial tools. I am now Chief Technical Architect at Druva, the leading provider of cloud-based data protection and data management tools for endpoints, infrastructure, and cloud applications. These posts reflect my own opinion and are not necessarily the opinion of my employer.

Like this:

Related

Post navigation

102 thoughts on “Updated Joomla/Mailman bridge”

zevsays:

Hi. Great idea, but it’s not working right on my site. Even though I have three mailing lists running, none of them show up in the component. Maybe there is a setting in Mailman that I need to change to make them appear?Thanks.Zevhttp://www.janglo.net

So, if you get anyone on either side of the divide that has any questions about integrating Mailman with Joomla!, hopefully they will be able to follow the bi-directional links and be able to get more information about how to do this sort of stuff.

The reason being that I only want site authors, editors and publishers to log in, so as to reduce administrative hassles. Otherwise, we’d have hundreds of users and that chances of giveing someone the wrong access skyrockets.

Looks like you (or somebody) went and turned on notices in your php.ini. Most people have them turned off. 😉 These really aren’t errors. They’re just "hey you did something stupid in your code" notices.

My site is hosted on a shared server so that http://lists.mydomain.org/mailman/admin shows my list and some others that belong to other users’ domains. It would be useful if the component had a filter setting so that the users only see a selected list or lists (I only have one list).

If the name(s) of the mailing list(s) could be specified in the admin settings for the component, then would it be possible to avoid the need for the lists to be publicly announced lists?

My site is hosted on a server that runs Mailman 2.0.13 and the component displays lists but won’t subscribe or unsubscribe users. I assume this is because it is not designed to work with Mailman 2.0.13.

Unless I can get my web hosting company to upgrade to Mailman 2.1.9, I need to modify mailman2.php I can probably do this if I can find the difference between the subscribe and unsubscribe URLs for mailman 2.0.13 and 2.1.9. I can’t find this in the Mailman documentation. Does anyone know or is it necessary to work it out from the Mailman source code?

[quote name=DML]My site is hosted on a shared server so that http://lists.mydomain.org/mailman/admin shows my list and some others that belong to other users’ domains. It would be useful if the component had a filter setting so that the users only see a selected list or lists (I only have one list).[/quote]I think I have found the answer to this, at least for my shared server. If the URL for the lists page is changed to http://lists.mydomain.org/mailman/listinfo instead of http://lists.mydomain.org/mailman/admin it only lists the lists for mydomain.org so I’ll need to make a small change to mailman2.php

as i can see from the manual http://www.php.net/function.file-get-contents , that is identical to file(), apart from return type (string instead of array). but after file_get_content, there is a string to array part.that could be a cleanup, but not the solution.

now, in php 5.2, there is now allow_url_include, that is sigtly different from allow_url_fopen (less invasive).

I have only one issue that I have seen. When a user subscribes, the brige returns the email address with the domain name appended to the list name. In the mailman configuration, the appended domanin name field is blank.

It does display the config prompt message though “This component integrates MailMan and Joomla!… You must have a working Mailman installation with publicly advertised mailing lists, access to its administrative interface via the web, and all mailing lists must have their admin password set to the same value. To configure this component, please go to Components -> Mailman2 -> Config.” so it seems to be reading the zip ok. Nothing is appearing in the components or administrator/components folders though.Message

Other extensions install ok so it is not file permissions.Has anyone got this working on a 1.5 site?

I imagine there ought to be something in dev.joomla.org but on a quick look I couldn’t see anything.

It appears to be expecting a config.mailman2.php file which isn’t in the archive. I guess there is a parameter you put in the xml or somewhere to tell it what to run.But it hasn’t created the _mailman2 table in the database either so there is more to it.

Other components have been adapted to run under legacy mode in 1.5 – I think your problem may just be to get it to install…but I wouldn’t know where to begin.

I’ve been looking into your source code for this component… it looks pretty straightforward "picking of the HTML-page".

I have 3 thoughts with this:

1. Am I right that this could break on a simple interface change?2. Wouldn’t it be possible to … if a member is already subscribed … to sniff the "options" page instead of the more general "admin" page you’re using now (and that still has to be used if an address is not a member yet). One can visit every options page using the admin password…**3. Do you plan on using the MVC-approach on the front-end too?

** The advantage is that there’s much more options that could be customized this way (I’m specifically thinking of the “Don’t recieve mails” option)

I do not believe it is compatible with 1.5 yet, because I believe you have to specifically code for that version, right?

As to when it will support 1.5, it will happen when:a. I upgrade to 1.5 (not happening any time soon)b. Someone volunteers to help me code it for 1.5.c. Some people step up to help me defray the costs of developing it for 1.5.

(I am not the primary developer, and have to pay someone to develop it for me.)

The existing version worked fine for me, but now I have a need for an improvement to allow specification of a selection of lists from different servers with different admin passwords.

I have started hacking around with the front end component and got it pretty much working how I want – list names, urls, passwords etc are stored in a separate table. I am intending to add primitive access control according to joomla user level (public, registered, special) so the user sees an appropriate subset of the available lists.

The question is whether you have any active development plans for the existing bridge or is there interest enough to inspire me to go ahead and produce an admin backend and some error trapping – what I have at the moment works fine for me, but I wouldn’t regard it as releasable, and I have to hand-knit the database table using phpMyAdmin.

If anyone is interested you can email me as rogercreagh at hotmail dot com.

Is there any way to change the default template that appears in the front end. For example, I’d like to change the following text:These mailing lists are hosted by mydomain.com. To join any of them, simply select either regular or digest format from the list below, and we will automatically subscribe myemail@mydomain.com to the lists you select. Click here to change your email address.

I want to delete the option to change the mail address and I’d like to change the column heading labeled, “STATUS” to “ACTION” or something other than STATUS (since it doesn’t actually display a users status…it just show options for actions to be taken).

I checked the component php and script files…I even searched through the mailman files on my server. I can’t find this particular template anywhere. Any thoughts?

I am running Mailman 2.15 and I can’t get the Joomla bridge to work (Joomla 1.x). I keep getting the following error message:You do not appear to have the correct URL for administering Mailman.The supplied URL was: http://lists.csccog.org/mailman/admin, which is constructed using the value you specified for the domain, which was: lists.csccog.org.Please check the value you specified for the domain in the configuration screen of this component.An email has been sent to you with a screen shot of what the component saw at this phase.Mailing List

Description

Status

If I go directly to the url listed, I can administer the mailman lists.

This is unrelated to the Joomla/Mailman bridge, but I’m merely using the wonderful software provided by the mail2forum.com people. It bridges Phpbb2 and any mail client. Here is the list of tasks I use.

1. Decide on a mailing list name (listname) 2. Create a pop account with a -forum name 3. If hosting the mailing list on your site, create a mailing list for in mailman 3a. Replies set to list 3b. Set archive to NO 3c. Membership -> Mass Subscribe -> subscribe -forum email account 4. If someone else is hosting the mailing list, subscribe -forum to that mailing list 4a. Use mail reader to become POP account, then do what you need to do for that account to be subscribed to that email address. The reason you’re running a mail client is that that almost always send a confirmation email to the subscribed address. 4b. Use mail client to reply to the confirmation request. 4c. Use the mail client interface to verify you can send and receive from the list.5. Create a Forum with the name of the list 6. Create a mailing list in phpbb 6a. Login to phpbb admin interface 6b. Create mailing list. 6c. Give it a any kind of sensible name 6d. Put the email address of the mailing list you just created (or subscribed to) as the email address 6e. Create a distribution list linking the new forum and new mailing list by clicking on Distribution Lists 6f. Set POP email address to the POP account you made.6g. Set POP password 6h. Make sure the following options are checked. – Try to extract date from incoming emails – Ignore the TO message header – Delete messages after import – Maximum number of message = 600 – Maximum size to import = 0 – Outgoing mail transport = sendmail – Send mail using an external mailing list server – Include original post in recipients – Configure From: – If you’re using an internal email address, set it to be the email address of poster/sender. – Remove reply-to – Strip reply tages – Subject prefix = [LISTNAME] – Do not force all posts as guest – Allow m2f to ignore phpbb security – Allow guest posting – Show poster as Name – Resend emails for edited posts – Add subject tag for edited posts Re: – Add Moderate outgoing email messages – Automatically authorize messages from admin/moderator – Moderator notification = your email – Strip or replace patterns – Drop single quote – Drop backslash – Spam filters – Enable all – Add the AutoReply filter

(All those options at the end are saved for me in the default options for a new list.)

Never mind — I solved the “appended domain” trouble. I just failed to read the very clear instructions in the control panel. After I added the “appended” information in my lists to the “appended domain” spot, the program began stripping that extra info from the MailMan feed. It’s working fine.

So eventually I started to look at the back-end myself and decided to do it in the new J1.5 MVC style, so having got that working I’ve gone back and completely rewritten the front-end in the same fashion.This is nearly ready now; effectively it is a completely new component that does what the original did but also allows lists to be on different servers and have different passwords. Once I’ve got it working with my setups I’ll make it available for others to try. It is J1.5 native only and I suspect it may also need PHP5.x (I haven’t got a PHP4 server to test it on). About a week, I guestimate if it carries on raining in the UK :dry: PS ‘fraid I haven’t abstracted all the strings into a language file so it is a bit hard-coded English (UK spelling) – needs a volunteer 😉

I had the same problem and found out that it was not mailmain or this component but the server. My host had set url_fopen and url_include in php.ini to off. That means that php cannot get the file from another server. I could not enable these via .htaccess, but found a workaround with cURLhttp://www.wiki.dreamhost.com/index.php/CURLHope it solves your issue.

This is an excellent bridge – just what I was looking for. I also have mail2forum working with phpBB and the CB Connector bridge to Joomla 1.0.15 (worth noting if you want to do this, you need to use the hack of m2fconfig.php for CB Connector to work).

Anyway, a minor detail – I only want my members to be able to subscribe to one of the lists available on my mailman server. According to the settings (if I have understood correctly), the bridge should only pick up the list(s) associated with the password entered. I have changed the password for the one list that I want members to be able to subcribe to, but it is still picking up all lists on my mailman server?

Hi, i set the mailman component on my J1.5 site and ti gives me the following white screen:

Your mailing list configurationClassroomThese mailing lists are hosted by Classroom. To join any of them, simply select either regular or digest format from the list below, and we will automatically subscribe to the lists you select. Click here to change your email address.

(Any lists you’re already subscribed to are selected below.)

You do not appear to have the correct URL for administering Mailman.The supplied URL was: http://lists.informatix.gr/mailman/admin/list/, which is constructed using the value you specified for the domain, which was: lists.informatix.gr.Please check the value you specified for the domain in the configuration screen of this component.An email has been sent to you with a screen shot of what the component saw at this phase.Mailing List

Description

Status

Have i done something wrong?

I have tried to install it on a J1.o installation too but no luck either…The thing is that the url to the list page that shows works if you put it on your browser and the password too.

[quote name=cpreston]The place where it gets the list of lists is before it needs a password. It only needs the password during the subscribe phase. So, as long as a list is public, it will show up in the list.[/quote]Thank you so much – changing settings in Mailman under privacy sorts that out and the component now works as expected. My remaining issue now is that the formatting of the headings Mailing List Description Status are thrown out (the first is okay, the second two are picking up Bold and larger font size from somewhere). Where can I change this in the backend please?

[quote name=cpreston]Turn on debug mode in the admin console, and then take a look at what the output is.[/quote][quote name=cpreston]It only checks the email address associated with the user id you’re currently logged into. You’re probably subscribed with another email address, then.[/quote]I have tried the debug – it sent output to my registered email (which is identical email to the one used as administrator and user) but still have the above options (ie it does not appear to be picking up that I am an existing subscriber – unless it switches subscribed list to bold type but still does not indicate an unsubsribe option?)

I’ve just done an update to my Jmailman version of the component (it lets you specify lists on any server and also admins can manage any email address – see http://www.crosborne.co.uk) and discovered a problem with Mailman v2.1.11 on some servers where the page returned by mailman puts ‘%40’ instead of ‘@’ in returned email addresses. I fixed this in my version but since this bit of code is the same as your version I wonder if you might have the same problem.

I saw the post about digest mode but still am having difficulty getting that part to work. I did make the $findmbr change above; it now lists the proper status if it’s set that way in mailman, but it doesn’t make changes to and from digest mode.

I’m kind of new to this and wonder if anyone has any pointers. Thanks!

In addition to the digest mode issue, I notice that it also doesn’t support Member Name. It would be great if it could pick up the user name and populate that also, which would facilitate list administration as so many people use weird e-mail addresses.

I just can’t seem to get it to switch to digest mode. This is on mailman 2.1.1.cp2.

Very basic questions. Is the only connection between mailman and the Joomla email database (or CB) initially to retrieve their email? If so, when a user updates their email in joomla or in CB, that update would not be reflected in the mailman list? or does mailman and joomla regularly talk and update each other?? And second, so the “mailman public list” is truly open to the public. No way to do a “private list?” thanks!!

When I look at the JED, what I see is that it works in Legacy mode. I have no immediate plans to update it, as I have no immediate requirement for full 1.5 support, but I welcome anyone’s help in this area.

Hello,I’m getting the error message below. From this forum I learned most errors are due to wrong configuration, but the URL below works fine is I copy/paste it into a browser.This problem has also been reported by atzounis on 2008/10/22, I cannot find an answer to his problem.The email being sent is a blank email.Thanks,Jaap

The message…………..Your mailing list configurationVoet websiteThese mailing lists are hosted by Voet website. To join any of them, simply select either regular or digest format from the list below, and we will automatically subscribe my name@planet.nl to the lists you select. Click here to change your email address.

(Any lists you’re already subscribed to are selected below.)

You do not appear to have the correct URL for administering Mailman.The supplied URL was: http://lists.voetvanoudheusden.nl/mailman/admin/geinteresseerden, which is constructed using the value you specified for the domain, which was: lists.voetvanoudheusden.nl.Please check the value you specified for the domain in the configuration screen of this component.An email has been sent to you with a screen shot of what the component saw at this phase.Mailing List

You do not appear to have the correct URL for administering Mailman. The supplied URL was: http://24weightloss.com/mailing-lists.html/public_html/administrator, which is constructed using the value you specified for the domain, which was: 24weightloss.com/mailing-lists.html. Please check the value you specified for the domain in the configuration screen of this component. An email has been sent to you with a screen shot of what the component saw at this phase.

Any ideas ? to me it looks like that i cant point to the right admin directory or something. Been testing with different variants no luck.

[quote name=shawn]Installed and set all the parameters. On the top of the form there are two notices.

Notice: Undefined variable: config in (path_to_my_webtoot)\components\com_mailman2\admin.mailman2.php on line 14

Notice: Trying to get property of non-object in (path_to_my_ webroot)\administrator\components\com_mailman2\admin.mailman2.php on line 14

Are they errors?

If not can I ignore them. Where do I go from there beyond the config?

Shawn[/quote]Looks like I can’t ignore these notes. After I created the menu item and run it from front end I got many php errors. the one at the end is:

You do not appear to have the correct URL for administering Mailman. The supplied URL was: http://(mysite)/mailman/admin/, which is constructed using the value you specified for the domain, which was: (mysite). Please check the value you specified for the domain in the configuration screen of this component. An email has been sent to you with a screen shot of what the component saw at this phase.

When I try to access the config of Mailman2 I get “Direct Access to this location is not allowed.” which is usually an indication that Joomla needs to be set on Legacy mode which I would rather not do.

I discovered that the issue was actually related to a PHP security setting in on the server. To overcome this without changing the setting I modified the code to use curl instead of “file_get_contents”, here is one of the examples from line 166 of /public_html/joomla/components/com_mailman2/mailman2.php

How does this work without logging in to mailman admin? I don’t see anything in the code that does that before it uses the /members/add, which fails if you have not logged into mailman. I don’t see any comments in the programs or here about that.

if you’re looking for similar functionality in Joomla 2.5 – I actually paid someone to create a component.

You can find it at mailbridge.beIt does use the Community Builder for changing settings though. In the backend you decide what options you want to show to a user – in the frontend you will then only see these item.

Currently, it only supports 1 list – but it’s on github. If you would like to improve it, feel free to suck in the code, and add your own features or fixes.