• Bad packets

    From Stephen Walsh@3:633/280 to All on Tue Oct 14 14:12:24 2025
    Hello everybody!

    If anyone receives a bad packet from the hub, let me know buy sending it to me via netmail as a file attach.
    Call it "badpkt.zip" or "filename.bad" I can then have a look at it and if able, repair it and re-send it.

    The hub sometimes does send out a bad packet. If I have that then I can see if it came from upstream with issues.

    For those that run native binkd. I have a backup script running after each session via the binkd exec line:

    exec "/home/husky/hpt-copy.sh" /home/husky/inbound.sec/*.[STFWMstfwm][ouaherOUAHER][0-9A-Za-z] *.[pP][kK][tT]

    It saves 16 days worth of packets.

    === Cut ===
    #!/bin/bash
    #
    # This script runs after a binkd session and processes FidoNet mail.
    #

    # Clean up old lock files (older than 60 minutes)
    find /home/husky/semafore -name hpt -type f -mmin +60 -delete

    # Check if HPT is already running
    if [ -f /home/husky/semafore/hpt ]
    then
    echo "HPT is already running, exiting"
    exit
    fi

    echo "=== Starting HPT mail processing ==="
    echo "copying packets"

    SECURE=/home/husky/inbound.sec
    BACKUPDIR=/home/husky/mail-backup

    # Create backup directory structure
    pushd $BACKUPDIR

    if [ ! -d "`date +%Y`" ]; then
    mkdir `date +%Y`
    fi

    cd `date +%Y`

    if [ ! -d "`date +%m`" ]; then
    mkdir `date +%m`
    fi

    cd `date +%m`

    if [ ! -d "`date +%d`" ]; then
    mkdir `date +%d`
    fi

    cd `date +%d`

    # Backup incoming packets
    find $SECURE -iname "*.pkt" -exec cp -p \{\} ./ \;
    find $SECURE -iname "*.PKT" -exec cp -p \{\} ./ \;

    for f in mo tu we th fr sa su; do
    find $SECURE -iname "*.${f}?" -exec cp -p \{\} ./ \;
    done
    for f in MO TU WE TH FR SA SU; do
    find $SECURE -iname "*.${f}?" -exec cp -p \{\} ./ \;
    done

    popd

    echo "=== Running HPT toss ==="
    /home/husky/bin/hpt toss
    sleep 2

    echo "=== Running HPT areafix ==="
    /home/husky/bin/hpt afix
    sleep 2

    echo "=== Running HPT pack ==="
    /home/husky/bin/hpt pack
    sleep 2

    echo "=== Running htick scan ==="
    /home/husky/bin/htick scan

    # Clean up semaphore files
    rm -f /home/husky/semafore/hpt

    echo "=== Cleaning up old mail backups ==="
    # Delete backup files older than 15 days log_file="/home/husky/logs/mail_backup_deletion.log"
    find /home/husky/mail-backup/ -mindepth 4 -maxdepth 4 -type f -mtime +15 -print0 | while IFS= read -r -d $'\0' file; do
    echo "$(date -Is) - Deleted file: \"$file\"" >> "$log_file"
    rm -f "$file"
    done

    # Delete empty directories
    log_file="/home/husky/logs/empty_dir_deletion.log"
    find /home/husky/mail-backup/ -mindepth 1 -type d -empty -print0 | while IFS= read -r -d $'\0' directory; do
    echo "$(date -Is) - Deleted empty directory: \"$directory\"" >> "$log_file"
    rmdir "$directory"
    done

    echo "=== HPT processing complete ==="
    === Cut ===


    Stephen


    --- GoldED+/LNX 1.1.5-b20250409
    * Origin: Dragon's Lair ---:- dragon.vk3heg.net -:--- Prt: 6800 (3:633/280)