NAME

UBB Archive - Automatically posts all e-mail sent to the specified address to your forums.


DESCRIPTION

This script is designed to allow traffic sent to a mailing list to also be posted (automatically) to one of your UBB forums.


SETUP

For sendmail, simply add an alias like this to your /etc/mail/aliases:

mailing-list-address: ``|/home/you/www/cgi-bin/ubb_archive.cgi''

If this is a real mailing list, you'll want to keep the majordomo (or whatever) mail handling aliases there as well:

mailing-list-address: ``|/usr/majordomo/wrapper resend -l mailing-list mailing-list-outgoing'',``|/home/you/www/cgi-bin/ubb_archive.cgi''

Once this is done (and newaliases is run to pick up the new aliases), any mail sent to that address will also be posted to your forums.

Also note that you may have to create a link to ubb_archive.cgi in /etc/smrsh for sendmail to allow it to run.

Alternatively, you can run this script on Majordomo archive files, via the command line:

ubb_archive.cgi archive1 [archive2] ...

Each archive file will be read, and each message in the archive will be posted to the forum you specify. This is useful to get your forums ``up to speed'' by posting all your past traffic.

And of course, you'll want to change the $f (forum number), $username, $password and $url variables to match your site. These can be found below.

For best results, I recommend creating a special user and forum on your board. Make the special user the moderator of the new forum, and set the forum so that only moderators can post or reply.

For an example, check out http://forums.army.ca and take a look in the ``Canadian Army Mailing List'' forum.


INFORMATION

Author: Mike Bobbitt ([email protected])

For updates, instructions and examples see http://perl.Bobbitt.ca/album on the web. Sometimes this site is a bit out of date. Try contacting me for the latest version if it's been a while since it was updated.

Please also note that this is a personal project. I work on it in my spare time, on weekends and evenings, so I may not be able to respond immediately to questions or comments.


LICENSE

As long as you leave this POD section and my contact info in tact above, feel free to use this as you see fit. If you come up with any good modifications to it, please let me know. I'd love to fold your mod into the public version (with credit, of course).

Good luck!


SUBROUTINES

error()

 error($line,$error_code,$extra_info);
 $line - Line number, where error occurred.
 $error_code - Pre-defined error code that prints a canned message.
 $extra_info - Additional information that can be passed in

Displayes the error message associated with $error_code along with the $extra_info. Then halts execution.

debug()

 debug($debug_message,$debug_level,$line);
 $debug_message - String to print if debugging is on
 $debug_level - Only pring string if current debug level is $debug_level or higher (current debug level is set by $debug)
 $line - The line number of the debug statement.

Prints a message, if $debug has a value.

webSubmit()

 $response=webSubmit();
 $response - The response from the web server

Connects to web server.