- 22 Oct, 2016 1 commit
-
-
* 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.
Sergey Poznyakoff authored
-
- 22 Jan, 2016 1 commit
-
-
- 11 Jul, 2015 1 commit
-
-
* include/mailutils/stream.h (MU_IOCTL_TLSSTREAM): New ioctl code. (MU_IOCTL_TLS_GET_CIPHER_INFO): New ioctl opcode. * libmailutils/property/assocprop.c (_assoc_prop_fill) (_assoc_prop_save): allow for NULL stream pointer. * libmu_auth/tls.c (_tls_io_ioctl,_tls_ioctl): Handle MU_IOCTL_TLSSTREAM/MU_IOCTL_TLS_GET_CIPHER_INFO ioctl. * imap4d/io.c (log_cipher): New function. (io_setio, imap4d_init_tls_server): Call log_cipher after successfully establishing the TLS connection. * imap4d/starttls.c (tls_encryption_on): Remove diagnostic output. * pop3d/extra.c (log_cipher): New function. (pop3d_setio,pop3d_init_tls_server): Call log_cipher after successfully establishing the TLS connection.
Sergey Poznyakoff authored
-
- 10 Jul, 2015 1 commit
-
-
Avoid calling gnutls_global_init (via mu_tls_module_init) prior to forking. gnutls_global_init opens at least one file descriptor (/dev/urandom), and closing it will disrupt its operation. Current stable libgnutls (3.3.15) is able to cope with it, but there are plenty of systems running much older versions. * libmailutils/server/msrv.c (mu_m_server_begin): Reset onexit list after forking. * libmu_auth/tls.c (mu_tls_module_init): Don't call mu_init_tls_libs. (_tls_server_open, _tls_client_open): Check return value from mu_init_tls_libs. * imap4d/auth_gsasl.c (auth_gsasl): Use mu_onexit to register onexit functions. * imap4d/imap4d.h (util_atexit): Remove prototype. * imap4d/starttls.c (imap4d_starttls): Don't register mu_deinit_tls_libs: now done by tls library. (starttls_init): Don't call mu_init_tls_libs. * imap4d/util.c (util_atexit): Remove. (util_bye): Update accordingly. * pop3d/extra.c (pop3d_setio): Print informational message after establishing TLS. (pop3d_bye): Don't call mu_deinit_tls_libs: that's done by the library. * pop3d/pop3d.c (main): Don't call mu_init_tls_libs.
Sergey Poznyakoff authored
-
- 02 Mar, 2015 1 commit
-
-
- 05 Feb, 2014 1 commit
-
-
- 17 Mar, 2012 1 commit
-
-
* imap4d/imap4d.c (set_strerr_flt,clr_strerr_flt): New functions. (imap4d_connection): Setup session prefix in strerr if mu_log_session_id is set. * imap4d/io.c (io_setio): Bugfix: unref debug stream. * pop3d/extra.c (pop3d_setio): Likewise. * pop3d/pop3d.c (set_strerr_flt,clr_strerr_flt): New functions. (pop3d_connection): Setup session prefix in strerr if mu_log_session_id is set. * include/mailutils/acl.h (mu_acl_setenv) (mu_acl_getenv,mu_acl_set_session_id): New functions. * include/mailutils/server.h (mu_session_id): New extern. (mu_m_server_configured_count): Fix signature. * include/mailutils/syslog.h (mu_log_session_id): New extern. * libmailutils/diag/syslog.c (mu_log_session_id): New global. * libmailutils/server/acl.c (_mu_acl) <envv,envc,envn>: New members. (run_closure) <env>: New member. (mu_acl_destroy): Free environment. (_acl_match): Handle "family" variable. (expand_arg): Propagate ACL environment to wordsplit. (mu_acl_check_sockaddr): Propagate ACL environment. (mu_acl_setenv) (mu_acl_getenv,mu_acl_set_session_id): New functions. * libmailutils/server/ipsrv.c (mu_ip_tcp_accept): Store session ID in the ACL. (mu_ip_udp_accept): Likewise. * libmailutils/server/msrv.c (mu_m_server_configured_count): Fix signature. (mu_m_server_check_acl): Store session ID in the ACL. * libmailutils/server/server.c (mu_session_id): New global variable. (connection_loop): Increment session ID (mu_acl_set_session_id): New function. * libmailutils/stream/fltstream.c (filter_ctl): Handle MU_IOCTL_SUBSTREAM. * libmailutils/stream/logstream.c (_log_ctl): Likewise. * libmu_cfg/common.c (mu_logging_param) <session-id>: New statement.
Sergey Poznyakoff authored
-
- 05 Jan, 2012 1 commit
-
-
- 04 Nov, 2011 1 commit
-
-
* 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.
Sergey Poznyakoff authored
-
- 14 Jul, 2011 1 commit
-
-
* lib/manlock.c: New file. * lib/Makefile.am (libmuaux_a_SOURCES): Add manlock.c. * lib/muaux.h (manlock_mandatory_locking) (manlock_lock_dir): New externs. (manlock_open_mailbox, manlock_lock) (manlock_touchlock, manlock_unlock): New protos. * libmailutils/base/amd.c (amd_cleanup): Remove unbalanced call to mu_locker_unlock. * libmailutils/base/locker.c (mu_locker_create): Bugfixes. * imap4d/imap4d.c (imap4d_cfg_param): Add mandatory-locking construct. (main): Call manlock_cfg_init. * imap4d/select.c (imap4d_select0): Use mandatory locking if the mailbox is to be opened r/w. * imap4d/rename.c (imap4d_rename): Note FIXME! * imap4d/bye.c: Call manlock_unlock after closing the mailbox. * imap4d/close.c: Likewise. * imap4d/sync.c (imap4d_sync): Call manlock_touchlock. * pop3d/lock.c: Remove. * pop3d/Makefile.am (pop3d_SOURCES): Remove lock.c * pop3d/extra.c (pop3d_abquit): Unlock mailbox. * pop3d/pop3d.c (pop3d_cfg_param): Add mandatory-locking construct. (main): Call manlock_cfg_init. (pop3d_mainloop): Call manlock_touchlock. * pop3d/pop3d.h (pop3d_lock) (pop3d_touchlock, pop3d_unlock): Remove. * pop3d/quit.c (pop3d_quit): Unlock the mailbox. * pop3d/user.c (pop3d_begin_session): Use manlock_open_mailbox.
Sergey Poznyakoff authored
-
- 02 Jan, 2011 1 commit
- 10 Dec, 2010 2 commits
-
-
This is the default behavior now. The reverse can be requested by a special MU_IOCTL_FD,MU_IOCTL_FD_SET_BORROW ioctl. * include/mailutils/stream.h (MU_STREAM_FD_AUTOCLOSE): Remove. This is the default behavior now. (MU_IOCTL_FD): New ioctl. (MU_IOCTL_FD_GET_BORROW, MU_IOCTL_FD_SET_BORROW): New opcodes. * include/mailutils/sys/file_stream.h (_MU_FILE_STREAM_FD_BORROWED): New flag. * libmailutils/stream/file_stream.c (fd_close): Close the fd unless _MU_FILE_STREAM_FD_BORROWED bit is set. (fd_open): Clear the _MU_FILE_STREAM_FD_BORROWED bit. (fd_ioctl): Handle MU_IOCTL_FD. (mu_file_stream_create): Remove MU_STREAM_FD_AUTOCLOSE. * ibmailutils/base/version.c (mu_print_options): Set borrow mode on the temporary stdout stream. * libmailutils/cfg/driver.c (mu_cfg_tree_reduce): Set borrow mode on the temporary stderr stream. * libmailutils/stdstream/strerr.c (mu_stdstream_strerr_create): Set borrow mode on the stderr stream. * libmailutils/tests/tempfile.c: set borrow mode on the temporary stream, because it may be reopened later (verify mode). * examples/mta.c: Remove MU_STREAM_FD_AUTOCLOSE. * imap4d/io.c: Likewise. * libmailutils/stream/prog_stream.c: Likewise. * libmailutils/stream/socket_stream.c: Likewise. * libmailutils/stream/temp_file_stream.c: Likewise. * maidag/lmtp.c: Likewise. * pop3d/extra.c: Likewise. These will disappear when the corresponding utilities are rewritten to use MU stdstream: * mail/escape.c (quote0): set borrow mode on the output stream. * mimeview/mimeview.c (display_file): set borrow mode on the input stream. Likewise, these will disappear when MH uses MU stdstream: * mh/anno.c (main): Set borrow mode on the input stream. * mh/mh_init.c (mh_real_install): Likewise. * mh/mh_whatnow.c (_whatnow): Likewise. * mh/mhl.c (open_output): Set borrow mode on the output stream. * mh/mhn.c (mhn_show,store_handler): Likewise.
Sergey Poznyakoff authored -
* examples/mta.c: Use MU_STREAM_FD_AUTOCLOSE. * imap4d/io.c: Likewise. * libmailutils/stream/file_stream.c: Likewise. * libmailutils/stream/prog_stream.c: Likewise. * libmailutils/stream/socket_stream.c: Likewise. * libmailutils/stream/temp_file_stream.c: Likewise. * maidag/lmtp.c: Likewise. * pop3d/extra.c: Likewise. * imap4d/preauth.c: Do not use MU_STREAM_AUTOCLOSE. Instead unref the transport stream after creating the derived one. * libmailutils/base/rfc2047.c: Likewise. * libmailutils/stream/fltstream.c: Likewise. * libmailutils/tests/fltst.c: Likewise. * libmu_auth/ldap.c: Likewise. * libmu_auth/tls.c: Likewise. * libmu_sieve/extensions/vacation.c: Likewise. * libproto/pop/pop3_stream.c: Likewise. * mail/decode.c: Likewise. * mh/mhn.c: Likewise. * libmailutils/filter/filter_iconv.c: Do not handle MU_STREAM_AUTOCLOSE. * libmailutils/stream/rdcache_stream.c: Likewise. * libmailutils/stream/streamref.c: Likewise. * libmailutils/stream/xscript-stream.c: Likewise. * include/mailutils/stream.h (MU_STREAM_AUTOCLOSE): Rename to MU_STREAM_FD_AUTOCLOSE.
Sergey Poznyakoff authored
-
- 06 Dec, 2010 1 commit
-
-
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.
Sergey Poznyakoff authored
-
- 05 Dec, 2010 1 commit
-
-
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.
Sergey Poznyakoff authored
-
- 09 Oct, 2010 1 commit
-
-
- 03 Oct, 2010 1 commit
-
-
One of stream flags bits indicates whether the stream is open or not. The mu_stream_open function refuses to act if it already is. The rest of functions (including mu_stream_close) refuses to act if the stream was not open. A special function (mu_stream_is_open) is provided to check if the stream is in open state. Any stream creation function returns an already open stream. The function mu_stream_open should be called only if the stream was previously closed by a call to mu_stream_close. * include/mailutils/stream.h (mu_stream_is_open): New proto. * include/mailutils/sys/stream.h (_MU_STR_OPEN): New flag. * libmailutils/stream.c (_mu_stream_create): Permit setting the _MU_STR_OPEN flag. (_stream_init): New static. (mu_stream_open): Return MU_ERR_OPEN if the stream is already open. (mu_stream_is_open): New function. (mu_stream_seek, mu_stream_read, mu_stream_readdelim) (mu_stream_getdelim, mu_stream_write, mu_stream_flush) (mu_stream_close, mu_stream_size, mu_stream_wait) (mu_stream_truncate): Check if the stream is open. Return MU_ERR_NOT_OPEN otherwise. * libmailutils/errors (MU_ERR_OPEN): Reword the diagnostics. * libmailutils/dbgstream.c (mu_dbgstream_create): Open the stream. * libmailutils/file_stream.c (mu_file_stream_create) (mu_fd_stream_create): Open the stream. * libmailutils/filter_iconv.c (mu_filter_iconv_create): Open the stream. * libmailutils/mapfile_stream.c (mu_mapfile_stream_create): Open the stream. * libmailutils/fltstream.c (mu_filter_stream_create): Mark the stream as open. * libmailutils/iostream.c (mu_iostream_create): Likewise. * libmailutils/memory_stream.c: Likewise. * libmailutils/message.c (_message_stream_create): Likewise. * libmailutils/message_stream.c (mu_message_stream_create): Likewise. * libmailutils/prog_stream.c (mu_prog_stream_create): Likewise. * libmailutils/socket_stream.c (mu_socket_stream_create): Likewise. * libmailutils/temp_file_stream.c (mu_temp_file_stream_create): Likewise. * libmailutils/amd.c (_amd_attach_message): Mark stream as open. * libmailutils/body.c (_body_get_stream): Likewise. * libmailutils/memory_stream.c: Likewise. * libmailutils/rdcache_stream.c (mu_rdcache_stream_create: Likewise. * libmailutils/stdio_stream.c (mu_stdio_stream_create): Likewise. * libmailutils/streamref.c (mu_streamref_create_abridged): Likewise. * libmailutils/tcp.c (mu_tcp_stream_create_with_source_ip): Likewise. * libmailutils/xscript-stream.c (mu_xscript_stream_create): Likewise. * libmu_auth/tls.c (_mu_tls_io_stream_create): Likewise. (_mu_tls_stream_create): Likewise. * libproto/pop/pop3_stream.c (mu_pop3_stream_create): Likewise. * examples/base64.c: Remove unnecessary mu_stream_open. * examples/http.c: Likewise. * examples/iconv.c: Likewise. * examples/msg-send.c: Likewise. * examples/murun.c: Likewise. * examples/musocio.c: Likewise. * examples/pop3client.c: Likewise. * imap4d/append.c: Likewise. * imap4d/io.c: Likewise. * imap4d/preauth.c: Likewise. * lib/mailcap.c: Likewise. * libmailutils/attachment.c: Likewise. * libmailutils/cfg_driver.c: Likewise. * libmailutils/header.c: Likewise. * libmailutils/mailcap.c: Likewise. * libmailutils/mimehdr.c: Likewise. * libmailutils/mutil.c: Likewise. * libmailutils/tests/fltst.c: Likewise. * libmailutils/tests/mailcap.c: Likewise. * libmailutils/vartab.c: Likewise. * libmailutils/wicket.c: Likewise. * libmu_argp/muinit.c: Likewise. * libmu_auth/ldap.c: Likewise. * libmu_sieve/extensions/pipe.c: Likewise. * libmu_sieve/extensions/spamd.c: Likewise. * libmu_sieve/extensions/vacation.c: Likewise. * libproto/imap/folder.c: Likewise. * libproto/mailer/smtp.c: Likewise. * libproto/mailer/smtp_starttls.c: Likewise. * libproto/mbox/mbox.c: Likewise. * libproto/nntp/nntp_connect.c: Likewise. * libproto/pop/mbox.c: Likewise. * libproto/pop/pop3_connect.c: Likewise. * libproto/pop/pop3_stls.c: Likewise. * maidag/mailtmp.c: Likewise. * mail/decode.c: Likewise. * mail/pipe.c: Likewise. * mail/send.c: Likewise. * mail/send.c: Likewise. * mail/write.c: Likewise. * mh/burst.c: Likewise. * mh/comp.c: Likewise. * mh/compcommon.c: Likewise. * mh/forw.c: Likewise. * mh/mh_init.c: Likewise. * mh/mh_whatnow.c: Likewise. * mh/mhl.c: Likewise. * mh/mhn.c: Likewise. * mh/repl.c: Likewise. * mimeview/mimeview.c: Likewise. * pop3d/extra.c: Likewise. * sieve/sieve.c: Likewise. * testsuite/smtpsend.c: Likewise.
Sergey Poznyakoff authored
-
- 25 Sep, 2010 3 commits
-
-
* include/mailutils/stream.h (MU_IOCTL_SWAP_STREAM): Remove. (MU_IOCTL_GET_STREAM, MU_IOCTL_SET_STREAM): New ioctls. * include/mailutils/sys/stream.h (_MU_SWAP_FIRST_ONLY) (_MU_SWAP_IOCTL_MUST_SUCCEED): Remove. (_mu_stream_swap_streams): Remove. * libmailutils/stream.c (_mu_stream_swap_streams): Remove. * libmailutils/filter_iconv.c (_icvt_ioctl): Handle MU_IOCTL_GET_STREAM, MU_IOCTL_SET_STREAM instead of MU_IOCTL_SWAP_STREAM. * libmailutils/iostream.c (_iostream_ctl): Likewise. * libmailutils/xscript-stream.c (_xscript_ctl): Likewise. * imap4d/auth_gsasl.c (restore_and_return): Unref the contents of str. (auth_gsasl): Use MU_IOCTL_GET_STREAM/MU_IOCTL_SET_STREAM to change the underlying transport streams. * imap4d/io.c (imap4d_init_tls_server): Likewise. * libproto/mailer/smtp_gsasl.c (insert_gsasl_stream): Likewise. * pop3d/extra.c (pop3d_init_tls_server): Likewise. * libproto/mailer/smtp_starttls.c (smtp_get_streams) (smtp_set_streams): New functions. (smtp_swap_streams): Remove. (mu_smtp_starttls): Use smtp_get_streams and smtp_set_streams instead of smtp_swap_streams. * libproto/pop/pop3_stls.c (pop3_get_streams) (pop3_set_streams): New functions. (pop3_swap_streams): Remove. (mu_pop3_stls): Use pop3_get_streams and pop3_set_streams. * testsuite/smtpsend.c (main): Uncomment mu_stream_unref on the carrier.
Sergey Poznyakoff authored -
* imap4d/imap4d.c (imap4d_mainloop): Take two file descriptor as arguments. All uses updated. * imap4d/imap4d.h (io_setio): Change signature. * imap4d/io.c (io_setio): Take two file descriptor as arguments. All uses updated. * pop3d/extra.c (pop3d_setio): Take two file descriptor as arguments. All uses updated. * pop3d/pop3d.c (pop3d_mainloop): Likewise. * pop3d/pop3d.h (pop3d_setio): Change signature.
Sergey Poznyakoff authored -
* examples/musocio.c: Use default stream buffer size. * imap4d/io.c: Likewise. * libmailutils/dbgstream.c: Likewise. * libmailutils/iostream.c: Likewise. * libmailutils/xscript-stream.c: Likewise. * libmu_auth/gsasl.c: Likewise. * libmu_auth/tls.c: Likewise. * libproto/pop/mbox.c: Likewise. * libproto/pop/pop3_stream.c: Likewise. * pop3d/extra.c: Likewise. * libmailutils/file_stream.c (mu_file_stream_create) (mu_fd_stream_create): File streams are fully buffered by default. * libmailutils/stdio_stream.c (mu_stdio_stream_create): Stdio streams are line buffered by default.
Sergey Poznyakoff authored
-
- 08 Sep, 2010 9 commits
-
-
-
* include/mailutils/stream.h (MU_IOCTL_LEVEL): New ioctl op. (XSCRIPT_NORMAL, XSCRIPT_SECURE, XSCRIPT_PAYLOAD): New constants. * include/mailutils/sys/xscript-stream.h (_mu_xscript_stream) <level>: New member. * mailbox/xscript-stream.c (TRANS_DISABLED): New flag. (print_transcript): Amount of output varies depending on the current output level. For secure data, try to recognize passwords and to replace them with *** on output. (_xscript_ctl): Support MU_IOCTL_LEVEL. * pop3d/extra.c (set_xscript_level): New function. * pop3d/pop3d.h (set_xscript_level): New proto. * pop3d/retr.c (pop3d_retr): Set XSCRIPT_PAYLOAD level before sending actual data and reset it to XSCRIPT_NORMAL afterwards. * pop3d/top.c (pop3d_top): Likewise. * pop3d/user.c: Set XSCRIPT_SECURE level while expecting the PASS command. * imap4d/fetch.c (imap4d_fetch): Run imap4d_fetch0 in XSCRIPT_PAYLOAD level. * imap4d/uid.c (imap4d_uid): Likewise. * imap4d/imap4d.c (imap4d_mainloop): Unless started in preauth mode, select XSCRIPT_SECURE mode until authentication has been passed. * imap4d/imap4d.h (set_xscript_level): New proto. * imap4d/io.c (io_format_completion_response): Switch to XSCRIPT_NORMAL level when changing to the authenticated state. (imap4d_readline): Read literals in XSCRIPT_PAYLOAD level. * imap4d/util.c (set_xscript_level): New function. * include/mailutils/pop3.h (mu_pop3_trace_mask): New prototype. (MU_POP3_XSCRIPT_MASK): New macro. (_mu_pop3_xscript_level): New proto. * libproto/pop/pop3_pass.c (mu_pop3_pass): Set XSCRIPT_SECURE while sending the password. * libproto/pop/pop3_retr.c (mu_pop3_retr): Set XSCRIPT_PAYLOAD before going to MU_POP3_RETR_RX state. * libproto/pop/pop3_stream.c (_pop3_event_cb): Set XSCRIPT_NORMAL. * libproto/pop/pop3_top.c (mu_pop3_top): Set XSCRIPT_PAYLOAD before going to MU_POP3_TOP_RX state. * libproto/pop/pop3_trace.c (mu_pop3_trace_mask) (_mu_pop3_xscript_level): New functions. * libproto/pop/mbox.c (pop_open): Set trace masks depending on the trace6 and trace7 debug levels. * examples/pop3client.c (com_verbose): Allow to mask/unmask transcript levels.
Sergey Poznyakoff authored -
* pop3d/extra.c (pop3d_setio): Use the canonic name of the CRLF filter, instead of the legacy "rfc822". * imap4d/fetch.c: Likewise. * imap4d/util.c: Likewise.
Sergey Poznyakoff authored -
* include/mailutils/stream.h (MU_IOCTL_SWAP_STREAM): New ioctl op. (mu_stream_seterr): New function. * include/mailutils/sys/stream.h (_MU_SWAP_FIRST_ONLY) (_MU_SWAP_IOCTL_MUST_SUCCEED): New defines. (_mu_stream_swap_streams): New proto. * mailbox/amd.c (amd_body_stream_read): Always update *pnread. * mailbox/errors (MU_ERR_NO_TRANSPORT): New error code. * mailbox/stream.c (_stream_seterror): Rename to mu_stream_seterr, remove static qualifier. All uses updated. (_mu_stream_swap_streams): New function. * mailbox/filter_iconv.c (_icvt_ioctl): Implement MU_IOCTL_SWAP_STREAM. * mailbox/iostream.c (_iostream_ctl): Likewise. * mailbox/xscript-stream.c (_xscript_ctl): Likewise. * pop3d/extra.c (real_istream, real_ostream): Remove statics. (pop3d_init_tls_server): Use MU_IOCTL_SWAP_STREAM to replace bottom-level transport layers without recreating the entire stream chain.
Sergey Poznyakoff authored -
If a stream takes another stream(s) as a transport, it always increases its reference count. This means that when that stream is destroyed the underlying stream is not destroyed by default (its refcount is decreased, that's all). To force destruction of the underlying stream, the caller must explicitly unreference it after creating the stream that uses it (or give its creation function the MU_STREAM_AUTOCLOSE flag, if it supports flags). Similarly, if a stream uses a non-stream object (e.g. a file descriptor) as the transport, it will not destroy it, unless it has been created with the MU_STREAM_AUTOCLOSE flag. This differs from the previous behavior. The MU_STREAM_NO_CHECK and MU_STREAM_NO_CLOSE flags are removed. * examples/base64.c (main): Call mu_filter_create with the MU_STREAM_AUTOCLOSE flag. * examples/mimetest.c (message_display_parts): Likewise. * examples/murun.c (main): Unref the input stream after passing it to mu_filter_prog_stream_create. * imap4d/fetch.c (fetch_io): Update arguments to mu_filter_create and mu_memory_stream_create. * imap4d/preauth.c (decode64_buf) (do_preauth_ident): Update arguments to mu_memory_stream_create and mu_tcp_stream_create. * imap4d/util.c (util_setio): Update arguments to mu_filter_create and mu_stdio_stream_create. * include/mailutils/stream.h (MU_STREAM_NO_CLOSE) (MU_STREAM_NO_CHECK): Remove. (MU_STREAM_AUTOCLOSE): New flag. (mu_iostream_create): Remove the `flags' argument. * libmu_argp/muinit.c (mu_app_init): Update arguments to mu_stdio_stream_create. * libmu_auth/ldap.c: Update arguments to mu_memory_stream_create and mu_filter_create. * libmu_auth/tls.c (_tls_io_close, _tls_close): Always try to close the transport stream. Rely on refcount to protect it. (_tls_io_done, _tls_done): Likewise, always unreference it. (_mu_tls_io_stream_create): Increase reference counter on the transport stream, unless MU_STREAM_AUTOCLOSE is requested. (_mu_tls_stream_create): Rewrite using the new MU_STREAM_AUTOCLOSE logic. * libmu_sieve/extensions/spamd.c (spamd_connect_tcp): Update arguments to mu_tcp_stream_create. (spamd_connect_tcp): Update arguments to mu_socket_stream_create and mu_filter_create. * libmu_sieve/extensions/vacation.c (build_mime): Update arguments to mu_filter_create. * mail/decode.c (display_submessage): Update arguments to mu_filter_create. * mailbox/attachment.c (mu_message_save_attachment): Update arguments to mu_filter_create. * mailbox/cfg_driver.c (mu_cfg_tree_reduce): Update arguments to mu_stdio_stream_create. * mailbox/dbgstream.c (_dbg_done): Use MU_STREAM_AUTOCLOSE bit to decide whether to destroy the debug object. (mu_dbgstream_create): Use MU_STREAM_AUTOCLOSE instead of MU_STREAM_NO_CLOSE. * mailbox/file_stream.c (fd_close): Use MU_STREAM_AUTOCLOSE bit to decide whether to close the descriptor. (mu_file_stream_create): Force MU_STREAM_AUTOCLOSE bit. * mailbox/filter.c (filter_create_rd, filter_create_wr): Change substream creation logic. * mailbox/filter_iconv.c (_icvt_close): Always try to close the transport stream. Rely on refcount to protect it. (_icvt_done): Ditto for destroying it. (mu_filter_iconv_create): Increase refcount on the transport stream, unless MU_STREAM_AUTOCLOSE is requested. * mailbox/fltstream.c (filter_done): Always dereference the transport stream. Rely on refcount to protect it. (filter_close): Ditto for closing it. (mu_filter_stream_create): Increase refcount on the transport stream, unless MU_STREAM_AUTOCLOSE is requested. * mailbox/iostream.c (_iostream_close) : Always try to close the transport stream. Rely on refcount to protect it. (_iostream_done): Ditto for closing it. (mu_iostream_create): Remove the use of MU_STREAM_NO_CLOSE. * mailbox/mimehdr.c (mu_mimehdr_decode_param): Remove the use of MU_STREAM_NO_CLOSE. * mailbox/mutil.c (mu_decode_filter) Change substream creation logic. * mailbox/prog_stream.c (_prog_open): Use MU_STREAM_AUTOCLOSE bit in arguments to mu_stdio_stream_create. (mu_filter_prog_stream_create): Increase refcount on the transport (input) stream. * mailbox/rfc2047.c (mu_rfc2047_decode): Dereference in_stream after passing it to mu_decode_filter. Pass MU_STREAM_AUTOCLOSE in flags to mu_filter_create. * mailbox/socket_stream.c (mu_socket_stream_create): Force MU_STREAM_AUTOCLOSE bit. * mailbox/streamref.c (_streamref_close): Always close the transport stream (refcount will protect it, if necessary). (mu_streamref_create_abridged): Mask out the MU_STREAM_AUTOCLOSE bit. * mailbox/temp_file_stream.c (mu_temp_file_stream_create: Force MU_STREAM_AUTOCLOSE bit. * mailbox/xscript-stream.c (_xscript_close): Always close the transport stream (refcount will protect it, if necessary). (mu_xscript_stream_create): Increase refcounts on both underlying streams, unless MU_STREAM_AUTOCLOSE is set. * pop3d/extra.c (pop3d_setio): Remove uses of MU_STREAM_NO_CLOSE. * examples/nntpclient.c: Remove uses of MU_STREAM_NO_CHECK/MU_STREAM_NO_CLOSE. * examples/pop3client.c: Likewise. * libmu_auth/gsasl.c: Likewise. * libproto/nntp/nntp_stream.c: Likewise. * libproto/pop/pop3_stream.c: Likewise. * mailbox/tcp.c: Likewise. * mailbox/vartab.c: Likewise. * mh/mh_list.c: Likewise. * mimeview/mimeview.c: Likewise. * mh/mhn.c: Likewise. (edit_mime): Use MU_STREAM_AUTOCLOSE. Bugfixes: * mailbox/fltstream.c (init_iobuf): Fix input initialization. (filter_write_internal): Bugfix. * mailbox/stream.c (_stream_buffer_freespace): New macro. (_stream_buffer_is_full): New macro. (BUFFER_FULL_P): Remove, use _stream_buffer_is_full instead. All callers updated. (_stream_flush_buffer): Operation for full buffered streams does not depend on the `all' flag. (mu_stream_write): Fix calculation of the bytes available in the buffer.
Sergey Poznyakoff authored -
* include/mailutils/stream.h (MU_STREAM_RDTHRU) (MU_STREAM_WRTHRU,MU_IOCTL_SET_TRANSPORT): New flags. (mu_xscript_stream_create, mu_iostream_create) (mu_dbgstream_create): New prototypes. * include/mailutils/sys/dbgstream.h: New header. * include/mailutils/sys/iostream.h: New header. * include/mailutils/sys/xscript-stream.h: New header. * include/mailutils/sys/Makefile.am (sysinclude_HEADERS): Add dbgstream.h, iostream.h and xscript-stream.h * mailbox/dbgstream.c: New file. * mailbox/iostream.c: New file. * mailbox/xscript-stream.c: New file. * mailbox/Makefile.am (libmailutils_la_SOURCES): Add dbgstream.c, iostream.c and xscript-stream.c * mailbox/filter_iconv.c (_icvt_ioctl): Simplify the declaration of ptrans. * mailbox/mapfile_stream.c (_mapfile_ioctl): Likewise. * mailbox/memory_stream.c (_memory_ioctl): Likewise. * mailbox/prog_stream.c (_prog_ioctl): Likewise. * mailbox/tcp.c (_tcp_ioctl): Likewise. * mailbox/fltstream.c (filter_ctl): Likewise. (filter_read_through, filter_write_through): New methods. (mu_filter_stream_create): Allow for use of MU_STREAM_RDTHRU and MU_STREAM_WRTHRU to create two-way filters (writing triggers filtering while reading is transparent or vice versa). * pop3d/extra.c (istream, ostream): Remove globals. (iostream): New variable. (real_istream, real_ostream): New variables. (pop3d_setio): Set transcript stream on top of the I/O one, if required. (pop3d_init_tls_server): Rewrite. Revert the meaning of the return code to match the usual convention (0 - success). (transcript): Removed. (pop3d_outf): Remove calls to transcript. * pop3d/pop3d.h (istream, ostream): Remove externs. (iostream): New extern. * pop3d/retr.c: Use iostream, instear of ostream. * pop3d/top.c: Likewise. * pop3d/stls.c: Update the call to pop3d_init_tls_server. * mailbox/stream_vprintf.c (mu_stream_vprintf): Fix return value to match the usual convention.
Sergey Poznyakoff authored -
STLS in pop3d is already working. * include/mailutils/sys/tls-stream.h: New header. * include/mailutils/tls.h (mu_tls_stream_create) (mu_tls_stream_create_client) (mu_tls_stream_create_client_from_tcp): Remove. (mu_tls_server_stream_create, mu_tls_client_stream_create): New protos. * libmu_auth/tls.c: Rewrite. * imap4d/util.c: Use mu_tls_server_stream_create. * libproto/pop/mbox.c: Use mu_tls_server_stream_create/ mu_tls_client_stream_create. * libproto/pop/pop3_stls.c: Use mu_tls_client_stream_create. * libproto/imap/folder.c: Use mu_tls_client_stream_create. * pop3d/capa.c (pop3d_capa): CAPA is allowed in both states. * pop3d/extra.c (pop3d_setio): Rewrite.
Sergey Poznyakoff authored -
* pop3d/pop3d.h: Include filter.h. (istream, ostream): New externs. * pop3d/extra.c (pop3d_setio): Set a crlf filter on the output stream. This allows to forget about \r in the rest of the code. * pop3d/retr.c (pop3d_retr): Use mu_stream_copy instead of copying streams manually. * pop3d/top.c (pop3d_top): Rewrite using streamrefs and mu_stream_copy. * all sources: Use \n instead of \r\n in output strings.
Sergey Poznyakoff authored -
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
Sergey Poznyakoff authored
-
- 05 Jan, 2010 1 commit
- 25 Aug, 2009 1 commit
-
-
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.
Sergey Poznyakoff authored
-
- 11 Aug, 2009 1 commit
-
-
* pop3d/pop3d.h: Remove unused includes. (ABORT): New state. (pop3d_command_handler_t, struct pop3d_command): New types. (pop3d_find_command): New function. (pop3d_stat,pop3d_top,pop3d_uidl,pop3d_user,pop3d_apop) (pop3d_auth,pop3d_capa,pop3d_dele,pop3d_list,pop3d_noop) (pop3d_quit,pop3d_retr,pop3d_rset): Remove const from the arguments. Functions are free to modify it. (pop3d_parse_command): New function. * pop3d/cmd.c: New file. * pop3d/Makefile.am: Link in cmd.o * pop3d/apop.c: Use pop3d_parse_command to parse commands * pop3d/auth.c: Likewise. * pop3d/extra.c (pop3d_args, pop3d_cmd): Remove. (pop3d_parse_command): New function. (pop3d_abquit): use pop3d_error_string to convert error numbers to messages. * pop3d/pop3d.c (cb_bulletin_db): Protect by #ifdef USE_DBM (pop3d_mainloop): Change loop condition. Use pop3d_parse_command to parse commands, pop3d_find_command to lookup handlers in the command table and pop3d_error_string to convert error numbers to messages. (main): Call enable_stls if necessary. * pop3d/capa.c, pop3d/dele.c, pop3d/list.c, pop3d/noop.c, pop3d/quit.c, pop3d/retr.c, pop3d/rset.c, pop3d/stat.c, pop3d/stls.c, pop3d/top.c, pop3d/uidl.c, pop3d/user.c: Remove const qualifier from the command handler argument.
Sergey Poznyakoff authored
-
- 06 Feb, 2008 1 commit
-
-
* imap4d/bye.c, imap4d/starttls.c, imap4d/util.c: Use exit codes from sysexits.h * imap4d/imap4d.c: Use mu_set_signals to install signals. Use exit codes from sysexits.h. * imap4d/imap4d.h: Include sysexits.h and muaux.h (ERR_TERMINATE): New define. (imap4d_sigchld,imap4d_signal): Remove. (imap4d_master_signal,imap4d_child_signal): New prototypes. * imap4d/signal.c (imap4d_master_signal,imap4d_child_signal): New functions. * pop3d/pop3d.h Include sysexits.h and muaux.h (ERR_TERMINATE): New define. (pop3d_signal): Remove. (pop3d_master_signal, pop3d_child_signal): New protos. * pop3d/signal.c (pop3d_master_signal, pop3d_child_signal): New functions. * pop3d/extra.c, pop3d/popauth.c * pop3d/pop3d.c: Use mu_set_signals to install signals. Use exit codes from sysexits.h. * include/mailutils/server.h (mu_m_server_set_strexit): New prototype. * include/mailutils/types.hin (MU_ARRAY_SIZE): New define. * lib/Makefile.am (libmuaux_la_SOURCES): Add signal.c, strexit.c. (noinst_HEADERS): Add muaux.h * lib/muaux.h: New file. * libsieve/extensions/spamd.c: Add NLS markers. * mailbox/header.c (header_readline): Minor rewrite. * mailbox/msrv.c (struct _mu_m_server): New member `strexit'. (mu_m_server_begin): Call alloc_children. (mu_m_server_restore_signals): New function. (mu_m_server_end): Call mu_m_server_restore_signals. (m_srv_conn): Reset signals in child branch. * po/POTFILES.in: Update.
Sergey Poznyakoff authored
-
- 04 Jan, 2008 1 commit
-
-
* mailbox/msrv.c: New file. * mailbox/Makefile.am: Add msrv.c. * include/mailutils/server.h (mu_tcp_server_conn_fp): Take sockaddr as argument (mu_tcp_server_create,mu_tcp_server_get_sockaddr): Likewise. (mu_m_server_*): New prototypes. * include/mailutils/types.hin (mu_m_server_t): New type. * mailbox/acl.c: Fix debugging output. (mu_sockaddr_to_str, mu_sockaddr_to_astr): New functions. * mailbox/tcpsrv.c: Handle AF_INET and AF_UNIX sockets. * examples/echosrv.c: Update mu_tcp_server_* calls. * examples/config/Makefile.am: Remove comsat.conf and mailutils.rc. * imap4d/imap4d.c, imap4d/imap4d.h, imap4d/signal.c, maidag/lmtp.c, maidag/maidag.c, maidag/maidag.h, pop3d/extra.c, pop3d/pop3d.c, pop3d/pop3d.h, pop3d/signal.c: Rewrite using m-server. * include/mailutils/cfg.h (mu_offsetof): Bug fix. * mailbox/cfg_driver.c (dup_container): Bugfix. Offset was not copied. (mu_cfg_section_add_params): If identifier starts with a dot, it is hidden, i.e. its substatements are copied directly into the parent structure. * mailbox/cfg_lexer.c (isword): Take care of opening braces. (default_lexer): Several fixes. * mailbox/cfg_parser.y (mu_cfg_parse): Initialize debugging level from global settings. (_scan_tree_helper): Ensure debugging object has correct locus information before calling the section parser. (mu_cfg_scan_tree): If no debugging object is supplied, use the one from diag.c * mailbox/daemon.c (mu_daemon_create_pidfile): Return a meaningful error code. * mailbox/debug.c (mu_debug_create): Initialize printer to NULL. (mu_debug_vprintf): If printer is NULL, use mu_debug_default_printer. (mu_debug_check_level): Bugfix. * mailbox/server.c: Minor indentation fix. * mailbox/syslog.c (mu_diag_syslog_printer): Chop off \r as well. * mailbox/folder.c (mu_folder_create_from_record): Bugfixes. * include/mailutils/debug.hm4 (mu_sockaddr_to_str) (mu_sockaddr_to_astr): New functions. * include/mailutils/.cvsignore: Add debug.h * po/POTFILES.in: Update.
Sergey Poznyakoff authored
-
- 29 Nov, 2007 1 commit
-
-
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
Sergey Poznyakoff authored
-
- 19 Nov, 2007 1 commit
-
-
(MU_APP_LIBRARIES): Rename libargp.a to libmuargp.a * NEWS: Update. * comsat/comsat.c, dotlock/dotlock.c, examples/muauth.c, examples/muemail.c, frm/frm.h, guimb/main.c, imap4d/imap4d.c, libargp/auth.c, libargp/cmdline.c, libargp/common.c, libargp/gsasl.c, libargp/mu_argp.c, libargp/pam.c, libargp/radius.c, libargp/sieve.c, libargp/sql.c, libargp/tls.c, libargp/virtdomain.c, maidag/maidag.h, mail/mail.c, mail.local/main.c, mail.remote/mail.remote.c, messages/messages.c, mimeview/mimetypes.y, mimeview/mimeview.c, movemail/movemail.c, pop3d/extra.c, pop3d/pop3d.c, pop3d/popauth.c, readmsg/readmsg.c, sieve/sieve.c: Include mailutils/libargp.h. * config/mailutils-config.c: New arguments to --link: cfg and argp. * include/mailutils/Makefile.am (pkginclude_HEADERS): Remove compat.h, add libargp.h, libcfg.h and version.h * include/mailutils/compat.h: Remove * include/mailutils/libargp.h: New file (from libargp/cmdline.h) * include/mailutils/libcfg.h: New file (from (libcfg/) * include/mailutils/version.h: New file * include/mailutils/folder.h (struct mu_0_6_folder_list): Remove (mu_0_6_folder_list, mu_0_6_folder_lsub) (mu_0_6_folder_list_destroy): Remove. * include/mailutils/mailutils.h: Include version.h Remove 0.6 compatibility layer. * mailbox/folder.c (list_to_0_6_folder_list, mu_0_6_folder_list) (mu_0_6_folder_lsub, mu_0_6_folder_list_destroy): Remove. * lib/Makefile.am (libmuaux_la_SOURCES): Remove argpinit.c, muinit.h and muinit.c * libargp/Makefile.am (noinst_LIBRARIES, noinst_HEADERS): Remove (lib_LIBRARIES): Add libmuargp.a * libargp/compat.c: New file. * libargp/muinit.c: New file. * libargp/cmdline.h: Remove. * libcfg/Makefile.am (noinst_HEADERS): Remove. * libcfg/auth.c, libcfg/common.c, libcfg/gsasl.c, libcfg/init.c, libcfg/pam.c, libcfg/radius.c, libcfg/sieve.c, libcfg/sql.c, libcfg/tls.c, libcfg/virtdomain.c: Include mailutils/libcfg.h * mailbox/Makefile.am (libmailutils_la_SOURCES): Add version.c * mailbox/cfg_lexer.c (_mu_parse_config): Do nothing if root_container is NULL. * 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: Use mh_argp_init instead of mu_argp_init. * mh/mh_argp.c, mh/mh_getopt.h (mh_argp_init): New function
Sergey Poznyakoff authored
-
- 17 Nov, 2007 1 commit
-
-
* include/mailutils/gocs.h, include/mailutils/pam.h, include/mailutils/radius.h, include/mailutils/syslog.h: New files * lib/argpinit.c, lib/muinit.c, lib/muinit.h: New files. * libsieve/conf.c: New file. * libcfg: New directory * libcfg/libcfg.h, libcfg/auth.c, libcfg/common.c, libcfg/init.c, libcfg/gsasl.c, libcfg/pam.c, libcfg/radius.c, libcfg/sieve.c, libcfg/sql.c, libcfg/tls.c, libcfg/virtdomain.c, libcfg/.cvsignore: New files. * libargp: New directory * libargp/auth.c, libargp/cmdline.h, libargp/common.c, libargp/gsasl.c, libargp/mu_argp.h, libargp/mu_argp.c, libargp/pam.c, libargp/radius.c, libargp/sieve.c, libargp/sql.c, libargp/tls.c, libargp/virtdomain.c, libargp/.cvsignore: New files. * mailbox/.cvsignore: Add cfg_parser.c and cfg_parser.h. * Makefile.am (SUBDIRS): Add libargp and libcfg. * configure.ac (MU_APP_LIBRARIES): New variable (MU_COMMON_INCLUDES): add libargp and libcfg (AC_CONFIG_FILES): Add libargp and libcfg. * auth/gsasl.c, auth/pam.c, auth/radius.c, auth/sql.c, auth/sql.h, auth/tls.c, auth/virtual.c, comsat/comsat.h, frm/frm.h, guimb/guimb.h, imap4d/imap4d.h, include/mailutils/gsasl.h, include/mailutils/libsieve.h, include/mailutils/mailutils.h, include/mailutils/mu_auth.h, include/mailutils/tls.h, include/mailutils/sql.h, maidag/maidag.h, mail/mail.h, mail.local/mail.local.h, mailbox/daemon.c, mailbox/system.c, mh/mh_argp.c, mh/mh_getopt.h, pop3d/pop3d.h, readmsg/readmsg.h: Remove argp stuff * comsat/comsat.c, config/mailutils-config.c, dotlock/dotlock.c, examples/muauth.c, examples/muemail.c, frm/frm.c, frm/from.c, guimb/main.c, imap4d/idle.c, imap4d/imap4d.c, imap4d/util.c, imap4d/version.c, maidag/lmtp.c, maidag/maidag.c, maidag/mailquota.c, mail/mail.c, mail/send.c, mail/version.c, mail.local/mailquota.c, mail.local/main.c, mail.remote/mail.remote.c, mailbox/mu_auth.c, messages/messages.c, mimeview/mimeview.c, movemail/movemail.c, pop3d/extra.c, pop3d/pop3d.c, pop3d/popauth.c, readmsg/readmsg.c, sieve/sieve.c: Use mu_app_init for parsing command line and configuration files. * comsat/Makefile.am, config/Makefile.am, dotlock/Makefile.am, examples/Makefile.am, frm/Makefile.am, guimb/Makefile.am, imap4d/Makefile.am, maidag/Makefile.am, mail/Makefile.am, mail.local/Makefile.am, mail.remote/Makefile.am, mailbox/Makefile.am, messages/Makefile.am, mimeview/Makefile.am, movemail/Makefile.am, pop3d/Makefile.am, readmsg/Makefile.am, sieve/Makefile.am: Use MU_APP_LIBRARIES. * include/mailutils/Makefile.am: Add new files. * include/mailutils/argp.h: Remove. * include/mailutils/cfg.h: New file. * include/mailutils/daemon.h (MODE_INTERACTIVE,MODE_DAEMON): New defines (from removed argp.h). (mu_gocs_daemon): New decl. * include/mailutils/error.h (mu_program_name): New variable (mu_set_program_name): New function. * lib/Makefile.am (libmuaux_la_SOURCES): Add new files. * libsieve/Makefile.am (libsieve_la_SOURCES): Remove argp.c, add conf.c instead. * libsieve/argp.c: Remove. * mailbox/cfg_parser.y (mu_cfg_parse_boolean): New function. * mailbox/mu_argp.c: Remove. * mailbox/muerror.c (mu_program_name): New variable (mu_set_program_name): New function (mu_default_error_printer): Print program name before diagnostic string. * mailbox/mutil.c (mu_sql_decode_password_type): New function. * mh/mh_whom.c (mh_alias_expand): Bugfix * po/POTFILES.in: Update * testsuite/lib/mailutils.exp (mu_init): Pass --no-site-rcfile --no-user-rcfile to all programs.
Sergey Poznyakoff authored
-
- 27 Jun, 2007 1 commit
-
-
- 27 Aug, 2005 1 commit
-
-
- 26 Aug, 2005 1 commit
-
-