bug-mailutils
[Top][All Lists]
Advanced

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

Re: RFC 822 address parsing API


From: Alain Magloire
Subject: Re: RFC 822 address parsing API
Date: Fri, 9 Mar 2001 01:12:34 -0500 (EST)

> 
> You mean somebody is working on reworking mailutil's address.c, or do you

There is in address.c a very trivial parser, not good enough to be
a complete RFC822 compliant one.
Do you have time to look at those issues?
I'll send you a separate email about license and assignment papers.
....

> Summary of my suggestions:
> 
> address_t should allow group notation to be iterated as if it
> was an unadorned address list.
> 
>  -> just a matter of having the parser keep on going through a
>     group
> 
> there should be an api to create an address that knows to quote
> the 3 parts of a mailbox.
> 
>  -> address_append_mailbox(address_t, const char* lp, domain, phrase)
> 
> (forget the insert, build the thing up in the order you want it)
> 
> there should be an api to get the local-part and domain part
> of an address, seperately, and unquoted.
> 
>  -> get_email() gets an address that could be delivered to, fed
>     into an smtp dialog, for example, the localpart and domain
>     part would be the unquoted thing. I also think that the
>     return of get_personal() should be unquoted.
> 
> there could be an api to create groups, and to append addresses:
> 
>  -> address_append_group(address_t, "the group name", address_t);
>  -> address_append_list(address_t, address_t);
> 
> (also forget the insert, build the thing up in the order you want it)
> 
> there could be an api that allowed you to traverse the address
> tree, find group nodes, and walk their contents knowing that
> you are in a named group. Perhaps not widely useful, but I can see
> neat things that could be done.
> 
> there should be an api to translate a header field from rfc2047
> encoded form, into the local charset, and from the local charset
> into rfc2047 form.

Ok, your assesments are correct, the first API that I've propose
lacked some functionnalities.  The improvements above would make
address_t an interessting component even on it's own, it does not
actually need any support from mailbox/*.

Send me again, when you will have time a new "address.h"(with the protoypes
of the rfc2047_encoding() functions) and lets start from this.

> 
> p.s. I didn't think you'd actually patch the docs, I just included it

The repository is already unstable so that's ok.  And any doc by a native
english speaking is better than my broken one 8-).

> as something to talk about, now that it's there I'm going to take an
> hour and finish it, and chop the comments out.

You did not have to use @comments, it will not appear in the
postcript/texinfo/dvi output.

You should be able to get postcript by doing :
# cd mailutils/doc
# texi2dvi mailutils.texi
# dvi2ps mailutils -o

Or pdf
# cd mailutils/doc
# texi2pdf mailutils

or simple info
# cd mailutils/doc
# makeinfo mailutils

-- 
au revoir, alain
----
Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]