====== Steps to get useful debug information ====== * There is a useful script that will attempt to send two Winlink messages [[https://github.com/nwdigitalradio/n7nix/blob/master/debug/chk_mail.sh | at NWDR N7NIX repo]] ===== Procedure to create a debug info file ===== * If you have problems please run //pluchk1.sh// and //pluchk2.sh// scripts and compose a regular e-mail to me attaching the requested files. * Please run these scripts as a normal user, **NOT** root. * Create scripts pluchk1.sh & pluchk2.sh by opening your editor & copy & paste each of the scripts below to their respective files. * Make the scripts executable. chmod +x pluchk1.sh chmod +x pluchk2.sh * now run first script, compose a winlink message then run the second script. ./pluchk1.sh # using what ever mail client you have, compose a mail message and address it to yourself and n7nix ./pluchk2.sh * Finally compose a regular e-mail message, address it to me, and attach all these files: * ~/tmp/pluchk.txt * /etc/postfix/main.cf * /etc/postfix/master.cf * /etc/postfix/transport ===== Scripts to create a debug info file ===== === pluchk1.sh === #!/bin/bash # # File : pluchk1.sh # # Verify paclink-unix install, part 1 scriptname="`basename $0`" user=$(whoami) VERSION="1.0" TMPDIR="/home/$user/tmp" DEBUGFILE="$TMPDIR/pluchk.txt" WL2KDIR="/usr/local/var/wl2k" OUTBOXDIR="$WL2KDIR/outbox" MAILDIR1="/home/$user/Mail" MAILDIR2="/home/$user/mail" MAILDIR3="/var/mail" # Verify NOT running as root if [[ $EUID -eq 0 ]] ; then echo "*** Do NOT run as root ***" 2>&1 exit 1 fi # check for existence of a local tmp directory if [ ! -d "$TMPDIR" ] ; then mkdir $TMPDIR fi # Collect some data { echo "=== Debug log file $(date) ===" echo "=== local Mail dir ===" if [ -e $MAILDIR1 ] ; then ls -alt $MAILDIR1 fi if [ -e $MAILDIR2 ] ; then ls -alt $MAILDIR2 fi echo "=== /var/mail ===" if [ -e $MAILDIR3 ] ; then ls -alt $MAILDIR3 fi echo echo "=== $WL2KDIR ===" if [ -d $WL2KDIR ] ; then filecount=$(ls -1 $OUTBOXDIR | wc -l) ls -alt $WL2KDIR echo echo "=== $OUTBOXDIR (count $filecount) ===" ls -alt $OUTBOXDIR else echo "$WL2KDIR not found" fi echo echo "=== mail log #1 ===" tail -n 6 /var/log/mail.log echo echo "=== sys log #1 ===" tail -n 6 /var/log/syslog echo } > $DEBUGFILE echo "$scriptname done" exit 0 === pluchk2.sh === #!/bin/bash # # File : pluchk2.sh # # Verify paclink-unix install, part 2 scriptname="`basename $0`" user=$(whoami) wait_time=10 VERSION="1.0" TMPDIR="/home/$user/tmp" DEBUGFILE="$TMPDIR/pluchk.txt" WL2KDIR="/usr/local/var/wl2k" OUTBOXDIR="$WL2KDIR/outbox" MAILDIR1="/home/$user/Mail" MAILDIR2="/home/$user/mail" MAILDIR3="/var/mail" # ==== Function telnet call ==== # arg1 = iteration identifier do_telnet() { { wl2ktelnet 2>&1 echo echo "=== mail log $1 ===" tail -n 10 /var/log/mail.log echo echo "=== sys log $1 ===" tail -n 10 /var/log/syslog echo filecount=$(ls -1 $OUTBOXDIR | wc -l) echo "=== finished $1 with outgoing count $filecount ===" echo } >> $DEBUGFILE } #==== Main ==== # Verify NOT running as root if [[ $EUID -eq 0 ]] ; then echo "*** Do NOT run as root ***" 2>&1 exit 1 fi # collect some data do_telnet 2 echo "waiting for $wait_time seconds ..." sleep $wait_time do_telnet 3 echo "$scriptname done" exit 0