🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Kyle Tucker Tue, 05 Jan 1993 21:13
deliver program option -n
#3899
Author: Kyle Tucker
Date: Tue, 05 Jan 1993 21:13
41 lines
1982 bytes
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

This is not using aliases as one would think -n would. As it is working, it
seems to just what -b would. Also, in the -v output below, what is the
system delivery file disabled line doing? Is this closing upon completion
of it's use?  

found system delivery file /usr/local/lib/deliver.sys
system delivery file disabled
Destinations as taken from argument list:
        tucker: Working
user delivery files disabled
missing post-user delivery file /usr/local/lib/deliver.post
As tucker, delivering to system mailbox /usr/mail/tucker
created lockfile /usr/mail/tucker.lock
locked with lockf()
unlocked with lockf()
removed lockfile /usr/mail/tucker.lock
wrote message to /usr/mail/tucker
Destinations after delivery:
        tucker: Done


Thank in advance, Kyle 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Kyle Tucker - Email Administrator  | 		Progress Software Corporation
tucker@bedford.progress.com 	   |		14 Oak Park
(617)280-4565			   |		Bedford, Mass. 01730
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Re: deliver program option -n
#3907
Author: 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"
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads