summaryrefslogtreecommitdiff
path: root/testsuite
AgeCommit message (Collapse)AuthorFiles
2019-12-06Build package.m4 in Makefilelibadd-cleanupSergey Poznyakoff2
The decision to build package.m4 in config.status makes proper maintenance of the file problematic. It is reverted. This patch also uses colon-separated VPATH for compatibility with other make implementations. * configure.ac: Don't build package.m4 * testsuite/Makefile.am: Do it here. * libmailutils/tests/Makefile.am: Use colon-separated VPATH for compatibility with BSD make. * testsuite/package.m4.in: Remove.
2019-12-04Make sure LD_LIBRARY_PATH overrides the DT_RPATH tag on FreeBSDSergey Poznyakoff1
* testsuite/testsuite.inc: Set LD_LIBRARY_PATH_RPATH variable to "y" before running tests.
2019-12-04Attempt to fix the library path insertion problem at the libtool level.Sergey Poznyakoff1
This reverts the cfd3a6fe (Revise LIBADD settings) patch. * bootstrap.conf: Patch the build-aux/ltmain.sh file. * mu-aux/ltmain.sh: New file. A modified version of the ltmain.sh file from libtool 2.4.6 * mu-aux/ltmain.sh.patch: New file. A patch built from ltmain.sh against the pristine version. * configure.ac: Require libtool 2.4.6 * comsat/Makefile.am: Revert cfd3a6fe. * examples/Makefile.am: Likewise. * imap4d/tests/Makefile.am: Likewise. * libmailutils/Makefile.am: Likewise. * libmailutils/tests/Makefile.am: Likewise. * libproto/dotmail/tests/Makefile.am: Likewise. * libproto/imap/Makefile.am: Likewise. * libproto/imap/tests/Makefile.am: Likewise. * libproto/mailer/Makefile.am: Likewise. * libproto/pop/Makefile.am: Likewise. * mu/Makefile.am: Likewise. * testsuite/Makefile.am: Likewise.
2019-11-30Improve makefile style consistencySergey Poznyakoff1
. Uniformly use parentheses instead of curly braces in variable referencing . Prefer to use Make variables over substitution variables, for variables prefixed with MU_
2019-11-30Revise LIBADD settingsSergey Poznyakoff1
Avoid contaminating *LIBADD with external libraries deduced by configure, as these may contain library path specifications (-L*) which drive some operating systems (vide: FreeBSD) crazy. This has an undesired side effect that the *LDADD statements of the tools that depend on these librarise must be autgmented accordingly.
2019-11-30Fix the cwdrepl auxiliary tool.Sergey Poznyakoff1
Make sure the longest possible match is replaced. * testsuite/cwdrepl.c: Sort the translist by directory length, in descending order. * mail/tests/atlocal.in: Add $testsuitedir to $PATH * mail/tests/hold.at (MAIL_TEST): Use cwdrepl instead of sed rules. Correct expected outputs accordingly.
2019-11-10BugfixesSergey Poznyakoff1
* include/mailutils/Makefile.am: Don't distribute types.h * mda/tests/mda.sh: New file. * mda/Makefile.am: Distribute mda.sh * mda/lmtpd/tests/atlocal.in: Set MU_DEFAULT_SCHEME and source mda.sh * mda/mda/tests/atlocal.in: Likewise. * mda/putmail/tests/atlocal.in: Likewise. * mda/lmtpd/tests/lmtpd.at: Use dumpmail * mda/tests/mda.inc (MDA_OPTIONS): Remove MUT_DEFAULT_OPTIONS. (dumpmail): Remove macro. * testsuite/package.m4.in (MU_DEFAULT_SCHEME): Remove macro. * maint/fullcheck.mk (fullcheck_tmpl): Make the source dir read-only.
2019-11-09Reorganize testsuiteSergey Poznyakoff4
Simplify Makefile.am's in tests subdirectories by moving the common part in a separate file and including it where necessary. Build only one copy of package.m4. Both package.m4 and include file testsuite.am reside in the testsuite directory. Also provide configure options for selecting mda components to build: --disable-build-mda do not build mda --disable-build-lmtpd do not build lmtpd --disable-build-putmail do not build putmail * .gitignore: Update. * Makefile.am [MU_COND_MDA]: Change to MU_COND_MDA_TOOLS * configure.ac: Provide a way to enable/disable building of mda, lmtpd and putmail separately. Build testsuite/package.m4 * testsuite/testsuite.am * testsuite/Makefile.am: Distribute both package.m4.in and package.m4. Include main part from testsuite.am * testsuite/package.m4.in: New file. * comsat/tests/Makefile.am: Include main part from testsuite.am * frm/tests/Makefile.am: Likewise. * imap4d/tests/Makefile.am: Likewise. * libmailutils/tests/Makefile.am: Likewise. * libmu_scm/tests/Makefile.am: Likewise. * libproto/dotmail/tests/Makefile.am: Likewise. * mail/tests/Makefile.am: Likewise. * messages/tests/Makefile.am: Likewise. * mh/tests/Makefile.am: Likewise. * mimeview/tests/Makefile.am: Likewise. * readmsg/tests/Makefile.am: Likewise. * sieve/tests/Makefile.am: Likewise. * mda/.gitignore: Remove. * mda/tests/Makefile.am: Remove. * mda/tests/testsuite.at: Remove. * mda/tests/.gitignore: Remove. * mda/tests/atlocal.in: Remove. * mda/tests/mda.inc: New file. * mda/Makefile.am: Add extra directory level. Add subdirs depending on whether the corresponding component is selected for building. * mda/lmtpd/.gitignore: New file. * mda/lmtpd/Makefile.am: New file. * mda/lmtpd.c: Move to mda/lmtpd/lmtpd.c * mda/lmtpd/tests/.gitignore: New file. * mda/lmtpd/tests/Makefile.am: New file. * mda/lmtpd/tests/atlocal.in: New file. * mda/tests/lmtpd.at: Move to mda/lmtpd/tests/lmtpd.at * mda/lmtpd/tests/testsuite.at: New file. * mda/mda/.gitignore: New file. * mda/mda/Makefile.am: New file. * mda/mda.c: Move to mda/mda/mda.c * mda/mda/tests/.gitignore: New file. * mda/mda/tests/Makefile.am: New file. * mda/mda/tests/atlocal.in: New file. * mda/tests/forward.at: Move to mda/mda/tests/forward.at * mda/tests/mda.at: Move to mda/mda/tests/mda.at * mda/mda/tests/testsuite.at: New file. * mda/putmail/.gitignore: New file. * mda/putmail/Makefile.am: New file. * mda/putmail.c: Move to mda/putmail/putmail.c * mda/putmail/tests/.gitignore: New file. * mda/putmail/tests/Makefile.am: New file. * mda/putmail/tests/atlocal.in: New file. * mda/tests/putmail.at: Move to mda/putmail/tests/putmail.at * mda/putmail/tests/testsuite.at: New file * po/POTFILES.in: Update pathnames * maint/fullcheck.mk: Minor fixes.
2019-03-02Fix the dot filter decodingSergey Poznyakoff2
* libmailutils/filter/dot.c (_dot_decoder): Don't emit extra newline at the "\n.\n" marker. * libmailutils/stream/stream.c (mu_stream_seterr): Don't treat ENOSYS as fatal error. * libmailutils/tests/dot.at: New file. * libmailutils/tests/testsuite.at: Include dot.at. * libmailutils/tests/Makefile.am: Add dot.at * testsuite/smtp-msg.at: Remove extra newline from the expected output. * testsuite/smtp-str.at: Likewise.
2019-02-26New autoconf macro for activating mailbox format supportSergey Poznyakoff1
* am/enable.m4 (MU_ENABLE_SUPPORT) (MU_ENABLE_BUILD): Use m4_-prefixed directives. (MU_ENABLE_MAILBOX_FORMAT) (MU_ENABLE_LOCAL_MAILBOX_FORMAT_ (MU_ENABLE_REMOTE_MAILBOX_FORMAT): New macros. (MU_LIB_MAILBOX) (MU_LIB_LOCAL_MAILBOX) (MU_LIB_REMOTE_MAILBOX): New substitution variables. * configure.ac: Use new macros to enable mailbox formats * libproto/Makefile.am: Augment SUBDIRS instead of using Makefile variables. * comsat/Makefile.am: Use MU_LIB_.*MAILBOX macros to link in the necessary libraries. * examples/Makefile.am: Likewise. * examples/cpp/Makefile.am: Likewise. * frm/Makefile.am: Likewise. * imap4d/Makefile.am: Likewise. * include/mailutils/sys/Makefile.am: Likewise. * libmu_scm/Makefile.am: Likewise. * libproto/Makefile.am: Likewise. * maidag/Makefile.am: Likewise. * mail/Makefile.am: Likewise. * messages/Makefile.am: Likewise. * mh/Makefile.am: Likewise. * movemail/Makefile.am: Likewise. * mu/libexec/Makefile.am: Likewise. * pop3d/Makefile.am: Likewise. * python/2/libmu_py/Makefile.am: Likewise. * python/3/libmu_py/Makefile.am: Likewise. * readmsg/Makefile.am: Likewise. * sieve/Makefile.am: Likewise. * testsuite/Makefile.am: Likewise.
2019-01-26Add tests for imap4d SEARCH BODY, TEXT, and CHARSETSergey Poznyakoff2
* imap4d/tests/.gitignore: New file. * imap4d/tests/ckiconv.c: New file. * imap4d/tests/Makefile.am: Build ckiconv.c * imap4d/tests/search.at: Add tests for BODY, TEXT and CHARSET * imap4d/tests/testsuite.at (IMAP4D_WITH_PREREQ): New macro (IMAP4D_CHECK): Skip test if the supplied prerequisite is not satisfied. * testsuite/spool/search2.mbox: New file. * testsuite/spool/DISTFILES: Add search2.mbox. * mail/decode.c (mime_descend): Fix handling of message/rfc822.
2019-01-03Update copyright yearsSergey Poznyakoff27
2018-06-12libmu_scm: more testsSergey Poznyakoff2
* testsuite/spool/mbox2: New file. Same messages as in mbox1, but with Mailutils auxiliary headers added. Ideally, libmailutils should not add any headers to the messages, unless explicitly requested to do so. Hopefully, I'll fix this in future. * testsuite/spool/DISTFILES: Add mbox2 and mime.msg * libmu_scm/tests/mailbox-append-message.at: New testcase. * libmu_scm/tests/mailbox-expunge.at: New testcase. * libmu_scm/tests/message-delete.at: New testcase. * libmu_scm/tests/message-get-flag.at: New testcase. * libmu_scm/mu_message.c (mu_scm_message_print): Display flags. * libmu_scm/tests/Makefile.am: Add new files. * libmu_scm/tests/mailbox-print.at: Remove the now superfluous quoting. * libmu_scm/tests/message-get-part.at: Likewise. * libmu_scm/tests/testsuite.at (MU_GUILE_CHECK): Quote the argument to AT_DATA Include new tests. Changes missing from the previous commit: * libmu_scm/mailutils/ancilla.scm * libmu_scm/mu_body.c * libmu_scm/mu_port.c
2018-06-10libmu_scm: minor fixes; add more testsSergey Poznyakoff1
* libmu_scm/mailutils/ancilla.scm (string->message) (file->message): Ise open- call instead of call-with-input to avoid premature closing of the input port. This has a drawbak that the port will be actually closed only after the returned message is destroyed (possibly by the gc). * libmu_scm/mu_body.c: Use scm_intprint when printing objects. * libmu_scm/mu_mailbox.c: Likewise. * libmu_scm/mu_port.c: Likewise. * libmu_scm/mu_message.c (mu_scm_message_free): Fix destroying of the underlying mu_message_t object. * libmu_scm/tests/message-get-num-parts.at: New file. * libmu_scm/tests/message-get-part.at: New file. * libmu_scm/tests/message-multipart.at: New file. * testsuite/spool/mime.msg: New file.
2018-01-19Version 3.4.90; update copyright yearsSergey Poznyakoff27
2017-11-23MIME: part boundary in not required to be followed by a newlie.Sergey Poznyakoff5
* libmailutils/mime/mime.c: Part boundary can be eitherr followd by a newline, or appear at the very end of input. * testsuite/Makefile.am: Add mime01.at * testsuite/testsuite.at: Include mime01.at. * testsuite/mime01.at: New file. * testsuite/mime.at: Update expected output. Don't filter output through tr & sed. * testsuite/mimetest.c: Change output to make sure no trailing whitespace could be produced.
2017-10-10Use mu_prtstr to safely print string valuesSergey Poznyakoff2
2017-06-20API for formatting message sets on outputSergey Poznyakoff1
* libmailutils/msgset/print.c (mu_msgset_formats): New global. (mu_stream_msgset_format): New function. * include/mailutils/msgset.h (mu_msgset_format): New struct. (mu_msgset_fmt_imap, mu_msgset_fmt_mh): New defines. (MU_MSGSET_IGNORE_TRANSERR): New flag (mu_msgset_copy, mu_msgset_translate): New protos. (mu_stream_msgset_format, mu_msgset_imap_print): New protos. (mu_msgset_print): Deprecate. * libmailutils/imapio/sendmsgset.c: Use mu_msgset_imap_print instead of mu_msgset_print. * mu/libexec/imap.c: Likewise. * libmailutils/msgset/Makefile.am: Add copy.c * libmailutils/msgset/add.c (mu_msgset_add_range): Translate if message set mode doesn't match the requested one. * libmailutils/msgset/sub.c (mu_msgset_sub_range): Likewise. * libmailutils/msgset/trans.c (_mu_msgset_translate_pair): Act according to the mode argument. (mu_msgset_translate): New function. * libmailutils/tests/msgset.c: New option -mh * mh/mh_sequence.c (write_sequence): Rewrite. * testsuite/msgset.c: Optionally translate uids to msgnums and vice-versa.
2017-06-07Fix tests when logical and physical CWD differSergey Poznyakoff5
MH testsuite produced false negatives when run in a directory accessed by its logical name (symlink). To fix this, avoiding at the same time the use of non-portable "pwd -P" & "pwd -L", this commit adds a filter utility that replaces both logical and physical cwd with a dot on output. The MH testsuite is updated to use this utility. * testsuite/cwdrepl.c: New utility * testsuite/Makefile.am: Build cwdrepl * testsuite/.gitignore: Update. * testsuite/cwdrepl.at: New test. * testsuite/testsuite.at: Include new test. * mh/tests/atlocal.in (PATH): Add testsuite (remove_curdir): Remove function. * mh/tests/comp.at: Use cwdrepl, fix expected output. * mh/tests/forw.at: Likewise. * mh/tests/mhn.at: Likewise. * mh/tests/mhpath.at: Likewise. * mh/tests/repl.at: Likewise.
2017-03-20Housekeeping: implement a tool for producing intermediate alpha tarballs.Sergey Poznyakoff1
Intermediate tarballs have the same version number as initial alpha version, to which is appended a suffix "-N", where N is the number of commits between the current git HEAD and the original alpha release. Additionally, the --version (or -version, for MH) output has been changed to include the N and the git description (for all releases, but stable). * .gitignore: Update. * Makefile.am: Remove git-describe and git-describe.h goals. (alpha, alphacheck): Rewrite. * configure.ac (GITINFO): New subst variable. * include/mailutils/Makefile.am (gitinfo.h): New built source. * libmailutils/cli/cli.c: Include gitinfo.h (mu_version_hook): Rewrite. * mh/mh_getopt.c: Include gitinfo.h (mh_version_hook): Rewrite. * mu-aux/gitinfo.pl: New file. * mu-aux/Makefile.am (EXTRA_DIST): Add gitinfo.pl * mu/Makefile.am (mu-setup.c): Add dependency * testsuite/testsuite.inc (MUT_VERSION): Account for changes in version output.
2017-01-17Minor changesSergey Poznyakoff1
* configure.ac: Set version 3.1.91 * NEWS: Update. * doc/texinfo/programs.texi: Minor change. * libmailutils/mime/mime.c (_mime_part_size) (_mime_body_lines): Fix counting. Return 0 if MIME is empty.
2017-01-01Happy GNU YearSergey Poznyakoff24
2016-11-02Rename default configuration fileSergey Poznyakoff1
The default configuration file name is "mailutils.conf". Legacy configuration file "mailutils.rc" is processed if necessary. * libmailutils/cli/cli.c: Rename main configuration file to mailutils.conf Remove 'rcfile' option aliases. (mu_cli_ext): Special handling for legacy configuration file. * NEWS: Update. * doc/texinfo/mailutils.texi: Update. * doc/texinfo/programs.texi: Update.
2016-11-02Improve configuration file handling.Sergey Poznyakoff1
* include/mailutils/cfg.h (mu_cfg_parse_hints): Rename site_rcfile to site_file, custom_rcfile to custom_file. Remove append_tree and data fields. (MU_PARSE_CONFIG_GLOBAL,MU_CFG_PARSE_PROGRAM): Remove. (MU_PARSE_CONFIG_VERBOSE): Rename to MU_CF_VERBOSE. (MU_PARSE_CONFIG_DUMP): Rename to MU_CF_DUMP. (MU_CFG_FMT_LOCUS): Rename to MU_CF_FMT_LOCUS. (MU_CFG_FMT_VALUE_ONLY): Rename to MU_CF_FMT_VALUE_ONLY. (MU_CFG_FMT_PARAM_PATH): Rename to MU_CF_FMT_PARAM_PATH. (MU_CFG_COMPATIBILITY,MU_CFG_DEPRECATED): Remove. (mu_parse_config, mu_get_config): Remove deprecated functions. * libmailutils/cli/cli.c (mu_general_help_text): New global. (app_data): New struct. (init_options): Construct configuration option group depending on which configuration files are in use. (mu_cli_ext): Don't use per-user configuration files for servers. Pass pointer to app_data structure as po.po_data (mu_cli): Set MU_CFHINT_PER_USER_FILE flag by default. * mail/testsuite/lib/mail.exp: Rewrite invocation of the mu_init command. * include/mailutils/cli.h (mu_cli_setup) <server>: New field. * comsat/comsat.c (cli): Mark as server. (main): Bugfix: pass pointer to server to mu_cli. * imap4d/imap4d.c (cli): Mark as server. * pop3d/pop3d.c: Likewise. * comsat/tests/testsuite.at: Use the --no-site-config option. * imap4d/tests/testsuite.at: Likewise. * libmailutils/cfg/driver.c: Update. * libmailutils/cfg/format.c: Update. * libmailutils/cfg/lexer.l: Update. * libmailutils/cfg/parser.y: Update. * mu/acl.c: Update. * pop3d/testsuite/lib/pop3d.exp: Likewise. * mu/mu.c: Don't read configuration files. * mu/query.c: Fix args_doc * testsuite/lib/mailutils.exp (mu_init): Change option handling. Set --no-config option by default.
2016-01-22Update copyright yearsSergey Poznyakoff24
2015-07-09Fix make check if MU_DEFAULT_SCHEME value is other than mboxSergey Poznyakoff1
* testsuite/testsuite.inc (MUT_DEFAULT_OPTIONS): New define. * maidag/tests/testsuite.at: Add MUT_DEFAULT_OPTIONS to the options passed to maidag * mail/tests/cols00.at: Use MUT_MAIL_CMD * mail/tests/cols01.at: Likewise. * mail/tests/copy00.at: Likewise. * mail/tests/nohome.at: Likewise. * mail/tests/testsuite.at (MUT_MAIL_CMD): New define. Pass MUT_DEFAULT_OPTIONS to mail. * sieve/tests/testsuite.at: Pass MUT_DEFAULT_OPTIONS to sieve.
2015-03-02Update copyright yearsSergey Poznyakoff24
2014-02-26Use AM_CPPFLAGS instead of INCLUDES; upgrade gintSergey Poznyakoff1
2014-02-05Update copyright years.Sergey Poznyakoff24
2012-06-01Update ignore lists.Sergey Poznyakoff1
2012-04-13Fix SMTP test on machines with IPv6 enabled.Sergey Poznyakoff3
* testsuite/smtpsend.c: New assignment option `family=' to force using a specified interface family. * testsuite/smtp-msg.at: Force IPv4. * testsuite/smtp-str.at: Likewise.
2012-01-13Bugfix in the testsuite.Sergey Poznyakoff2
* testsuite/smtp-msg.at: Ignore output from kill. * testsuite/smtp-str.at: Likewise.
2012-01-05Happy GNU YearSergey Poznyakoff24
2011-12-31Add SMTP test.Sergey Poznyakoff5
* examples/mta.c: Handle -bD option. Detach from the controlling terminal if -bd is given. Print pid and port number in this case. * testsuite/smtpsend.c: Fix handling of the trace= option. * testsuite/Makefile.am: Add new tests. * testsuite/smtp-msg.at: New test case. * testsuite/smtp-str.at: New test case. * testsuite/testsuite.at: Include new test cases.
2011-12-30Improve msgset interface. Use it in MH.Sergey Poznyakoff1
* libmailutils/msgset/Makefile.am (libmsgset_la_SOURCES): Add new files. * libmailutils/msgset/addset.c: New file. * libmailutils/msgset/count.c: New file. * libmailutils/msgset/foreachmsgno.c: New file. * libmailutils/msgset/foreachuid.c: New file. * libmailutils/msgset/isempty.c: New file. * libmailutils/msgset/subset.c: New file. * libmailutils/msgset/trans.c: New file. * libmailutils/msgset/add.c (mu_msgset_add_range): Take fourth argument specifying the conversion mode. Translate numbers as necessary. * libmailutils/msgset/foreachmsg.c: Translate numbers as necessary. * libmailutils/msgset/foreachnum.c: Rewrite. * libmailutils/msgset/negate.c (_invert_range) (mu_msgset_add_range): Update calls to mu_msgset_add_range. * libmailutils/msgset/parse.c (parse_msgnum_env)<mode>: New member. (parse_msgrange): Update calls to mu_msgset_add_range. (mu_msgset_parse_imap): Change signature. All callers updated. * libmailutils/msgset/sub.c (mu_msgset_sub_range): Take fourth argument specifying the conversion mode. Translate numbers as necessary. * imap4d/copy.c (imap4d_copy0): Update calls to mu_msgset_create and mu_msgset_parse_imap. * imap4d/fetch.c (fetch_thunk): Likewise. * imap4d/search.c (parse_simple_key): Likewise. * imap4d/store.c (store_thunk): Likewise. * include/mailutils/msgset.h (MU_MSGSET_NUM,MU_MSGSET_UID): New defines. (mu_msgset_add,mu_msgset_sub): New protos. (mu_msgset_add_range,mu_msgset_sub_range): Take 4 arguments. All callers changed. * include/mailutils/sys/msgset.h (_mu_msgset_translate_pair) (_mu_msgset_translate_range): New protos. * libmailutils/tests/msgset.c: Reflect the above changes. * testsuite/msgset.c: Likewise. * libproto/imap/mbox.c: Update calls to mu_msgset functions. * mh/mh.h (mh_msgset_t): Remove. (mh_iterator_fp): Remove typedef. (mh_msgset_parse): Change signature. (mh_msgset_member,mh_msgset_reverse,mh_msgset_negate) (mh_msgset_current,mh_msgset_free,mh_msgset_uids): Remove protos. (mh_msgset_parse_string): New proto. (mh_msgset_first_current,mh_msgset_first): New proto. (mh_iterate: Remove proto. Use mu_msgset_foreach* functions instead. (mh_seq_add,mh_seq_delete): Change signatures. * mh/mh_init.c (mh_iterate): Remove. * mh/mh_msgset.c: Rewrite using mu_msgset_t. * mh/mh_sequence.c: Likewise. * mh/anno.c: Use new msgset functions. * mh/burst.c: Likewise. * mh/comp.c: Likewise. * mh/folder.c: Likewise. * mh/forw.c: Likewise. * mh/mark.c: Likewise. * mh/mhn.c: Likewise. * mh/mhpath.c: Likewise. * mh/mhseq.c: Likewise. * mh/pick.c: Likewise. * mh/refile.c: Likewise. * mh/repl.c: Likewise. * mh/rmm.c: Likewise. * mh/scan.c: Likewise. * mh/send.c: Likewise. * mh/sortm.c: Likewise. * mh/whatnowenv.c: Likewise. * mh/tests/mark.at: Reflect changes in the format of the saved sequences, which may contain ranges now. * mu/imap.c: Update calls to mu_msgset functions.
2011-12-28msgset: implement "foreach" calls.Sergey Poznyakoff1
* imap4d/copy.c (copy_env) <src>: Remove. Not needed now. (size_sum,do_copy): Change to a mu_msgset_message_action_t. (try_copy,safe_copy): Change signature; use mu_msgset_foreach_message. * imap4d/fetch.c (_fetch_from_message): Change to a mu_msgset_message_action_t. (imap4d_fetch0): Use mu_msgset_foreach_message. * imap4d/imap4d.h (imap4d_message_action_t): Remove typedef. (util_foreach_message): Remove. Use mu_msgset_foreach_message. * imap4d/store.c (_do_store): Change to a mu_msgset_message_action_t. (imap4d_store0): Use mu_msgset_foreach_message. * imap4d/util.c (util_foreach_message): Remove. * include/mailutils/list.h (mu_list_foreach_dir): New proto. * include/mailutils/msgset.h (mu_msgset_msgno_action_t) (mu_msgset_message_action_t): New typedefs. (mu_msgset_negate,mu_msgset_foreach_dir_msgno) (mu_msgset_foreach_msgno,mu_msgset_foreach_dir_message) (mu_msgset_foreach_message): New protos. * libmailutils/list/foreachdir.c: New file. * libmailutils/list/Makefile.am (liblist_la_SOURCES): Add foreachdir.c. * libmailutils/list/head.c (mu_list_head): Fix conditional. * libmailutils/list/tail.c (mu_list_tail): Likewise. * libmailutils/msgset/foreachmsg.c: New file. * libmailutils/msgset/foreachnum.c: New file. * libmailutils/msgset/negate.c: New file. * libmailutils/msgset/Makefile.am (libmsgset_la_SOURCES): Add new files. * libmailutils/msgset/getitr.c (mu_msgset_get_iterator): Call mu_msgset_aggregate before doing anything. * libmailutils/msgset/getlist.c (mu_msgset_get_list): Likewise. * libmailutils/msgset/locate.c (mu_msgset_locate): Likewise. * libmailutils/msgset/parse.c (parse_msgrange): Remove duplicated code. * testsuite/msgset.c: Implement -neg option.
2011-12-26Add functions for operations on message sets.Sergey Poznyakoff2
* configure.ac: Build libmailutils/msgset/Makefile * include/mailutils/msgset.h: New file. * include/mailutils/Makefile.am (pkginclude_HEADERS): Add msgset.h * include/mailutils/mailutils.h: Include mailutils/msgset.h * include/mailutils/sys/msgset.h: New file. * include/mailutils/sys/Makefile.am (sysinclude_HEADERS): Add msgset.h * include/mailutils/types.hin (mu_msgset_t): New type. * libmailutils/Makefile.am (SUBDIRS): Add msgset. (libmailutils_la_LIBADD): Add libmsgset.la * libmailutils/msgset/Makefile.am: 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/msgset.at: New file. * libmailutils/tests/msgset.c: New file. * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add msgset. (TESTSUITE_AT): Add msgset.at. * libmailutils/tests/testsuite.at: Include msgset.at. * testsuite/msgset.c: New file. * testsuite/Makefile.am (noinst_PROGRAMS): Add msgset.
2011-12-22Implement imap (client) bodystructure and envelope.Sergey Poznyakoff2
* libmailutils/string/wordsplit.c (alloc_space): Fix reallocation calculations. * imap4d/fetch.c (bodystructure): Output number of lines for any TEXT part, not only TEXT/PLAIN. * include/mailutils/header.h (MU_HEADER_CONTENT_LOCATION): New define. * include/mailutils/imap.h (mu_imap_fetch_bodystructure): Implement. (mu_imap_fetch_envelope): Replace data fields with a single pointer to struct mu_imapenvelope. * include/mailutils/message.h: Include datetime.h (mu_imapenvelope, mu_bodystructure): New structs. (mu_message_type): New type. (mu_message_get_imapenvelope,mu_message_imapenvelope_free) (mu_message_set_imapenvelope) (mu_bodystructure_free,mu_list_free_bodystructure) (mu_message_get_bodystructure) (mu_message_set_bodystructure): New protos. * include/mailutils/mime.h (mu_mime_param_assoc_create) (mu_mime_param_assoc_add): New protos. * include/mailutils/sys/message.h (_mu_message)<_imapenvelope> <_bodystructure>: New methods. * libmailutils/mailbox/bodystruct.c: New file. * libmailutils/mailbox/imapenv.c: New file. * libmailutils/mailbox/Makefile.am (libmailbox_la_SOURCES): Add new sources. * libproto/imap/fetch.c: Implement bodystructure. * mu/imap.c: Likewise. * testsuite/bs.c: New file. * testsuite/Makefile.am (noinst_PROGRAMS): Add bs.
2011-12-16Add a test suite for folder delete method.Sergey Poznyakoff5
* testsuite/Makefile.am: Add new test cases. * testsuite/testsuite.at: Inclide fldel.at, add banners. * testsuite/atlocal.in: Define MH_SUPPORT and MAILDIR_SUPPORT variables depending on whether the corresponding mailbox format is enabled. * testsuite/fldel.at: New test case. * testsuite/mbdel.at: Skip tests which rely on disabled mailbox formats.
2011-12-16Share folder implementation between mbox, mh and maildir. Fix mu_folder_delete.Sergey Poznyakoff3
* include/mailutils/folder.h (_mu_fsfolder_init): New proto. * include/mailutils/mailbox.h (mu_mailbox_create_at): New proto. * libmailutils/mailbox/mailbox.c (mu_mailbox_create_at): New function. * libmailutils/mailbox/Makefile.am (libmailbox_la_SOURCES): Add fsfolder.c * libmailutils/mailbox/folder.c (mu_folder_delete): If folder does not provide its own method for deletion, use mu_mailbox_remove. (mu_folder_open, mu_folder_close, mu_folder_enumerate) (mu_folder_lsub, mu_folder_subscribe, mu_folder_unsubscribe) (mu_folder_rename): Return EINVAL if folder is NULL. (mu_folder_match): Bugfix: don't pass folder flags to fnmatch. * libmailutils/mailbox/fsfolder.c: New file. Implementation of file-system based folders. * libmailutils/mailbox/mailbox (_create_mailbox0): Propagate error return from mu_registrar_lookup_url. * libmailutils/tests/fsfolder00.at: New test case. * libmailutils/tests/fsfolder01.at: New test case. * libmailutils/tests/fsfolder02.at: New test case. * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add fsfolder. (TESTSUITE_AT): Add fsfolder tests. * libmailutils/tests/testsuite.at: Include fsfolder tests. * libproto/mbox/folder.c: Use fsfolder. (_mh_is_scheme): Check file even if scheme matches. * libproto/maildir/folder.c: Likewise. (_maildir_is_scheme): Check file even if scheme matches. * libproto/mh/folder.c: Likewise. * testsuite/fldel.c: New file. * testsuite/Makefile.am (noinst_PROGRAMS): Buld fldel.
2011-12-12Fix UID generation in mboxes (complements f9a034c7)Sergey Poznyakoff6
* libproto/mbox/mboxscan.c (mbox_scan_internal): Fix UID generation. * testsuite/lstuid.c: New test program. * testsuite/lstuid00.at: New test case. * testsuite/lstuid01.at: Likewise. * testsuite/lstuid02.at: Likewise. * testsuite/Makefile.am: Add new test cases. * testsuite/testsuite.at: Likewise.
2011-11-29Imap4d: fix handling of nested message/rfc822 parts.Sergey Poznyakoff1
* imap4d/fetch.c (fetch_runtime_closure) <msglist>: New member. (frt_register_message,frt_unregister_messages): New functions. (fetch_get_part_rfc822): Look into encapsulated rfc822 messages. (_frt_body_text,_frt_header) (_frt_header_fields): Use frt_unregister_messages. (imap4d_fetch0): Initialize all fields in struct fetch_runtime_closure. Destroy msglist when finished using it. * imap4d/tests/fetch.at: Add test cases for nested message/rfc822. * testsuite/spool/msg.mbox: Add a message with nested message/rfc822 part.
2011-11-28Fix a bug in imap4d parser, add more tests.Sergey Poznyakoff2
* imap4d/io.c (gettok): Fix memory overwrite. * imap4d/tests/fetch.at: Add checks for HEADER, HEADER.FIELDS, HEADER.FIELDS.NOT, and TEXT applied to message/rfc822 parts. * testsuite/spool/msg.mbox: New file. * testsuite/spool/DISTFILES: Add msg.mbox.
2011-11-19Rename mu_list_do to mu_list_foreach. Add comments to mailutils/list.hSergey Poznyakoff1
2011-11-04Fix TLS usage.Sergey Poznyakoff1
Remove --tls option. Make TLS stream open methods call mu_init_tls_libs. It is now not necessary to call this function explicitly, unless the application wishes to ensure TLS is initialized (e.g. pop3d or imap4d). * include/mailutils/libargp.h (mu_tls_cmdline): Remove. * libmu_argp/tls.c * libmu_argp/Makefile.am (libmu_argp_a_SOURCES): Remove tls.c * libmu_argp/cmdline.c (all_cmdline_capa): Remove tls.c * libmu_auth/tls.c [WITH_TLS] (mu_tls_module_config): Enable by default. (mu_check_tls_environment): Return 0 if TLS is disabled. (mu_init_tls_libs): Always call gnutls_global_init, otherwise any call to TLS library (especially, handshake) can produce a coredump. * libmu_cfg/tls.c: Fix description string for tls.enable. * mh/mh_init.c (mh_init): Remove call to mu_init_tls_libs, now unnecessary. * python/libmu_py/registrar.c: Likewise. * testsuite/smtpsend.c: Likewise.
2011-10-22Fixes in the testsuite & some minor fixes.Sergey Poznyakoff1
* comsat/comsat.c (main): Use real UID to determine user name. Don't rely on environment variables. * maidag/util.c (maidag_error): Re-initialize va_list before reusing it. * mh/ali.c (ali_print_name_list): Change printing loop to correctly handle empty lists. * mh/mh_whatnow.c (quit): Print newline before returning. * comsat/tests/testsuite.at: Skip tests if run as root. * maidag/tests/forward.at: Skip test if run as root. * mh/tests/ali.at: Ignore comment lines in /etc/passwd and /etc/group. Make sure awk is run with a valid stdin. Some implementations (true awk, in particular) try to close stdin even if it is not used and bail out if unable to do so. * mh/tests/atlocal.in (mimeflt): Make sure awk is run with a valid stdin (see above). * mh/tests/anno.at: Always use semicolon before closing curly brace in sed expressions. * mh/tests/mark.at: Likewise. * mh/tests/pick.at: Likewise. * testsuite/testsuite.inc: Likewise. * mh/tests/comp.at: Reflect changes to mh_whatnow.c. * mh/tests/mhn.at: Don't rely on a particular tar output format.
2011-10-16mh: open mailboxes in read-only mode unless the requested operation mandates ↵Sergey Poznyakoff1
otherwise. * mh/mhn.c: Open mailbox in read-only mode. * mh/mhseq.c: Likewise. * mh/scan.c: Likewise. * mh/pick.c: If sequences are given, open mailbox for RW, otherwise open it for reading only. * testsuite/testsuite.inc (MUT_MBCHMOD): New macro. (MUT_MBCOPY): Take optional third argument - mailbox mode. * mh/tests/mhl.at: Make sure mailboxes are r/o. * mh/tests/mhn.at: Likewise. * mh/tests/mhseq.at: Likewise. * mh/tests/scan.at: Likewise.
2011-10-15imap4d: fix returned INTERNALDATE and date searches.Sergey Poznyakoff3
INTERNALDATE now includes a meaningful timezone information (it used to return +0000). Date searches disregard the time and timezone of the INTERNALDATE or Date: header, as mandated by RFC 3501. * libmailutils/base/date.c (mu_parse_ctime_date_time): In the absence of TZ in ctime strings, return local time zone. * imap4d/io.c (imap4d_tokbuf_getline): Kill trailing whitespace. * imap4d/util.c (adjust_tm): New function. (util_parse_internal_date) (util_parse_822_date) (util_parse_ctime_date): Take three arguments, the third one controlling what information to return. All uses updated. * imap4d/fetch.c (_frt_internaldate): Return meaningful timezone. If all else fails, use local TZ. * imap4d/imap4d.h (datetime_parse_mode): New enum. (util_parse_internal_date) (util_parse_822_date) (util_parse_ctime_date): Change signature. * imap4d/search.c (parse_simple_key) (_header_date,cond_before,cond_on,cond_since): Use datetime_date_only mode. * testsuite/spool/search.mbox: New file. * testsuite/spool/DISTFILES: Add search.mbox * imap4d/testsuite/lib/imap4d.exp (imap4d_start): New option -mbox. * imap4d/testsuite/imap4d/search.exp: Rewrite. * imap4d/testsuite/imap4d/create.exp: Account for TZ part in internaldate strings, which may vary. * imap4d/testsuite/imap4d/fetch.exp: Likewise. * imap4d/testsuite/imap4d/list.exp: List the new mailbox.
2011-07-05Allow caller to set up custom in,out,err,progname,tag before calling ↵Sergey Poznyakoff1
mu_app_init. * include/mailutils/stdstream.h (MU_STDSTREAM_RESET_STRIN) (MU_STDSTREAM_RESET_STROUT,MU_STDSTREAM_RESET_STRERR) (MU_STDSTREAM_RESET_NONE,MU_STDSTREAM_RESET_ALL): New flags. (mu_stdstream_setup): Change signature. All uses updated. * libmailutils/stdstream/basestr.c (mu_stdstream_setup): Use the flags argument to decide whether to close existing streams. Make sure stdstream_flushall enters the onexit queue only once. * libmu_argp/muinit.c (mu_app_init): Don't override variables that may be set by the caller (program_name, tag, streams).
2011-06-08Various minor fixes.Sergey Poznyakoff1
* include/mailutils/diag.h (mu_full_program_name): New extern. * libmailutils/diag/diag.c (mu_full_program_name): New global. (mu_set_program_name): Set mu_full_program_name. (mu_diag_at_locus): Fix format specifier. * libmailutils/diag/bt.c: Use mu_full_program_name instead of program_invocation_name. * libmailutils/diag/wd.c (mu_wd): Likewise. * comsat/comsat.c: Fix format specifiers. * lib/mailcap.c: Likewise. * libmu_sieve/util.c: Cast formatted arguments to match format specs. * mh/mh_getopt.c: Likewise. * libmailutils/cidr/fromstr.c: Add missing includes. * libproto/mailer/smtp.c: Likewise. * libproto/pop/mbox.c: Likewise. * testsuite/smtpsend.c: Likewise. * mu/getarg.c: Likewise. * mu/imap.c: Likewise. * mu/pop.c (com_connect): Protect TLS code with #ifdef. * mu/Makefile.am (EXTRA_DIST): Add mu-setup.awk. * mail/summary.c (mail_summary): Fix data types of the counters.

Return to:

Send suggestions and report system problems to the System administrator.