🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.misc
Article #3907

Re: deliver program option -n

#3907
From: Chip Salzenberg
Date: Wed, 06 Jan 1993 18:12
64 lines
2411 bytes
According to tucker@bedford.progress.COM:
>I am working with the deliver program and have -n option being used in
>the following deliver.sys:
>
>case $1 in
>address)
>        set -x
>        SUBJECT=`grep "^Subject:" $HEADER`
>        cat $HEADER $BODY | /usr/local/bin/deliver -vn tucker
>        mailx -s "Re: $SUBJECT" $SENDER << XXX
>Your mail regarding $SUBJECT has been forwarded to the proper person.
>;;
>esac

Mistake #1: deliver.sys may be called with several addresses, so you
need a loop.  Mistake #2: if you want tucker's ".deliver" executed,
you should just output "tucker" and let the parent Deliver handle it.
So the code should be more like:

================================================================

FWD=

for u
do
    case "$u" in
    address1) echo "tucker"; FWD=yes ;;
    address2) echo "someone"; FWD=yes ;;
    address3) echo "otherone"; FWD=yes ;;
    *)        echo "$u"	;;
    esac
done

if test -n "$FWD"
then
    SUBJECT="`header -f subject $HEADER`"
    mailx -s "Re: $SUBJECT" $SENDER << XXX
Your mail regarding:
   $SUBJECT
has been forwarded to the proper person(s).
XXX
fi

================================================================

>This is not using aliases as one would think -n would. As it is working, it
>seems to just what -b would.

Deliver never uses aliases.  It executes delivery files.  And "-n"
does just what the man page says it does: avoid all delivery files.

>Also, in the -v output below, what is the system delivery file disabled
>line doing?
>
>found system delivery file /usr/local/lib/deliver.sys
>system delivery file disabled

It's doing what you asked for when you used the "-n" option: finding
but skipping the system delivery file.
-- 
Chip Salzenberg at Teltronics/TCT  <chip@tct.com>, <73717.366@compuserve.com>
  "you make me want to break the laws of time and space / you make me
   want to eat pork / you make me want to staple bagels to my face /
   and remove them with a pitchfork" -- Weird Al Yankovic, "You Make Me"
Technical Details
Message-ID: <2B4B211C.8BCB@tct.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!sybus.sybus.com!myrddin!tct!chip
References: <1993Jan5.211312.14560@progress.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.mail.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!sybus.sybus.com!myrddin!tct!chip
From: chip@tct.com (Chip Salzenberg)
Subject: Re: deliver program option -n
Message-ID: <2B4B211C.8BCB@tct.com>
Date: Wed, 6 Jan 1993 18:12:44 GMT
References: <1993Jan5.211312.14560@progress.com>
Organization: TC Telemanagement, Clearwater, FL
Lines: 64