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

Re: [RFC] Exim as standard Debian MTA?



Hi,
>>"Steve" == Steve Lamb <morpheus@calweb.com> writes:

 Steve> On 28 Aug 1998 21:38:35 -0500, Manoj Srivastava wrote:
 >> It is not a hacked up version of regex. It does not nneed to
 >> be, a general purpose regex engine shall serve really poorly for
 >> rewrite rules. It is a specialized matching language, whose tokenizer
 >> is optimized for the requirements of SMTP address rewites. 

 Steve> Let's just say I don't agree at all.  I know that I can and
 Steve> would do a much better job with, say, pcre than I would with
 Steve> Sendmail's implimentation.  Funny that I pick that, isn't it?
 Steve> ;)

	Sure, any turing complete language shall work quite well. But,
 like perl or pcre, they are overkill. You do not need the full power
 of something like (recognizing "only US$15,- p min")
______________________________________________________________________
# Be very generous about accepting "only US$15,- p min" text.
 /\b(?:to|just|only)\s+(?:[a-z]{2}\s*)?(?:(?:\$|\#)\s*)?(?:\d+[o\d]*(?:[.,](?:\
 [o\d]{2}|-)?)?|\.[o\d]+)(?:\s*cents)?\s*(?:\/|p(?:er|\.)?)\s*(?:m(?:in(?:ute)\
 ?)?|h(?:ou)?r?|da?y?|w(?:ee)k?|mo?n(?:th)?|y(?:ea)?r?)/i
______________________________________________________________________

	Or even
______________________________________________________________________
 /\b(?:to|just|only)    # first they try to de-emphasize it
  \s+(?:[a-z]{2}\s*)?   # Sometimes with something for the currency
  (?:(?:\$|\#)\s*)?     # Sometimes a currency notation (needs expanding)
  (?:\d+[o\d]*          # A number
     (?:[.,](?:[o\d]{2} #    with an optional fractional portion
      |-)?)?            #    or a hyphen for 00
   |\.[o\d]+)           # or exclusively fractional
  (?:\s*cents)?         # an alternative currency location
  \s*(?:\/|p(?:er|\.)?) # "per" and variations
  \s*(?:m(?:in(?:ute)?)?# "minute"   and variations
     |h(?:ou)?r?        # or "hour"   ''     ''
     |da?y?             # or "day"    ''     ''
     |w(?:ee)k?         # or "week"   ''     ''
     |mo?n(?:th)?       # or "month"  ''     ''
     |y(?:ea)?r?)       # or "year"   ''     ''
  /ix                   # Ignore case and use free-format regexp
______________________________________________________________________

	In order to do sendmail rewrites.


 >> which you seem to have missed the point of. Configuration files are
 >> read by programs. Configuration files need be written by
 >> humans. Seems like something that takes the input in a format
 >> readable by humans, and converts it into a fromat readable by
 >> machines is a good thing.

 Steve> Except that isn't what is done with the m4 scripts, is it?  It
 Steve> cuts and pastes other configuration files together to give a
 Steve> good base, but anything specific still has to be done with
 Steve> that hacked together language.

	Point. Though I still think that calling sendmails language
 hacked is just as valid as calling Perl a hacked up language (even
 Larry concedes trhat point).

 Steve> If an O is followed by a space it is presumed that what
 Steve> follows is a long form configuration statement.  
 Steve> OQ
 Steve> O QueueDirectory

 Steve>     To me that seems like a hack since one could just scan for section
 Steve> headers and keywords instead of hacking it into that ancient thing.

	One mans hack is another mans backwards compatibility.


	I kinda like the fact that sendmail.cf has remained largely
 unchanged ;-).

	manoj
-- 
 Yes, but which self do you want to be?
Manoj Srivastava  <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E


Reply to: