Login Form






Lost Password?
No account yet? Register (FREE)

Search Backup Central

Disclaimer

The opinions contained within this website, it's blog(s), forums, and Wikis, are those of the original poster and do not represent the position of my (or any other) employer. This blog is not owned by my employer nor does it officially represent any company.
Updated Joomla/Mailman bridge PDF Print E-mail
Written by W. Curtis Preston   
Tuesday, 08 May 2007

I've received a lot of requests for the bridge we wrote to make Joomla work with mailman.   Here it is!

It now supports Joomla 1.5 when running in Legacy Mode.

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 component for Joomla 1.0 here .

Download the component for Joomla 1.5 here .  (The 1.5 version is new, so please let me know how it works.)

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 "Forums & Mailing Lists -> 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.  Now you don't have to edit the mailman.php script any more! 

Here are the 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 users
4. 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.

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.

Comments
Add NewSearchRSS
zev - Not working right   | Registered | 2007-05-29 10:41:34
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.
Zev
www.janglo.net
cpreston   | Super Administrator | 2007-05-31 23:35:28
They have to be publicly available lists. That's an option in the mailman admin screen.
bradknowles - Updated link from Mailman FAQ   | Registered | 2007-06-02 01:22:20
Folks,

FYI, I updated Mailman FAQ Wizard entry 1.26 at http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.026.htp to include a pointer to this page.

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.

Congratulations Curtis!
zev - Beautiful   | Registered | 2007-06-03 07:44:22
Looks great now. Thanks!
Zev
ceverett - I'd like to be able to add pe   | Registered | 2007-07-20 09:49:07
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.
cpreston   | Super Administrator | 2007-07-20 10:55:22
I think something got taken off your comment, because I'm not sure what you're asking for.
mattsoutatown - errors   | Registered | 2007-08-14 05:08:02
I'm getting 3 main errors:

Notice: Constant _MM_TITLE already defined in httpdocs/administrator/components/com_mailman2/language/english.php on line 4


Notice: Undefined variable: email_message in httpdocs/components/com_mailman2/mailman2.php on line 86
Your mailing list configuration


Notice: Undefined variable: table in httpdocs/components/com_mailman2/mailman2.php on line 182

Any help would be appreciated

Other than that, everything's working just fine
cpreston - Took me a while   | Super Administrator | 2007-08-29 09:31:30
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.

The lines of code that were causing the warnings have been fixed.
ruudd45 - edit language   | Registered | 2007-08-19 04:28:07
Is it possible to edit the language file?
cpreston   | Super Administrator | 2007-08-19 23:41:13
Absolutely. It's just a text file. (./administrator/components/com_mailman2/languages/english.php for english)

You can even make a new one for another language if you want.
arjaan - edit mailadress   | Registered | 2007-08-28 07:23:04
There is an "error" in the language files which prevents the user to edit his userdetails when joomla is not installed in the root of the webserver.

in the string _MM_HOSTED_INTRO3 there is a trailing slash before index.php. Remove this and it works if you have joomla installed in a subdir.
cpreston - Fixed!   | Super Administrator | 2007-08-28 15:41:07
Good call! I edited both english.php and germani.php, the two language files it ships with.
cpreston - Review me!   | Super Administrator | 2007-08-28 15:42:13
It sure would be nice if a couple of you that have found this useful to review it at joomla.org:

http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,2409/Itemid,35/.
morej - Adjustment to mailman2.php   | Registered | 2007-09-30 19:32:28
On my site, the component worked fine, but did not properly subscribe to digest lists. When a user attempted to subscribe to a digest, they would get subscribed OK, but not to a digest form.

I fixed it by changing the $turnondigesturl= line to read as follows:

Code:

$turnondigesturl="http://" . $ll_domain . "/mailman/admin/" . $list_name . "/members?user=". $email . "&" ;
$turnondigesturl=$tu
rnondigesturl . $email . "_digest=1& setmemberopts_btn=Su
bmit%20Your%20Change
s&allmodbit_val=0&";
$turnondigesturl=$tu
rnondigesturl . $email . "_language=en&" . $email . "_nodupes=1&" . "adminpw=" . "$ll_adminpw";


This was tested on Debian with Mailman version 2.1.5-8sarge5
cpreston - Thanks!   | Super Administrator | 2007-08-29 09:30:31
That change looks fine. I wonder if this is a version issue. I know that MailMan can do different things with different versions.

I've added it to the main source code. I left the old line commented out in case anyone has any issues with other Mailman versions.
iknownothing - how to update translation   | Registered | 2007-09-10 02:03:52
Hi I translated to simplified_chinese for my own. would you like to share? where to update it?

my addr iknownothing at gmail
cpreston - Wow! Send it to me   | Super Administrator | 2007-09-15 20:15:29
Also send me the url of where it's running in Chinese. That would be fun to look at.
DML - Lists on shared hosts   | 147.197.164.xxx | 2007-09-18 04:19:58
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?
DML - Old version of Mailman   | 147.197.164.xxx | 2007-09-18 04:34:46
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?
romildo - Old version of Mailman   | 64.142.80.xxx | 2007-12-31 16:01:33
The same thing happen to me and I found out that the problem is because you probably have the "Appended domain" variable setup in the Mailman2 Joomla config. At least that was my problem.
DML - re: Lists on shared hosts   | Registered | 2007-09-18 05:51:29
DML wrote:
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).


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
Rocco83 - insecure settings?   | Registered | 2007-09-24 10:43:27
Hi.

i have noticied that this component require allow_url_fopen On in php.ini.

I have php in cgi mode, so i can't use .htaccess way to workaround, but i don't think that wrapper it is a good way anyway.

example:
http://tutorials.ausweb.com.au/web/Tutorials/PHP-and-MySql/Security-issues---allow_url_fopen/

Now, i have found (not hard to) the lines that do the bad thing:

Code:

---
$adminurl="http://" . $l_domain . "/mailman/admin";
$content=file_get_co
ntents("$adminurl","FALSE";

#Content is now some HTML code containing only a few lines of what we need
$listarray = preg_split('/\n/',$content);

#let's loop through it and look for lines that look like this:
#
#Description Text Goes Here

foreach ($listarray as $element) {
---


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).

other hint:
http://wiki.dreamhost.com/index.php/Allow_url_fopen
http://wiki.dreamhost.com/CURL_PHP_tutorial

as you can see, i have no solution at all, just hints, you are the coder

waiting for update!

thanks
daniele
Rocco83 - https   | Registered | 2007-09-25 03:09:05
hi.

another thing, i have restricted access to mailman only in https, via url rewrite.

i can see the list, but mailman bridge is not telling me if i am subscribed or not to lists (and i am, to at least one).

this is a bug due to https?

thanks
daniele
cpreston   | Super Administrator | 2007-10-03 12:42:30
The only suggestion I have is to use the debug feature in the latest version and see what emails it sends you.
dchinn - appended domain name in contro   | Registered | 2007-10-03 11:57:14
The bridge works great!

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.

Any suggestions?

Thanks!
Dave
cpreston - appended domain name in contro   | Super Administrator | 2007-10-03 12:41:32
I need to know exactly where this is happening. Can you send me some screen shots and/or forwarded emails to curtis ^at? backupcentral.com ?
djtrouten - Appended domain?   | 24.118.4.xxx | 2008-07-11 00:41:12
Did you ever solve this problem? I'm having the same trouble.
djtrouten - Never mind   | 24.118.4.xxx | 2008-07-11 02:02:25
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.
zstub - make everyone get emails   | Registered | 2007-10-23 10:57:44
Is there any way to set this so that all new users on the site automatically start getting individual emails when they sign up for Joomla? That would be really great for my site!
Thanks.
cpreston   | Super Administrator | 2007-10-27 13:05:17
It's not in the current plans, but if I get enough requests for it, I might consider it.

(It would also help if someone helped volunteer to code this feature.)
rogerco - Joomla 1.5 - or some other pro   | Registered | 2007-10-25 08:59:15
Does it work with Joomla 1.5 (with legacy mode on)
I am getting an error when it tries to install


* JInstaller::install:
File '/home/roger/public_html/tmp/ install_4720bccc472c
0/config.mailman2.php' does not exist

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?
Jurgentje   | Registered | 2007-10-26 09:15:45
Same here... only a different randomized install folder...

Anxious to have this component running on Joomla 1.5 too... (hoping to go live as soon as it leaves its RC-status)
cpreston - Not running 1.5   | Super Administrator | 2007-10-27 13:07:41
I'm not running 1.5 even on a test site, so I can't test your problem. Sounds like the file structure is different for 1.5. Anyone know of docs that will help me figure out how 1.5 is different?
rogerco - re: Not running 1.5   | Registered | 2007-10-28 13:32:59
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.
Jurgentje - Mechanics of the plug-in   | Registered | 2007-10-31 03:27:36
Hi,

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)
Jurgentje - Mechanics of the plug-in   | Registered | 2007-11-09 14:45:05
Is there a way to interactively help developing the component?

I've added "nomail" feature for personal improvement, and would like to turn it into a class-based system. This way, it's pretty easy to add or update elements without having to rewrite it all...

But I would really find it frustrating to put lots of energy into it, and then figure out you were doing just the same. (One way or another, the one with the latest release would be frustrated)

I think subversioning the bridge would be a great idea...
cpreston - I'm not actively developing i   | Super Administrator | 2007-11-11 16:47:19
so there's very little chance of us colliding.

I agree with subversions.
cpreston - You are correct   | Super Administrator | 2007-11-11 16:45:37
Yes, this would need to be tested with each new version of Mailman, but so far I haven't seen any issues in this area with several different releases of Mailman.

No, you cannot visit the member's version of the subscribe page with the admin password. You can visit the admin's view of the members options page.

I have no idea what the MVC-approach is.
kool_zero   | Registered | 2007-12-10 12:36:52
ok i am getting :

Warning! This component has not been configured yet.
You need to configure the com_mailman component via its admin screen in Joomla!
Go to your Joomla! admin console & select Components -> com_mailman2 and change the default values

but i have changed the default values. any ideas?
cpreston - Are the values still there?   | Super Administrator | 2007-12-10 20:48:00
If you go back into the config field, are they all still there? Usually this means that you didn't change all of them. The first five fields must be changed to your site values.
celine - Joomla 1.5 ?   | 216.145.54.xxx | 2008-02-21 08:41:28
Hi,
does mailman is compatible with joomla 1.5 ?
If not is it in progress or will it never be adapted ?
Thank you!
cpreston - Never is a really long time   | Super Administrator | 2008-02-21 09:38:47
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.)
satsick - Setting up at registration   | 80.35.129.xxx | 2008-03-17 07:08:31
I've installed your component successfully.

I'm using a single list.

I've got 1 question:
Is it possible to automatically subscribe new registered users to a list? I mean, when users finish registration I want them to be automatically subscribed.

May I change sth? Where?


Thanks in advance!
rogerco - Extended version   | 86.53.79.xxx | 2008-05-11 05:09:47
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.
cpreston - That is awesome!   | Super Administrator | 2008-05-11 12:45:44
I've had more than a few requests for those features, but I DON'T have an active development team on this. I'd love to help you refine and test what you have.
rogerco - new version of mailman link near   | 141.163.84.xxx | 2008-07-11 04:21:01
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
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
bonaventure - Change wording in front end   | 70.238.162.xxx | 2008-06-02 11:54:55
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?
emagin   | 76.103.26.xxx | 2008-07-04 18:07:50
Go to /administrator/components/com_mailman2/language

You can tweak the text there.

For layout i'm not sure, it might be
admin.mailman2.html.php maybe
could not find an html.php file for the users/front end
emagin - Forum Integration - How   | 76.103.26.xxx | 2008-06-28 19:40:10
Can you explain a bit the forum integration with mailman. Very nice!
cpreston - Just check out mail2forum.com   | Super Administrator | 2008-07-07 12:57:54
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.)
emagin - Community Builder - Edit Email Link   | 76.103.26.xxx | 2008-07-07 12:57:13
For users with Community Builder sites, you want to update your language file because the Edit Email link is wrong:

Language file (english for me) update at about line 13. This file is in ./administrator/components/com_mailman2/language.php

Look for _MM_HOSTED_INTRO3 and change the link in that line to point to the community builder profile link.
mkinsey - Mailman 2 Bridge Problems   | 67.35.115.xxx | 2008-07-05 19:42:22
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.
cpreston - Have you turned on debug mode?   | Super Administrator | 2008-07-07 12:51:00
Have you turned on debug mode? That usually helps people figure out what's happening.
Jumalakarhu - Server settings?   | 81.167.3.xxx | 2008-07-20 07:56:16
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 cURL
http://www.wiki.dreamhost.com/index.php/CURL
Hope it solves your issue.
Anon - Offer option to subscribe to one list only when multiple lis   | 81.105.242.xxx | 2008-07-20 13:46:22
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?

Please can you advise if I need to change anything?

Many thanks

Anon
Only registered users can write comments!

Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved.

 
< Prev   Next >

Sponsored Links