The script is at http://www.vbmysql.com/fudmail.phps
Summary: This script is for use with FUDforum (http://fud.prohost.org
). FUDforum has a great feature for mirroring Mailing lists so that mailing list posts end up in a FUDforum forum, but it's currently limited to using procmail as a source for emails. This script uses the standard IMAP tools to hook to a POP server and grab the latest emails, it then does some cleanup and tries to determine which list is targeted, then pipes it to the fudmail mail handler script.
It determines which list to point to with the following:
$mailing_lists = array(
This script is working, but I know that my newbieness is getting in the way of it being even better. Here's the things I need to do:
1) If someone cross-posts to all three lists, the email shows up three times in each mirror forum. I am not sure why it would get piped three times to each of the three lists but I would like to fix this.
2) Some of these lists have aliases at the list server (email@example.com can also be firstname.lastname@example.org
m). So I think I need to go to a two-dimensional array approach where you give a list name and a script-id code that says which list gets piped to (currently the script ID is the array position + 1 i.e. element 0 has an id of 1 which gets passed to the FUD mailer script. The script uses the id to know which forum to post the message to).
I would love some help with these things and any other tips that can be given for making this script better.