Article View: comp.mail.mush
Article #11Re: mush 7.2.5 auto.forcing of return address
From: Bart Schaefer
Date: Sat, 31 Oct 1992 04:28
Date: Sat, 31 Oct 1992 04:28
68 lines
2576 bytes
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
Technical Details
Message-ID:
<9210302028.ZM10810@zigzag>Path:
arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!bloom-beacon!INTERNET!dont-send-mail-to-path-linesShow Full Headers
Complete Article Headers
Newsgroups: comp.mail.mush Path: arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!bloom-beacon!INTERNET!dont-send-mail-to-path-lines From: bart@zigzag.UUCP (Bart Schaefer) Subject: Re: mush 7.2.5 auto.forcing of return address Message-ID: <9210302028.ZM10810@zigzag> Sender: root@athena.mit.edu (Wizard A. Root) Reply-To: bart@zigzag.z-code.com Organization: The Internet Date: Sat, 31 Oct 1992 04:28:13 GMT Lines: 68