ELM ME+ 2.5 PLalpha41 announcement

Elm ME+ 2.5 PLalpha41

- Is available with
        <URL: http://www.elmme-mailer.org/elm-ME+2.5/src/elm-ME+2.5.PLalpha41.patch.gz >
  and   <URL: http://www.elmme-mailer.org/elm-ME+2.5/src/elm-ME+2.5.alpha41.tar.gz >
  via WWW.

- Is available on ftp.funet.fi
  via anonymous ftp
    directory  pub/mirrors/elmme-mailer.org/mirror/src/elm-ME+2.5/
           or  pub/unix/mail/elm/elm-ME+2.5/

    files      elm-ME+2.5.PLalpha41.patch.gz
    and        elm-ME+2.5.alpha41.tar.gz

  or is available with
        <URL: http://www.nic.funet.fi/pub/unix/mail/elm/elm-ME+2.5/elm-ME+2.5.PLalpha41.patch.gz >
  and   <URL: http://www.nic.funet.fi/pub/unix/mail/elm/elm-ME+2.5/elm-ME+2.5.alpha41.tar.gz >
  via WWW.

- Is availabel with
  message-id <elmME+2.5/PLalpha41/1-0@klovni.keh.iki.fi>
  on newsgroups alt.sources and comp.mail.elm.

SUMMARY: This release adds new memory allocation wrappers,
         compiles libelmme-resolv.so module on more Linux 
         distributions, makes IPv6 support more complete, 
         may use getaddrinfo(), getifaddrs() and 
         if_nameindex() -functions. New elmrc option 
         "ipv6-scope-id" is added and new values are added 
         to elmrc option "mail-services-lookup". This 
         release changes error handling on parsing of 
         headers. Then also some other changes and bug 
         fixes are included.

