[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Implementation of Developer's DB



>>>>> "Philip" == Philip Hands <phil@hands.com> writes:

    > I thought that the convention was to use ``minused'' addresses
    > for this:

    >   karlheg-cvsweb@debian.org

    > That's certainly the qmail way of doing things, and I seem to
    > remeber a discussion on djb-qmail that concluded that someone
    > who was using plussed addresses was doing so just to be
    > different.

    > Of course qmail can handle plusses too, but minusses are the
    > default.

 Here's a paste-in of the `sendmail-8.8.8' ruleset 5.  The part after
 the plus is essentially ignored when it figures out who to deliver
 the mail to, so your tosser (procmail or Gnus) can match on the part
 between the plus and the at.

 Like it says, this happens *after* the "/etc/aliases" lookup happens,
 so you can do things like:

   root: wecoyote+root

 ... and then `wecoyote' could have a "~/.procmailrc" file that tosses
 everything with the `+root' into the "root" inbox, or a Gnus `nnmail-
 split-fancy' SPLIT to do the similar.

 A minus would make it be a different delivery address, and so that
 would have to be handled in either aliases, with specific aliases
 there for each "minused" address, or in a rule you wrote yourself
 especially for some ad-hoc purpose, perhaps implemented with a
 berkeley database table lookup or something.  You can hook into the
 rewrite rule chain all over the place in `sendmail', a lot like you
 can with SmartList runcontrol setups.

 I suppose you could hack ruleset 5 to use `-', but then you'd not be
 able to have a user with a `-' in the login_id, which I think is
 fairly common.

 The `op.txt' in "/usr/doc/sendmail/" says:

    You may want to use it for special "per user" extensions.  For
    example, in the address "jgm+foo@CMU.EDU"; the "+foo" part is not
    part of the user name, and is passed to the local mailer for local
    use.


###########################################################################
###   Ruleset 5 -- special rewriting after aliases have been expanded   ###
###########################################################################

S5

# deal with plussed users so aliases work nicely
R$+ + *			$#local $@ $&h $: $1
R$+ + $*		$#local $@ + $2 $: $1 + *

# prepend an empty "forward host" on the front
R$+			$: <> $1

# send unrecognized local users to a relay host
#R< > $+ 		$: < $L . > $( user $1 $)	look up user
#R< $* > $+ <> $*	$: < > $2 $3			found; strip $L
#R< $* . > $+		$: < $1 > $2			strip extra dot

# see if we have a relay or a hub
R< > $+			$: < $H > $1			try hub
R< > $+			$: < $R > $1			try relay
R< > $+			$: < > < $1 $(dequote "" $&h $) >	nope, restore +detail
R< > < $+ + $* > $*	   < > < $1 > + $2 $3		find the user part
R< > < $+ > + $*	$#local $@ $2 $: @ $1		strip the extra +
R< > < $+ >		$@ $1				no +detail
R$+			$: $1 $(dequote "" $&h $)	add +detail back in
R< local : $* > $*	$: $>95 < local : $1 > $2	no host extension
R< error : $* > $*	$: $>95 < error : $1 > $2	no host extension
R< $- : $+ > $+		$: $>95 < $1 : $2 > $3 < @ $2 >
R< $+ > $+		$@ $>95 < $1 > $2 < @ $1 >

 It's either modem noise or SNOBOL... :-)


Reply to: