NAME

bbsboard - Internet to BBS email-post handler

SYNOPSIS

In /usr/local/etc/bbs.rc or /etc/bbs.rc;

    # $DUMP     = '/tmp/msgdump.tmp';           # Dump message to disk; halt
    $MAIL_LOG   = '/var/log/bbsmail.log';       # Log of bbsmail
    $BOARD_LOG  = '/var/log/bsboard.log';       # Log of bbsboard
    $SIZE_LIMIT = 204800;                       # Size limit of attachments
    $NO_ATTACH  = '\.(?i-xsm:exe|scr|pif|bat)$';# Block matched attachments

    # Set virutal hosts; The C<bbs.> prefix of keys should be omitted.
    %DOMAINS = (
        'elixus.org' => {
            BASEURL => 'http://elixus.org',
            WWWHOME => '/srv/www/elixir',
            PARAM   => ['MELIX', '/home/melix'],
            OWNER   => 'melix',
            GROUP   => 'melix',
        },
        'cvic.org'  => {
            BASEURL => 'http://cvic.org',
            WWWHOME => '/srv/www/cvic',
            PARAM   => ['CVIC', '/srv/bbs/cvic',
                         1003, 2500, 1005, 250, 1004, 50000], # needs utmp
            OWNER   => 'cvic',
            GROUP   => 'bbs',
            PERMIT  => 1, # 'permit' file required to post
        },
        'm543.com'  => {
            BASEURL => 'http://m543.com',
            WWWHOME => '/srv/www/m543',
            PARAM   => ['CVIC', '/srv/bbs/m543',
                         1103, 2500, 1105, 250, 1104, 50000], # needs utmp
            OWNER   => 'cvic',
            GROUP   => 'bbs',
        },
    );

    # multiple domains, same IP
    $DOMAINS{'m543.org'}       = $DOMAINS{'music543.org'} =
    $DOMAINS{'music543.com'}   = $DOMAINS{'m543.com'};

    # fallback using the 'true' hostname
    $DOMAINS{'geb.elixus.org'} = $DOMAINS{'elixus.org'};

    # default domain for in-site mails
    $DEFAULT_DOMAIN = 'elixus.org'

To configure it with sendmail, modify sendmail.cf like this:

    ######################################
    ###   Ruleset 0 -- Parse Address   ###
    ######################################

    R$+.bbs < @ $=w .>          $#bbsmail $: $1         bbs mail gateway
    R$+.board < @ $=w .>        $#bbsboard $: $1        bbs board gateway

    # handle locally delivered names

    R$+.bbs                     $#bbsmail $:$1          bbs mail gateway
    R$+.board                   $#bbsboard $:$1         bbs board gateway

    ##################################################
    ###   Local and Program Mailer specification   ###
    ##################################################

    Mbbsmail,   P=/usr/local/bin/bbsmail, F=lsSDFMuhP, S=10, R=20,
                A=bbsmail $u
    Mbbsboard,  P=/usr/local/bin/bbsboard, F=lsSDFMuhP, S=10, R=20,
                A=bbsboard $u

To feed it a MIME mail directly at the command line:

    % bbsmail < message.txt

DESCRIPTION

This script relays e-mails sent to *.bbs@domain as mails to BBS user mailboxes; it is designed to be a drop-in replacement for the MAPLE BBS utility of the same name.

This program could be used serve multiple BBS sites, each distinguished by its domain name. MIME encodings, multipart messages, quoted words are all handled correctly.

If supplied with a web directory, attachments could be saved for later download. You could restrict the max. allowed size of each attachments.

If the optional HTML::Parse and HTML::FromText modules were installed, HTML-only mails and simple HTML attachments could be rendered as plain text.

CAVEATS

Currently this script does not check proper permissions; you could use the OurNet backend to achieve restricted permission. See bbscomd for how to run an OurNet node.

However, authentication is currently not implemented; while sending password via e-mail is easy, the author finds it distasteful. A proper way to parse PGP-signed mail might be the only viable route, and any contributions on that front will be most welcomed.

SEE ALSO

OurNet::BBS, bbsmail.

AUTHORS

Autrijus Tang <autrijus@autrijus.org>

COPYRIGHT

Copyright 2001-2002 by Autrijus Tang <autrijus@autrijus.org>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html