Changes on Elm ME+ 2.5 PLalpha41 compared with Elm ME+ 2.5 PLalpha40

        SUMMARY: This release adds new memory allocation wrappers,
                 compiles libelmme-resolv.so module on more Linux 
                 distributions, makes IPv6 support more complete, 
                 may use getaddrinfo(), getifaddrs() and 
                 if_nameindex() -functions. New elmrc option 
                 "ipv6-scope-id" is added and new values are added 
                 to elmrc option "mail-services-lookup". This 
                 release changes error handling on parsing of 
                 headers. Then also some other changes and bug 
                 fixes are included.

        WARNING: There are some changes on nm usage so it may
                 cause that different set of symbols are found.
                 Please report possible problems.

        - metapager() did not display correctly a header
          whose unfolded length was 2560 characters or more.
          Raised that to 32k characters as it is on 

        - Added safe_calloc() as wrapper to calloc().
          That is similar to safe_malloc(). 
        - Changed len from unsigned to size_t on safe_*
          allocation functions
        - Fail if size < 1  on safe_*  allocation functions
        - Added safe_array_realloc() to lib/safemalloc.c
        - Added safe_zero_alloc() to lib/safemalloc.c

        - Possible fix for debug_print_buffer()

        - Added Configure test for <stdint.h>

        - On Red Hat Enterprise Linux Server release 5.6 (Tikanga)
          Configure test for resolv library fails with
                /tmp/ccOfeE26.o: In function `main':
                tryresolv.c:(.text+0x474): undefined reference to `__ns_initparse'
                tryresolv.c:(.text+0x605): undefined reference to `__ns_parserr'
                tryresolv.c:(.text+0x86f): undefined reference to `__ns_name_uncompress'
                tryresolv.c:(.text+0x902): undefined reference to `__ns_name_uncompress'
                tryresolv.c:(.text+0x9a0): undefined reference to `__ns_name_uncompress'
                tryresolv.c:(.text+0xbb4): undefined reference to `__ns_name_uncompress'
                tryresolv.c:(.text+0xc58): undefined reference to `__ns_name_uncompress'
                collect2: ld returned 1 exit status
        > Linked tryresolv with static libresolv.a

        - Added nls/C/C/C/s_iconv.m
        - Added nls/C/C/C/s_smtp.m
        - Added nls/C/C/C/s_tls.m

        - Changed struct smtp_callbacks on

        - Do not call flush_filter() with NULL
          ptr->filter_line on set_out_state_line_mode().
          Possible fix for crash.
        - Fix for add_se_alias_to_entry()
          on lib/service_list.c

        - If getaddrinfo() is available, use it for address lookup 
                mail-services-lookup = hostname
          was used on user's .elm/elmrc -file. This is default.
        - New value 
                mail-services-lookup = gethostbyname
          on user's .elm/elmrc -file specifies that 
          gethostbyname() should be used.
        - New value 
                mail-services-lookup = getaddrinfo
          on user's .elm/elmrc -file specifies that 
          getaddrinfo() should be used.
        * However gethostbyname() is still used to 
          initialize "hostdomain" and IPv4 addressed 
          returned are still used for default values of
          "mailname" elmrc variable. This does not
          use "mail-services-lookup" elmrc variable
          and getaddrinfo() is not used on here.
        - Configure tests if AI_ADDRCONFIG is usable
          with getaddrinfo()

        - Fix panic on connect_remote_account_1():
          "CONNECTION PANIC in remote_mbx.c:521:connect_remote_account_1
           >>>No data (ra_from)"
        - Fixed some wrong definitions on known
          headers array on lib/addr/headers.c 

        - Changed parse_header_address() on
          lib/addr/getaddrc.c so that missing ','
          after '>' is detected. Before that change
          components of two address was catenated.

        - Do not alloc zero length vector
          if add_name_to_string() is called
          with empty ascii string. add_ascii_to_string()
          uses actually add_name_to_string().

        - Added more wrapping of headers when they are printed
          to editor's buffer on src/hdrconfg.c

        - If getifaddrs() is available, Configure asks
          that should interface addresses added to "mailname" 
          global elm.rc variable. Interface "lo" is
          ignored when adding addresses to "mailname".
          Also IPv6 addresses with scope id are ignored.

        - Added get_interfaces(), update_interface_list(),
          set_SOCKADDR_from_data(), free_interface_list() ,
          same_SOCKADDR_ptr_generic() to lib/remote_mbx.c

        - Small fix to lookup_domain_name() on

        - If getifaddrs() is available and elmrc variable
          "query-address-type" (on resolv: -section on 
          user's .elm/elmrc -file) have value "default", 
          resolv -module uses interface address list to 
          determine if query A (IPv4) or AAAA (IPv6) records 
          need to be queried. Interface "lo" and IPv6 
          addresses with non-zero scope-id are ignored. 
          If only IPv4 addresses are seen then A (IPv4) 
          records are queried. If only IPv6 addresses are 
          seen then AAAA (IPv6) records are queried. Mail 
          domain verify queries both A (IPv4) or AAAA (IPv6) 
          records for query-address-type=default
          (when verify-domain=resolv:mx-address is used.)

        - Settings
                mail-services-lookup = shared
                mail-services-lookup = resolv:addresses
                mail-services-lookup = resolv:all-addresses
          caused that that command that IP-address
          an mailbox name as
             elm -f username@
          was not accepted on Fedora release 19 
          and Ubuntu 10.04.4 LTS. Changed  give_service_entry3()
          to ignore mail-services-lookup if literal
          IP address is given as argument.
        - Do not allow addr= on user's mail.services
          or global elm.mailservices file if
          name of entry matches to literal IP-address.

        - If if_nameindex is available, elmrc
                ipv6-scope-id = link-local-if-index
          can be used to tell that scope id's
          for link local IPv6-addresses are
          are interface indexes. This adds
          support for interface names as
          textual form of scope ids.
        * Scope id is part after % -character
          on numeric IPv6 -address.
        - Option
                ipv6-scope-id = auto
                ipv6-scope-id = link-local-if-index
          if numeric scope id's of link
          local addresses matches to interface
          index on where address is located.
        - Scope-ids for other type IPv6-addresses
          are still numeric with
              ipv6-scope-id = link-local-if-index
        - Configure asks is struct sockaddr_in6's 
          sin6_scope_id -field is always interface 
          index as given on if_nametoindex() and
          if_indextoname() for link local addresses.
          For Linux this default to "yes".

        NOTE: Currently numeric IPv6 addresses is 
          possible to give on user's mail.services
          -file or on global elm.mailservices -file. 
          Elsewhere (for example hostnames on
          mailbox names) they are misparsed.

        - Added FL_SHOWSYS value for flags -field of 
          struct rc_save_info_rec.
        - "/usr/bin/nm -D -f sysv" seems crash on
          Ubuntu 14.04.4 LTS. Try "nm -D" instead
          if "nm -D -f sysv" crashes on Configure.

        - Using previous answer to "What is your domain name?"
          question as default on Configure even when
          hostname gives different domain.
        New files:

        New elmrc options:


        - Not compiled with MMDF support defined, so probably it doesn't 
          work (or even compile).

        - This has not been tested much so there can be bad bugs. 

          Bug reports to: Kari E. Hurtta <elm@elmme-mailer.org>
                                     (was hurtta+elm@posti.FMI.FI)

        - Internationalized (ie. non-ASCII) domain names are not supported.

        - Support for multipart/signed and multipart/encrypted (specially: 
          support for PGP/MIME) only in reading side. There is no support 
          for attachments with multipart/encrypted.

        - HP's shoftkeys are no longer supported

        - DECNET addresses like host::user may be interpreted as phrase
          of group syntax or as route of source routed address.

        - Header editing screen now uses addresses in form phrase <address>, 
          but because it does not require using of comma (,), multiword 
          phrases must be entered in quotes. 

          For example:  "Kari Hurtta" <hurtta>

        - If address includes <> or comments (), they are not aliased 
          expanded. So aliases must be entered as bare words.

        - Addresses given as arguments to elm command should be given
          as one address per argument. Giving of sevaral addresses per 
          one argument causes that address is misparsed if header is 
          edited on header editing screen.

          That is:

                Use:    elm  '"Kari Hurtta" <hurtta>' 'Admin <root>'

          Don't use:    elm  'Kari Hurtta <hurtta>, Admin <root>'

        - p)rint command acts as P)rint text -command. So it
          is currently quite useless.
          p)rint command does that via readmsg -command. However
          P)rint text does actually same (without readmsg).

        - Some Linux libraries does not follow $LC_CTYPE when program is 
          setgid. Net result is that your locale is always C. That is 
          visible that $LC_CTYPE does not effect to locale printed by 
          'elm -vvvvv':

                Locale (LC_CTYPE):         C
                Display character-set:     US-ASCII
                Sending character-set:     US-ASCII

        - All refrences iso2022 maps are parsed and read to memory. 
          This may cause quite big memory consumption specially because 
          eastern (multibyte) sets tend to be lot of characters. That 
          mapping information should be shared between processes to 
          reduce memory consuption.

        - If display charset is produced by using mapping from locale 
          to charset where charset definition is later invalidated 
          ("removed") by setting explicit compatcharsets on user's 
          .elm/elmrc, that may  cause PANIC on elm's internal pager 
          or other problems. Invalidation happens if display charset 
          is on implicit compatcharsets list (because of charset 
          definition), but does not have explicit compatcharsets list 
          given by user. 

        - Neither Unicode didirectional algorithm nor Right-Left scripts 
          are supported.

        - In some situations two Status headers may be generated two 
          Status headers -- one by IMAP deamon and one from APPENDed 
        - When APPENDing message to IMAP folder (which is normal UNIX 
          mailbox format) original "From " separator line can not be 
          preserved -- specially it is not possible to pass envelope 
          sender address.
        - For UTF-8 charset Elm only knows printable characters from 
          Latin/1 range, if unicode database (see elmrc option "unidata")
          is not loaded.

        - For using of ISO2022 character sets it is required that mapping 
          them to unicode is know -- otherwise Elm ME+ does not know which 
          characters are printable.

        - UTF-16 surrogate pairs (D800-DFFF) are not supported on UTF-7 

        - Mixing of names using IMAP naming convention 
          (imap-naming-convention = yes)
          and names using imap-charset does not work very well...

        - "  Regarding my message (8 Aug 2000) regarding 'newmail' on 
           AIX 4.3.3 in an 'aixterm' window and the 'aixterm' did not 
          close, indeed the problem was NOT related to 'newmail' but an 
          AIX bug.

          IBM has release a patch, and the 'aixterm' in AIX 4.3.3 must
          be update with fileset X11.apps.aixterm. (PTF
          U473920) is solved to problem."
         From: Noam G. Nudelman  <noam@mail.biu.ac.il>

        - File /usr/share/locale/fi/charset gives charset name utf-8 on 
          Linux Mandrake 7.2. This causes that Configure generates 
                fi      utf-8
          to elm.mimecharsets. However that seems to have
          incorrect mapping. You may want change this to
                fi      ISO-8859-1

          ( however nl_langinfo(CODESET) gives charset ISO-8859-15
            but look following entry. )

        - Locale 'fi' seems to have charset ISO-8859-15 according
          of nl_langinfo(CODESET)  on Mandrake Linux 7.2 (and probaly 
          others with same glibc version). However for example gnome 
          terminal uses font 
          and not

          Also KDE's konsole program seems use iso8859-1 character set
          although locale is 'fi' which should have ISO-8859-15 according
          of nl_langinfo (selecting "unicode" from menu seems fix that.)
          Because of mismatch more correct locale is fi_FI.88591, which gives
          ISO-8859-1 character set according of nl_langinfo(CODESET).

          ( Locale seems come from /etc/sysconfig/i18n or $HOME/.i18n )

        > To enable handling of ISO-8859-1 and ISO-8859-15 character sets
          on linux console, read comments from doc/terminal.info file.

        - Mandrake Linux 7.2 seems set LD_PRELOAD to load 
          /usr/lib/libxalflaunch.so.0. That (xalf-0.4-2mdk) causes that 
          elm to crash on startup (actually before main() is reached.)

        - kterm on Mandrake Linux 7.2 seems have (at least on my test
          environment) seems get bad fontlist (*VT100*fontList) which 
          gives bad font for iso8859-1 -- therefore ISO-8859-1 characters 
          do not work.
          ("xrdb -query" seems report resource with name "*fontList"
           -- that probably overrides "*VT100*fontList" which comes
           from /usr/lib/X11/app-defaults/KTerm )

        - Also note that initially kterm does NOT default to
          ISO-8859-1 -- therefore ISO-8859-1 works only when
          elm explicity switch to ISO-8859-1 (for example
          with 'elm -D ISO-8859-1')

        - When assembling message/partial MIME (RFC 2046) 
          requires that all headers except Content-*, Subject, 
          MIME-Version, Message-ID and Encrypted are copied from
          initial enclosing message to assembled message. It also 
          requires that headers except Content-*, Subject,
          MIME-Version,  Message-ID and Encrypted  are ignored and
          dropped from enclosed  message.

          For now we copy only Received: -headers. Dropping extra
          headers from enclosed message makes assembly more 
          complicated  (and dropping of Received: -headers
          from enclosed message do not make sense.)

        - EXIF files are sometimes labeled with content-type
          image/jpeg. They also use .jpg filename extension. They are
          not accepted by Elm ME+ as image/jpeg because magic number 
          (and format) is different. It is unclear what is correct
          treatment. According of specification EXIF files may
          wrap also other file types than jpeg (JFIF).

        - mailer=sendmail; verify=yes works only when sendmail 
          is installed as setuid root. Use mailer=submission instead.
        * Starting from sendmail 8.12 sendmail is normally
          installed as setgid smmsp and not as setuid root.
        - However error message is printed only if 
          verify-local-address=yes is also set

        - IMAP connection is stalled some times. Reason is unknown.

        - From name option (-f) on fastmail is currently broken.

