Loading ...
Sorry, an error occurred while loading the content.

Re: SMTP with URIs (was: Re: [rest-discuss] REST Issues)

Expand Messages
  • Jan Algermissen
    I an not sure if I was able to understand the BNF in RFC822 correctly. I could nt find a production for atom for some reason. Anyhow, I was told today, that
    Message 1 of 13 , Jun 10, 2005
    • 0 Attachment
      I an not sure if I was able to understand the BNF in RFC822
      correctly. I could'nt find
      a production for 'atom' for some reason.

      Anyhow, I was told today, that email addresses (the local part) may
      contain

      a-zA-Z0-9-_.

      which isn't really that much :o)

      some issues arise:

      - since URLs are case sensitive and email addresses are not, do the
      existing transport agents
      preserve the case?

      - do we encode the leading slash or do we drop it because we know it
      must be there?

      - @ is not allowed in path portions of URIs, so we can safely just
      decode our encoded email
      addresses until we find @

      - suppose we encode like CGI, that is using a special character
      followed by the hex value of
      the encoded one, what special character can we use given that all
      allowed characters occurr
      in ordinary email addresses?

      Or maybe this is no issue at all, because the encoded email
      addresses are dispatched to
      the HTTP POST 'gateway' based on the mail agent's configuration
      anyhow *before* decoding
      becomes an issue.


      Any further thoughts?


      Jan



      On Jun 7, 2005, at 3:32 PM, Vincent D Murphy wrote:

      > On Tue, 7 Jun 2005 14:48:58 +0200, "Jan Algermissen"
      > <jalgermissen@...> said:
      >
      >>> (escaped appropriately of course)
      >>>
      >>
      >> Since the above works, what would I need to escape? IOW, can someone
      >> tell me in what RFC this is defined?
      >>
      >
      > I'm not sure, because I was actually just covering my ass. :)
      >
      > I guess you're looking for a lowest common denominator between
      > the BNF of RFC822 (or RFC2822), the format of mail messages (and
      > more importantly, addresses), and RFC2396, URIs.
      >
      > Maybe they're the same, but I would be surprised if there aren't
      > at least a few corner cases.
      >

      ________________________________________________________________________
      ____________________
      Jan Algermissen, Consultant & Programmer
      http://jalgermissen.com
      Tugboat Consulting, 'Applying Web technology to enterprise IT'
      http://www.tugboat.de
    • Jan Algermissen
      ... Umm....since all valid email address local name characters are valid URL characters...how are we going to do the escaping reliably???? Jan ...
      Message 2 of 13 , Jun 10, 2005
      • 0 Attachment
        On Jun 7, 2005, at 9:47 AM, Vincent D Murphy wrote:
        >

        > I wonder whether its appropriate to use an
        > SMTP address of
        >
        > $path@$hostname
        >
        > given the URI
        >
        > http://$hostname/$path/
        >
        > (escaped appropriately of course)

        Umm....since all valid email address local name characters are valid
        URL characters...how are we
        going to do the escaping reliably????

        Jan

        >
        > Does this qualify as 'asynchronous REST'? I'm imagining treating that
        > whole SMTP message as a POST to the resource identified by the SMTP
        > address (http://$hostname/$path/ above).
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
        >

        ________________________________________________________________________
        ____________________
        Jan Algermissen, Consultant & Programmer
        http://jalgermissen.com
        Tugboat Consulting, 'Applying Web technology to enterprise IT'
        http://www.tugboat.de
      • Jeoff Wilks
        1. Could the mailto URI spec be used to fit the application? http://www.ietf.org/rfc/rfc2368.txt (page 2 has grammar and encoding details) 2. If you absolutely
        Message 3 of 13 , Jun 10, 2005
        • 0 Attachment
          1. Could the mailto URI spec be used to fit the application?
          http://www.ietf.org/rfc/rfc2368.txt  (page 2 has grammar and encoding details)

          2. If you absolutely have to encode a request URI into an email address itself...
          http://www.ietf.org/rfc/rfc2822.txt  (see 3.4.1 Addr-spec, and then reference 3.2.4 Atom)

          "If the [local portion of the email address string] can be represented as a dot-atom (that is, it contains no characters other than atext characters or "." surrounded by atext characters), then the dot-atom form SHOULD be used ..."
           - 3.4.1 excerpt

          From the grammar, atext includes these characters:

          atext           =       ALPHA / DIGIT / ; Any character except controls,
                                  "!" / "#" /     ;  SP, and specials.
                                  "$" / "%" /     ;  Used for atoms
                                  "&" / "'" /
                                  "*" / "+" /
                                  "-" / "/" /
                                  "=" / "?" /
                                  "^" / "_" /
                                  "`" / "{" /
                                  "|" / "}" /
                                  "~"

          To support a wider range of characters, you could use a quoted-string (sec 3.2.5):

          "Strings of characters that include characters other than those allowed in atoms may be represented in a quoted string format, where the characters are surrounded by quote (DQUOTE, ASCII value 34) characters."

          That works as long as you don't need the " character...

          --Jeoff


          On 6/10/05, Jan Algermissen <jalgermissen@...> wrote:

          On Jun 7, 2005, at 9:47 AM, Vincent D Murphy wrote:
          >

          >  I wonder whether its appropriate to use an
          > SMTP address of
          >
          > $path@$hostname
          >
          > given the URI
          >
          > http://$hostname/$path/
          >
          > (escaped appropriately of course)

          Umm....since all valid email address local name characters are valid
          URL characters...how are we
          going to do the escaping reliably????

          Jan

          >
          > Does this qualify as 'asynchronous REST'? I'm imagining treating that
          > whole SMTP message as a POST to the resource identified by the SMTP
          > address (http://$hostname/$path/ above).
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
          >
          >

          ________________________________________________________________________
          ____________________
          Jan Algermissen, Consultant & Programmer
          http://jalgermissen.com
          Tugboat Consulting, 'Applying Web technology to enterprise IT'
          http://www.tugboat.de







          Yahoo! Groups Links

          <*> To visit your group on the web, go to:
              http://groups.yahoo.com/group/rest-discuss/

          <*> To unsubscribe from this group, send an email to:
              rest-discuss-unsubscribe@yahoogroups.com

          <*> Your use of Yahoo! Groups is subject to:
              http://docs.yahoo.com/info/terms/





        • Jan Algermissen
          Jeoff, thanks for this. I just did not get it from the text. And for another issue: Does anyone have an idea how to make use of the email s From address if
          Message 4 of 13 , Jun 10, 2005
          • 0 Attachment
            Jeoff,

            thanks for this. I just did not get it from the text.

            And for another issue:

            Does anyone have an idea how to make use of the email's From address if
            HTTP authentication is required by the target resource?

            Is an email address a valid HTTP auth username? And one would need some
            identity verification, e.g. PGP for the From address...


            Jan




            On Jun 10, 2005, at 6:18 PM, Jeoff Wilks wrote:

            > 1. Could the mailto URI spec be used to fit the application?
            > http://www.ietf.org/rfc/rfc2368.txt (page 2 has grammar and
            > encoding details)
            >
            > 2. If you absolutely have to encode a request URI into an email
            > address itself...
            > http://www.ietf.org/rfc/rfc2822.txt (see 3.4.1 Addr-spec, and then
            > reference 3.2.4 Atom)
            >
            > "If the [local portion of the email address string] can be
            > represented as a dot-atom (that is, it contains no characters other
            > than atext characters or "." surrounded by atext characters), then
            > the dot-atom form SHOULD be used ..."
            > - 3.4.1 excerpt
            >
            > From the grammar, atext includes these characters:
            >
            > atext = ALPHA / DIGIT / ; Any character except
            > controls,
            > "!" / "#" / ; SP, and specials.
            > "$" / "%" / ; Used for atoms
            > "&" / "'" /
            > "*" / "+" /
            > "-" / "/" /
            > "=" / "?" /
            > "^" / "_" /
            > "`" / "{" /
            > "|" / "}" /
            > "~"
            >
            > To support a wider range of characters, you could use a quoted-
            > string (sec 3.2.5):
            >
            > "Strings of characters that include characters other than those
            > allowed in atoms may be represented in a quoted string format,
            > where the characters are surrounded by quote (DQUOTE, ASCII value
            > 34) characters."
            >
            > That works as long as you don't need the " character...
            >
            > --Jeoff
            >
            >
            > On 6/10/05, Jan Algermissen <jalgermissen@...> wrote:
            > On Jun 7, 2005, at 9:47 AM, Vincent D Murphy wrote:
            > >
            >
            > > I wonder whether its appropriate to use an
            > > SMTP address of
            > >
            > > $path@$hostname
            > >
            > > given the URI
            > >
            > > http://$hostname/$path/
            > >
            > > (escaped appropriately of course)
            >
            > Umm....since all valid email address local name characters are valid
            > URL characters...how are we
            > going to do the escaping reliably????
            >
            > Jan
            >
            > >
            > > Does this qualify as 'asynchronous REST'? I'm imagining treating
            > that
            > > whole SMTP message as a POST to the resource identified by the SMTP
            > > address (http://$hostname/$path/ above).
            > >
            > >
            > >
            > > Yahoo! Groups Links
            > >
            > >
            > >
            > >
            > >
            > >
            > >
            >
            > ______________________________________________________________________
            > __
            > ____________________
            > Jan Algermissen, Consultant & Programmer
            > http://jalgermissen.com
            > Tugboat Consulting, 'Applying Web technology to enterprise IT'
            > http://www.tugboat.de
            >
            >
            >
            >
            >
            >
            >
            > Yahoo! Groups Links
            >
            >
            >
            >
            >
            >
            >
            >
            >
            > Yahoo! Groups Links
            > To visit your group on the web, go to:
            > http://groups.yahoo.com/group/rest-discuss/
            >
            > To unsubscribe from this group, send an email to:
            > rest-discuss-unsubscribe@yahoogroups.com
            >
            > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
            >

            ________________________________________________________________________
            ____________________
            Jan Algermissen, Consultant & Programmer
            http://jalgermissen.com
            Tugboat Consulting, 'Applying Web technology to enterprise IT'
            http://www.tugboat.de
          Your message has been successfully submitted and would be delivered to recipients shortly.