{Unbreaks} Change how address checking works..
commiteb4489dae948c83dbbea0cf4f584ab25b5417b86
authorSteffen "Daode" Nurpmeso <sdaoden@users.sf.net>
Tue, 9 Oct 2012 12:04:57 +0000 (9 14:04 +0200)
committerSteffen "Daode" Nurpmeso <sdaoden@users.sf.net>
Tue, 9 Oct 2012 12:04:57 +0000 (9 14:04 +0200)
tree004b0c8544ac05b84cf910d4aa9ad5427df2db1a
parent82ffe9b6a00561833917f91db0ed99c038e60932
{Unbreaks} Change how address checking works..

Do one small step towards a more sophisticated address handling,
and introduce enum nameflags, struct addrguts, addrspec_with_guts(),
rename mime_name_invalid() to is_addr_invalid(), is_fileaddr() to
is_fileorpipe_addr(), reorder where is_addr_invalid() and checkaddrs()
are defined (head.c and names.c, respectively), and little things.

It turned out that nail(1) is most terrible inefficient when dealing
with addresses and that yet no mechanism was available to implement
IDNA support, because the IDNA convertion has to be applied to the
domain part of either of the plain addr-spec and the full address
as is seen, e.g., in a To: line.  Since no information is carried
through all those layers but the plain name there was no possibility
to perform the necessary steps in deeper layers.

So the only chance to really implement this is at creation time
of struct name objects.

And then there is that terrific checking of address content from
multiple layers, again, after any possible information has been
thrown away.

So add an address checking at creation time of struct name objects.

It must be understood that this is work in progress.
This is a complicated codebase that is full of bugs, where fiddling
around with one screw may badly effect others, as has been seen
already in the last weeks.
On the long run i hope to be able to turn more and more places
over to work with objects that have all necessary information
available all the time, and managed to perform the parsing and
gathering of information once, and once only.
Until then legacy code is needed.

Anyway.  This first step will make it possible to implement IDNA
support on the encoding side, once upon struct name creation time,
and for the addr-spec and the entire address in one go.
It may be that decoding IDNA will never be implemented.
def.h
extern.h
head.c
mime.c
names.c
sendout.c
tty.c