Collector of these patches

        Kari Hurtta <elm@elmme-mailer.org>
        Kari Hurtta <hurtta+elm@siilo.FMI.FI>


 Configure                            |  286 ++++++!
 MANIFEST                             |    6 
 README.ME+                           |  222 +++++
 config.h.SH                          |   54 !
 doc/elmmailservices-info             |    4 
 doc/elmrc-info                       |   37 
 hdrs/connection_imp.h                |  109 ++
 hdrs/defs_major.h                    |    6 
 hdrs/elm_defs.h                      |    5 
 hdrs/elmlib.h                        |   32 
 hdrs/me.h                            |    6 
 hdrs/patchlevel.h                    |   10 
 hdrs/s_elm.h                         |    3 
 hdrs/s_iconv.h                       |    3 
 hdrs/s_me.h                          |    6 
 hdrs/s_resolv.h                      |    2 
 hdrs/s_smtp.h                        |   37 
 hdrs/s_tls.h                         |   28 
 hdrs/save_opts.h                     |   16 
 lib/MAGIC                            |    2 
 lib/Makefile.SH                      |    7 
 lib/addr/addr_list.c                 |   35 
 lib/addr/address.c                   |    9 
 lib/addr/error.c                     |   15 
 lib/addr/getaddr.c                   |  325 +!!!!!!
 lib/addr/getid.c                     |    6 
 lib/addr/headers.c                   |   22 
 lib/addr/mailer.c                    |    6 
 lib/addr/message-id.c                |   11 
 lib/addr/mlist.c                     |   23 
 lib/addr/outheaders.c                |   14 
 lib/addr/parsestring.c               |    6 
 lib/addr/references.c                |   25 
 lib/alias/address_alias.c            |   16 
 lib/alias/alias_vector.c             |   16 
 lib/alias/aliases.c                  |   23 
 lib/alias/aliasexpand.c              |   16 
 lib/bindata.c                        |   12 
 lib/cancel.c                         |    8 
 lib/charset.c                        |   36 
 lib/charset_input.c                  |   10 
 lib/conf_writer.c                    |    9 
 lib/cs_binary.c                      |   22 
 lib/cs_iso2022.c                     |   53 !
 lib/cs_unknown.c                     |   36 
 lib/cs_utf.c                         |   83 !!
 lib/debug.c                          |   10 
 lib/dynarray.c                       |    8 
 lib/hdrencode.c                      |    8 
 lib/iso2022.c                        |   26 
 lib/iso2022_map.c                    |    8 
 lib/ldstate.c                        |   12 
 lib/mailer/mailer.c                  |   26 
 lib/mailer/shared_mailer.c           |   10 
 lib/mbox/con_imap.c                  |   28 
 lib/mbox/connection.c                |    7 
 lib/mbox/imap.c                      |   13 
 lib/mbox/localmbx.c                  |   29 
 lib/mbox/mbox.c                      |   22 
 lib/mbox/pop.c                       |   24 
 lib/mbox/remote_server.c             |   17 
 lib/mbox/savefolder.c                |   33 
 lib/mbox/shared_mbox.c               |   34 
 lib/mbox/state.c                     |    8 
 lib/misc/charset.c                   |    8 
 lib/misc/iso2022.c                   |    8 
 lib/misc/mediatype.c                 |   31 
 lib/misc/mime_types.c                |   37 
 lib/misc/mlist.c                     |   17 
 lib/misc/service_list.c              |   22 
 lib/misc/terminal.c                  |   10 
 lib/output.c                         |   16 
 lib/pager_lineext.c                  |    9 
 lib/pager_range.c                    |    9 
 lib/pgrng_bfr_binding.c              |    9 
 lib/rc_delay.c                       |   16 
 lib/rc_handle.c                      |   14 
 lib/rc_parse.c                       |   22 
 lib/rc_propline.c                    |   15 
 lib/read_rc.c                        |  715 +++++++++++-!!!!
 lib/remote_mbx.c                     |  862 ++++++++++++++++++++!!
 lib/safemalloc.c                     |  235 !!!!!
 lib/sb_file.c                        |   40 !
 lib/sb_mem.c                         |   26 
 lib/schedule.c                       |   16 
 lib/service_list.c                   | 1371 +++++++++++++--!!!!!!!!!!!!!!!!!!!
 lib/shared.c                         |   18 
 lib/shared_all.c                     |   12 
 lib/shared_connect.c                 |   10 
 lib/state_in.c                       |   16 
 lib/state_out.c                      |   94 
 lib/streamsched.c                    |   20 
 lib/string.c                         |   60 !
 lib/stringbuffer.c                   |    9 
 lib/stringtok.c                      |    6 
 lib/syscall.c                        |    8 
 lib/unicode.c                        |    6 
 lib/write_rc.c                       |   10 
 melib/mailcap.c                      |   18 
 melib/mime_param.c                   |   38 
 melib/mpar_multipart.c               |   14 
 melib/parse_util.c                   |    6 
 melib/partial.c                      |   10 
 nls/C/C/C/s_elm.m                    |    6 
 nls/C/C/C/s_iconv.m                  |    4 
 nls/C/C/C/s_me.m                     |   12 
 nls/C/C/C/s_resolv.m                 |    4 
 nls/C/C/C/s_smtp.m                   |   71 +
 nls/C/C/C/s_tls.m                    |   53 +
 nls/Makefile.SH                      |   12 
 shared_libs/iconv/Makefile.SH        |    5 
 shared_libs/iconv/elmiconv.h         |    5 
 shared_libs/iconv/iconv.c            |   44 !
 shared_libs/include/shared_smtp.h    |    6 
 shared_libs/resolv/Makefile.SH       |    7 
 shared_libs/resolv/README.ME+        |   19 
 shared_libs/resolv/config            |   89 !!
 shared_libs/resolv/elmrc-resolv-info |   10 
 shared_libs/resolv/resolv.c          |  251 +++!!
 shared_libs/smtp/Makefile.SH         |    5 
 shared_libs/smtp/elmsmtp.h           |    5 
 shared_libs/smtp/shared_smtp.c       |   16 
 shared_libs/smtp/smtp.c              |  387 ++!!!!!!!
 shared_libs/tls/Makefile.SH          |    4 
 shared_libs/tls/elmtls.h             |    6 
 shared_libs/tls/remote.c             |   44 !
 shared_libs/tls/smtp.c               |   25 
 shared_libs/tls/tls.c                |   72 !
 src/aliases/aliases.c                |   16 
 src/aliases/aliases_map.c            |   19 
 src/args.c                           |   35 
 src/attach_menu.c                    |   12 
 src/browser.c                        |   20 
 src/command/command.c                |   32 
 src/editmsg.c                        |   21 
 src/fbrowser.c                       |   10 
 src/hdrconfg.c                       |  291 ++!!!!
 src/limit.c                          |    8 
 src/list/list.c                      |    6 
 src/menu_common/alias_limit.c        |    7 
 src/menu_common/message_limit.c      |    6 
 src/messages/canceled_mail.c         |   22 
 src/messages/digest.c                |   18 
 src/messages/duplicate.c             |   22 
 src/messages/header_alloc.c          |   10 
 src/messages/messages.c              |    6 
 src/messages/partial.c               |   24 
 src/messages/storage.c               |   16 
 src/messages/thread.c                |   32 
 src/messages/thread_messages.c       |   10 
 src/metapager.c                      |   42 !
 src/mime.c                           |   12 
 src/opt_generic.c                    |   12 
 src/pager/span_line.c                |    8 
 src/pager/wraprecord.c               |   10 
 src/remail.c                         |   36 
 src/screen/knode.c                   |   12 
 src/showmsg.c                        |    9 
 src/snd_display.c                    |   12 
 src/thread.c                         |   10 
 src/url/mailto.c                     |    8 
 src/url/url.c                        |   12 
 src/url/url_path.c                   |    6 
 src/utils.c                          |   12 
 utils/elmalias.c                     |   12 
 utils/elmbindata.c                   |    6 
 utils/elmcharset.c                   |    6 
 utils/elmiso2022sets.c               |    6 
 utils/fastmail.c                     |   34 
 utils/readmsg/folder.c               |    8 
 utils/readmsg/fstate.c               |    8 
 utils/readmsg/readmsg.c              |   13 
 172 files changed, 3138 insertions(+), 173 deletions(-), 4692 modifications(!)

/ Kari Hurtta