Short: Native AmigaOS FTN mailer (binkd port, no ixemul/ixnet) Author: Gary "Spitfire" McCulloch (Amiga port); binkd by Dima Maloff Uploader: spitfiretn gmail com Type: comm/fido Version: 10.18 Requires: bsdsocket.library (Roadshow/AmiTCP/Amiberry bsdsocket_emu), Architecture: m68k-amigaos Distribution: Aminet Kurz: Nativer AmigaOS FTN-Mailer (binkd-Port, ohne ixemul/ixnet) AMIBINKD Native AmigaOS 3.x port of binkd, the FTN mailer =============================================================================== DESCRIPTION =============================================================================== AmiBinkD is a native AmigaOS 3.x build of binkd, the FidoNet Technology Network (FTN) mailer, used to send and receive FTN echomail/netmail packets over TCP/IP using the BinkP protocol. Unlike every prior Amiga build of binkd, this one does not require ixemul.library or ixnet.library. It talks to bsdsocket.library directly, and every place the historical Amiga port depended on ixemul's vfork()- based process model has been replaced with a native AmigaOS equivalent: each BinkP session (inbound or outbound) runs as its own real AmigaOS process, spawned via CreateNewProcTags() -- genuine concurrent sessions, not one session at a time. This is a from-scratch reconstruction, not a recompile of the old ixemul Amiga port. It was built by tracing every ixemul/ixnet dependency in upstream binkd's own historical Amiga support and replacing each one with a direct AmigaOS/bsdsocket.library equivalent, then hardening the result against several real behavioral differences between Amiberry's bsdsocket_emu and genuine Roadshow/BSD sockets that only showed up under live testing, not at compile time. See manual.txt section 15 for the full list, if you're maintaining this on a different TCP/IP stack. If you carry several FTN networks, one config file and one command line cover all of them: AmiBinkD:AmiBinkD -p -PALL AmiBinkD:AmiBinkD.cfg "-P ALL" polls every node listed in the config, instead of naming each uplink with its own -P switch or keeping a separate config and script per network. See manual.txt section 07. For full installation notes, configuration reference, known real-hardware findings, and version history, see manual.txt. FILES INCLUDED =============================================================================== AmiBinkD Compiled AmigaOS executable (m68k, AmigaOS 3.0+) AmiBinkD.info Workbench icon (colour image needs AmigaOS 3.5+) readme.txt Quick overview and install notes manual.txt Full SysOp documentation amibinkd-example.cfg Example configuration file amibinkd.scr Example AmigaDOS poll-all driver script Copy amibinkd-example.cfg to a name of your choosing (e.g. AmiBinkD.cfg, or one file per network -- see manual.txt section 07) and edit it for your system before running. amibinkd.scr is a ready-to-edit "-P ALL" poll script -- point it at your config name and schedule it from your BBS's event system. REQUIREMENTS =============================================================================== * Commodore Amiga or compatible/emulated Amiga system, AmigaOS 3.0+ (m68k) * bsdsocket.library -- Roadshow, AmiTCP, or (as tested) Amiberry's bsdsocket_emu * An FTN-aware BBS engine or tosser to hand packets to/from (built and tested against C-Net/5 Amiga Pro, but AmiBinkD itself only reads/writes standard FTN packet and outbound-flow files -- it doesn't call into C-Net/5 directly) * At least one FTN address and an uplink/hub willing to carry your mail AmiBinkD is a standalone compiled executable. It has no ixemul.library or ixnet.library dependency of any kind -- confirmed via string search on the built binary. CONCURRENCY =============================================================================== Classic AmigaOS has no fork()/pthreads without ixemul, but it does have CreateNewProcTags() (dos.library) -- the native primitive this port uses to spawn each BinkP session as its own real process. An inbound connection arriving while an outbound poll is already in flight, or several networks polled back-to-back, no longer have to wait their turn. See manual.txt section 05 for the full technical writeup of how this works and what it took to get right on classic AmigaOS specifically. QUICK INSTALL =============================================================================== 1. Copy the AmiBinkD folder to your BBS mail directory. Example: Mail:AmiBinkD/AmiBinkD 2. Copy amibinkd-example.cfg to AmiBinkD.cfg (or a per-network name -- see manual.txt section 07) and edit it: your domain(s), your FTN address(es), sysname/location/sysop, log path, inbound directories, and your node/hub line(s) with the real host, port, and password. 3. Create the directories your config references if they don't already exist: the outbound directory named in each "domain" line, the inbound/temp-inbound directories, and the log directory. 4. Test an outbound poll manually first, from a Shell: AmiBinkD:AmiBinkD -p -P
AmiBinkD:AmiBinkD.cfg Once that works, "-P ALL" in place of "-P" polls every node in the config in one go. 5. Review the log, then set up your regular polling schedule and/or inbound server (see manual.txt sections 09-10). BASIC MAIL FLOW =============================================================================== 1. AmiBinkD polls (outbound) or accepts a connection (inbound), performs the BinkP handshake, and exchanges queued files/packets over TCP. 2. Received .pkt files land in your configured inbound directory. 3. Your tosser (e.g. C-Net/5's Toss) processes them into your message bases. 4. Outbound mail queued by your BBS/tosser into the domain's outbound directory gets picked up and sent on the next poll. =============================================================================== VERSION HISTORY =============================================================================== v10.18 - Inbound Sessions Stop Hanging, Readable Session Log ----------------------------------------------------------- * The session log was rewritten to be readable on an 80-column screen -- a blank line between sessions, an explicit END marker, and shorter messages. "BEGIN" alone went from 120 columns to 68; it had been the only line in a poll that wrapped twice. Lines over 80 per poll dropped from nine to four. Everything else is done from configuration, not code: "loglevel" controls detail (level 3 is what carries the remote's SYS/ZYZ/LOC/VER identity block -- at level 2 your sessions are logged anonymously), and "nolog" masks hide individual messages. See the sample config and manual section 06. Note "nolog" takes ONE MASK PER WORD: a mask written with spaces is split, and a stray bare "*" among the pieces silences the log completely. * AmiBinkD no longer identifies itself as part of any BBS package. The VER string sent to every node you poll is now "AmiBinkd v10.18-binkp/1.1", matching the form other mailers use. It previously named a specific BBS, which was wrong for a general AmigaOS mailer. * Upgrade from v10.15, which is the previous public release. v10.16 and v10.17 were never released -- they are listed further down because they explain the version jump and because the AmigaOS problems they uncovered are worth passing on to anyone else porting to this platform. Nothing shipped between v10.15 and this release. * The root cause, after three releases of narrowing it down, was setting a file's datestamp. On AmigaOS that is SetFileDate(), and when another Process holds the file it does not return an error -- it never returns. No timeout bounds it, nothing watches the session, so the session is gone: it keeps its server slot, socket and .bsy locks forever. Enough of those and the server hits "maxservers" and refuses all inbound. It only bites when something else is touching the same directories. On the author's system that is C-Net/5's own overnight file-catalog jobs, which is why it looked like a night-time-only fault: 66 of 66 inbound commits succeeded during the day, and 7 of 7 hung after 21:00. One of those hangs landed inside a poll client, so the BBS event that launched it never finished and outbound mail was dead for seventeen hours. * Fix: new "set-file-dates" setting, defaulting OFF on this port (see the manual, section 06). Every other binkd platform defaults it on; this is the one place AmiBinkD deliberately differs. What you give up is cosmetic -- received files carry their arrival time rather than the sender's timestamp. Nothing in BinkP, tossing or duplicate detection depends on it. Turn it on only if you are certain nothing else touches your inbound/outbound directories while the mailer runs. * Verified over an 18-hour run spanning the overnight window that broke the previous release: 89 inbound sessions started, 89 closed, nothing leaked, 351 file commits, concurrent-session count peaking at 5 and returning to zero between polls, and all 59 scheduled BBS mail events completing. For comparison, v10.16 saturated in 13 hours and v10.17 had leaked 55 sessions by 26 hours. * Also fixed: "unknown domain" errors and silently-skipped polls. Not a bug you could have hit -- it existed only in an unreleased build -- but the cause is worth passing on, because the build system, not the code, was at fault. Object files did not depend on headers, so changing a shared struct rebuilt only some of the program and left the rest reading the old field offsets. The binary linked, ran, and quietly stopped calling out on six of seven networks. If you build this yourself from an older Makefile, do a full "make clean" after touching any header. v10.17 - One Hung Session No Longer Takes The Others With It (unreleased) ------------------------------------------------------------------------ * Never released; superseded by v10.18. Sessions refresh their .bsy datestamps on every pass of the protocol loop, and that work was done holding a single global lock across file I/O. One session blocking in there pinned the lock and every other concurrent session piled up behind it -- so a single stuck file operation took down every session on the system, and the pile-up fed itself. v10.17 stopped the cascade (the lock is never held across I/O now, and is never waited on), but a session could still hang on its own. v10.18 removes the hanging call entirely. v10.16 - Inbound Socket Handoff (unreleased; fix retained in v10.18) ------------------------------------------------------------------- * Never released. Its inbound fix was real and is retained in v10.18, but on test it traded one failure for another: sessions that hung leaked permanently and piled up until inbound stopped, which in practice was worse than v10.15's quieter failure. That leak is what v10.17 and v10.18 went on to fix. The notes below are kept because the underlying problem is instructive for anyone porting to AmigaOS. * Worth doing whatever mailer you run: if your BBS event script deletes .bsy/.csy files before polling, make sure a failed delete cannot abort the script -- on AmigaDOS, wrap them in "FAILAT 21" and "FAILAT 10". A lock file held by a live session is otherwise enough to kill the whole event, and your mailer never runs. The "kill-old-bsy" setting already removes stale locks for you. * Inbound BinkP sessions never worked at all, in any release from v10.5 through v10.15. The symptom was easy to blame on the other end. Your log recorded "incoming session with