summaryrefslogtreecommitdiff
path: root/comsat/comsat.c
AgeCommit message (Collapse)AuthorFiles
2024-01-06Update copyright yearsSergey Poznyakoff1
2023-04-30Switch to newer autotoolsSergey Poznyakoff1
* configure.ac: Require autoconf 2.71, automake 1.16.2 Don't use obsolete macros. Drop support for Berkeley DB 2. * gint: Upgrade. * gnulib: Upgrade. * am/db2.m4: Remove. Support for bdb2 withdrawn. * libmu_dbm/berkeley.c: Drop support for bdb2. * am/config_paths.m4: Don't use obsolete autoconf macros. * am/debug.m4: Likewise. * am/enable.m4: Likewise. * am/gsasl.m4: Likewise. * am/gssapi.m4: Likewise. * am/ipv6.m4: Likewise. * am/tls.m4: Likewise. * mail/mail.h (mailvar_value): Rename bool to boolean to avoid eventual conflicts. All uses changed. * comsat/comsat.c: Remove the uses of RETSIGTYPE. * examples/echosrv.c: Likewise. * imap4d/bye.c: Likewise. * imap4d/imap4d.c: Likewise. * imap4d/imap4d.h: Likewise. * imap4d/signal.c: Likewise. * lib/muaux.h: Likewise. * lib/signal.c: Likewise. * libmailutils/mailer/progmailer.c: Likewise. * libmailutils/server/msrv.c: Likewise. * libmu_sieve/extensions/spamd.c: Likewise. * mh/mhn.c: Likewise. * mh/prompter-tty.c: Likewise. * mh/sortm.c: Likewise. * pop3d/pop3d.h: Likewise. * pop3d/signal.c: Likewise.
2023-01-22Update copyright yearsSergey Poznyakoff1
2022-01-02Update copyright yearSergey Poznyakoff1
2021-01-05Update copyright yearsSergey Poznyakoff1
2020-02-08Update copyright yearsSergey Poznyakoff1
2019-09-03comsatd: optional argument to the --test option supplies the name of the tty ↵Sergey Poznyakoff1
to use * NEWS: Document changes. * comsat/action.c (open_default_tty): Remove. (open_tty): Examine the tty device (or file) and construct a suitable filter chain. Use append mode when opening it. * comsat/comsat.c: The --test option takes optional argument. * comsat/tests/testsuite.at: Use local file instead of the tty. * doc/texinfo/programs/comsatd.texi: Document changes.
2019-01-03Update copyright yearsSergey Poznyakoff1
2018-01-19Version 3.4.90; update copyright yearsSergey Poznyakoff1
2017-11-01Improve socket and SMTP client APISergey Poznyakoff1
Split formatting functions into two distinct families. Functions prefixed with mu_sys_sockadrr deal with struct sockaddr, wherease those starting with mu_sockaddr deal with struct mu_sockaddr. Introduce special format for SMTP EHLO. When sending EHLO to the remote party, use IP address in square brackets if hostname is empty. * libmailutils/sockaddr/Makefile.am (libsockaddr_la_SOURCES): Add fromsock.c * libmailutils/sockaddr/fromsock.c: New function. * libmailutils/sockaddr/str.c (mu_sockaddr_format): Rewrite. (mu_sys_sockaddr_format,mu_sys_sockaddr_to_astr): New functions. * include/mailutils/debug.h (mu_sockaddr_to_astr): Remove prototype. * include/mailutils/sockaddr.h (mu_sockaddr_format): New enum. (mu_sockaddr_format): change signature. (mu_sys_sockaddr_format,mu_sys_sockaddr_to_astr): New prototypes. (mu_sockaddr_from_socket): New prototype. * include/mailutils/stream.h (MU_IOCTL_TCPSTREAM): New ioctl family; (MU_IOCTL_TCP_GETSOCKNAME): New ioctl opcode. * comsat/comsat.c: Use mu_sys_sockaddr_ interface to handle struct sockaddr. * lib/tcpwrap.c: Likewise. * libmailutils/server/ipsrv.c: Likewise. * libmailutils/server/msrv.c: Likewise. * libmailutils/stream/tcp.c (_tcp_ioctl): Handle MU_IOCTL_TCPSTREAM. * libproto/mailer/smtp_ehlo.c (mu_smtp_ehlo): If hostname is empty, use IP address in square brackets.
2017-01-01Happy GNU YearSergey Poznyakoff1
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-10-22Provide extended interface to mu_cli.Sergey Poznyakoff1
* include/mailutils/cfg.h (MU_CFG_APPEND_TREE): New flag. * include/mailutils/cli.h (mu_version_copyright): New extern. (mu_cli_ext): New proto. * libmailutils/cfg/parser.y (mu_cfg_parse_config): Check for MU_CFG_APPEND_TREE bit set before accessing hints->append_tree. * libmailutils/cli/cli.c (param_set): Likewise. (mu_cli_ext): New function. (mu_cli): Rewrite as an entry point to mu_cli_ext. * comsat/comsat.c: Remove inclusion of obsolete headers. * mu/help.c: Likewise. * pop3d/extra.c: Likewise.
2016-10-16Convert comsat to mu_cliSergey Poznyakoff1
2016-10-08Use mu_c_type_t throughout the code. Get rid of mu_cfg_param_data_type.Sergey Poznyakoff1
* include/mailutils/cfg.h (mu_cfg_param_data_type): Remove. (mu_cfg_param_type): New enum. (mu_cfg_param) <type>: Change type to int. (mu_cfg_cidr): Remove. (mu_cfg_parse_boolean): Remove. All uses updated. * include/mailutils/util.h (mu_c_void): New constant. (mu_c_type_str): New extern/ * libmailutils/string/str_to_c.c (mu_c_type_str): New global. * libmailutils/cfg/format.c (mu_cfg_data_type_string): Rename to mu_c_type_string; change argument type. All uses updated. * libmailutils/cfg/parser.y: Use mu_str_to_c for value conversion. * libmailutils/tests/.gitignore: Update. * libmailutils/tests/Makefile.am: Add strtoc.at; build strtoc * libmailutils/tests/strtoc.at: New file. * libmailutils/tests/strtoc.c: New file. * libmailutils/tests/testsuite.at: Include strtoc.at * comsat/comsat.c: Use mu_c_type_t types. * dotlock/dotlock.c: Likewise. * imap4d/imap4d.c: Likewise. * lib/manlock.c: Likewise. * lib/tcpwrap.c: Likewise. * libmailutils/server/msrv.c: Likewise. * libmu_argp/muinit.c: Likewise. * libmu_cfg/common.c: Likewise. * libmu_cfg/gsasl.c: Likewise. * libmu_cfg/ldap.c: Likewise. * libmu_cfg/pam.c: Likewise. * libmu_cfg/radius.c: Likewise. * libmu_cfg/sieve.c: Likewise. * libmu_cfg/sql.c: Likewise. * libmu_cfg/tls.c: Likewise. * libmu_cfg/virtdomain.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.
2016-08-22Allow to configure the length of the backlog queue for TCP serversSergey Poznyakoff1
New statement backlog is provided in the server block. * include/mailutils/server.h (mu_m_server_cfg_init): Pass mu_m_server_t as first argument. * libmailutils/server/msrv.c (mu_m_server_cfg_init): Pass mu_m_server_t as first argument. Customize available statements depending on the type of server (tcp vs udp). New statement "backlog" available for tcp servers. * comsat/comsat.c: Update call to mu_m_server_cfg_init * imap4d/imap4d.c: Likewise. * pop3d/pop3d.c: Likewise. * maidag/maidag.c: Likewise.
2016-01-22Update copyright yearsSergey Poznyakoff1
2015-07-02Version 2.99.99Sergey Poznyakoff1
* configure.ac: Version 2.99.99 * NEWS: Update. * libmu_argp/mailutils.c: New file. * libmu_argp/Makefile.am: Add mailutils.c * libmu_argp/cmdline.c (all_cmdline_capa): Add mu_mailutils_cmdline. (mu_libargp_init): Register modflags function. * libmu_argp/mu_argp.c (mu_build_argp): Retain negative group numbers. (argp_capa): New member: modflags. (mu_register_argp_capa): Take pointer to modflags function as 3rd parameter. (mu_build_argp): Use modflags member to alter argp flags. (mu_argp_build): Take pointer to flags as its third argument. * libmu_argp/muinit.c (mu_app_init): Pass pointer to flags to mu_argp_build. * libmu_cfg/init.c (mu_libcfg_init): Silently ignore unknown groups * include/mailutils/libargp.h (mu_mailutils_cmdline): New extern. (mu_cmdline_capa): New member: modflags. (mu_argp_build): Change signature. (mu_register_argp_capa): Change signature. * libmailutils/cfg/gocs.c (std_gocs_table): Add dummy entry for "mailutils" * mu/Makefile.am (bin_PROGRAMS): Rename to "mailutils". * mu/dispatch.c (dispatch_docstring): Use mu_program_name instead of the hardcoded name. * mu/mu.c: Use "mailutils" capability. * mu/mailutils-config.in: Rename to mu/mailutils-config * comsat/comsat.c: Use "mailutils" capability. * dotlock/dotlock.c: Likewise. * examples/muauth.c: Likewise. * examples/muemail.c: Likewise. * frm/frm.c: Likewise. * frm/from.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.
2015-03-02Update copyright yearsSergey Poznyakoff1
2014-02-05Update copyright years.Sergey Poznyakoff1
2012-03-11Fix the use of struct utmp/utmpx in comsatd.Sergey Poznyakoff1
* am/utmp.m4: Check if struct utmp has ut_user or ut_name members. * comsat/comsat.c [HAVE_UTMPX_H]: Define UTMP as a typedef of struct utmpx. Define ut_user, if necessary. (find_user): Use ut_user instead of (backward-compatible) ut_name.
2012-01-05Happy GNU YearSergey Poznyakoff1
2011-11-04Implement pop3s and imap4s in respective servers.Sergey Poznyakoff1
* comsat/comsat.c (comsat_prefork,comsat_connection): Change signatures. * imap4d/imap4d.c: Implement imaps. * imap4d/imap4d.h (io_setio): Change signature. (tls_encryption_on): New proto. * imap4d/io.c (io_setio): Change signature. Initialize TLS stream if requested. * imap4d/starttls.c (tls_encryption_on): New function. * include/mailutils/server.h (mu_srv_config): New struct. (mu_m_server_conn_fp, mu_m_server_prefork_fp): Remove typedefs. (mu_m_server_handler_fp): New typedef. (mu_m_server_set_conn): Change signature. (mu_m_server_set_prefork): Change signature. (mu_m_server_set_app_data_size) (mu_m_server_set_config_size): New prototype. (mu_m_server_cfg_init): Change signature. * include/mailutils/tls.h (mu_init_tls_libs): Change signature. * lib/tcpwrap.c: Include tcpwrap.h (mu_tcp_wrapper_daemon): Fix declaration. (mu_tcp_wrapper_prefork): Change signature. * lib/tcpwrap.h (mu_tcp_wrapper_prefork): Change signature * libmailutils/server/msrv.c (_mu_m_server) <conn,prefork>: Change data type. All uses updated. <app_data_size>: New member. (m_srv_config): Remove struct. Replaced with mu_srv_config from tls.h (mu_m_server_set_conn): Change signature. (mu_m_server_set_prefork): Change signature. (mu_m_server_set_app_data_size) (mu_m_server_set_config_size): New functions. (add_server): Allocate app_data_size additional bytes of data. (mu_m_server_cfg_init): Take one argument. * libmu_auth/tls.c (mu_tls_module_init): Update call to mu_init_tls_libs. Don't call mu_file_safety_check with NULL argument. (mu_init_tls_libs): Rewrite. Prepare x509 here, instead of doing it each time a TLS stream is created. (mu_deinit_tls_libs): Free x509, if exists. (_tls_server_open): Update call to mu_init_tls_libs. Remove x509 initialization. * libmu_cfg/tls.c (cb2_safety_checks): Fix typos. * maidag/lmtp.c (lmtp_connection): Change signature. * maidag/maidag.c (main): Update call to mu_m_server_cfg_init. * maidag/maidag.h (lmtp_connection): Change signature. * pop3d/extra.c (pop3d_setio): Initialize TLS stream, if requested. * pop3d/pop3d.c: Implement pops. * pop3d/pop3d.h (pop3d_setio): Change prototype.
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-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.
2011-01-02Update copyright years.Sergey Poznyakoff1
Happy GNU year!
2010-12-08Minor improvementSergey Poznyakoff1
* examples/config/dot.biffrc: Update. * comsat/comsat.c (main): In test mode, normalize biffrc names that begin with ./ or ../
2010-12-08comsat: provide a fine-grained control over where biffrc errors are outputSergey Poznyakoff1
* comsat/comsat.c (biffrc_errors): New variable. (comsat_cfg_param): New statements: biffrc-errors-to-tty and biffrc-errors-to-err (main): In test mode, set biffrc_errors to BIFFRC_ERRORS_TO_ERR. * comsat/comsat.h (BIFFRC_ERRORS_TO_TTY) (BIFFRC_ERRORS_TO_ERR): New flags. (biffrc_errors): New variable. * comsat/action.c (report_error): Consult biffrc_errors.
2010-12-08comsat: improve tty handling, add testsuite.Sergey Poznyakoff1
* comsat/action.c (need_crlf, _open_tty, open_tty): Moved from comsat.c (open_default_tty): New function. (run_user_action): Take device name as first argument. Reuse wordsplit memory. * comsat/comsat.c (notify_user): Update invocation of run_user_action. * comsat/comsat.h (open_tty): Remove prototype. (run_user_action): Change signature. * configure.ac: Add comsat tests. * comsat/Makefile.am (SUBDIRS): Add tests. * comsat/tests/.gitignore: New file. * comsat/tests/Makefile.am: New file. * comsat/tests/atlocal.in: New file. * comsat/tests/testsuite.at: New file.
2010-12-07comsat: add a way to specify alternative biffrc file name; new biffrc ↵Sergey Poznyakoff1
statement: tty * comsat/comsat.c (options): New option --file. (biffrc): New variable. (comsatd_parse_opt): Handle the --file option. (open_tty): New function. (notify_user): Open the tty using open_tty function and a default set of filters. (main): Hanlde --file option. * comsat/action.c (run_user_action): Implement the `tty' statement. * comsat/comsat.h (biffrc): New extern. (open_tty): New function. mu: accept a chain of filters. * mu/filter.c (filter_doc, filter_docstring): Update. (mutool_filter): Accept a filter chain.
2010-12-07comsat: Use mu streams instead of stdioSergey Poznyakoff1
* 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-06Rewrite debugging and logging support.Sergey Poznyakoff1
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-09Fix copyleft notices to follow the GNU standards.Sergey Poznyakoff1
2010-10-05Remove the use of MAXHOSTNAMELEN macro.Sergey Poznyakoff1
* 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 Poznyakoff1
* 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-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 Poznyakoff1
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 Poznyakoff1
* 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 Poznyakoff1
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.
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-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.

Return to:

Send suggestions and report system problems to the System administrator.