summaryrefslogtreecommitdiff
path: root/comsat
AgeCommit message (Collapse)AuthorFiles
2010-12-07Rewrite prog stream support.Sergey Poznyakoff1
Two interfaces are provided: mu_prog_stream_create offers full control over the program execution environment (i.e. running privileges, cwd, resource limits) via a set of hints. A simpler interface, mu_command_stream_create, runs the command in the current environment. mu_filter_prog_stream_create is removed, because its functionality can be achieved by a correspondingly crafted set of hints to mu_prog_stream_create. * include/mailutils/prog.h: New file. * include/mailutils/mailutils.h: Include mailutils/prog.h * include/mailutils/Makefile.am (pkginclude_HEADERS): Add prog.h * include/mailutils/stream.h (mu_prog_stream_create) (mu_filter_prog_stream_create): Remove prototypes. * include/mailutils/sys/prog_stream.h (_mu_prog_stream): Change structure. (_mu_prog_limit_codes, _mu_prog_limit_flags): New externs. * include/mailutils/util.h (mu_set_user_privileges) (mu_switch_to_privs): New prototypes. * lib/userprivs.c: Move to libmailutils/base. * lib/Makefile.am (libmuaux_a_SOURCES): Remove userprivs.c * libmailutils/base/Makefile.am (libbase_la_SOURCES): Add userprivs.c * libmailutils/base/userprivs.c (mu_set_user_privileges): New function. (mu_switch_to_privs): Rewrite as another entry point to mu_set_user_privileges. * libmailutils/stream/prog_stream.c (_mu_prog_limit_flags) (_mu_prog_limit_codes): New global variables. (start_program_filter): Use hints to control execution environment. (_prog_stream_create): Save hints. (mu_prog_stream_create): Change signature. (mu_command_stream_create): New function (corresponds to the prior mu_prog_stream_create). (mu_filter_prog_stream_create): Remove function. * comsat/action.c (action_exec): Use new mu_prog_stream_create calling convention. * examples/murun.c: Rewrite. * mh/mhn.c (show_internal): Use new mu_prog_stream_create calling convention. * mh/tests/mhn.at: Reflect changes to mhn. * imap4d/preauth.c: Use mu_command_stream_create. * libmu_sieve/extensions/pipe.c * mail/decode.c * mail/pipe.c * mail/send.c * mh/mhl.c * mu/shell.c * mail/mail.h: Include mailutils/prog.h * mh/mh.h * po/POTFILES.in: Add libmailutils/base/userprivs.c.
2010-12-07comsat: Use mu streams instead of stdioSergey Poznyakoff3
* comsat/action.c (action_beep, echo_string) (action_echo, action_exec): Take mu_stream_t as first argument. (open_rc): Take mu_stream_t as tty, return mu_stream_t as well. Install the linecon filter. (run_user_action): Take mu_stream_t as first arg. Pass it to all invoked actions. * comsat/comsat.c (get_newline_str): Remove. (need_crlf): New function. (notify_user): Use mu_stream_t instead of FILE. Install a 7bit filter and CRLF filter (if the device requires it). * comsat/comsat.h: Include mailutils/filter.h. (run_user_action): Change signature.
2010-12-07comsat: minor changesSergey Poznyakoff1
* libmailutils/mailbox/mailbox.c (mu_mailbox_open): Fix error checking condition. * comsat/action.c (act_getline): Remove. (open_rc): Return mu_stream_t. Use linecon filter.
2010-12-06Revise stream ioctl support.Sergey Poznyakoff1
The mu_stream_ioctl function gets two argument that identify the ioctl in question: "family", which identifies a family of ioctls in question, and "opcode", which indicates the requested operation within that family. * include/mailutils/stream.h: Define ioctl families and opcodes. (mu_stream_ioctl): Change signature. * include/mailutils/sys/stream.h (_mu_stream)<ctl>: Change signature. * include/mailutils/log.h (mu_severity_from_string) (mu_severity_to_string): New protos. * libmailutils/stream/stream.c (mu_stream_ioctl): Change signature. * libmailutils/filter/filter_iconv.c: Rewrite ioctl support. * libmailutils/stream/file_stream.c: Likewise. * libmailutils/stream/fltstream.c: Likewise. * libmailutils/stream/iostream.c: Likewise. * libmailutils/stream/logstream.c: Likewise. * libmailutils/stream/mapfile_stream.c: Likewise. * libmailutils/stream/memory_stream.c: Likewise. * libmailutils/stream/nullstream.c: Likewise. * libmailutils/stream/prog_stream.c: Likewise. * libmailutils/stream/rdcache_stream.c: Likewise. * libmailutils/stream/streamref.c: Likewise. * libmailutils/stream/syslogstream.c: Likewise. * libmailutils/stream/tcp.c: Likewise. * libmailutils/stream/xscript-stream.c: Likewise. * libmu_auth/tls.c: Likewise. * comsat/action.c: Change calls to mu_stream_ioctl. * imap4d/auth_gsasl.c: Likewise. * imap4d/io.c: Likewise. * imap4d/util.c: Likewise. * libmailutils/base/getpass.c: Likewise. * libmailutils/cfg/parser.y: Likewise. * libmailutils/mailbox/body.c: Likewise. * libmailutils/mime/mime.c: Likewise. * libmailutils/stdstream/dbgstream.c: Likewise. * libmailutils/stdstream/strerr.c: Likewise. * libmu_sieve/runtime.c: Likewise. * libmu_sieve/sieve.y: Likewise. * libmu_sieve/util.c: Likewise. * libproto/imap/trace.c: Likewise. * libproto/mailer/smtp_data.c: Likewise. * libproto/mailer/smtp_starttls.c: Likewise. * libproto/mailer/smtp_trace.c: Likewise. * libproto/pop/pop3_stls.c: Likewise. * libproto/pop/pop3_stream.c: Likewise. * libproto/pop/pop3_trace.c: Likewise. * maidag/lmtp.c: Likewise. * mail/source.c: Likewise. * mu/logger.c: Likewise. * pop3d/extra.c: Likewise. * pop3d/retr.c: Likewise. * TODO: Update. * doc/texinfo/nullstream.texi: Update.
2010-12-06Rewrite debugging and logging support.Sergey Poznyakoff3
The mu_debug_t object and associated functions have been removed. New debugging functions are based on the logstream interface. * include/mailutils/debug.hm4: Remove. * include/mailutils/debug.h: New file. * include/mailutils/Makefile.am (BUILT_SOURCES,EXTRA_DIST): Remove debug.h, debug.hm4. * mu-aux/debugdef.m4: Remove. * mu-aux/debcat.awk: New file. * mu-aux/Makefile.am (EXTRA_DIST): Replace debugdef.m4 with debcat.awk. * include/mailutils/sys/dbgstream.h: Remove. * include/mailutils/sys/debug.h: Remove. * include/mailutils/sys/Makefile.am (sysinclude_HEADERS): Remove debug.h and dbgstream.h, add debcat.h * include/mailutils/sys/.gitignore: Add debcat.h. * libmailutils/diag/dbgstderr.c: Remove. * libmailutils/diag/dbgsyslog.c: Remove. * libmailutils/diag/gdebug.c: Remove. * libmailutils/diag/debcat: New file. * libmailutils/diag/Makefile.am (libdiag_la_SOURCES): Remove these sources. * libmailutils/diag/debug.c: Rewrite from scratch. * libmailutils/diag/diag.c: Rewrite from scratch. * libmailutils/diag/syslog.c (mu_diag_syslog_printer): Remove function. (mu_log_syslog, mu_log_print_severity): New variables. * libmailutils/stream/dbgstream.c: Remove. * libmailutils/stream/Makefile.am (libstream_la_SOURCES): Remove dbgstream.c.. * libmailutils/stdstream/Makefile.am (libstdstream_la_SOURCES): Add dbgstream.c. * libmailutils/stream/logstream.c (_mu_severity_str): Change strings to lower case. (_log_write): Improve handling of unrecognized escapes. (_log_ctl): Handle MU_LOGSTREAM_ADVANCE_LOCUS_LINE and MU_LOGSTREAM_ADVANCE_LOCUS_COL. * libmailutils/mailbox/folder.c (mu_folder_has_debug) (mu_folder_get_debug, mu_folder_set_debug): Remove functions. * mu-aux/debcat.awk: New file. * libmailutils/stdstream/dbgstream.c: New file. * comsat/action.c: Use new debug/log functions. * comsat/comsat.c: Likewise. * examples/aclck.c: Likewise. * examples/echosrv.c: Likewise. * examples/msg-send.c: Likewise. * examples/nntpclient.c: Likewise. * examples/numaddr.c: Likewise. * frm/common.c: Likewise. * imap4d/imap4d.c: Likewise. * imap4d/io.c: Likewise. * imap4d/util.c: Likewise. * libmailutils/auth/mu_auth.c: Likewise. * libmailutils/base/amd.c: Likewise. * libmailutils/cfg/driver.c: Likewise. * libmailutils/cfg/format.c: Likewise. * libmailutils/cfg/lexer.l: Likewise. * libmailutils/cfg/parser.y: Likewise. * libmailutils/mailbox/mailbox.c: Likewise. * libmailutils/mailbox/mbx_default.c: Likewise. * libmailutils/mailer/mailer.c: Likewise. * libmailutils/mailer/progmailer.c: Likewise. * libmailutils/server/acl.c: Likewise. * libmailutils/server/ipsrv.c: Likewise. * libmailutils/server/msrv.c: Likewise. * libmailutils/tests/wicket.c: Likewise. * libmu_argp/auth.c: Likewise. * libmu_argp/cmdline.c: Likewise. * libmu_argp/common.c: Likewise. * libmu_auth/ldap.c: Likewise. * libmu_cfg/acl.c: Likewise. * libmu_cfg/auth.c: Likewise. * libmu_cfg/common.c: Likewise. * libmu_cfg/ldap.c: Likewise. * libmu_cfg/sieve.c: Likewise. * libmu_cfg/sql.c: Likewise. * libmu_scm/mu_message.c: Likewise. * libmu_sieve/prog.c: Likewise. * libmu_sieve/runtime.c: Likewise. * libproto/imap/trace.c: Likewise. * libproto/mailer/mbox.c: Likewise. * libproto/mailer/prog.c: Likewise. * libproto/mailer/sendmail.c: Likewise. * libproto/mailer/smtp.c: Likewise. * libproto/mailer/smtp_trace.c: Likewise. * libproto/mbox/folder.c: Likewise. * libproto/mbox/mbox.c: Likewise. * libproto/nntp/folder.c: Likewise. * libproto/nntp/nntp_debug.c: Likewise. * libproto/pop/mbox.c: Likewise. * libproto/pop/pop3_trace.c: Likewise. * maidag/guile.c: Likewise. * maidag/lmtp.c: Likewise. * maidag/maidag.c: Likewise. * maidag/util.c: Likewise. * mail/mail.c: Likewise. * mail/mailvar.c: Likewise. * mail/send.c: Likewise. * mail/source.c: Likewise. * mh/mh_argp.c: Likewise. * mh/send.c: Likewise. * mimeview/mimeview.c: Likewise. * movemail/movemail.c: Likewise. * mu/wicket.c: Likewise. * pop3d/extra.c: Likewise. * pop3d/pop3d.c: Likewise. * readmsg/readmsg.c: Likewise. * sieve/sieve.c: Likewise. * testsuite/mimetest.c: Likewise. * libmu_sieve/sieve-priv.h (mu_sieve_machine) <parse_error_printer> <error_printer, debug_printer, debug>: Remove. <errstream>: New member. (mu_sv_compile_error, mu_sv_print_value_list) (mu_sv_print_tag_list): Change prototypes. * libmu_sieve/actions.c: Use new sieve debug functions. * libmu_sieve/extensions/list.c: Likewise. * libmu_sieve/extensions/moderator.c: Likewise. * libmu_sieve/extensions/pipe.c: Likewise. * libmu_sieve/extensions/spamd.c: Likewise. * libmu_sieve/extensions/timestamp.c: Likewise. * libmu_sieve/extensions/vacation.c: Likewise. * libmu_sieve/sieve.y : Likewise. * libmu_sieve/sieve.l: Likewise. * libmu_sieve/tests.c: Likewise. * libmu_sieve/util.c: Rewrite diagnostic support. * /maidag/sieve.c: Use new debug/log and sieve diagnostic functions. * mu/mu.c (main): Remove call to mu_stdstream_setup. It is called by mu_app_init now. * libmailutils/base/wicket.c (mu_wicket_stream_match_url): Change signature. * libmailutils/cfg/gocs.c (mu_gocs_logging_init): Rewrite. * libmailutils/mailbox/message.c (mu_message_save_to_mailbox): Remove mu_debug_t argument. * libmailutils/stdstream/basestr.c (mu_stdstream_setup): Minor fixes. * libmailutils/stdstream/strerr.c (mu_stdstream_strerr_create): Do not install filter stream if tag is NULL. (mu_stdstream_strerr_setup): New function. * libmu_argp/muinit.c (mu_app_init): Set mu_log_tag. Call mu_stdstream_setup. * libmu_scm/mu_dbgport.c: Rewrite port support. * include/mailutils/acl.h (mu_acl_get_debug) (mu_acl_set_debug): Remove prototypes. * include/mailutils/auth.h (mu_wicket_stream_match_url): Change signature. * include/mailutils/cfg.h (mu_cfg_locus_t): Remove typedef, use struct mu_locus instead. (mu_cfg_locus): Remove declaration. (mu_cfg_node)<locus>: Change type. (mu_cfg_node)<debug>: Remove. (mu_cfg_vperror,mu_cfg_perror) (mu_cfg_parse_error,mu_cfg_format_error): Remove prototypes. (mu_cfg_callback_t): Change signature. All uses updated. (mu_cfg_get_debug): Remove prototype. (mu_cfg_assert_value_type, mu_cfg_string_value_cb): Change signature. (mu_cfg_tree_set_debug): Remove prototype. (mu_cfg_tree_create_node): Change signature. * include/mailutils/diag.h (MU_DIAG_): Redefine via MU_LOG_ constants. (mu_diag_get_debug,mu_diag_set_debug): Remove. (mu_diag_cont_vprintf, mu_diag_cont_printf) (mu_diag_at_locus): New functions. * include/mailutils/folder.h (mu_folder_has_debug) (mu_folder_get_debug, mu_folder_set_debug): Remove prototypes. * include/mailutils/gocs.h (mu_gocs_logging): Remove structure. (mu_gocs_debug)<errpfx>: Remove. * include/mailutils/guile.h (mu_scm_make_debug_port): Change prototype. * include/mailutils/mailbox.h (mu_mailbox_has_debug) (mu_mailbox_get_debug,mu_mailbox_set_debug): Remove. * include/mailutils/mailer.h (mu_mailer_get_debug) (mu_mailer_set_debug): Remove. * include/mailutils/message.h (mu_message_save_to_mailbox): Change signature. * include/mailutils/mu_auth.h (mu_auth_set_debug): Remove proto. * include/mailutils/nntp.h (mu_nntp_set_debug): Remove. * include/mailutils/progmailer.h (mu_progmailer_set_debug): Remove proto. * include/mailutils/server.h (mu_ip_server_set_debug) (mu_ip_server_get_debug): Remove proto. * include/mailutils/sieve.h (mu_sieve_locus_t): Remove. Use struct mu_locus instead. (mu_sieve_printf_t, mu_sieve_parse_error_t): Remove. (mu_sieve_action_log_t): Change signature. (mu_sieve_machine_init): Change signature. (mu_sieve_machine_init_ex): New function. (mu_sieve_get_diag_stream) (mu_sieve_set_diag_stream): New functions. (mu_sieve_set_data): New function. (mu_sieve_get_locus): Change signature. (mu_sieve_set_error,mu_sieve_set_parse_error) (mu_sieve_set_debug,mu_sieve_set_debug_object): Remove protos. * include/mailutils/stdstream.h (mu_stdstream_strerr_setup): New proto. * include/mailutils/stream.h (MU_LOGSTREAM_ADVANCE_LOCUS_LINE) (MU_LOGSTREAM_ADVANCE_LOCUS_COL): New ioctls. (mu_dbgstream_create): Change signature. * include/mailutils/sys/folder.h (_mu_folder) <debug>: Remove. * include/mailutils/sys/mailbox.h (_mu_mailbox) <debug>: Remove. * include/mailutils/sys/mailer.h (_mu_mailer) <debug>: Remove. * include/mailutils/sys/nntp.h (_mu_nntp) <debug>: Remove. * include/mailutils/syslog.h (mu_log_syslog) (mu_log_print_severity): New externs. * include/mailutils/types.hin (_mu_debug, mu_debug_t): Remove. * lib/tcpwrap.h: Remove unused prototypes. * imap4d/imap4d.h: Include mailutils/stdstream.h * mail/mail.h: Likewise. * pop3d/pop3d.h: Likewise. * mh/comp.c (main): Bugfix. * po/POTFILES.in: Update. * TODO: Update.
2010-11-02Remove the --license option.Sergey Poznyakoff1
It is not needed because the --version option shows a terse info about the license, as well as a link to its full text.
2010-10-28Add wordsplit module.Sergey Poznyakoff2
The wordsplit module (borrowed from another project of mine, called 'grecs') provides a flexible and powerful mechanism for parsing input in a way similar to posix-shell. In particular, the POSIX function wordexp is a subset of the wordsplit functionality. The argcv module is now deprecated. * include/mailutils/wordsplit.h: New file. * include/mailutils/Makefile.am (pkginclude_HEADERS): Add wordsplit.h * libmailutils/string/wordsplit.c: New file. * libmailutils/string/Makefile.am (libstring_la_SOURCES): Add wordsplit.c. * include/mailutils/argcv.h (mu_argcv_join): New proto. (mu_argcv_get, mu_argcv_get_n, mu_argcv_get_np) (mu_argcv_unquote_char, mu_argcv_quote_char) (mu_argcv_quoted_length, mu_argcv_unquote_copy) (mu_argcv_quote_copy): Mark as deprecated. * include/mailutils/mailutils.h: Include wordsplit.h. * libmailutils/tests/wsp.c: New file. * libmailutils/tests/.gitignore: List wsp. * libmailutils/tests/wordsplit.at: New file. * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add wsp (TESTSUITE_AT): Add wordsplit.at. * libmailutils/tests/argcv.c: Define MU_ARCGV_DEPRECATED to avoid deprecation warnings. * libmailutils/tests/testsuite.at: Include wordsplit.at. * libmailutils/base/argcvfree.c: New file. * libmailutils/base/argcvjoin.c: New file. * libmailutils/base/argcvrem.c: New file. * libmailutils/base/Makefile.am (libbase_la_SOURCES): Add new files. * libmailutils/base/argcv.c: Define MU_ARCGV_DEPRECATED to avoid deprecation warnings. (argcv_string, argcv_free, argv_free) (mu_argcv_remove): Rewrite in separate modules. * comsat/comsat.h: Include wordsplit.h. * imap4d/imap4d.h: Likewise. * mail/mail.h: Likewise. * mh/mh.h: Likewise. * readmsg/readmsg.h: Likewise. * comsat/action.c: Use wordsplit. * imap4d/fetch.c: Likewise. * lib/mailcap.c: Likewise. * libmailutils/auth/mu_auth.c: Likewise. * libmailutils/base/mutil.c: Likewise. * libmailutils/cfg/format.c: Likewise. * libmailutils/cfg/lexer.l: Likewise. * libmailutils/cfg/parser.y: Likewise. * libmailutils/diag/gdebug.c: Likewise. * libmailutils/mailer/mailer.c: Likewise. * libmailutils/server/acl.c: Likewise. * libmailutils/stream/prog_stream.c: Likewise. * libmailutils/tests/listop.c: Likewise. * libmailutils/url/create.c: Likewise. * libmu_auth/ldap.c: Likewise. * libmu_auth/radius.c: Likewise. * libmu_sieve/sieve.l: Likewise. * libproto/mailer/mbox.c: Likewise. * libproto/mailer/smtp.c: Likewise. * libproto/mailer/smtp_gsasl.c: Likewise. * mail/mailline.c: Likewise. * mail/mailvar.c: Likewise. * mail/send.c: Likewise. * mail/util.c: Likewise. * mh/folder.c: Likewise. * mh/mh_alias.y: Likewise. * mh/mh_argp.c: Likewise. * mh/mh_init.c: Likewise. * mh/mh_list.c: Likewise. * mh/mh_msgset.c: Likewise. * mh/mh_sequence.c: Likewise. * mh/mh_whatnow.c: Likewise. * mh/mh_sequence.c: Likewise. * mh/mh_whatnow.c: Likewise. * mh/mhn.c: Likewise. * mh/send.c: Likewise. * movemail/movemail.c: Likewise. * mu/shell.c: Likewise. * readmsg/readmsg.c: Likewise. * testsuite/smtpsend.c: Likewise. * pop3d/popauth.c: Use wordsplit. Use simplified input format (username and password delimited by any amount of whitespace). Read/produce old format if invoked with the --compatibility option. * examples/aclck.c: Use wordsplit instead of argcv. * examples/header.c: Likewise. * examples/mta.c: Likewise. * examples/.gitignore: Remove pop3client. * examples/Makefile.am: Remove pop3client. * po/POTFILES.in: Add new files.
2010-10-12Use mu_make_file_name where necessary.Sergey Poznyakoff1
* comsat/action.c (run_user_action): Use mu_make_file_name. * imap4d/lsub.c (imap4d_lsub): Likewise. * imap4d/subscribe.c (imap4d_subscribe): Likewise. * imap4d/unsubscribe.c (imap4d_unsubscribe): Likewise. * libmailutils/base/filename.c (mu_get_full_path): Likewise. * libmailutils/base/tempfile.c (mu_tempfile): Likewise. * libmailutils/base/url.c (_url_path_default): Likewise. * libmu_auth/virtual.c (getpwnam_virtual) (mu_auth_virt_domain_by_name): Likewise. * libmu_sieve/extensions/vacation.c (check_db): Likewise. * libmu_sieve/sieve.l (_try_include): Likewise. * maidag/forward.c (maidag_forward): Likewise. * mh/mh.h (mh_safe_make_file_name): New proto. * mh/mh_init.c (mh_audit_open,mh_get_dir) (mh_expand_name,mh_real_install): Use mh_safe_make_file_name. (mh_safe_make_file_name): New function. * mh/folder.c (read_seq_file, _scan): Use mh_safe_make_file_name. * mh/mh_global.c (mh_read_profile, _mh_init_global_sequences): Likewise. * mh/install-mh.c (main): Likewise. * mh/mhn.c (normalize_path, store_handler, main): Likewise. * mh/repl.c (make_draft): Likewise. * mh/rmf.c (rmf): Likewise. * mh/sortm.c (swap_message): Likewise. * mimeview/mimetypes.l (mimetypes_open): Likewise. * lib/mailcap.c: Add error checking.
2010-10-10Split the mess in mutil.c into logically separated units.Sergey Poznyakoff1
* libmailutils/base/mutil.c (mu_hex2ul, mu_hexstr2ul): Move to string/hexstr.c. (mu_get_homedir, mu_get_full_path) (mu_expand_path_pattern): Move to base/filename.c. (mu_getcwd): Move to base/getcwd.c. (mu_tilde_expansion): Move to base/tilde.c (mu_cpystr): Move to string/cpystr.c. (mu_get_host_name): Move to base/hostname.c. (mu_set_user_email,mu_set_user_email_domain) (mu_get_user_email_domain,mu_aget_user_email_domain) (mu_get_user_email,mu_normalize_path): Move to base/usremail.c. (mu_tempfile,mu_tempname): Move to base/tempfile.c. (mu_spawnvp): Move to base/spawnvp.c. (mu_qualify_link,mu_unroll_symlink): Move to base/symlink.c. (mu_rfc2822_references,mu_rfc2822_msg_id) (mu_rfc2822_in_reply_to): Move to base/msgid.c. (mu_strcasestr): Move to string/cstrcasestr.c. (mu_string_unfold): Move to string/unfold.c. (mu_true_answer_p): Move to string/trueans.c. (mu_scheme_autodetect_p): Move to base/schemeauto.c. (mu_fd_wait): Move to base/fdwait.c. (mu_set_default_fallback,mu_decode_filter): Move to filter/decode.c. (__argp_base_name): Move to lib/argp_base.c. * libmailutils/base/fdwait.c: New file. * libmailutils/base/filename.c: New file. * libmailutils/base/getcwd.c: New file. * libmailutils/base/hostname.c: New file. * libmailutils/base/msgid.c: New file. * libmailutils/base/schemeauto.c: New file. * libmailutils/base/spawnvp.c: New file. * libmailutils/base/symlink.c: New file. * libmailutils/base/tempfile.c: New file. * libmailutils/base/tilde.c: New file. * libmailutils/base/usremail.c: New file. * libmailutils/base/Makefile.am: Add new files. * libmailutils/filter/decode.c: New file. * libmailutils/filter/Makefile.am: Add new files. * libmailutils/string/cpystr.c: New file. * libmailutils/string/cstrcasestr.c: New file. * libmailutils/string/hexstr.c: New file. * libmailutils/string/trueans.c: New file. * libmailutils/string/unfold.c: New file. * libmailutils/string/Makefile.am: Add new files. * lib/argp_base.c: New file. * lib/Makefile.am: Add new files. * include/mailutils/io.h: Include stdarg.h * include/mailutils/mutil.h: Rename to util.h. Reorder prototypes and declarations in logical groups. All uses changed. * include/mailutils/cstr.h (mu_strcasestr): New proto, moved from include/mailutils/mutil.h.
2010-10-09Fix copyleft notices to follow the GNU standards.Sergey Poznyakoff4
2010-10-05Remove the use of MAXHOSTNAMELEN macro.Sergey Poznyakoff2
* comsat/comsat.c (hostname): Change type. (comsat_init): Use mu_get_host_name. * comsat/comsat.h (hostname): Change declaration. * libmailutils/locker.c (lock_dotlock): Use mu_get_host_name. * libmailutils/mutil.c (mu_get_host_name): Rewrite. * pop3d/pop3d.c (pop3d_mainloop): Remove unnecessary call to gethostbyname. * pop3d/pop3d.h (MAXHOSTNAMELEN): Remove definition.
2010-09-25Minor changes.Sergey Poznyakoff4
* am/debug.m4 (MU_DEBUG_MODE): Rewrite. Use -Wdeclaration-after-statement if supported. * comsat/oldcfg.c: Remove. * comsat/Makefile.am (comsatd_SOURCES): Remove oldcfg.c. * comsat/comsat.c: Remove the obsolete --config and --convert-config options. * comsat/comsat.h (convert_config): Remove.
2010-09-08For alpha version, include git tag info in the version output.Sergey Poznyakoff1
* include/mailutils/libargp.h (mu_program_version_hook): New proto. * libmu_argp/Makefile.am (libmu_argp_a_SOURCES): Remove mu_argp.h. * libmu_argp/mu_argp.h: Remove. * libmu_argp/muinit.c [MU_ALPHA_RELEASE]: Include git-describe.h (mu_program_version_hook): New function. (mu_argp_init): Set mu_program_version_hook, unless vers is given. * comsat/comsat.c (main): Call mu_argp_init with NULL arguments. * config/mailutils-config.c: Likewise. * dotlock/dotlock.c: Likewise. * examples/muauth.c: Likewise. * frm/frm.c: Likewise. * frm/from.c: Likewise. * guimb/main.c: Likewise. * imap4d/imap4d.c: Likewise. * maidag/maidag.c: Likewise. * mail/mail.c: Likewise. * messages/messages.c: Likewise. * mimeview/mimeview.c: Likewise. * movemail/movemail.c: Likewise. * pop3d/pop3d.c: Likewise. * pop3d/popauth.c: Likewise. * readmsg/readmsg.c: Likewise. * sieve/sieve.c: Likewise.
2010-09-08Use stringrefs, add some guidelines for further editing.Sergey Poznyakoff1
* comsat/action.c * imap4d/fetch.c * imap4d/search.c * mh/burst.c * mh/comp.c * mh/forw.c * mh/mh_ctx.c * mh/mh_format.c * mh/mh_list.c * mh/mhn.c * mh/pick.y * pop3d/retr.c * pop3d/top.c * readmsg/msglist.c * readmsg/readmsg.c
2010-09-08Stream support rewritten from scratch.Sergey Poznyakoff1
Does not compile yet. New files: * mailbox/streamref.c * include/mailutils/sys/streamref.h * include/mailutils/sys/file_stream.h * include/mailutils/sys/header_stream.h * include/mailutils/sys/mapfile_stream.h * include/mailutils/sys/memory_stream.h * include/mailutils/sys/message_stream.h * include/mailutils/sys/prog_stream.h * include/mailutils/sys/socket_stream.h * include/mailutils/sys/stdio_stream.h * include/mailutils/sys/stream.h * include/mailutils/sys/streamtrans.h * mailbox/prog_stream.c * mailbox/stdio_stream.c * mailbox/stream_printf.c * mailbox/stream_vprintf.c * mailbox/temp_file_stream.c * mailbox/streamcpy.c * mailbox/binflt.c * mailbox/crlfflt.c * mailbox/fltstream.c * mailbox/qpflt.c * mailbox/linelenflt.c Removed files: * mailbox/filter_rfc822.c * mailbox/filter_trans.c Moved files (with edits): * libproto/include/filter0.h -> include/mailutils/sys/filter.h * libproto/include/header0.h -> include/mailutils/sys/header.h * libproto/include/message0.h -> include/mailutils/sys/message.h * libproto/include/mime0.h -> include/mailutils/sys/mime.h Modified files: * comsat/action.c * config/mailutils-config.c * examples/base64.c * examples/cpp/msg-send.cc * examples/header.c * examples/http.c * examples/iconv.c * examples/mimetest.c * examples/msg-send.c * examples/mta.c * examples/murun.c * examples/nntpclient.c * examples/pop3client.c * imap4d/append.c * imap4d/auth_gsasl.c * imap4d/fetch.c * imap4d/preauth.c * imap4d/search.c * imap4d/util.c * include/mailutils/body.h * include/mailutils/folder.h * include/mailutils/header.h * include/mailutils/mailbox.h * include/mailutils/mailer.h * include/mailutils/mailutils.h * include/mailutils/message.h * include/mailutils/stream.h * include/mailutils/sys/Makefile.am * include/mailutils/sys/filter.h * include/mailutils/sys/header.h * include/mailutils/sys/message.h * include/mailutils/sys/mime.h * include/mailutils/sys/nntp.h * include/mailutils/sys/pop3.h * include/mailutils/sys/stream.h * include/mailutils/types.hin * lib/mailcap.c * lib/mu_dbm.h * libmu_argp/muinit.c * libmu_auth/ldap.c * libmu_auth/tls.c * libmu_scm/Makefile.am * libmu_scm/mu_body.c * libmu_scm/mu_message.c * libmu_scm/mu_port.c * libmu_sieve/actions.c * libmu_sieve/extensions/pipe.c * libmu_sieve/extensions/spamd.c * libmu_sieve/extensions/vacation.c * libproto/mailer/smtp.c * libproto/mbox/mboxscan.c * libproto/mbox/mbox.c * libproto/mbox/mbox0.h * libproto/nntp/nntp_article.c * libproto/nntp/nntp_carrier.c * libproto/nntp/nntp_destroy.c * libproto/nntp/nntp_ihave.c * libproto/nntp/nntp_post.c * libproto/nntp/nntp_readline.c * libproto/nntp/nntp_sendline.c * libproto/pop/pop3_carrier.c * libproto/pop/pop3_destroy.c * libproto/pop/pop3_readline.c * libproto/pop/pop3_sendline.c * libproto/pop/pop3_stat.c * maidag/mailtmp.c * mail/decode.c * mail/escape.c * mail/msgset.y * mail/pipe.c * mail/print.c * mail/send.c * mail/top.c * mail/util.c * mail/write.c * mailbox/Makefile.am * mailbox/amd.c * mailbox/attachment.c * mailbox/body.c * mailbox/cfg_driver.c * mailbox/cfg_format.c * mailbox/debug.c * mailbox/file_stream.c * mailbox/folder.c * mailbox/hdritr.c * mailbox/header.c * mailbox/mailbox.c * mailbox/mailcap.c * mailbox/mailer.c * mailbox/mapfile_stream.c * mailbox/memory_stream.c * mailbox/message.c * mailbox/message_stream.c * mailbox/mime.c * mailbox/mimehdr.c * mailbox/mutil.c * mailbox/prog_stream.c * mailbox/progmailer.c * mailbox/rfc2047.c * mailbox/socket_stream.c * mailbox/stream.c * mailbox/stream_vprintf.c * mailbox/tcp.c * mailbox/vartab.c * mailbox/wicket.c * mh/burst.c * mh/comp.c * mh/compcommon.c * mh/forw.c * mh/mh_ctx.c * mh/mh_format.c * mh/mh_init.c * mh/mh_list.c * mh/mh_whatnow.c * mh/mhl.c * mh/mhn.c * mh/pick.y * mh/repl.c * mimeview/mimeview.c * mu-aux/generr.awk * pop3d/extra.c * pop3d/pop3d.h * pop3d/retr.c * pop3d/top.c * readmsg/msglist.c * readmsg/readmsg.c * sieve/sieve.c
2010-02-21Re-do configuration tree support using mu_list_t.Sergey Poznyakoff1
* include/mailutils/cfg.h (mu_cfg_node) <next,node>: Remove members. <nodes>: New member. (mu_cfg_tree)<head,tail>: Remove. <nodes>: New member. (mu_cfg_iter_closure): New struct. (mu_cfg_preorder): Change prototype. (mu_cfg_postorder): Remove. (mu_cfg_create_node_list): New proto. (mu_cfg_tree_create_node): Change signature. (mu_cfg_tree_add_nodelist): New proto. (mu_cfg_find_node): Change signature. * include/mailutils/libargp.h (mu_argp_node_list): Remove struct. (mu_argp_node_list_init, mu_argp_node_list_add) (mu_argp_node_list_new, mu_argp_node_list_finish): Change signature. * libmu_argp/cmdline.c (mu_argp_node_list_init, mu_argp_node_list_add) (mu_argp_node_list_new, mu_argp_node_list_finish): Take mu_list_t as the nodelist argument. * mailbox/cfg_parser.y (parse_head,parse_tail): Remove. (parse_node_list): New static, used instead of the above. All uses updated. (mu_cfg_alloc_node): Last argument is mu_list_t. (mu_cfg_create_node_list): New function. (mu_cfg_tree_postprocess): Rewrite. (mu_cfg_preorder): Rewrite. (mu_cfg_postorder): Remove. (mu_cfg_destroy_tree): Use mu_list_destroy to free the node list. (mu_cfg_scan_tree): Update calls to mu_cfg_preorder. (mu_cfg_tree_add_node): Rewrite. (mu_cfg_tree_add_nodelist): New function. (mu_cfg_find_node): Change type of the first argument. (mu_cfg_create_subtree): Rewrite. * mailbox/cfg_format.c (mu_cfg_format_parse_tree) (mu_cfg_format_node): Use new mu_cfg_preorder function. * libmu_argp/common.c: Update calls to mu_argp_node_ functions. * libmu_argp/auth.c: Likewise. * comsat/comsat.c: Likewise. * config/mailutils-config.c: Likewise. * dotlock/dotlock.c: Likewise. * imap4d/imap4d.c: Likewise. * libmu_argp/sieve.c: Likewise. * libmu_argp/tls.c: Likewise. * maidag/maidag.c: Likewise. * mimeview/mimeview.c: Likewise. * movemail/movemail.c: Likewise. * pop3d/pop3d.c: Likewise. * readmsg/readmsg.c: Likewise. * sieve/sieve.c: Likewise.
2010-01-05Update copyright years.Sergey Poznyakoff5
Happy GNU year!
2009-12-28Improve configuration parsing (step 1).Sergey Poznyakoff1
Remove obsolete options (these have been made hidden in v. 2.0). Handle "include" and "program" after parsing the sources, not while reducing the tree, as was previously. Retain, however, old functions for compatibility, making them deprecated. Add "query" mode to mailutils-config. * include/mailutils/cfg.h (mu_cfg_node_tag): Remove (mu_cfg_statement): Rename to mu_cfg_node_statement. (mu_cfg_tree): New member: tail. (mu_cfg_perror): Change signature. (mu_cfg_vperror, mu_cfg_parse_error): New protos. (MU_CFG_PATH_DELIM, MU_CFG_PATH_DELIM_STR): New defines. (MU_PARSE_CONFIG_PLAIN,MU_CFG_FMT_LOCUS): New constant. (MU_CFG_DEPRECATED): New macro. (mu_parse_config,mu_get_config): Deprecated. (mu_cfg_format_parse_tree): Change signature. (mu_cfg_format_node, mu_cfg_parse_file): New protos. (mu_cfg_tree_free): Remove stale proto. (mu_cfg_find_node, mu_cfg_create_subtree): New protos. * include/mailutils/libcfg.h (mu_libcfg_parse_config): New proto. (mu_parse_config_files): Deprecated. * include/mailutils/mutil.h (mu_make_file_name): New proto. (mu_retrieve_fp, mu_register_retriever) (mu_retrieve): Remove unused prototypes. * include/mailutils/opool.h (mu_opool_union): New proto. * libmu_argp/Makefile.am (libmu_argp_a_SOURCES): Remove sources (see below): * po/POTFILES.in: Likewise. * libmu_argp/gsasl.c: Remove. * libmu_argp/pam.c: Remove. * libmu_argp/radius.c: Remove. * libmu_argp/sql.c: Remove. * libmu_argp/tls.c: Remove. * libmu_argp/virtdomain.c: Remove. * config/mailutils-config.c: New option --query (-q) (main): Handle query mode. * comsat/comsat.c: Define MU_CFG_COMPATIBILITY to suppress deprecation warnings. * bootstrap.conf (XGETTEXT_OPTIONS): Add mu_cfg error reporting functions. * mailbox/Makefile.am (libmailutils_la_SOURCES): Add mkfilename.c * mailbox/mkfilename.c: New file. * imap4d/imap4d.c: Remove obsolete option (hidden since 2.0) * libmu_argp/auth.c: Likewise. * libmu_argp/cmdline.c: Likewise. * libmu_argp/tls.c: Likewise. * pop3d/pop3d.c: Likewise. * libmu_argp/common.c: Likewise. (mu_common_argp_options): New option --set. * libmu_argp/muinit.c (mu_app_init): Rewrite using parse tree as a principal entity. * libmu_cfg/init.c (mu_libcfg_parse_config): New function. * mailbox/cfg_driver.c (make_file_name): Remove. (_cb_include): Use mu_make_file_name. (mu_build_container): Use deprecated code only unless MU_PARSE_CONFIG_PLAIN flag is set. (mu_cfg_tree_reduce): Do nothing if the tree is NULL. * mailbox/cfg_format.c (format_node): Print locus optionally. (mu_cfg_format_parse_tree): Take additional argument. (mu_cfg_format_node): New function. * mailbox/cfg_lexer.l: Update calls to diagnostic functions. (mu_cfg_parse_file): New function. (mu_get_config): Rewrite. * mailbox/cfg_parser.y (parse_tree): Replace with parse_head, parse_tail. All usages updated. (mu_cfg_free_node): New function. (mu_cfg_vperror): New function. (mu_cfg_perror,mu_cfg_parse_error): New function. (mu_cfg_tree_union): New function. (mu_cfg_tree_postprocess): New function. (mu_cfg_find_section): Use MU_CFG_PATH_DELIM instead of hardcoded slash. (mu_cfg_value_eq): New function. (mu_cfg_find_node): New function. Redesign of an old idea. (mu_cfg_create_subtree): New function. * mailbox/opool.c (mu_opool_union): New function. * frm/testsuite/frm/test.exp: use --set option instead of the obsolete --mail-folder. * messages/testsuite/messages/test.exp: Likewise. * sieve/testsuite/sieve/action.exp: Likewise. * mail/testsuite/lib/mail.exp: use --set option instead of the obsolete --mail-spool. * mailbox/testsuite/lib/mailbox.exp: Likewise. * testsuite/lib/mailutils.exp: Likewise. * mailbox/mutil.c (mu_register_retriever) (mu_retrieve): Remove unused functions. Minor fix: * frm/common.c (frm_abort): Initialize URL before usage. (frm_scan): Don't call frm_abort on a mailbox that was not opened successfully.
2009-12-16Fix format specifiers and usage of const char* arguments/variables.Sergey Poznyakoff1
Affected files: * comsat/comsat.c * examples/header.c * examples/mailcap.c * examples/pop3client.c * examples/url-parse.c * imap4d/fetch.c * imap4d/id.c * imap4d/list.c * imap4d/select.c * imap4d/status.c * imap4d/store.c * imap4d/sync.c * imap4d/util.c * include/mailutils/sieve.h * libmu_argp/common.c * libmu_argp/muinit.c * libmu_sieve/actions.c * libmu_sieve/extensions/pipe.c * libmu_sieve/extensions/vacation.c * libmu_sieve/prog.c * libmu_sieve/require.c * libmu_sieve/runtime.c * libmu_sieve/sieve-priv.h * libmu_sieve/sieve.y * libproto/imap/folder.c * libproto/imap/mbox.c * libproto/mailer/sendmail.c * libproto/mbox/mbox.c * libproto/pop/pop3_list.c * libproto/pop/pop3_stat.c * maidag/lmtp.c * maidag/sieve.c * mail/copy.c * mail/decode.c * mail/envelope.c * mail/eq.c * mail/escape.c * mail/from.c * mail/mail.h * mail/mailline.c * mail/mailvar.c * mail/size.c * mail/util.c * mail/write.c * mailbox/cfg_format.c * mailbox/folder.c * mailbox/parse822.c * mailbox/system.c * messages/messages.c * mh/folder.c * mh/forw.c * mh/inc.c * mh/mh.h * mh/mh_alias.l * mh/mh_fmtgram.y * mh/mh_getopt.h * mh/mh_init.c * mh/mh_msgset.c * mh/mh_whatnow.c * mh/mhn.c * mh/pick.y * mimeview/mimetypes.y * python/libmu_py/debug.c * sieve/sieve.c
2009-09-28Harmonise --help outputJordi Mallach1
* comsat/comsat.c: Add docstring. * movemail/movemail.c: Add docstring.
2009-08-25Minor improvements in comsat and frmSergey Poznyakoff2
* comsat/action.c (action_exec): Remove `line' argument. Do not explicitly add locus to the messages. (run_user_action): Add locus to diagnostics mu_debug_t, so it is prepended to all diagnostic messages automatically. * comsat/comsat.c: Improve help output * frm/frm.c (attr_help): Remove unnecessary variable.
2009-08-25Fix help messages.Sergey Poznyakoff1
Option descriptions in `--help' output do not constitute conceptual sentences. Therefore, they should not begin with a capital letter, nor end with a final point. Affected files: comsat/comsat.c, config/mailutils-config.c, dotlock/dotlock.c, frm/frm.c, frm/from.c, guimb/main.c, imap4d/imap4d.c, libmu_argp/auth.c, libmu_argp/common.c, libmu_argp/gsasl.c, libmu_argp/pam.c, libmu_argp/radius.c, libmu_argp/sieve.c, libmu_argp/sql.c, libmu_argp/tls.c, libmu_argp/virtdomain.c, libmu_auth/sql.c, libmu_cfg/sql.c, maidag/maidag.c, maidag/mailquota.c, maidag/mailtmp.c, mail/mail.c, messages/messages.c, mh/ali.c, mh/anno.c, mh/burst.c, mh/comp.c, mh/fmtcheck.c, mh/folder.c, mh/forw.c, mh/inc.c, mh/install-mh.c, mh/mark.c, mh/mh_init.c, mh/mhl.c, mh/mhn.c, mh/mhparam.c, mh/mhpath.c, mh/pick.c, mh/refile.c, mh/repl.c, mh/rmf.c, mh/rmm.c, mh/scan.c, mh/send.c, mh/sortm.c, mh/whatnow.c, mh/whom.c, mimeview/mimeview.c, movemail/movemail.c, pop3d/pop3d.c, pop3d/popauth.c, readmsg/readmsg.c, sieve/sieve.c
2009-08-25Change error messages to comply with the GNU standards.Sergey Poznyakoff3
The string MESSAGE should not begin with a capital letter when it follows a program name and/or file name, because that isn't the beginning of a sentence. (The sentence conceptually starts at the beginning of the line.) Also, it should not end with a period. * include/mailutils/diag.h (mu_diag_funcall): New prototype. * mailbox/diag.c: New function. * comsat/action.c, comsat/comsat.c, comsat/oldcfg.c, config/mailutils-config.c, configure.ac, dotlock/dotlock.c, frm/common.c, frm/from.c, guimb/collect.c, guimb/main.c, guimb/util.c, imap4d/auth_gsasl.c, imap4d/auth_gss.c, imap4d/bye.c, imap4d/close.c, imap4d/imap4d.c, imap4d/login.c, imap4d/preauth.c, imap4d/signal.c, imap4d/starttls.c, imap4d/util.c, lib/mailcap.c, lib/tcpwrap.c, libmu_argp/mu_argp.c, libmu_auth/ldap.c, libmu_auth/radius.c, libmu_auth/sql.c, libmu_auth/tls.c, libmu_cfg/acl.c, libmu_cfg/common.c, libmu_cfg/init.c, libmu_cfg/ldap.c, libmu_cfg/sql.c, libmu_sieve/actions.c, libmu_sieve/comparator.c, libmu_sieve/extensions/moderator.c, libmu_sieve/prog.c, libmu_sieve/sieve.l, libproto/imap/folder.c, libproto/mbox/mbox.c, maidag/deliver.c, maidag/lmtp.c, maidag/maidag.c, maidag/mailquota.c, maidag/mailtmp.c, maidag/script.c, mail/alias.c, mail/cd.c, mailbox/cfg_lexer.l, mailbox/cfg_parser.y, mailbox/file_stream.c, mailbox/gocs.c, mailbox/msrv.c, mailbox/mutil.c, mailbox/registrar.c, messages/messages.c, mh/folder.c, mh/forw.c, mh/inc.c, mh/mark.c, mh/mh_ctx.c, mh/mh_fmtgram.y, mh/mh_format.c, mh/mh_init.c, mh/mh_list.c, mh/mh_msgset.c, mh/mh_whatnow.c, mh/mh_whom.c, mh/mhl.c, mh/mhn.c, mh/pick.c, mh/refile.c, mh/repl.c, mh/rmf.c, mh/scan.c, mh/send.c, mimeview/mimetypes.l, mimeview/mimeview.c, movemail/movemail.c, pop3d/apop.c, pop3d/bulletin.c, pop3d/extra.c, pop3d/lock.c, pop3d/logindelay.c, pop3d/pop3d.c, pop3d/popauth.c, pop3d/quit.c, pop3d/signal.c, pop3d/user.c, readmsg/readmsg.c, sieve/sieve.c: Fix error messages.
2009-08-13Minor fixes.Sergey Poznyakoff1
* comsat/comsat.h: Include confpaths.h, not paths.h. * lib/utmp.c: Likewise. * libmu_scm/mu_scm.h: Likewise. * libproto/mailer/sendmail.c: Likewise. * mail/mail.h: Likewise. * mailbox/mbx_default.c: Likewise. * mailbox/version.c: Likewise. * lib/daemon.c: Likewise. * include/mailutils/mailer.h (struct timeval): forward decl.
2009-07-07Introduce locale-independent character type and string functions.Sergey Poznyakoff2
* include/mailutils/cctype.h: New file. * include/mailutils/cstr.h: New file. * include/mailutils/Makefile.am: Add new files. * mailbox/cstrcasecmp.c: New file. * mailbox/cstrlower.c: New file. * mailbox/cstrupper.c: New file. * mailbox/muctype.c: New file. * mailbox/strltrim.c: New file. * mailbox/strrtrim.c: New file. * mailbox/strskip.c: New file. * mailbox/Makefile.am: Add new files. * .gitignore: Update * gnulib.modules: Remove strcase. * comsat/comsat.h, imap4d/imap4d.h, include/mailutils/mailutils.h, include/mailutils/mutil.h, include/mailutils/sys/pop3.h, libmu_scm/mu_scm.h, mail/mail.h: Include cstr.h and cctype.h. * comsat/oldcfg.c, config/mailutils-config.c, examples/mimetest.c, examples/mta.c, examples/nntpclient.c, examples/pop3client.c, imap4d/append.c, imap4d/create.c, imap4d/delete.c, imap4d/fetch.c, imap4d/id.c, imap4d/idle.c, imap4d/list.c, imap4d/namespace.c, imap4d/rename.c, imap4d/search.c, imap4d/status.c, imap4d/store.c, imap4d/uid.c, imap4d/util.c, libmu_argp/compat.c, libmu_auth/ldap.c, libmu_auth/sql.c, libmu_scm/mu_message.c, libmu_sieve/actions.c, libmu_sieve/comparator.c, libmu_sieve/extensions/list.c, libmu_sieve/extensions/spamd.c, libmu_sieve/extensions/vacation.c, libmu_sieve/load.c, libmu_sieve/sieve.l, libmu_sieve/tests.c, libproto/imap/folder.c, libproto/mailer/smtp.c, libproto/mbox/mbox.c, libproto/mh/folder.c, libproto/mh/mbox.c, libproto/pop/folder.c, libproto/pop/mbox.c, libproto/pop/pop3_connect.c, maidag/forward.c, maidag/lmtp.c, maidag/maidag.c, maidag/maidag.h, maidag/mailquota.c, mail/alt.c, mail/copy.c, mail/decode.c, mail/escape.c, mail/followup.c, mail/mail.c, mail/mailline.c, mail/msgset.y, mail/print.c, mail/reply.c, mail/send.c, mail/shell.c, mail/util.c, mail/write.c, mailbox/address.c, mailbox/amd.c, mailbox/assoc.c, mailbox/attachment.c, mailbox/attribute.c, mailbox/cfg_lexer.l, mailbox/date.c, mailbox/filter.c, mailbox/gdebug.c, mailbox/header.c, mailbox/kwd.c, mailbox/locale.c, mailbox/mailcap.c, mailbox/mailer.c, mailbox/message.c, mailbox/message_stream.c, mailbox/mime.c, mailbox/msrv.c, mailbox/mutil.c, mailbox/parse822.c, mailbox/progmailer.c, mailbox/rfc2047.c, mailbox/syslog.c, mailbox/url.c, mailbox/version.c, mh/mh.h, mh/mh_alias.l, mh/mh_ctx.c, mh/mh_fmtgram.y, mh/mh_init.c, mh/mh_list.c, mh/mh_msgset.c, mh/mh_sequence.c, mh/mh_whatnow.c, mh/mh_whom.c, mh/mhn.c, mh/mhparam.c, mh/pick.y, mh/sortm.c, mimeview/mimetypes.y, pop3d/bulletin.c, pop3d/expire.c, pop3d/pop3d.c, pop3d/pop3d.h, pop3d/popauth.c, pop3d/user.c, readmsg/msglist.c, readmsg/readmsg.c, readmsg/readmsg.h, sql/mysql.c, sql/postgres.c: Use locale-independent cclass and str functions.
2009-07-05Fix namespaces and inclusion directories.Sergey Poznyakoff1
* README-hacking: Update. * configure.ac (MU_COMMON_INCLUDES): Remove. (MU_LIB_COMMON_INCLUDES,MU_APP_COMMON_INCLUDES): New variables. Link lib/gettext.h and lib.intprops.h to include. * gnulib.modules: Remove fnmatch. * comsat/Makefile.am, config/Makefile.am, dotlock/Makefile.am, frm/Makefile.am, guimb/Makefile.am, imap4d/Makefile.am, maidag/Makefile.am, mail/Makefile.am, movemail/Makefile.am, pop3d/Makefile.am, python/libmu_py/Makefile.am, readmsg/Makefile.am sieve/Makefile.am (INCLUDES): Use MU_APP_COMMON_INCLUDES * lib/Makefile.am, examples/Makefile.am, libmu_argp/Makefile.am, libmu_auth/Makefile.am, libmu_cpp/Makefile.am, libmu_sieve/Makefile.am, libproto/imap/Makefile.am, libproto/mailer/Makefile.am, libproto/mh/Makefile.am, libproto/nntp/Makefile.am, libproto/pop/Makefile.am, mailbox/Makefile.am, mapi/Makefile.am, messages/Makefile.am, mh/Makefile.am, sql/Makefile.am (INCLUDES): Use MU_LIB_COMMON_INCLUDES
2008-12-08Switched to Git repository.Sergey Poznyakoff1
* m4: Rename to am. * README-alpha, README-hacking: Reflect the switch. * */.cvsignore: Rename to .gitignore, update. * gnulib.modules: Add gitlog-to-changelog. * ChangeLog: Remove.
2008-08-21* include/mailutils/mutil.h, mailbox/mutil.c (mu_normalize_path):Sergey Poznyakoff1
Remove useless second argument. All callers changed.
2008-03-07Fix translatable strings.Sergey Poznyakoff1
2008-02-09* comsat/comsat.c (comsat_cfg_param): Reword a help messageSergey Poznyakoff1
for require-tty. * examples/header.c (cmd_readline): New function. New command 'readline'. * po/POTFILES.in: Remove stray reference to muerrno.c
2008-02-08(act_getline): Bugfix. Do not return eof on an empty line. Reported by Damon ↵Sergey Poznyakoff1
Harper.
2008-01-14* include/mailutils/gocs.h (log_facility): Remove.Sergey Poznyakoff1
* include/mailutils/syslog.h (mu_log_facility, mu_log_tag): New declarations. (MU_LOG_TAG): New define. * mailbox/gocs.c (mu_gocs_logging_init): Set mu_log_tag. * mailbox/syslog.c (mu_log_facility, mu_log_tag): New variables. * libcfg/common.c (mu_logging_param): New statement `tag'. * comsat/comsat.c, imap4d/imap4d.c, imap4d/login.c, maidag/maidag.c, mail.local/main.c, pop3d/pop3d.c, pop3d/user.c, sieve/sieve.c: Use MU_LOG_TAG in openlog, and program_version in mu_m_server_create calls.
2008-01-13Fix NLS issues.Sergey Poznyakoff1
* configure.ac: Define DEFAULT_TEXT_DOMAIN * comsat/comsat.c, dotlock/dotlock.c, frm/frm.c, frm/from.c, guimb/main.c, imap4d/imap4d.c, maidag/maidag.c, mail/mail.c, mail.local/main.c, mail.remote/mail.remote.c, messages/messages.c, mh/ali.c, mh/anno.c, mh/burst.c, mh/comp.c, mh/fmtcheck.c, mh/folder.c, mh/forw.c, mh/inc.c, mh/install-mh.c, mh/mark.c, mh/mhl.c, mh/mhn.c, mh/mhparam.c, mh/mhpath.c, mh/pick.c, mh/refile.c, mh/repl.c, mh/rmf.c, mh/rmm.c, mh/scan.c, mh/send.c, mh/sortm.c, mh/whatnow.c, mh/whom.c, mimeview/mimeview.c, movemail/movemail.c, pop3d/pop3d.c, pop3d/popauth.c, readmsg/readmsg.c, sieve/sieve.c, Use MU_APP_INIT_NLS instead of mu_init_nls. * mailbox/nls.c (mu_init_nls): Do not call textdomain.
2008-01-05* NEWS: Update.Sergey Poznyakoff2
* mailbox/Makefile.am: Replace tcpsrv.c with ipsrv.c. * mailbox/tcpsrv.c: Replace with ... * mailbox/ipsrv.c: ... this file, which supports both TCP and UDP. * mailbox/msrv.c: Use mu_ip_server_t. * mailbox/server.c (mu_server_destroy): Bugfix. * comsat/comsat.c, comsat/comsat.h: Use m-server. * maidag/lmtp.c, maidag/maidag.h, pop3d/pop3d.c: Update to match changed m-server types. * include/mailutils/server.h (mu_tcp_*): Replace with mu_ip_*. Add new prototypes. * include/mailutils/types.hin: Likewise. * lib/tcpwrap.c, lib/tcpwrap.h (mu_tcp_wrapper_prefork): Update signature to match mu_m_server_prefork_fp. * examples/echosrv.c: Use mu_ip_server_t * imap4d/idle.c, imap4d/imap4d.c, imap4d/imap4d.h, imap4d/preauth.c, imap4d/util.c: Remove mu_gocs_daemon. * include/mailutils/gocs.h, include/mailutils/libargp.h, include/mailutils/libargp.h, libargp/cmdline.c, libargp/common.c, libcfg/common.c, libcfg/init.c, mailbox/daemon.c, mailbox/gocs.c: Remove mu_gocs_daemon. * mailbox/amd.c (amd_open): Provide a null-locker. * include/mailutils/locker.h, mailbox/locker.c (mu_locker_mod_flags): New function. * examples/config/mailutils.schema: LDAP schema for Mailutils. * examples/config/Makefile.am: Add mailutils.schema * dotlock/dotlock.c (main): Remove superfluous invocation of mu_locker_set_flags. * libproto/mbox/mbox.c (mbox_quick_get_message): Return MU_ERR_NOENT if mailbox is empty. * mailbox/tcpsrv.c (family_to_proto): Rename to mu_address_family_to_domain. * po/POTFILES.in: Update. * pop3d/lock.c (pop3d_lock): use mu_locker_mod_flags, instead of mu_locker_set_flags.
2007-12-30* comsat/comsat.c: New config statement require-tty.Sergey Poznyakoff1
(main): Use /dev/null as the tty if require-tty is false.
2007-12-30* comsat/Makefile.am: Remove cfg.cSergey Poznyakoff4
* comsat/cfg.c: Remove. * comsat/comsat.c: Use MU configuration and acls. * comsat/comsat.h: Include acl.h * libproto/maildir/mbox.c (maildir_qfetch): Bugfix.
2007-12-30* comsat/Makefile.am: Remove cfg.cSergey Poznyakoff4
* comsat/cfg.c: Remove. * comsat/comsat.c: Use MU configuration and acls. * comsat/comsat.h: Include acl.h * libproto/maildir/mbox.c (maildir_qfetch): Bugfix.
2007-12-11* comsat/comsat.c, imap4d/imap4d.c, maidag/maidag.c,Sergey Poznyakoff1
pop3d/pop3d.c: Call mu_tcpwrapper_cfg_init. * include/mailutils/cfg.h (mu_cfg_section_add_container) (mu_cfg_section_add_params, mu_create_canned_section) (mu_create_canned_param, mu_get_canned_container): New functions. * lib/tcpwrap.c (mu_tcpwrapper_cfg_init): New function. * lib/tcpwrap.h (TCP_WRAPPERS_CONFIG): Change definition. * mailbox/cfg_driver.c (mu_create_canned_section) (mu_create_canned_param): Change prototypes. (add_parameters): Rename to mu_cfg_section_add_params, make extern. All callers changed.
2007-11-29* comsat/action.c, comsat/comsat.c, imap4d/auth_gsasl.c,Sergey Poznyakoff2
imap4d/auth_gss.c, imap4d/authenticate.c, imap4d/bye.c, imap4d/close.c, imap4d/imap4d.c, imap4d/login.c, imap4d/search.c, imap4d/signal.c, imap4d/starttls.c, imap4d/util.c, maidag/lmtp.c, maidag/maidag.c, maidag/script.c, mail.local/main.c, mail.local/script.c, pop3d/apop.c, pop3d/bulletin.c, pop3d/extra.c, pop3d/lock.c, pop3d/logindelay.c, pop3d/pop3d.c, pop3d/quit.c, pop3d/signal.c, pop3d/user.c, libsieve/util.c: Use mu_diag_output instead of syslog. * sieve/sieve.c: New option --no-program-name, for testsuite. * sieve/testsuite/lib/sieve.exp: Call sieve with the --no-program-name option. * mailbox/cfg_lexer.c, mailbox/cfg_parser.y: Improve debugging. * mailbox/diag.c: New file. * mailbox/gdebug.c (mu_debug_level_from_string): New function. * mailbox/muerror.c (mu_verror, mu_error): Rewrite using mu_diag functions. * mailbox/syslog.c (mu_diag_level_to_syslog): New function. (mu_diag_syslog_printer): New function. * mh/mh_argp.c (mh_argp_parse): Set prigram name using mu_set_program_name. * mh/mh_init.c (mu_error_printer): No longer needed. * movemail/movemail.c (movemail_error_printer): No longer needed. * include/mailutils/Makefile.am (pkginclude_HEADERS): Add diag.h * include/mailutils/diag.h: New file. * include/mailutils/cfg.h (mu_cfg_lexer_t): Take mu_debug_t as its second argument. * include/mailutils/error.h: Include diag.h (mu_program_name,mu_set_program_name): Remove. Already declared in diag.h. (mu_error_set_print): Deprecated. * mailbox/Makefile.am (libmailutils_la_SOURCES): Add diag.c
2007-11-28Introduce "global debug settings". Mailutils objects are supposedSergey Poznyakoff1
to set their default mu_debug_t objects basing on these settings. * include/mailutils/Makefile.am: Add debug.hin. Build debug.h from it. * include/mailutils/debug.hm4: New file. * include/mailutils/debug.h: Remove generated file. * scripts/Makefile.am (EXTRA_DIST): Add debugdef.m4 * scripts/debugdef.m4: New file. * include/mailutils/gocs.h (struct mu_gocs_debug): New data type. (mu_gocs_register_std): Argument is const. (mu_gocs_debug_init): New function. * include/mailutils/libargp.h (mu_debug_cmdline): New extern. * include/mailutils/libcfg.h (mu_debug_cfg_capa): New extern. * libargp/cmdline.c: Add mu_debug_cmdline * libargp/common.c: Add debug settings. * libargp/mu_argp.c (struct cap_buf.capa): Remove const qualifier. * libcfg/common.c (mu_locking_param): Remove superfluous `lock-' prefix from the statement names. (mu_debug_param): New parameter group. * libcfg/init.c: Add mu_debug_param. * mailbox/gocs.c (mu_gocs_debug_init): New function. * mailbox/Makefile.am (libmailutils_la_SOURCES): Add gdebug.c * mailbox/gdebug.c: New file * mailbox/debug.c (mu_debug_printf, mu_debug_vprintf) (mu_debug_check_level): New functions. (mu_debug_printv, mu_debug_print): Rewrite using new basic calls. * comsat/comsat.c, dotlock/dotlock.c, examples/muauth.c, mail.remote/mail.remote.c: Add debug capability. * frm/frm.c, frm/from.c, guimb/main.c, imap4d/imap4d.c, mail/mail.c, mail.local/main.c, messages/messages.c