path: root/libmailutils/
AgeCommit message (Collapse)AuthorFiles
2021-01-05Update copyright yearsSergey Poznyakoff1
2020-02-08Update copyright yearsSergey Poznyakoff1
2019-12-14Fix several linking issuesSergey Poznyakoff1
* Require libtool version 2.4.6 (MU_LINK_POSTFLAGS): Remove. Not needed with the patched version of Detect the presencecof GSSAPI. Fix displaying the status of GSSAPI support. Remove the hack introduced on 2010-02-19 (commit 35ac66f056). (MU_AUTHLIBS,SQLLIB) (SQL_LOADABLE_MODULES,SQL_LIBOBJS): Insert spaces only when needed. * mu-aux/ from libtool 2.4.6 with fixes from installed. * bootstrap.conf (bootstrap_epilogue): Install the fixed version. * am/gssapi.m4: Allow for "yes" and "probe" argument values. Improve makefile style consistency . Uniformly use parentheses instead of curly braces in variable referencing; . Prefer to use Make variables over substitution variables, for variables prefixed with MU_; * comsat/ * dotlock/ * examples/ * examples/cpp/ * frm/ * imap4d/ * imap4d/tests/ * lib/ * libmailutils/ * libmailutils/address/ * libmailutils/auth/ * libmailutils/base/ * libmailutils/cfg/ * libmailutils/cidr/ * libmailutils/cli/ * libmailutils/datetime/ * libmailutils/diag/ * libmailutils/filter/ * libmailutils/imapio/ * libmailutils/list/ * libmailutils/locus/ * libmailutils/mailbox/ * libmailutils/mailcap/ * libmailutils/mailer/ * libmailutils/mime/ * libmailutils/msgset/ * libmailutils/opt/ * libmailutils/property/ * libmailutils/server/ * libmailutils/sockaddr/ * libmailutils/stdstream/ * libmailutils/stream/ * libmailutils/string/ * libmailutils/tests/ * libmailutils/url/ * libmailutils/wicket/ * libmu_auth/ * libmu_cpp/ * libmu_dbm/ * libmu_scm/ * libmu_scm/mailutils/ * libmu_sieve/ * libmu_sieve/extensions/ * libproto/dotmail/ * libproto/dotmail/tests/ * libproto/imap/ * libproto/imap/tests/ * libproto/maildir/ * libproto/mailer/ * libproto/mbox/ * libproto/mh/ * libproto/nntp/ * libproto/pop/ * mail/ * mapi/ * mda/lib/ * mda/lmtpd/ * mda/mda/ * mda/mda/tests/ * mda/putmail/ * messages/ * mh/ * mh/tests/ * mimeview/ * movemail/ * mu/ * mu/libexec/ * pop3d/ * python/2/libmu_py/ * python/2/mailutils/ * python/3/libmu_py/ * python/3/mailutils/ * readmsg/ * sieve/ * sql/ * testsuite/
2019-07-11Pull wordsplit from submodule.Sergey Poznyakoff1
* .gitmodules: Add wordsplit. * Version 3.7.90 * NEWS: Raise version number. * include/mailutils/sys/ Include wordsplit.h from the submodule. * include/mailutils/sys/wordsplit.h: New file. * include/mailutils/wordsplit.h: Rewrite as a wrapper over mailutils/sys/wordsplit.h * libmailutils/ Distribute files from wordsplit. * libmailutils/string/ Add libmailutils/wordsplit to the include path. * libmailutils/string/wordsplit.c: Replace with a wrapper over wordsplit/wordsplit.c * libmailutils/tests/.gitignore: Update. * libmailutils/tests/ Pull wordsplit testsuite from the submodule. * libmailutils/tests/ Remove. * libmailutils/tests/wsp.c: Remove.
2019-02-03Rewrite the mailcap supportSergey Poznyakoff1
* Build libmailutils/mailcap/Makefile * include/mailutils/mailcap.h: Rewrite * include/mailutils/sys/ Add mailcap.h * include/mailutils/sys/mailcap.h: New file. * include/mailutils/util.h: Add missing include. * lib/mailcap.c: Rewrite using new API. * libmailutils/ Build in mailcap * libmailutils/base/ Remove mailcap.c * libmailutils/base/mailcap.c: Remove. * libmailutils/mailcap/ New file. * libmailutils/mailcap/ctmatch.c: New file. * libmailutils/mailcap/deferrclos.c: New file. * libmailutils/mailcap/mcp_creat.c: New file. * libmailutils/mailcap/mcp_destr.c: New file. * libmailutils/mailcap/mcp_err.c: New file. * libmailutils/mailcap/mcp_flags.c: New file. * libmailutils/mailcap/mcp_get.c: New file. * libmailutils/mailcap/mcp_sel.c: New file. * libmailutils/mailcap/mcp_count.c: New file. * libmailutils/mailcap/mcp_find.c: New file. * libmailutils/mailcap/ent_cmd.c: New file. * libmailutils/mailcap/ent_creat.c: New file. * libmailutils/mailcap/ent_destr.c: New file. * libmailutils/mailcap/ent_locus.c: New file. * libmailutils/mailcap/ent_type.c: New file. * libmailutils/mailcap/fieldacc.c: New file. * libmailutils/mailcap/fields.c: New file. * libmailutils/mailcap/finder.c: New file. * libmailutils/mailcap/parse.c: New file. * libmailutils/mailcap/parsefile.c: New file. * libmailutils/tests/mailcap.c: Rewrite using new API. Improve cli * libmailutils/tests/mcf.c: New file. * libmailutils/tests/ctm.c: New file. * libmailutils/tests/ New file. * libmu_cpp/ Rewrite using new API. * python/2/libmu_py/mailcap.c: Rewrite using new API. * python/3/libmu_py/mailcap.c: Rewrite using new API. * examples/python/2/ Minor change. This example is broken with the new API. Should be fixed. * include/mailutils/cpp/mailcap.h: Update * include/mailutils/cpp/pop3.h: Update
2019-01-21Improve folder handling and expansion in mail. Add convenience functions to ↵Sergey Poznyakoff1
the library. * Build libmailutils/wicket * libmailutils/ Likewise. * libmailutils/base/wicket.c: Move file wicket stuff to ... * libmailutils/wicket/file.c: ... here * libmailutils/wicket/noauth.c: New file. * libmailutils/wicket/ New file. * include/mailutils/auth.h (mu_noauth_ticket_create) (mu_noauth_wicket_create): New protos. * include/mailutils/folder.h (mu_folder_attach_ticket) (mu_folder_is_local): New protos. * include/mailutils/mailbox.h (mu_mailbox_attach_ticket): New proto. * include/mailutils/sys/folder.h (_mu_folder): Remove flags. Add new member: is_local. * libmailutils/mailbox/folder.c (mu_folder_create_from_record): Set is_local. (mu_folder_attach_ticket): New function. (mu_folder_is_local): New function. * libmailutils/mailbox/mbx_default.c (mu_mailbox_attach_ticket): New function. * libmailutils/url/create.c: Allow for trailing / in url. * libproto/imap/mbox.c (_imap_mbx_open): Do initial scan. (__imap_msg_get_stream): Initialize clos.size. * libproto/imap/tests/imapfolder.c: Attach ticket to the folder. * mail/cd.c (mail_cd): Expand directory name (~, %, + notations) prior to use. * mail/file.c (mail_file): Attach ticket to the mailbox. * mail/copy.c (append_to_mailbox): Likewise. * mail/mailline.c: Rewrite directory expansion. Implement fully functional folder expansion. * mail/util.c (util_folder_path) (util_outfolder_name): Rewrite using mu_mailbox_expand_name.
2019-01-03Update copyright yearsSergey Poznyakoff1
2018-01-19Version 3.4.90; update copyright yearsSergey Poznyakoff1
2017-06-07Begin implementing liblocusSergey Poznyakoff1
Liblocus is a part of libmailutils that will provide functions for manipulating source file locations, for use in lexers, grammars, etc. This will expand the functionality of the mu_locus type and logstreams. * add libmailutils/locus/ * include/mailutils/assoc.h (mu_assoc_install_ref2): New proto. * libmailutils/base/assoc.c (mu_assoc_install_ref2): New entry point. * libmailutils/base/copyfile.c (copy_regular_file): Add typecasts. * libmailutils/ Build liblocus * libmailutils/locus/ New file. * libmailutils/locus/debug.c: New file. * libmailutils/locus/ident.c: New file. * libmailutils/locus/tracker.c: New file. * libmailutils/tests/ New file. * libmailutils/tests/tracker.c: New file.
2017-01-01Happy GNU YearSergey Poznyakoff1
2016-10-11Introduce new CLI/configuration code for mailutils applications.Sergey Poznyakoff1
The new API is to replace libmu_cfg and libmu_argp. A smooth transition is scheduled, during which the two APIs will coexist, * Build libmailutils/cli/Makefile * include/mailutils/cli.h: New file. * include/mailutils/ Add cli.h * libmailutils/cli/ New file. * libmailutils/cli/capa.c: New file. * libmailutils/cli/cli.c: New file. * libmailutils/cli/stdcapa.c: New file. * libmailutils/ (SUBDIRS): Add cli. * include/mailutils/cfg.h (mu_cfg_parse_hints): New members: append_tree and data. (MU_PARSE_CONFIG_LINT): New flag. * include/mailutils/diag.h (mu_program_name) (mu_full_program_name): Remove const qualifier. * include/mailutils/locker.h (mu_locker_set_default_external_program): Argument is const. * libmailutils/base/locker.c: Likewise. * include/mailutils/opt.h (mu_progname, mu_absprogname): Replace with mu_program_name and mu_full_program_name. (mu_set_progname): Rename to mu_set_program_name. (mu_parseopt) <po_data>: Change type to void *. (po_help_hook, po_version_hook): Change signatures. (mu_parseopt_error): New function. * libmailutils/opt/progname.c (mu_progname, mu_absprogname): Replace with mu_program_name and mu_full_program_name. (mu_set_progname): Rename to mu_set_program_name. * libmailutils/opt/help.c: Minor changes * libmailutils/opt/opt.c (parse_error): Rename to mu_parse_error (extern). (next_opt): Fix permutations. * libmailutils/tests/parseopt.c: Reflect changes. * libmailutils/tests/ Improve test case * libmailutils/tests/ Reflect changes. * libmailutils/tests/ Reflect changes. * include/mailutils/stdstream.h (mu_program_name): Remove qualifier. * libmailutils/cfg/driver.c (mu_cfg_tree_reduce): Remove useless condition * libmailutils/cfg/lexer.l (mu_cfg_parse_file): Additional info messages. * libmailutils/cfg/parser.y (mu_cfg_parse_config): Join in the append_tree. * libmailutils/diag/diag.c (mu_program_name, mu_full_program_name) (mu_set_program_name): Remove. Declared elsewhere. * libmu_sieve/conf.c: Add new configuration code. Mark old text for removal. * libmailutils/tests/tcli.c: New program. * libmailutils/tests/ Add tcli.c
2016-10-07Add generic library for option parsing.Sergey Poznyakoff1
* Build libmailutils/opt * include/mailutils/ Add opt.h * include/mailutils/opt.h: New file. * include/mailutils/util.h (mu_c_type_t): New datatype. (mu_str_to_c): New proto. * libmailutils/ Add opt to subdirs. * libmailutils/opt/ New file. * libmailutils/opt/help.c: New file. * libmailutils/opt/opt.c: New file. * libmailutils/opt/progname.c: New file. * libmailutils/string/ Add new files. * libmailutils/string/str_to_c.c: New file. * libmailutils/string/to_sn.c: New file. * libmailutils/string/to_un.c: New file. * libmailutils/tests/.gitignore: Update. * libmailutils/tests/ Update. * libmailutils/tests/parseopt.c: New file.
2016-01-22Update copyright yearsSergey Poznyakoff1
2015-03-02Update copyright yearsSergey Poznyakoff1
2014-02-05Update copyright years.Sergey Poznyakoff1
2012-01-05Happy GNU YearSergey Poznyakoff1
2011-12-26Add functions for operations on message sets.Sergey Poznyakoff1
* Build libmailutils/msgset/Makefile * include/mailutils/msgset.h: New file. * include/mailutils/ (pkginclude_HEADERS): Add msgset.h * include/mailutils/mailutils.h: Include mailutils/msgset.h * include/mailutils/sys/msgset.h: New file. * include/mailutils/sys/ (sysinclude_HEADERS): Add msgset.h * include/mailutils/types.hin (mu_msgset_t): New type. * libmailutils/ (SUBDIRS): Add msgset. (libmailutils_la_LIBADD): Add * libmailutils/msgset/ New file. * libmailutils/msgset/add.c: New file. * libmailutils/msgset/aggr.c: New file. * libmailutils/msgset/clear.c: New file. * libmailutils/msgset/create.c: New file. * libmailutils/msgset/free.c: New file. * libmailutils/msgset/getitr.c: New file. * libmailutils/msgset/getlist.c: New file. * libmailutils/msgset/locate.c: New file. * libmailutils/msgset/parse.c: New file. * libmailutils/msgset/print.c: New file. * libmailutils/msgset/sub.c: New file. * libmailutils/tests/ New file. * libmailutils/tests/msgset.c: New file. * libmailutils/tests/ (noinst_PROGRAMS): Add msgset. (TESTSUITE_AT): Add * libmailutils/tests/ Include * testsuite/msgset.c: New file. * testsuite/ (noinst_PROGRAMS): Add msgset.
2011-12-08Revamp date/time calculations.Sergey Poznyakoff1
* Build libmailutils/datetime/ * include/mailutils/datetime.h (mu_datetime_julianday) (mu_datetime_dayofweek,mu_datetime_dayofyear) (mu_datetime_year_days): New protos. * libmailutils/ (SUBDIRS): Add datetime (libmailutils_la_LIBADD): Add * libmailutils/base/ (libbase_la_SOURCES): Remove date.c and strftime.c. * libmailutils/base/date.c: Remove. * libmailutils/base/strftime.c: Move to libmailutils/datetime * libmailutils/datetime/ New file. * libmailutils/datetime/dow.c: New file. * libmailutils/datetime/doy.c: New file. * libmailutils/datetime/jd.c: New file. * libmailutils/datetime/scantime.c: New file. * libmailutils/datetime/streamftime.c: New file. * libmailutils/datetime/tab.c: New file. * libmailutils/datetime/unixtime.c: New file. * libmailutils/datetime/utcoff.c: New file. * libmailutils/datetime/yd.c: New file. * libmailutils/tests/ Fix yday numbers.
2011-11-18Move list support into a separate convenience library.Sergey Poznyakoff1
* Build libmailutils/list/Makefile * include/mailutils/sys/list.h (DESTROY_ITEM): New define. (_mu_list_insert_item): New proto. * libmailutils/ (SUBDIRS): Add list. (libmailutils_la_LIBADD): Add list/ * libmailutils/base/ (libbase_la_SOURCES): Remove list sources. * libmailutils/base/list.c: Split into smaller files (see below). * libmailutils/base/listlist.c: Move to libmailutils/list/listlist.c * libmailutils/list/ New file. * libmailutils/list/append.c: New file. * libmailutils/list/array.c: New file. * libmailutils/list/clear.c: New file. * libmailutils/list/count.c: New file. * libmailutils/list/create.c: New file. * libmailutils/list/destroy.c: New file. * libmailutils/list/do.c: New file. * libmailutils/list/empty.c: New file. * libmailutils/list/get.c: New file. * libmailutils/list/getcomp.c: New file. * libmailutils/list/insert.c: New file. * libmailutils/list/intersect.c: New file. * libmailutils/list/iterator.c: New file. * libmailutils/list/locate.c: New file. * libmailutils/list/prepend.c: New file. * libmailutils/list/remove.c: New file. * libmailutils/list/replace.c: New file. * libmailutils/list/setcomp.c: New file. * libmailutils/list/setdestr.c: New file.
2011-11-17Implement IMAP I/O functions for client and server.Sergey Poznyakoff1
* include/mailutils/imapio.h: New file. * include/mailutils/sys/imapio.h: New file. * libmailutils/imapio/create.c: New file. * libmailutils/imapio/getline.c: New file. * libmailutils/imapio/literal.c: New file. * libmailutils/imapio/printf.c: New file. * libmailutils/imapio/qstring.c: New file. * libmailutils/imapio/send.c: New file. * libmailutils/imapio/trace.c: New file. * libmailutils/imapio/words.c: New file. * libmailutils/imapio/xscript.c: New file. * Build libmailutils/imapio/Makefile * include/mailutils/ (pkginclude_HEADERS): Add imapio.h. * include/mailutils/imapio.h: New file. * include/mailutils/sys/ (sysinclude_HEADERS): Add imapio.h. * include/mailutils/sys/imapio.h: New file. * include/mailutils/types.hin (mu_imapio_t): New data type. * libmailutils/ (SUBDIRS): Add imapio. * libmailutils/tests/ Build imapio * libmailutils/tests/imapio.c: New source. * libmailutils/tests/wsp.c: Handle escape argument
2011-03-30Implement IPv6 support.Sergey Poznyakoff1
* am/ipv6.m4: New file. * examples/sa.c: New file. * include/mailutils/cidr.h: New file. * include/mailutils/sockaddr.h: New file. * libmailutils/cidr/ New file. * libmailutils/cidr/fromsa.c: New file. * libmailutils/cidr/fromstr.c: New file. * libmailutils/cidr/match.c: New file. * libmailutils/cidr/tosa.c: New file. * libmailutils/cidr/tostr.c: New file. * libmailutils/sockaddr/ New file. * libmailutils/sockaddr/copy.c: New file. * libmailutils/sockaddr/create.c: New file. * libmailutils/sockaddr/free.c: New file. * libmailutils/sockaddr/fromnode.c: New file. * libmailutils/sockaddr/insert.c: New file. * libmailutils/sockaddr/ipaddr.c: New file. * libmailutils/sockaddr/str.c: New file. * libmailutils/sockaddr/unlink.c: New file. * libmailutils/sockaddr/url.c: New file. * libmailutils/tests/cidr.c: New file. * Call MU_ENABLE_IPV6. Build libmailutils/sockaddr and libmailutils/cidr. * examples/.gitignore: Add mblconv and sa * examples/ (noinst_PROGRAMS): Add sa. * examples/aclck.c: Use new ACL API. * examples/echosrv.c: Use new mserv API. * include/mailutils/ (pkginclude_HEADERS): Add cidr.h and sockaddr.h * include/mailutils/acl.h (mu_acl_append, mu_acl_prepend) (mu_acl_insert): Change signatures. * include/mailutils/debug.h (mu_sockaddr_to_str): Remove proto. * include/mailutils/mailutils.h: Include cidr.h and sockaddr.h * include/mailutils/server.h (mu_ip_server_create): Change signature. (mu_ip_server_get_sockaddr): Likewise. (mu_m_server_set_default_address) (mu_m_server_get_default_address): Remove. * include/mailutils/stream.h (mu_tcp_stream_create_from_sa): New proto. * include/mailutils/types.hin (mu_cidr, mu_sockaddr): New structs. * include/mailutils/url.h (MU_URL_IPV6): New flag. (MU_URL_PARSE_DSLASH_OPTIONAL): New parse flag. * libmailutils/ Descend into cidr and sockaddr. Link in libcidr and libsockaddr. * libmailutils/diag/debug.c (mu_debug_log_begin): Flush mu_strerr. * libmailutils/diag/errors (MU_ERR_NONAME) (MU_ERR_BADFLAGS,MU_ERR_SOCKTYPE) (MU_ERR_FAMILY,MU_ERR_SERVICE): New errors. * libmailutils/server/acl.c: Rewrite API using mu_cidr. * libmailutils/server/ipsrv.c: Rewrite AI using mu_sockaddr. * libmailutils/server/msrv.c: Likewise. * libmailutils/stream/tcp.c: Likewise. * libmailutils/tests/.gitignore: Add cidr. * libmailutils/tests/ (noinst_PROGRAMS): Add cidr. * libmailutils/tests/url-parse.c: Support command line options to tune the parsing. * libmailutils/tests/ Pass options to url-parse. * libmailutils/url/create.c (getkn): Return meaningful error code. (_mu_url_ctx_parse_host): Accept IPv6 addresses. Set the MU_URL_IPV6 flag if one is given. (_mu_url_ctx_parse): Unless MU_URL_PARSE_DSLASH_OPTIONAL flag is given, request :// after scheme part. (mu_url_create): Add MU_URL_PARSE_DSLASH_OPTIONAL flag. * libmu_cfg/acl.c: Use new ACL API. * mu/acl.c: Likewise. * libproto/mailer/smtp.c (smtp_open): Use mu_tcp_stream_create_from_sa * libproto/pop/mbox.c (pop_open): Likewise. * mu/imap.c (com_connect): Likewise. * mu/pop.c (com_connect): Likewise. * testsuite/smtpsend.c (main): Likewise.
2011-01-02Update copyright years.Sergey Poznyakoff1
Happy GNU year!
2010-12-04Introduce stdstream module; move deprecated functions to libmu_compat.Sergey Poznyakoff1
* include/mailutils/log.h: New file. * include/mailutils/stdstream.h: New file. * include/mailutils/ (pkginclude_HEADERS): Add stdstream.h and log.h. * include/mailutils/argcv.h: Include mailutils/types.h * include/mailutils/mailutils.h: Include stdstream.h Remove vartab.h * include/mailutils/types.hin (MU_DEPRECATED): New define. * include/mailutils/vartab.h: Mark this header and all prototypes it defines as deprecated. * libmailutils/stdstream/ New file. * libmailutils/stdstream/basestr.c: New file. * libmailutils/stdstream/strerr.c: New file. * libmu_compat/ New file. * libmu_compat/tests/.gitignore: New file. * libmu_compat/tests/ New file. * libmu_compat/tests/ New file. * libmu_compat/tests/ New file. * libmailutils/base/ (noinst_LTLIBRARIES): Remove argcv.c and vartab.c. * libmailutils/ (SUBDIRS): Add stdstream. (libmailutils_la_LIBADD): Add stdstream/ * libmailutils/tests/ (noinst_PROGRAMS): Remove argcv (TESTSUITE_AT): Remove * libmailutils/tests/ Do not include * libmailutils/base/argcv.c: Move to libmu_compat/argcv.c * libmailutils/tests/ Move to libmu_compat/tests/ * libmailutils/tests/argcv.c: Move to libmu_compat/tests/argcv.c * libmailutils/base/vartab.c: Move to libmu_compat/vartab.c * (SUBDIRS): Add libmu_compat. * Add libmu_compat/tests, libmu_compat/tests/Makefile, libmu_compat/tests/atlocal, libmu_compat/Makefile and libmailutils/stdstream/Makefile to config file list. * mu/ldflags.c (lib_descr): Add mu_compat. * mu/logger.c (logger_parse_opt): -t does not imply --syslog. (mutool_logger): Use inline-comment filter to insert "tag: " prefix. Flush and destroy both streams before returning. * po/ Add libmailutils/stream/logstream.c, libmailutils/stdstream/baseio.c, libmailutils/stdstream/strerr.c and mu/logger.c.
2010-11-18Rewrite property support.Sergey Poznyakoff1
* Add libmailutils/property/Makefile to config files. * include/mailutils/property.h (mu_property_create) (mu_property_destroy): Change signature. (mu_property_get_owner): Remove. (mu_property_create_init) (mu_property_set_init, mu_property_set_init_data) (mu_property_ref, mu_property_unref) (mu_property_save): New protos. (mu_property_get_iterator) (mu_assoc_property_init): New protos. * include/mailutils/sys/property.h (property_item): Remove definition. (MU_PROP_INIT, MU_PROP_FILL, MU_PROP_MODIFIED): New flags. (_mu_property): Rewrite from scratch. (_mu_property_check): New proto. * libmailutils/property/ New file. * libmailutils/property/assocprop.c: New file. * libmailutils/property/create.c: New file. * libmailutils/property/propget.c: New file. * libmailutils/property/propitr.c: New file. * libmailutils/property/propset.c: New file. * libmailutils/ (SUBDIRS): Add property. (libmailutils_la_LIBADD): Add property/ * libmailutils/base/property.c: Remove. * libmailutils/base/ (libbase_la_SOURCES): Remove property.c * libmailutils/base/assoc.c (first): Avoid coredumping on empty hash table. * include/mailutils/folder.h (mu_folder_set_property) (mu_folder_get_property): New protos. * include/mailutils/sys/folder.h (_mu_folder) <property> <_get_property>: New members. * libmailutils/mailbox/folder.c (mu_folder_destroy): Destroy the property. (mu_folder_get_property) (mu_folder_set_property): New functions. * include/mailutils/mailbox.h (mu_mailbox_set_property): New proto. * libmailutils/mailbox/mailbox.c (mu_mailbox_set_property): New function. (mu_mailbox_get_property): Use _get_property method. * include/mailutils/mailer.h (mu_mailer_set_property): New proto. * include/mailutils/sys/mailer.h (_mu_mailer) <_get_property>: New member. * libmailutils/mailer/mailer.c (mu_mailer_set_property): New function. (mu_mailer_get_property): Use _get_property method. * include/mailutils/iterator.h (mu_iterator_set_dataptr): New proto. * include/mailutils/sys/iterator.h (_mu_iterator) <dataptr>: New method. * libmailutils/base/iterator.c (mu_iterator_set_dataptr): New function. (mu_iterator_current): Rewrite as a wrapper around mu_iterator_current_kv. (mu_iterator_current_kv): Use dataptr method (if defined) to extract the data pointer. * libmailutils/tests/prop.c: New file. * libmailutils/tests/ New file. * libmailutils/tests/ (noinst_PROGRAMS): Add prop. (TESTSUITE_AT): Add * libmailutils/tests/ Include
2010-10-26Rewrite URL support.Sergey Poznyakoff1
The purpose is to make it modular and flexible. URLs are parsed out as they are created. Missing URL parts can be supplied via a "URL hint" at creation time (similar to the approach used in creating mu_address_t). Ports can be specified either as numbers or as service names. Original port string representation can be retrieved from the URL, as well as its numeric value. * libmailutils/url/accessor.h: New file. * libmailutils/url/copy.c: New file. * libmailutils/url/create.c: New file. * libmailutils/url/decode.c: New file. * libmailutils/url/destroy.c: New file. * libmailutils/url/dup.c: New file. * libmailutils/url/expand.c: New file. * libmailutils/url/flag.c: New file. * libmailutils/url/get-auth.c: New file. * libmailutils/url/get-host.c: New file. * libmailutils/url/get-param.c: New file. * libmailutils/url/get-path.c: New file. * libmailutils/url/get-portstr.c: New file. * libmailutils/url/get-query.c: New file. * libmailutils/url/get-scheme.c: New file. * libmailutils/url/get-secret.c: New file. * libmailutils/url/get-user.c: New file. * libmailutils/url/match.c: New file. * libmailutils/url/port.c: New file. * libmailutils/url/scheme.c: New file. * libmailutils/url/uplevel.c: New file. * libmailutils/url/urlstr.c: New file. * (AC_CONFIG_FILES): Add libmailutils/url/Makefile * libmailutils/ (SUBDIRS): Add url. (libmailutils_la_LIBADD): Link with liburl. * libmailutils/base/ (libbase_la_SOURCES): Remove url.c * libmailutils/base/url.c: Remove. * libmailutils/string/ (libstring_la_SOURCES): Add xdecode.c * libmailutils/string/xdecode.c: New file. * include/mailutils/sys/url.h (_mu_url): Change type to short. <_get_port>: Change second argument to unsigned. <_get_portstr>: New method. * include/mailutils/url.h (MU_URL_SCHEME): New flag. (MU_URL_PARSE_HEXCODE, MU_URL_PARSE_HIDEPASS) (MU_URL_PARSE_PORTSRV, MU_URL_PARSE_PORTWC) (MU_URL_PARSE_PIPE, MU_URL_PARSE_SLASH): New flags. (mu_url_create_hint, mu_url_copy_hints): New prototypes. (mu_url_parse): Remove. (mu_url_get_port): Change second argument to unsigned. (mu_url_decode_len,mu_url_decode): Remove. (mu_url_decode): New proto. (mu_url_sget_portstr, mu_url_aget_portstr) (mu_url_get_portstr): New protos. * include/mailutils/util.h (mu_str_url_decode) (mu_str_url_decode_inline): New protos. * libproto/pop/mbox.c (pop_open): Port is unsigned. * libproto/imap/folder.c: Use MU_URL_SCHEME in url_may_have. * libproto/maildir/folder.c: Likewise. * libproto/mailer/prog.c: Likewise. * libproto/mailer/remote.c: Likewise. * libproto/mailer/sendmail.c: Likewise. * libproto/mailer/smtp.c: Likewise. * libproto/mbox/folder.c: Likewise. * libproto/mh/folder.c: Likewise. * libproto/nntp/folder.c: Likewise. * libproto/pop/folder.c: Likewise. * imap4d/imap4d.c: Remove calls to mu_url_parse. * libmailutils/base/registrar.c: Likewise. * libmailutils/base/wicket.c: Likewise. * libmailutils/mailbox/folder.c: Likewise. * libmailutils/mailbox/mailbox.c: Likewise. * libmailutils/mailer/mailer.c: Likewise. * libmailutils/tests/url-parse.c: Likewise. * libmailutils/tests/wicket.c: Likewise. * libproto/mailer/smtp_auth.c: Likewise. * maidag/deliver.c: Likewise. * mu/wicket.c: Likewise. * libmailutils/mime/mimehdr.c (mu_mimehdr_decode_param): Use mu_str_url_decode, instead of mu_url_decode. * libmailutils/stream/tcp.c (_tcp_instance)<port>: Change type to unsigned short. All uses updated. (mu_tcp_stream_create_with_source_ip) (mu_tcp_stream_create_with_source_host) (mu_tcp_stream_create): Port is unsigned. * include/mailutils/stream.h (mu_tcp_stream_create_with_source_ip) (mu_tcp_stream_create_with_source_host) (mu_tcp_stream_create): Port is unsigned. * include/mailutils/cpp/url.h (get_port): Return unsigned. * libmu_cpp/ (get_port): Return unsigned. (parse): Empty function. Schedule for removal. * python/libmu_py/url.c (api_url_parse): Empty function. Schedule for removal. (api_url_get_port): Port is unsigned. * libmailutils/base/wicket.c (mu_wicket_file_match_url) (mu_wicket_file_match_url): New parameter: parse_flags. * mu/wicket.c (wicket_match): Use parse_flags to control whether or not to show the plaintext password. * doc/texinfo/url.texi: Update.
2010-10-09Reorganize libmailutils directory structure.Sergey Poznyakoff1
* (AC_CONFIG_FILES): Add libmailutils/ subdirs. * include/mailutils/ Update references to libmailutils. * po/ Likewise. * libmailutils/.gitignore: Update. * libmailutils/ Use convenience libraries in subdirs. * libmailutils/string/ New file. * libmailutils/cstrcasecmp.c: Move to libmailutils/string. * libmailutils/cstrlower.c: Likewise. * libmailutils/cstrupper.c: Likewise. * libmailutils/strltrim.c: Likewise. * libmailutils/strskip.c: Likewise. * libmailutils/stripws.c: Likewise. * libmailutils/strrtrim.c: Likewise. * libmailutils/asnprintf.c: Likewise. * libmailutils/asprintf.c: Likewise. * libmailutils/muctype.c: Likewise. * libmailutils/vasnprintf.c: Likewise. * libmailutils/mkfilename.c: Likewise. * libmailutils/stream/ New file. * libmailutils/dbgstream.c: Move to libmailutils/stream. * libmailutils/file_stream.c: Likewise. * libmailutils/fltstream.c: Likewise. * libmailutils/iostream.c: Likewise. * libmailutils/mapfile_stream.c: Likewise. * libmailutils/memory_stream.c: Likewise. * libmailutils/message_stream.c: Likewise. * libmailutils/prog_stream.c: Likewise. * libmailutils/rdcache_stream.c: Likewise. * libmailutils/socket_stream.c: Likewise. * libmailutils/stdio_stream.c: Likewise. * libmailutils/stream.c: Likewise. * libmailutils/stream_printf.c: Likewise. * libmailutils/stream_vprintf.c: Likewise. * libmailutils/streamcpy.c: Likewise. * libmailutils/streamref.c: Likewise. * libmailutils/tcp.c: Likewise. * libmailutils/temp_file_stream.c: Likewise. * libmailutils/xscript-stream.c * libmailutils/cfg/ New file. * libmailutils/cfg/.gitignore: New file. * libmailutils/cfg_driver.c: Move to libmailutils/cfg/driver.c. * libmailutils/cfg_format.c: Move to libmailutils/cfg/format.c. * libmailutils/cfg_lexer.l: Move to libmailutils/cfg/lexer.l. * libmailutils/cfg_parser.y: Move to libmailutils/cfg/parser.y. * libmailutils/gocs.c: Move to libmailutils/cfg/gocs.c. * libmailutils/diag/ New file. * libmailutils/diag/.gitignore: New file. * libmailutils/debug.c: Move to libmailutils/diag. * libmailutils/diag.c: Likewise. * libmailutils/gdebug.c: Likewise. * libmailutils/errors: Likewise. * libmailutils/muerrno.cin: Likewise. * libmailutils/syslog.c: Likewise. * libmailutils/dbgstderr.c: Likewise. * libmailutils/dbgsyslog.c: Likewise. * libmailutils/address/ New file. * libmailutils/address.c: Move to libmailutils/address. * libmailutils/parse822.c: Likewise. * libmailutils/mailbox/ New file. * libmailutils/mailbox.c: Move to libmailutils/mailbox. * libmailutils/mbx_default.c: Likewise. * libmailutils/mbxitr.c: Likewise. * libmailutils/attribute.c: Likewise. * libmailutils/body.c: Likewise. * libmailutils/envelope.c: Likewise. * libmailutils/folder.c: Likewise. * libmailutils/hdritr.c: Likewise. * libmailutils/header.c: Likewise. * libmailutils/message.c: Likewise. * libmailutils/msgscan.c: Likewise. * libmailutils/mailer/ New file. * libmailutils/mailer.c: Move to libmailutils/mailer. * libmailutils/progmailer.c: Likewise. * libmailutils/mime/ New file. * libmailutils/attachment.c: Move to libmailutils/mime. * libmailutils/mime.c: Likewise. * libmailutils/mimehdr.c: Likewise. * libmailutils/server/ New file. * libmailutils/acl.c: Move to libmailutils/server. * libmailutils/server.c: Likewise. * libmailutils/msrv.c: Likewise. * libmailutils/ipsrv.c: Likewise. * libmailutils/auth/ New file. * libmailutils/auth.c: Move to libmailutils/auth. * libmailutils/mu_auth.c: Likewise. * libmailutils/system.c: Likewise. * libmailutils/base/ New file. * libmailutils/base/.gitignore: New file. * libmailutils/alloc.c: Move to libmailutils/base. * libmailutils/amd.c: Likewise. * libmailutils/argcv.c: Likewise. * libmailutils/assoc.c: Likewise. * libmailutils/daemon.c: Likewise. * libmailutils/date.c: Likewise. * libmailutils/fgetpwent.c: Likewise. * libmailutils/freeitem.c: Likewise. * libmailutils/getpass.c: Likewise. * libmailutils/iterator.c: Likewise. * libmailutils/kwd.c: Likewise. * libmailutils/list.c: Likewise. * libmailutils/listlist.c: Likewise. * libmailutils/locale.c: Likewise. * libmailutils/locker.c: Likewise. * libmailutils/mailcap.c: Likewise. * libmailutils/md5.c: Likewise. * libmailutils/monitor.c: Likewise. * libmailutils/munre.c: Likewise. * libmailutils/mutil.c: Likewise. * libmailutils/nls.c: Likewise. * libmailutils/nullrec.c: Likewise. * libmailutils/observer.c: Likewise. * libmailutils/opool.c: Likewise. * libmailutils/parsedate.y: Likewise. * libmailutils/permstr.c: Likewise. * libmailutils/property.c: Likewise. * libmailutils/registrar.c: Likewise. * libmailutils/refcount.c: Likewise. * libmailutils/rfc2047.c: Likewise. * libmailutils/sha1.c: Likewise. * libmailutils/secret.c: Likewise. * libmailutils/ticket.c: Likewise. * libmailutils/url.c: Likewise. * libmailutils/vartab.c: Likewise. * libmailutils/version.c: Likewise. * libmailutils/wicket.c: Likewise.
2010-10-07Implement a filter for quoting ^From. Use it for appending to UNIX mailboxes.Sergey Poznyakoff1
* libmailutils/fromflt.c: New file. * libmailutils/ (libmailutils_la_SOURCES): Add fromflt.c * libmailutils/tests/ Include * include/mailutils/filter.h (mu_from_filter): New filter type. * libmailutils/filter.c (mu_filter_get_list): Register mu_from_filter. * libmailutils/ New file. * libmailutils/tests/ (TESTSUITE_AT): Add * libmailutils/tests/ Mention `filter' in the keywords. * libmailutils/tests/ Likewise. * libmailutils/tests/fltst.c (main): Fix argc check. * libproto/mbox/mbox.c (append_message_to_stream): Use "FROM" filter.
2010-10-05Implement echo control on fd streams. Implement mu_getpass function.Sergey Poznyakoff1
* Test for tcgetattr and tcsetattr. * gnulib.modules (getpass-gnu): Remove. * include/mailutils/mutil.h (mu_getpass): New proto. * include/mailutils/stream.h (MU_IOCTL_GET_ECHO) (MU_IOCTL_SET_ECHO): New ioctls. * include/mailutils/sys/file_stream.h (_MU_FILE_STREAM_ECHO_OFF): New flag. (_mu_file_stream) <echo_state>: New member. * libmailutils/getpass.c: New file. * libmailutils/ (libmailutils_la_SOURCES): Add getpass.c. * libmailutils/file_stream.c (fd_done): Free echo_state. (fd_ioctl): Implement MU_IOCTL_GET_ECHO and MU_IOCTL_SET_ECHO. * mu/mu.h (mustrin): New extern. * mu/pop.c (com_pass): Use mu_getpass. * mu/shell.c (mustrin): New variable. (readline): Use mu_stream_getline instead of getline. (mutool_shell): Create mustrin. * pop3d/popauth.c (options): Fix typo. (fill_pass): Use mu_getpass.
2010-09-14Bugfix.Sergey Poznyakoff1
* libmailutils/ (SUBDIRS): Make sure tests are descended into only when the libmailutils library is already built.
2010-09-14Rewrite libmailutils testsuite in Autotest.Sergey Poznyakoff1
* Create libmailutils/tests/atlocal and libmailutils/tests/Makefile. Remove libmailutils/testsuite. * examples/ (noinst_PROGRAMS): Remove programs moved to libmailutils/tests. * examples/argcv.c -> libmailutils/tests/argcv.c * libmailutils/testsuite/Decode -> libmailutils/tests/Decode * libmailutils/testsuite/Encode -> libmailutils/tests/Encode * examples/decode2047.c: Move to libmailutils/tests * examples/encode2047.c: Move to libmailutils/tests * examples/mailcap.c: Likewise. * examples/url-parse.c: Likewise. * include/mailutils/ Minor changes. * libmailutils/ (SUBDIRS): Replace testsuite with tests. * libmailutils/tests/ New file. * libmailutils/tests/addr.c: New file. * libmailutils/tests/ New file. * libmailutils/tests/ New file. * libmailutils/tests/ New file. * libmailutils/tests/ New file. * libmailutils/tests/ New file. * libmailutils/tests/ New file. * libmailutils/tests/ New file. * libmailutils/tests/fltst.c: New file. * libmailutils/tests/ New file. * libmailutils/tests/ New file. * libmailutils/tests/ New file. * libmailutils/tests/ New file. * libmailutils/testsuite/: Delete. * frm/tests/ Prefix package.m4 creation commands with $(AM_V_GEN). * readmsg/tests/ Likewise. * sieve/tests/ Likewise. * frm/tests/ Minor changes. * readmsg/tests/ Include * sieve/tests/ Likewise. * sieve/tests/ Comment out inclusion of * testsuite/ Add m4_version_prereq.
2010-09-14Rename mailbox/ to libmailutils/.Sergey Poznyakoff1
This change has been waiting since 2005-08-16 (aaab88142c8193f1), when libmailbox had been renamed to libmailutils. Back then MU was still under CVS, which didn't like renames.

Return to:

Send suggestions and report system problems to the System administrator.