-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm not subscribed.  I just had this idea minutes ago, and I haven't
thought it through or checked if it already exists.  So, sorry if I'm
wasting your time.

How about a tag that I can define.  It's like making tags modular.  I'll
talk about implementing the current tags in these terms, but I'm talking
about a more general mechanism.

A tag definition would say how many arguments the tag takes.  Sender
addresses take zero.  All others defined right now would take one.  In the
future maybe we'll have more.  You can generate one of these with
tmda-address generally by saying what kind of tag you want, and what its
arguments will be.  Then tmda-address generates the signature for it.

When TMDA sees one of these, it validates it and, if valid, passes it on to
some defined program.  The program would accept the message text on
standard input, the tag arguments as arguments to the program, and its
return code would determine how TMDA handles the message.

Come to think of it, this isn't as general as I want right now, but if I
put some more thought into it, it could get there.

I don't know what tag definition syntax would be, but you'd be able to
specify things like:

* tag 'pom' takes one text argument and is handled by 'pom-validator'
* tmda-address --type pom --arg waxing => foo-pom-waxing.ab123@
* then pom-validator is called as 'pom-validator waxing < msg-text'
  when the address is used.
* pom-validator returns zero for OK.
* if pom-validator returns 1 do pom-action-1, (defaults to ACTION_INCOMING)
* I can define any number of action <=> return value pairs.

* tag 'sender' takes zero arguments, but the secret argument is
  the envelope sender.  It's handled by 'sender-validator'
* sender-validator is called as 'sender-validator env-sender < msg-text'
* blah blah

* tag 'supersender' takes zero arguments, but the secret argument is any
  'from' type address that makes it valid.

If it's flexible enough for all that, all the current tagged addresses
could be implemented in terms of modules written to do them.  At that
point, people could add (and contribute) their own frankenstein tag
behaviors.

You really do want POM addresses that only work when the moon is waxing?
You can do it!  You want an address that works only when you're not on
vacation?  No problem!  You want an address that delivers only twice and
then never works again?  It's possible.

So, there's my idea, crude as it is.  Open fire and such.
- -- 
Kyle Hasselbacher | Perl:  The swiss army chainsaw of UNIX tools.
[EMAIL PROTECTED]  |                      -- Rob Kolstad
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAV8hj10sofiqUxIQRAq5PAKDm4HkPfZyteSiTwbfrQcQCJqBSegCgvmB/
J6lRQFK9+Ci+PQpptJ8Aoeo=
=k4Rn
-----END PGP SIGNATURE-----
_________________________________________________
tmda-workers mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-workers

Reply via email to