Install paclink-unix
- Configure a single MTA
This is an old revision of the document!
chmod +x pluchk1.sh chmod +x pluchk2.sh
./pluchk1.sh # using what ever mail client you have, compose a mail message and address it to yourself and n7nix ./pluchk2.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
#!/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