💾 Archived View for gemini.complete.org › modern-clients-with-fbb captured on 2024-08-31 at 12:02:28. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-07-09)
-=-=-=-=-=-=-
Packet BBSs like FBB (Packet BBS)[1] work great for what they're intended to do: provide access to messaging within a low-bandwidth environment. They, however, don't do a good job of things such as tracking what bulletins you've already read.
The tips on this page are premised on the notion that both packet P-mail ("private" mail) and bulletins bear strong resemblance to standard Internet RFC2822-format email. I (John Goerzen[2]) have set up systems so that I can use standard mail clients like mutt and Thunderbird with packet mail and BBSs.
To do this, I set up FBB with the POP, NNTP, and SMTP servers on my machine. This lets you choose your own client with the features you like. I'll go over the setup for this on this page.
As mentioned on the FBB (Packet BBS)[3] page, FBB includes POP, NNTP, and SMTP servers. For those of you not familiar with those, they function in this way:
The exact setup probably requires a very recent 7.04r FBB release; see the FBB page for information on the (sometimes surprising) locations for obtaining the latest releases.
The first step to enabling POP, SMTP, and NNTP is editing your FBB's port.sys file.
The key to doing this is not very well-documented, but it works like this, as an example:
#Com Interface Address (device) Baud 6 9 56B9:56BA:77 0
The address field has three port numbers, expressed in hex, in this format: POPPORT:SMTPPORT:NNTPPORT. If you don't wish to run a specific server, you can list a port number of 0.
In this example, the POP server is on port 22201, SMTP on 22202, and NNTP on 119. This puts POP and SMTP on non-standard ports, and NNTP on a standard port, reasoning that few machines are likely to already have an NNTP server running.
After restarting FBB, you should be able to telnet to each of these ports and see a greeting string.
As the SYSOP, you will need to run `EU` on the user account and set a password. You may also have to set some flags such as M; this needs further testing.
This is pretty easy. You can set up any mail reader that supports POP and distinct SMTP accounts. Thunderbird is one example. Here's what you'll tell it:
Account details
* Your name: Your first name only
* Your email address `CALL@BBS.HIER` -- for instance, `XX0XX@ZZ0ZZ.#ENY.NY.USA.NOAM`
POP server details
* Hostname: localhost
* Port: 22201 (if you're following the advice above)
* Username: your callsign, in all caps
* Password: as set with `EU`
* SSL/TLS: none
SMTP server details
* Hostname: localhost
* Port: 22202
* Authenticaiton: none (do NOT supply a username or password for SMTP)
Other programs, such as fetchmail, can easily pull down this mail as well.
The moment you download your mail with a POP client, the message will be marked Y (read) on the FBB server.
This is all you need to do and it'll make things Just Work.
Now, let's look at bulletins. Bulletins can be both read and posted using the NNTP protocol. However, in testing, I discovered that the NNTP protocol implementation in FBB is too buggy for every current newsreader I tried. Its XOVER and XHDR implementations both are severely broken and may cause a client to hang.
However, there's a very nice NNTP command-line scriptable client called sinntp[5], which actually provides what may be a more elegant solution. I will show you how to set up sinntp along with some scripts to integrate it nicely with mutt.
5: http://code.google.com/p/sinntp/
sinntp downloads messages from an NNTP server and saves messages from each "newsgroup" into an individual mbox-style mailbox file. FBB defines newsgroups as those groups listed in themes.sys, though when posting a bulletin, the Newsgroups header should be set to CALL@DEST instead. Once you have an mbox-style file, you can do just about anything with it -- read it with a mail client, transfer it to your regular mail account, etc.
My scripts will take that mbox and copy the messages in it to a Maildir, another standard mailbox format that is a bit easier to work with reliably.
sinntp also includes a command-line tool to post new messages to an NNTP server. I will show you how to integrate this with mutt.
These sinntp commands will be used:
I have set up a ~/Mail-fbb for this stuff. Within it, I made four directories: incoming, data, folders, and bin. The scripts I will show are to be saved into bin.
You will need some tools. Here are the Debian package names; on other distros, look for something similar:
We'll start building this up from the most specific to the most general. This script is called `bin/proc-each-msg` and is called for each message downloaded. It copies the Newsgroups: header to a Mail-Followup-To header, which causes replies generated in mutt to be posted to the correct newsgroup automatically. It also delivers to a destination Maildir automatically.
#!/bin/bash # Script to receive each message from formail -s. # Copy the Newsgroups header to Mail-Followup-To. # Deliver to a destination Maildir. # Needs destination Maildir as "$1". Additional destinations may be listed # as parameters as well. set -e if [ ! -d "$1" ]; then echo "Syntax: $0 destMaildir" exit 5 fi TEMPDIR=`mktemp --tmpdir -d fbb-procmsg.XXXXXXXX` TEMPFILE="$TEMPDIR/msg" cat > "$TEMPFILE" NEWSGROUPS=`formail -x Newsgroups: < "$TEMPFILE"` while [ -n "$1" ]; do formail -A "Mail-Followup-To: $NEWSGROUPS" < "$TEMPFILE" | \ deliverquota "$1" shift done rm -r "$TEMPDIR"
Next, here's bin/get-news, the main driver behind all of this. You will need to edit this one a bit. If you use the archive feature, run "maildirmake ~/Mail-fbb/archive" before using this. The archive feature places a copy of every received message in an archive area for future processing or reference.
#!/bin/bash # Main runner script # Set this to the top-level directory for your setup. FBBMAILHOME=~/Mail-fbb # Before running, cd to that directory and run: # mkdir incoming data folders # maildirmake archive # If you don't want archiving, delete the reference to archive on the # formail -s line below. # Groups to ignore. IGNOREGROUPS="ASIA|WPUPDATES|SAT|SATELLITE|WEATHER" # script follows. set -e # Change to home directory for the system cd "$FBBMAILHOME" # Grab the list of groups. SINNTPOPTS="-S localhost -U XX0XX -P MYPASSWORD" nntp-list $SINNTPOPTS | egrep -v "^($IGNOREGROUPS)$" > data/groups # Download the mail into incoming/ cd incoming for GROUP in `cat ../data/groups`; do nntp-pull $SINNTPOPTS "$GROUP" || true done cd "$FBBMAILHOME" # Store the mail into folders. for GROUP in `cat data/groups`; do if [ ! -d "folders/$GROUP" ]; then maildirmake "folders/$GROUP" fi if [ -f "incoming/$GROUP" ]; then formail -s bin/proc-each-msg "folders/$GROUP" archive < "incoming/$GROUP" rm "incoming/$GROUP" fi done # All done!
Now, let's set up ~/Mail-fbb/muttrc for mutt. A few things we want to do here:
1. Recognize the folders under ~/Mail-fbb/folders
2. Support posting replies to bulletins and new bulletins there.
3. Optionally, also support sending P-mail using the SMTP server.
So here we go. You'll need to edit your callsign and password in here a few places.
# Example muttrc for FBB NNTP integration # Set this to your BBS hierarchical path set from="XX0XX@ZZ0ZZ.#ENY.NY.USA.NOAM" # Set this to your folder path set folder=$HOME/Mail-fbb/folders # And this to your INBOX folder set spoolfile=$HOME/Mail-fbb/folders/INBOX mailboxes "=INBOX" `echo -n "mailboxes " ; \ for group in $(ls $HOME/Mail-fbb/folders/); do \ echo -n " =" ; \ echo -n "$group" ; \ done ; \ echo " " ` # Other Settings # Delete without prompting # set delete=yes set use_from=yes set mbox_type=Maildir unset sendmail folder-hook INBOX unset sendmail folder-hook INBOX set smtp_url="smtp://localhost:22202/" folder-hook INBOX unmy_hdr To folder-hook !INBOX unset smtp_url folder-hook !INBOX 'set sendmail="nntp-push -S localhost -U MYCALL -P PASSWORD -p strip_headers"' #set record="~/Maildir/.sent-mail" set delete=yes set mark_old=no
And finally, how about a simple script to use to start mutt with? Save this to bin/fbbmutt:
#!/bin/bash exec mutt -F ~/Mail-fbb/muttrc "$@"
Now, run bin/get-news to download your mail. You can then run bin/fbbmutt to read your mail. You can press c to change to a different group, and any groups with unread mail will show up automatically. You can send a new message to CALL@DEST from any folder but INBOX to post a new bulletin, can use g to reply to a bulletin with a new bulletin.
--------------------------------------------------------------------------------
FBB is a Packet Radio[7]
BBS. This page has a bit of
information about it.
(c) 2022-2024 John Goerzen