🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Bart Schaefer Sat, 31 Oct 1992 04:28
Re: mush 7.2.5 auto.forcing of return address
#11
Author: Bart Schaefer
Date: Sat, 31 Oct 1992 04:28
68 lines
2576 bytes
On Oct 28,  9:01am, Larry W. Virden wrote:
} Subject: mush 7.2.5 auto.forcing of return address
} 
} Okay.  Here is my situation.  I have nothing I seem to be able to do about
} the CAUSE of this politically.  So I want mush to help me deal with it as
} best I can.
} 
} My outgoing mail can go to valid domain addresses and the pseudo address of
} user@host.bitnet.  But Bang addresses and user@host.uucp do NOT work properly.

Ouch.  You're in trouble ...

} I have to change these addresses to gateway thru a local.friendly.host
} address.
} 
} What do I need to set so that occurs?  I though
} 
} set auto_route
} set domain_route local.friendly.host
} 
} would do it, but it doesn't seem to.  Any ideas?

The settings above will generate addresses that look like

    local.friendly.host!then!some!path!you!gave!to!destination

Wherein, if any of (then,some,path,you,gave,to) is in host.domain.form,
then mush will throw away everything up to that domain before sticking
local.friendly.host! on the front.

What you probably want are addresses like

    some!path!you!gave!to!destination@local.friendly.host

but mush won't automatically generate such an address because it is
"bad form".

So, here's what you do:

    #! /bin/sh
    #
    # Sendmail front-end to thumb nose at politically incorrect sysadmins
    #
    args=
    host=local.friendly.host
    for i in ${1+"$@"}
    do
	case $i in
	-*) args="$args $i"					;;
	*@$host) args="$args $i"				;;
	*@*) args="$args "`echo "$i" | sed 's/@/%/'`@$host	;;
	*!*) args="$args $i@$host"				;;
	*) args="$args $i"					;;
	esac
    done
    exec /usr/lib/sendmail -oi $args

Call the above script "mysendmail" or the like and then in .mushrc, add

    set sendmail = mysendmail

(be sure "mysendmail" is in your path).  The script assumes that
local.friendly.host does the right thing with user%host1@host2 addresses,
so you may need to do something more complicated in the *@* case.

-- 
Bart Schaefer                                     schaefer@zigzag.z-code.com
Z-Code Software Corp.                             schaefer@z-code.com
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