Listhandler is a php filter script for xmail. It has been tested with xmail 1.21/Win32 and PHP5

Listhandler is a script that allows a user to subscribe to and unsubscribe from a list by simply sending an email to listofinterest-subscribe@yourdomain or listofinterest-unsubscribe@yourdomain, respectively. It then requests the user's reply to commit the process.

It also checks whether a users is allowed to post or not (fix of xmail psync hole) by looking them up in the mlusers.tab file. Only RW flag is supportet here.

Note: This script no longer uses the php mail() function as it did in earlier versions.

Warning: This software is provided 'as is' in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The script is a simple filter that needs to be called with

"php anypath\\listhandler.php"    "@@FILE"    "@@FROM"    "@@RRCPT"    "@@RCPT"

or on linux

"/var/lib/xmail/listhandler/listhandler.php"	"@@FILE"	"@@FROM"	"@@RRCPT"	"@@RCPT"

You'll need to modify some basic configuration inside the script itself.


you should add a user such as listhandler@yourdomain and create two extra aliases for each list you want to handle

eg:

you have a list named mylist@mydomain and want to add (un)subscription support to it, then you only need to add two aliases for listhandler@yourdomain named mylist-subscribe@mydomain and mylist-unsubscribe@mydomain. In fact you could also add them as real mailboxes but it may not make much sense.

The listhandler stores temporary data in a subfolder named 'pending' inside the mailing list folder.

To subscribe to mylist@mydomain, you just need to send an empty mail to mylist-subscribe@mydomain and follow the instruction in the mail that you get back. Unsubscribe works likewise. There is no check for double subscriptions.

The check for valid users against mlusers.tab is done for all other mails


July 7. 2013 

Martin Schmid
APS systems AG


PS: current versions are available on www.haeschmi.ch/xmail .
