[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: smtp-policy q-s and wishes

On Tue, Feb 13, 2001 at 07:21:34PM +0300, Eugene Crosser wrote:
> about relaying policy:
> >   The more I think of it, I think it really begins to need a script
> >   facility for this use, not only simple attributes + hardcoded logic
> >   about the order of things.
> I always felt that attribute model is not very convenient.
> I would prefer something like this:

   Hmm..  Why not, do you have spare cycles to implement it ?
   I am pushing my cycles on wrestling the ZMailer Manual SGML,
   now that I can produce nice printout *and* HTML properly
   from same source.

   This "something" needs some statements to bind dbases (e.g. what
   is "localnames"?)

   Syntactic details like should there be  $(thing to evaluate)  or
   just  (thing to evaluate)   are matters of taste -- I prefer $(...).
   How can multiple variables be set ?  Are they just boolean flags,
   or perhaps e.g. RBL database lookup yields text ?

   Set value (as opposed to unset/0) could evaluate as:
   in test, and lead to text expansion in deny message.

   Could the same machinery be extended to be message-content filter ?
   (I mean these function evaluators)

> PHASE initial
> 	* unset relay
> PHASE connection
> 	[]/8 deny "Connections from private networks not accepted"
> 	[]/24 set customernet
> 	(checkdb custnetworks) set customernet
> 	[]/16 set hostile
> PHASE helo
> 	# nothing
> PHASE mailfrom
> 	(! resolvable) deny "From domain must resolve"
> PHASE rcptto
> 	(checkdb localnames) set islocal
> 	(/^postmaster@/ & ?islocal) accept
> 	?hostile deny "Your netblock is barred"
> 	?islocal accept
> 	(checkdb mxrelay) accept
> 	?customernet accept
> 	* deny "Relaying denied"
> (just to get an idea) - you would see which checks are performed at which
> time.  Every check can either terminate session with error response or
> set/unset named flag.  At later stages, these flags can be checked.
> Each check could match variable available at this phase against regexp,
> look it up in a database, or just see if a particular flag is set or unset.
> Eugene

/Matti Aarnio	<mea@nic.funet.fi>