1994-09-20 - (fwd) “Will You Be a Terrorist?”

Header Data

From: hughes@ah.com (Eric Hughes)
To: cypherpunks@toad.com
Message Hash: eca35be10e5acc70117f0268c083d1e7bf3a2896c63fbc2ea3cd2104620a2a46
Message ID: <9409192336.AA15969@ah.com>
Reply To: <35l8lv$6g9@bb.com>
UTC Datetime: 1994-09-20 00:14:37 UTC
Raw Date: Mon, 19 Sep 94 17:14:37 PDT

Raw message

From: hughes@ah.com (Eric Hughes)
Date: Mon, 19 Sep 94 17:14:37 PDT
To: cypherpunks@toad.com
Subject: (fwd) "Will You Be a Terrorist?"
In-Reply-To: <35l8lv$6g9@bb.com>
Message-ID: <9409192336.AA15969@ah.com>
MIME-Version: 1.0
Content-Type: text/plain


   [...] giving both limited-use remailers 

Limited use remailers are exactly what a subscription service does.

   Could you send me what you've done on this?  I think it's a desirable
   feature to have, though requiring that people hack their sendmail.cfs
   is not a big boost to the "popularity of package" indicator.

Admittedly, sendmail.cf hacking is not for the light of heart.  I've
appended a little tutorial I wrote a few months ago on how to do this.
The only correction I have on rereading is that version 8 sendmail
doesn't use frozen configuration files.

Eric
-----------------------------------------------------------------------------


How to add + to your email syntax
---------------------------------

Ever wanted one of those cool <user+@domain> addresses?  So you can
use <user+loud_mailing_list@domain> and get a filter to easily move
the list out from your regular mail?  Now you can.

This tutorial works if you're running a fairly standard version of
sendmail.  It requires some hacking to sendmail.cf, so you need the
permission to do that; that's usually root.  The modifications are
fairly straightforward.

I.  Add + to the list of operator symbols.

The sendmail 'o' macro determines how to break up strings in
sendmail.cf rules into tokens.  In order to be able to recognize +
specially, you'll have to add to the operator symbols to make it
separately recognizable.

So, first do a 

	% grep -n ^Do sendmail.cf
	116:Do.:%@!^=/[]

Now, go in and edit line 116 and add a + sign at the end:

	Do.:%@!^=/[]+

That's all.  Now sendmail will not include + inside of its tokens.


II.  Duplicate local delivery rules to accept + syntax.

Sendmail is a delivery multiplexer.  You want to change the syntax for
local deilvery, so all you need to change is the local mail
specifications.  First, make sure your local mailer is called 'local'.
You can search for the mailer definition as follows:

	% grep ^Mlocal sendmail.cf
	Mlocal,	P=/usr/libexec/mail.local, F=lsDFMmn, [...]

I've elided the tail end of the line, because all you really need to
ascertain is that the local mailer has the right name.

Now you want to search for all the delivery rules that deliver mail to
the local mailer:

	% grep -n '#local' sendmail.cf
	563:R$-<@$w>		$#local$:$1
	585:R$-<@$D>		$#local$:$1			user@ah.com
	614:R$+			$#local$:$1			everything else

I have three rules for local delivery.  (The second one is custom, and
allows for delivery to a domain address for which no IP address
exists.)  All you do now is to add a rule for '+' delivery for each
kind of existing local delivery.  After I changed mine, it said:

	% grep -n '#local' sendmail.cf
	563:R$-<@$w>		$#local$:$1
	564:R$-+$*<@$w>		$#local$:$1
	586:R$-<@$D>		$#local$:$1			user@ah.com
	587:R$-+$*<@$D>		$#local$:$1			user@ah.com
	616:R$-+$*		$#local$:$1			everything else
	617:R$+			$#local$:$1			everything else

Rules that matched "$-", a single token, I changed to match "$-+$*", a
single token followed by "+" followed by zero or more tokens.

Rules that matched "$+", one or more tokens, I changed to match
"$-+$*", same as above.  I added the changed rule _before_ the
original rule because otherwise the $+ would swallow up everything.

The $1 in the second column refers to the first macro to match in the
pattern in column one.  That's the username the mail gets to delivered
to.  If you have more complicated usernames, you're likely already a
seasoned sendmail trooper.


III.  Install and Test

You should probably increment the version number when you make the
change.  It's in the 'Z' macro, do

	% grep -n ^DZ sendmail.cf
	104:DZ2.06

Freeze the sendmail configuration with

	sendmail -bz

otherwise your changes won't take effect.  Now send yourself some test
mail and make sure it works.


Eric Hughes
hughes@ah.com
17 February 1994





Thread