- 03 Nov, 2010 1 commit
-
-
* mu/Makefile.am (MODULES): New variable. Put all commands there. (mu_SOURCES): Include $(MODULES). (EXTRA_DIST): Add mu-setup.h mu-setup.c mu-setup.awk (BUILT_SOURCES): New variable. (mu-setup.h, mu-setup.c): New goals. * mu/mu.c (doc): Remove command description: it is generated automatically. (mu_help_filter): New function. (argp): Use mu_help_filter. (mutool_action_tab): Remove. (mutool_nosys,find_action): Remove. (mu_help): New function. (main): Use dispatch_find_action. * mu/mu.h: Include mailutils/types.h (mutool_pop, mutool_filter, mutool_flt2047) (mutool_info, mutool_query, mutool_acl) (mutool_wicket, mutool_ldflags, mutool_cflags): Remove protos. (mu_help, dispatch_find_action, dispatch_docstring): New protos. * mu/acl.c: Add MU Setup comment. * mu/cflags.c: Likewise. * mu/filter.c: Likewise. * mu/flt2047.c: Likewise. * mu/info.c: Likewise. * mu/ldflags.c: Likewise. * mu/pop.c: Likewise. * mu/query.c: Likewise. * mu/wicket.c: Likewise. * mu/mu-setup.awk: New file. * mu/help.c: New file. * mu/dispatch.c: New file. * mu/.gitignore: Add mu-status.[ch] * po/POTFILES.in: Add mu/dispatch.c and mu/help.c.
Sergey Poznyakoff authored
-
- 02 Nov, 2010 4 commits
-
-
It is not needed because the --version option shows a terse info about the license, as well as a link to its full text.
Sergey Poznyakoff authored -
* libmailutils/stream/streamref.c (mu_streamref_create_abridged): Set full buffering by default.
Sergey Poznyakoff authored -
* include/mailutils/wordsplit.h (mu_wordsplit_free_words): New proto. * libmu_auth/sql.c: Include wordsplit.h
Sergey Poznyakoff authored
-
- 30 Oct, 2010 1 commit
-
-
* libmailutils/string/wordsplit.c (mu_wordsplit_init): Call mu_wordsplit_free_words to reclaim the memory. (mu_wordsplit_free_words): New function. (mu_wordsplit_free): Use mu_wordsplit_free_words. * imap4d/imap4d.c (imap4d_session_setup0): Use wordsplit instead of vartab. * imap4d/imap4d.h: Don't include vartab.h. * imap4d/preauth.c (do_preauth_ident): Use mu_str_stripws instead of the static trimcrlf, which is removed. (do_preauth_program): Use wordsplit instead of vartab and mu_prog_stream_create instead of popen. * libmailutils/mailbox/mbx_default.c: Include nls.h Don't include vartab.h (mu_construct_user_mailbox_url): Use wordsplit instead of vartab. * libmailutils/server/acl.c (expand_arg): Use wordsplit instead of vartab. * libmu_auth/ldap.c (_mu_ldap_search):L Likewise. * libmu_auth/radius.c (_expand_query): Likewise. * libmu_auth/sql.c (mu_sql_expand_query): Likewise. * libproto/mailer/prog.c (_expand_sender, _expand_rcpt): Rewrite. (url_to_argv): : Use wordsplit instead of vartab. * po/POTFILES.in: Add more files.
Sergey Poznyakoff authored
-
- 29 Oct, 2010 3 commits
-
-
* mu/mu.h (mutool_prompt_vartab): Remove. (mutool_prompt_env): New extern. * mu/pop.c (pop_prompt_vartab): Rewrite as pop_prompt_env. All callers changed. * mu/shell.c (mutool_prompt_vartab): Remove variable. (mutool_prompt_env): New variable. (expand_prompt): Remove function. (input_line_interactive): Use mu_wordsplit to expand command prompt.
Sergey Poznyakoff authored -
K/V is a new type of environment where variable names (keys) and values are stored separately in adjacent environment elements. This should simplify wordsplit initialization in many cases. * include/mailutils/wordsplit.h (MU_WRDSF_ENV_KV): New flag. * libmailutils/string/wordsplit.c (mu_wordsplit_find_env): Implement search in a K/V environment. * libmailutils/tests/wordsplit.at: Test K/V environments. * libmailutils/tests/wsp.c (bool_keytab): Implement env_kv. (make_env_kv): New function. (main): Convert environment if env_kv is given.
Sergey Poznyakoff authored -
Eventually this will lead to vartab fading out until it is removed in some point in the future. Wordsplit provides a much better variable substitution mechanism. * include/mailutils/wordsplit.h (mu_wordsplit) <ws_getvar>: Change signature. <ws_closure>: New member. (MU_WRDSF_CLOSURE): New flag. * libmailutils/string/wordsplit.c (mu_wordsplit_init): Initialize ws_closure to NULL, unless MU_WRDSF_CLOSURE is set. Do not modify ws_wordn if MU_WRDSF_DOOFFS is set. (wsnode_remove): Clear _WSNF_JOIN on the previous node if the node being deleted is the last one in chain. (expvar): Pass ws_closure as 3rd argument to ws_getvar. Insert a NULL node if the variable is not defined. * movemail/movemail.c: Use wordsplit instead of vartab. Note a side effect: the "source:*" and "dest:*" variables are now written as "source_*" and "dest_*", correspondingly. (movemail_getvar_closure): New structure. (DCL_VTX): Remove macro and its uses. (get_url_part, movemail_getvar): New functions. (set_program_id): Rewrite using wordsplit.
Sergey Poznyakoff authored
-
- 28 Oct, 2010 2 commits
-
-
The wordsplit module (borrowed from another project of mine, called 'grecs') provides a flexible and powerful mechanism for parsing input in a way similar to posix-shell. In particular, the POSIX function wordexp is a subset of the wordsplit functionality. The argcv module is now deprecated. * include/mailutils/wordsplit.h: New file. * include/mailutils/Makefile.am (pkginclude_HEADERS): Add wordsplit.h * libmailutils/string/wordsplit.c: New file. * libmailutils/string/Makefile.am (libstring_la_SOURCES): Add wordsplit.c. * include/mailutils/argcv.h (mu_argcv_join): New proto. (mu_argcv_get, mu_argcv_get_n, mu_argcv_get_np) (mu_argcv_unquote_char, mu_argcv_quote_char) (mu_argcv_quoted_length, mu_argcv_unquote_copy) (mu_argcv_quote_copy): Mark as deprecated. * include/mailutils/mailutils.h: Include wordsplit.h. * libmailutils/tests/wsp.c: New file. * libmailutils/tests/.gitignore: List wsp. * libmailutils/tests/wordsplit.at: New file. * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add wsp (TESTSUITE_AT): Add wordsplit.at. * libmailutils/tests/argcv.c: Define MU_ARCGV_DEPRECATED to avoid deprecation warnings. * libmailutils/tests/testsuite.at: Include wordsplit.at. * libmailutils/base/argcvfree.c: New file. * libmailutils/base/argcvjoin.c: New file. * libmailutils/base/argcvrem.c: New file. * libmailutils/base/Makefile.am (libbase_la_SOURCES): Add new files. * libmailutils/base/argcv.c: Define MU_ARCGV_DEPRECATED to avoid deprecation warnings. (argcv_string, argcv_free, argv_free) (mu_argcv_remove): Rewrite in separate modules. * comsat/comsat.h: Include wordsplit.h. * imap4d/imap4d.h: Likewise. * mail/mail.h: Likewise. * mh/mh.h: Likewise. * readmsg/readmsg.h: Likewise. * comsat/action.c: Use wordsplit. * imap4d/fetch.c: Likewise. * lib/mailcap.c: Likewise. * libmailutils/auth/mu_auth.c: Likewise. * libmailutils/base/mutil.c: Likewise. * libmailutils/cfg/format.c: Likewise. * libmailutils/cfg/lexer.l: Likewise. * libmailutils/cfg/parser.y: Likewise. * libmailutils/diag/gdebug.c: Likewise. * libmailutils/mailer/mailer.c: Likewise. * libmailutils/server/acl.c: Likewise. * libmailutils/stream/prog_stream.c: Likewise. * libmailutils/tests/listop.c: Likewise. * libmailutils/url/create.c: Likewise. * libmu_auth/ldap.c: Likewise. * libmu_auth/radius.c: Likewise. * libmu_sieve/sieve.l: Likewise. * libproto/mailer/mbox.c: Likewise. * libproto/mailer/smtp.c: Likewise. * libproto/mailer/smtp_gsasl.c: Likewise. * mail/mailline.c: Likewise. * mail/mailvar.c: Likewise. * mail/send.c: Likewise. * mail/util.c: Likewise. * mh/folder.c: Likewise. * mh/mh_alias.y: Likewise. * mh/mh_argp.c: Likewise. * mh/mh_init.c: Likewise. * mh/mh_list.c: Likewise. * mh/mh_msgset.c: Likewise. * mh/mh_sequence.c: Likewise. * mh/mh_whatnow.c: Likewise. * mh/mh_sequence.c: Likewise. * mh/mh_whatnow.c: Likewise. * mh/mhn.c: Likewise. * mh/send.c: Likewise. * movemail/movemail.c: Likewise. * mu/shell.c: Likewise. * readmsg/readmsg.c: Likewise. * testsuite/smtpsend.c: Likewise. * pop3d/popauth.c: Use wordsplit. Use simplified input format (username and password delimited by any amount of whitespace). Read/produce old format if invoked with the --compatibility option. * examples/aclck.c: Use wordsplit instead of argcv. * examples/header.c: Likewise. * examples/mta.c: Likewise. * examples/.gitignore: Remove pop3client. * examples/Makefile.am: Remove pop3client. * po/POTFILES.in: Add new files.
Sergey Poznyakoff authored
- 27 Oct, 2010 4 commits
-
-
Parameters are allowed: they are used to expand hashed or indexed mailbox names. * libproto/maildir/folder.c (_maildir_record): Add MU_URL_PARAM. * libproto/mbox/folder.c (_mbox_record): Likewise. * libproto/mh/folder.c (_mh_record): Likewise.
Sergey Poznyakoff authored -
*gnulib.modules (snprintf, vasprintf): Remove. *sieve/tests/reject.at: Use AT_PACKAGE_VERSION instead of the hardcoded version number. *lib/mu_asprintf.h: Remove. * imap4d/auth_gss.c: Replace asprintf with mu_asprintf and vasprintf by mu_vasnprintf. * guimb/guimb.h: Likewise. * imap4d/imap4d.h: Likewise. * imap4d/unsubscribe.c: Likewise. * lib/Makefile.am * lib/mailcap.c: Likewise. * libmu_argp/muinit.c: Likewise. * maidag/deliver.c: Likewise. * maidag/maidag.h: Likewise. * mail/escape.c: Likewise. * mail/mail.c: Likewise. * mail/mail.h: Likewise. * mail/util.c: Likewise. * mail/write.c: Likewise. * mh/burst.c: Likewise. * mh/forw.c: Likewise. * mh/mh.h: Likewise. * mh/mh_alias.l: Likewise. * mh/mh_format.c: Likewise. * mh/mh_getopt.c: Likewise. * mh/mh_init.c: Likewise. * mh/mh_msgset.c: Likewise. * mh/mh_sequence.c: Likewise. * mh/mh_whatnow.c: Likewise. * mh/mhn.c: Likewise. * mh/send.c: Likewise. * mimeview/mimetypes.l: Likewise. * mimeview/mimetypes.y: Likewise. * mimeview/mimeview.c: Likewise. * movemail/movemail.c: Likewise. * mu/ldflags.c: Likewise. * pop3d/expire.c: Likewise. * pop3d/pop3d.h: Likewise. * sieve/sieve.c: Likewise.
Sergey Poznyakoff authored -
The allow_severity and deny_severity variables are valid only for tcpd and related applications, hosts_access does not use them. * lib/tcpwrap.c (mu_tcp_wrapper_cb_hosts_allow_syslog) (mu_tcp_wrapper_cb_hosts_deny_syslog): Remove functions. (allow_severity, deny_severity): Remove variables. (tcpwrapper_param): Remove allow-syslog-priority and deny-syslog-priority.
Sergey Poznyakoff authored -
* NEWS, configure: Set version number to 2.9.90 to avoid confusion with 2.2.x branch.
Sergey Poznyakoff authored
-
- 26 Oct, 2010 1 commit
-
-
The purpose is to make it modular and flexible. URLs are parsed out as they are created. Missing URL parts can be supplied via a "URL hint" at creation time (similar to the approach used in creating mu_address_t). Ports can be specified either as numbers or as service names. Original port string representation can be retrieved from the URL, as well as its numeric value. * libmailutils/url/accessor.h: New file. * libmailutils/url/copy.c: New file. * libmailutils/url/create.c: New file. * libmailutils/url/decode.c: New file. * libmailutils/url/destroy.c: New file. * libmailutils/url/dup.c: New file. * libmailutils/url/expand.c: New file. * libmailutils/url/flag.c: New file. * libmailutils/url/get-auth.c: New file. * libmailutils/url/get-host.c: New file. * libmailutils/url/get-param.c: New file. * libmailutils/url/get-path.c: New file. * libmailutils/url/get-portstr.c: New file. * libmailutils/url/get-query.c: New file. * libmailutils/url/get-scheme.c: New file. * libmailutils/url/get-secret.c: New file. * libmailutils/url/get-user.c: New file. * libmailutils/url/match.c: New file. * libmailutils/url/port.c: New file. * libmailutils/url/scheme.c: New file. * libmailutils/url/uplevel.c: New file. * libmailutils/url/urlstr.c: New file. * configure.ac (AC_CONFIG_FILES): Add libmailutils/url/Makefile * libmailutils/Makefile.am (SUBDIRS): Add url. (libmailutils_la_LIBADD): Link with liburl. * libmailutils/base/Makefile.am (libbase_la_SOURCES): Remove url.c * libmailutils/base/url.c: Remove. * libmailutils/string/Makefile.am (libstring_la_SOURCES): Add xdecode.c * libmailutils/string/xdecode.c: New file. * include/mailutils/sys/url.h (_mu_url): Change type to short. <_get_port>: Change second argument to unsigned. <_get_portstr>: New method. * include/mailutils/url.h (MU_URL_SCHEME): New flag. (MU_URL_PARSE_HEXCODE, MU_URL_PARSE_HIDEPASS) (MU_URL_PARSE_PORTSRV, MU_URL_PARSE_PORTWC) (MU_URL_PARSE_PIPE, MU_URL_PARSE_SLASH): New flags. (mu_url_create_hint, mu_url_copy_hints): New prototypes. (mu_url_parse): Remove. (mu_url_get_port): Change second argument to unsigned. (mu_url_decode_len,mu_url_decode): Remove. (mu_url_decode): New proto. (mu_url_sget_portstr, mu_url_aget_portstr) (mu_url_get_portstr): New protos. * include/mailutils/util.h (mu_str_url_decode) (mu_str_url_decode_inline): New protos. * libproto/pop/mbox.c (pop_open): Port is unsigned. * libproto/imap/folder.c: Use MU_URL_SCHEME in url_may_have. * libproto/maildir/folder.c: Likewise. * libproto/mailer/prog.c: Likewise. * libproto/mailer/remote.c: Likewise. * libproto/mailer/sendmail.c: Likewise. * libproto/mailer/smtp.c: Likewise. * libproto/mbox/folder.c: Likewise. * libproto/mh/folder.c: Likewise. * libproto/nntp/folder.c: Likewise. * libproto/pop/folder.c: Likewise. * imap4d/imap4d.c: Remove calls to mu_url_parse. * libmailutils/base/registrar.c: Likewise. * libmailutils/base/wicket.c: Likewise. * libmailutils/mailbox/folder.c: Likewise. * libmailutils/mailbox/mailbox.c: Likewise. * libmailutils/mailer/mailer.c: Likewise. * libmailutils/tests/url-parse.c: Likewise. * libmailutils/tests/wicket.c: Likewise. * libproto/mailer/smtp_auth.c: Likewise. * maidag/deliver.c: Likewise. * mu/wicket.c: Likewise. * libmailutils/mime/mimehdr.c (mu_mimehdr_decode_param): Use mu_str_url_decode, instead of mu_url_decode. * libmailutils/stream/tcp.c (_tcp_instance)<port>: Change type to unsigned short. All uses updated. (mu_tcp_stream_create_with_source_ip) (mu_tcp_stream_create_with_source_host) (mu_tcp_stream_create): Port is unsigned. * include/mailutils/stream.h (mu_tcp_stream_create_with_source_ip) (mu_tcp_stream_create_with_source_host) (mu_tcp_stream_create): Port is unsigned. * include/mailutils/cpp/url.h (get_port): Return unsigned. * libmu_cpp/url.cc (get_port): Return unsigned. (parse): Empty function. Schedule for removal. * python/libmu_py/url.c (api_url_parse): Empty function. Schedule for removal. (api_url_get_port): Port is unsigned. * libmailutils/base/wicket.c (mu_wicket_file_match_url) (mu_wicket_file_match_url): New parameter: parse_flags. * mu/wicket.c (wicket_match): Use parse_flags to control whether or not to show the plaintext password. * doc/texinfo/url.texi: Update.
Sergey Poznyakoff authored
-
- 25 Oct, 2010 2 commits
-
-
* libmailutils/base/url.c (mu_url_matches_ticket): Use different weight values, depending on the missing part. * libmailutils/base/wicket.c (mu_wicket_stream_match_url): Refuse URLs that lack host and password parts.
Sergey Poznyakoff authored
- 24 Oct, 2010 3 commits
-
-
…ckward compatibility. * config/.gitignore: Remove. * config/Makefile.am: Remove. * config/mailutils-config.c: Remove. * config/maint.mk: Remove. * config/mailutils.m4: Move to mu-aux/mailutils.m4 * mu-aux/Makefile.am (m4datadir, dist_m4data_DATA): New variables. * Makefile.am (SUBDIRS) <config>: Remove. * configure.ac (AC_CONFIG_FILES): Remove config. * mu/mailutils-config: New file. * mu/cflags.c: New file. * mu/ldflags.c: New file. * mu/Makefile.am (dist_bin_SCRIPTS, EXTRA_DIST): Add mailutils-config. (mu_SOURCES): Add cflags.c and ldflags.c. (AM_CPPFLAGS): New variable. * mu/mu.c: Add new modes: cflags and ldflags. * mu/mu.h (mutool_ldflags, mutool_cflags): New protos. * po/POTFILES.in: Update.
Sergey Poznyakoff authored -
* mu/wicket.c: New file. * mu/mu.h (mutool_wicket): New proto. * mu/mu.c (mutool_action_tab): Add an entry for wicket mode. * mu/Makefile.am (mu_SOURCES): Add wicket.c * .gitignore: Update.
Sergey Poznyakoff authored -
The new algorithm always returns the best match, i.e. the one with the smallest number of wildcard comparisons. * include/mailutils/auth.h (mu_wicket_stream_match_url) (mu_wicket_file_match_url): New protos. Remove unnecessary 'extern' qualifiers. * include/mailutils/url.h (mu_url_is_ticket): Remove. (mu_url_matches_ticket): New proto. * libmailutils/base/url.c (mu_url_parse): Fix name corruption during password obfuscation. (defined): Remove static function. (mu_url_is_ticket): Remove function. (mu_url_matches_ticket): New function. * libmailutils/base/wicket.c (get_ticket_url): Remove. (mu_wicket_stream_match_url) (mu_wicket_file_match_url): New functions. (file_ticket_get_cred): Use mu_wicket_file_match_url. * libmailutils/tests/wicket.c: New file. * libmailutils/tests/Wicketfile: New file. * libmailutils/tests/wicket.at: New file. * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add wicket. (EXTRA_DIST): Add Wicketfile (TESTSUITE_AT): Add wicket.at * libmailutils/tests/testsuite.at: Include wicket.at * libmailutils/tests/.gitignore: Update.
Sergey Poznyakoff authored
-
- 21 Oct, 2010 2 commits
-
-
* include/mailutils/smtp.h (mu_smtp_dot): New proto. * libproto/mailer/smtp_dot.c: New file. * libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES): Add smtp_dot.c. * libproto/mailer/smtp.c (smtp_send_message): Send RSET after an unexpected SMTP reply. Call mu_smtp_dot after successful sending. * libproto/mailer/smtp_data.c (_mu_smtp_data_end): Set state to MU_SMTP_DOT. * libproto/mailer/smtp_rset.c (mu_smtp_rset): Improve state selection algorithm. * libproto/mailer/smtp_send.c (mu_smtp_send_stream): Don't reset state: it is done by _mu_smtp_data_end. * testsuite/smtpsend.c (main): Call mu_smtp_dot after sending message.
Sergey Poznyakoff authored -
* libproto/pop/folder.c (_pop_record): Accept URL parameters. * libproto/pop/mbox.c (pop_open): Don't start TLS if the `notls' parameter is present in the URL.
Sergey Poznyakoff authored
-
- 20 Oct, 2010 1 commit
-
-
…-smtp-00. Minor fix in maidag (url mode). * include/mailutils/registrar.h (MU_RECORD_DEFAULT) (MU_RECORD_LOCAL): New flags. (_mu_record) <flags,url_may_have,url_must_have>: New members. Remove unnecessary externs. (mu_record_set_.*): Remove all protos. (mu_record_check_url, mu_registrar_test_local_url): New protos. * include/mailutils/sys/url.h (_mu_url) <flags>: New member. (MU_URL_USER, MU_URL_SECRET, MU_URL_AUTH) (MU_URL_HOST, MU_URL_PORT, MU_URL_PATH) (MU_URL_PARAM, MU_URL_QUERY) (MU_URL_CRED, MU_URL_INET, MU_URL_ALL): New flags. (mu_url_get_flags, mu_url_has_flag): New protos. * libmailutils/base/registrar.c (mu_record_set_.*): Remove all. (mu_record_check_url): New function. (mu_registrar_test_local_url): New function. * libmailutils/base/url.c (mu_url_copy0): Copy flags. (mu_url_parse): Use flags intead of inspecting each structure member. Set flags. (mu_url_get_flags, mu_url_has_flag): New functions. * libmailutils/diag/errors (MU_ERR_URL_MISS_PARTS) (MU_ERR_URL_EXTRA_PARTS): New error codes. * libmailutils/mailbox/folder.c (mu_folder_create_from_record): Check the URL using mu_record_check_url. * libproto/imap/folder.c (_imap_record, _imaps_record): Initialize new fields. * libproto/maildir/folder.c (_maildir_record): Likewise. * libproto/mbox/folder.c (_mbox_record): Likewise. * libproto/mh/folder.c (_mh_record): Likewise. * libproto/nntp/folder.c (_nntp_record): Likewise. * libproto/pop/folder.c (_pop_record, _pops_record): Likewise. * libproto/mailer/prog.c (_prog_record): Likewise. (_url_prog_init): Remove extra checks, rely on mu_record_check_url. * libproto/mailer/remote.c (_mu_remote_smtp_record) (_mu_remote_sendmail_record,_mu_remote_prog_record): Initialize new fields. * libproto/mailer/sendmail.c (_url_sendmail_init): Remove extra checks, rely on mu_record_check_url. (_sendmail_record): Initialize new fields. * libproto/nntp/url.c (url_nntp_destroy): Remove. (_nntp_url_init): Remove extra checks. * libproto/pop/url.c (url_pop_destroy): Remove. (_url_pop_init, _url_pops_init): Remove extra checks. * libproto/mailer/smtp.c (_url_smtp_init): Remove extra checks. (_smtp_record): Initialize new fields. (smtp_mailer_add_auth_mech): New function. (smtp_open): Allow for auth= part before the host name. * maidag/deliver.c (is_remote_url): New function. (do_delivery): Do not try to switch user privileges if the URL refers to a remote mailbox. * maidag/maidag.c (main): Initialize TLS.
Sergey Poznyakoff authored
-
- 19 Oct, 2010 1 commit
-
-
* libmailutils/mailer/mailer.c (_set_from): Parameter from= can be used to set the sender address explicitly. (_set_to): New function. Parameter to= sets recipient addresses explicitly. (create_part): Use _set_to. * libproto/mailer/mbox.c (remote_mbox_append_message): Use the to= parameter.
Sergey Poznyakoff authored
-
- 18 Oct, 2010 1 commit
-
-
* include/mailutils/header.h: Remove unnecessary externs. (mu_url_sget_param, mu_url_aget_param): New protos. * libmailutils/base/url.c (mu_url_sget_param, mu_url_aget_param): New functions. * libmailutils/mailbox/hdrfirst.c: New file. * libmailutils/mailbox/Makefile.am (libmailbox_la_SOURCES): Add hdrfirst.c. * libmailutils/mailbox/message.c (message_envelope_sender): Try to restore the envelope sender from X-Envelope-Sender, X-Envelope-From, X-Original-Sender, and From headers, in that order. * libmailutils/mailer/mailer.c (_set_from): Try to obtain sender from the message envelope. If that fails, fall back to the From header. * libproto/mailer/mbox.c (parse_received, guess_message_recipient): New static functions. (remote_mbox_append_message): Get recipient address from the first of X-Envelope-To, Delivered-To, X-Original-To headers, in that order. If that fails, try to deduce it from the Received header. If that fails too, fall back to the To header. If recipient-headers URL parameter is defined, its value (a comma-separated list of names) overrides this list. The strip-domain parameter, if present, instructs the function to strip domain part from the recipient address before resolving it. The domain parameter, if present, supplies the domain name which overrides the domain obtained from the URL.
Sergey Poznyakoff authored
-
- 17 Oct, 2010 1 commit
-
-
- 16 Oct, 2010 1 commit
-
-
* movemail/Makefile.am (movemail_LDADD): Add MU_LIB_MAILER. * movemail/movemail.c: Register *all* mailbox formats, including remote ones.
Sergey Poznyakoff authored
-
- 12 Oct, 2010 1 commit
-
-
- 11 Oct, 2010 2 commits
-
-
* include/mailutils/util.h (mu_readlink): New function. (mu_unroll_symlink): Change prototype. * libmailutils/base/symlink.c (mu_qualify_link): Remove. (mu_readlink): New function. (mu_unroll_symlink): Rewrite. Don't use statically allocated buffers. * libmailutils/base/locker.c (mu_locker_create): Update calls to mu_unroll_symlink.
Sergey Poznyakoff authored -
* comsat/action.c (run_user_action): Use mu_make_file_name. * imap4d/lsub.c (imap4d_lsub): Likewise. * imap4d/subscribe.c (imap4d_subscribe): Likewise. * imap4d/unsubscribe.c (imap4d_unsubscribe): Likewise. * libmailutils/base/filename.c (mu_get_full_path): Likewise. * libmailutils/base/tempfile.c (mu_tempfile): Likewise. * libmailutils/base/url.c (_url_path_default): Likewise. * libmu_auth/virtual.c (getpwnam_virtual) (mu_auth_virt_domain_by_name): Likewise. * libmu_sieve/extensions/vacation.c (check_db): Likewise. * libmu_sieve/sieve.l (_try_include): Likewise. * maidag/forward.c (maidag_forward): Likewise. * mh/mh.h (mh_safe_make_file_name): New proto. * mh/mh_init.c (mh_audit_open,mh_get_dir) (mh_expand_name,mh_real_install): Use mh_safe_make_file_name. (mh_safe_make_file_name): New function. * mh/folder.c (read_seq_file, _scan): Use mh_safe_make_file_name. * mh/mh_global.c (mh_read_profile, _mh_init_global_sequences): Likewise. * mh/install-mh.c (main): Likewise. * mh/mhn.c (normalize_path, store_handler, main): Likewise. * mh/repl.c (make_draft): Likewise. * mh/rmf.c (rmf): Likewise. * mh/sortm.c (swap_message): Likewise. * mimeview/mimetypes.l (mimetypes_open): Likewise. * lib/mailcap.c: Add error checking.
Sergey Poznyakoff authored
-
- 10 Oct, 2010 4 commits
-
-
* python/libmu_py/folder.c (api_folder_set_stream): Remove. * python/libmu_py/message.c (api_message_set_stream): Remove. * python/libmu_py/stream.c (api_stream_ref, api_stream_unref): Add. (api_stream_sequential_readline, api_stream_sequential_write): Remove.
Wojciech Polak authored -
* include/mailutils/cstr.h (mu_strcasestr): Rename to mu_c_strcasestr. * libmailutils/string/cstrcasestr.c: Likewise. All uses changed.
Sergey Poznyakoff authored -
* libmailutils/base/mutil.c (mu_hex2ul, mu_hexstr2ul): Move to string/hexstr.c. (mu_get_homedir, mu_get_full_path) (mu_expand_path_pattern): Move to base/filename.c. (mu_getcwd): Move to base/getcwd.c. (mu_tilde_expansion): Move to base/tilde.c (mu_cpystr): Move to string/cpystr.c. (mu_get_host_name): Move to base/hostname.c. (mu_set_user_email,mu_set_user_email_domain) (mu_get_user_email_domain,mu_aget_user_email_domain) (mu_get_user_email,mu_normalize_path): Move to base/usremail.c. (mu_tempfile,mu_tempname): Move to base/tempfile.c. (mu_spawnvp): Move to base/spawnvp.c. (mu_qualify_link,mu_unroll_symlink): Move to base/symlink.c. (mu_rfc2822_references,mu_rfc2822_msg_id) (mu_rfc2822_in_reply_to): Move to base/msgid.c. (mu_strcasestr): Move to string/cstrcasestr.c. (mu_string_unfold): Move to string/unfold.c. (mu_true_answer_p): Move to string/trueans.c. (mu_scheme_autodetect_p): Move to base/schemeauto.c. (mu_fd_wait): Move to base/fdwait.c. (mu_set_default_fallback,mu_decode_filter): Move to filter/decode.c. (__argp_base_name): Move to lib/argp_base.c. * libmailutils/base/fdwait.c: New file. * libmailutils/base/filename.c: New file. * libmailutils/base/getcwd.c: New file. * libmailutils/base/hostname.c: New file. * libmailutils/base/msgid.c: New file. * libmailutils/base/schemeauto.c: New file. * libmailutils/base/spawnvp.c: New file. * libmailutils/base/symlink.c: New file. * libmailutils/base/tempfile.c: New file. * libmailutils/base/tilde.c: New file. * libmailutils/base/usremail.c: New file. * libmailutils/base/Makefile.am: Add new files. * libmailutils/filter/decode.c: New file. * libmailutils/filter/Makefile.am: Add new files. * libmailutils/string/cpystr.c: New file. * libmailutils/string/cstrcasestr.c: New file. * libmailutils/string/hexstr.c: New file. * libmailutils/string/trueans.c: New file. * libmailutils/string/unfold.c: New file. * libmailutils/string/Makefile.am: Add new files. * lib/argp_base.c: New file. * lib/Makefile.am: Add new files. * include/mailutils/io.h: Include stdarg.h * include/mailutils/mutil.h: Rename to util.h. Reorder prototypes and declarations in logical groups. All uses changed. * include/mailutils/cstr.h (mu_strcasestr): New proto, moved from include/mailutils/mutil.h.
Sergey Poznyakoff authored
-
- 09 Oct, 2010 2 commits
-
-
-
* configure.ac (AC_CONFIG_FILES): Add libmailutils/ subdirs. * include/mailutils/Makefile.am: Update references to libmailutils. * po/POTFILES.in: Likewise. * libmailutils/.gitignore: Update. * libmailutils/Makefile.am: Use convenience libraries in subdirs. * libmailutils/string/Makefile.am: New file. * libmailutils/cstrcasecmp.c: Move to libmailutils/string. * libmailutils/cstrlower.c: Likewise. * libmailutils/cstrupper.c: Likewise. * libmailutils/strltrim.c: Likewise. * libmailutils/strskip.c: Likewise. * libmailutils/stripws.c: Likewise. * libmailutils/strrtrim.c: Likewise. * libmailutils/asnprintf.c: Likewise. * libmailutils/asprintf.c: Likewise. * libmailutils/muctype.c: Likewise. * libmailutils/vasnprintf.c: Likewise. * libmailutils/mkfilename.c: Likewise. * libmailutils/stream/Makefile.am: New file. * libmailutils/dbgstream.c: Move to libmailutils/stream. * libmailutils/file_stream.c: Likewise. * libmailutils/fltstream.c: Likewise. * libmailutils/iostream.c: Likewise. * libmailutils/mapfile_stream.c: Likewise. * libmailutils/memory_stream.c: Likewise. * libmailutils/message_stream.c: Likewise. * libmailutils/prog_stream.c: Likewise. * libmailutils/rdcache_stream.c: Likewise. * libmailutils/socket_stream.c: Likewise. * libmailutils/stdio_stream.c: Likewise. * libmailutils/stream.c: Likewise. * libmailutils/stream_printf.c: Likewise. * libmailutils/stream_vprintf.c: Likewise. * libmailutils/streamcpy.c: Likewise. * libmailutils/streamref.c: Likewise. * libmailutils/tcp.c: Likewise. * libmailutils/temp_file_stream.c: Likewise. * libmailutils/xscript-stream.c * libmailutils/cfg/Makefile.am: New file. * libmailutils/cfg/.gitignore: New file. * libmailutils/cfg_driver.c: Move to libmailutils/cfg/driver.c. * libmailutils/cfg_format.c: Move to libmailutils/cfg/format.c. * libmailutils/cfg_lexer.l: Move to libmailutils/cfg/lexer.l. * libmailutils/cfg_parser.y: Move to libmailutils/cfg/parser.y. * libmailutils/gocs.c: Move to libmailutils/cfg/gocs.c. * libmailutils/diag/Makefile.am: New file. * libmailutils/diag/.gitignore: New file. * libmailutils/debug.c: Move to libmailutils/diag. * libmailutils/diag.c: Likewise. * libmailutils/gdebug.c: Likewise. * libmailutils/errors: Likewise. * libmailutils/muerrno.cin: Likewise. * libmailutils/syslog.c: Likewise. * libmailutils/dbgstderr.c: Likewise. * libmailutils/dbgsyslog.c: Likewise. * libmailutils/address/Makefile.am: New file. * libmailutils/address.c: Move to libmailutils/address. * libmailutils/parse822.c: Likewise. * libmailutils/mailbox/Makefile.am: New file. * libmailutils/mailbox.c: Move to libmailutils/mailbox. * libmailutils/mbx_default.c: Likewise. * libmailutils/mbxitr.c: Likewise. * libmailutils/attribute.c: Likewise. * libmailutils/body.c: Likewise. * libmailutils/envelope.c: Likewise. * libmailutils/folder.c: Likewise. * libmailutils/hdritr.c: Likewise. * libmailutils/header.c: Likewise. * libmailutils/message.c: Likewise. * libmailutils/msgscan.c: Likewise. * libmailutils/mailer/Makefile.am: New file. * libmailutils/mailer.c: Move to libmailutils/mailer. * libmailutils/progmailer.c: Likewise. * libmailutils/mime/Makefile.am: New file. * libmailutils/attachment.c: Move to libmailutils/mime. * libmailutils/mime.c: Likewise. * libmailutils/mimehdr.c: Likewise. * libmailutils/server/Makefile.am: New file. * libmailutils/acl.c: Move to libmailutils/server. * libmailutils/server.c: Likewise. * libmailutils/msrv.c: Likewise. * libmailutils/ipsrv.c: Likewise. * libmailutils/auth/Makefile.am: New file. * libmailutils/auth.c: Move to libmailutils/auth. * libmailutils/mu_auth.c: Likewise. * libmailutils/system.c: Likewise. * libmailutils/base/Makefile.am: New file. * libmailutils/base/.gitignore: New file. * libmailutils/alloc.c: Move to libmailutils/base. * libmailutils/amd.c: Likewise. * libmailutils/argcv.c: Likewise. * libmailutils/assoc.c: Likewise. * libmailutils/daemon.c: Likewise. * libmailutils/date.c: Likewise. * libmailutils/fgetpwent.c: Likewise. * libmailutils/freeitem.c: Likewise. * libmailutils/getpass.c: Likewise. * libmailutils/iterator.c: Likewise. * libmailutils/kwd.c: Likewise. * libmailutils/list.c: Likewise. * libmailutils/listlist.c: Likewise. * libmailutils/locale.c: Likewise. * libmailutils/locker.c: Likewise. * libmailutils/mailcap.c: Likewise. * libmailutils/md5.c: Likewise. * libmailutils/monitor.c: Likewise. * libmailutils/munre.c: Likewise. * libmailutils/mutil.c: Likewise. * libmailutils/nls.c: Likewise. * libmailutils/nullrec.c: Likewise. * libmailutils/observer.c: Likewise. * libmailutils/opool.c: Likewise. * libmailutils/parsedate.y: Likewise. * libmailutils/permstr.c: Likewise. * libmailutils/property.c: Likewise. * libmailutils/registrar.c: Likewise. * libmailutils/refcount.c: Likewise. * libmailutils/rfc2047.c: Likewise. * libmailutils/sha1.c: Likewise. * libmailutils/secret.c: Likewise. * libmailutils/ticket.c: Likewise. * libmailutils/url.c: Likewise. * libmailutils/vartab.c: Likewise. * libmailutils/version.c: Likewise. * libmailutils/wicket.c: Likewise.
Sergey Poznyakoff authored
-
- 08 Oct, 2010 3 commits
-
-
* mu/Makefile.am [MU_COND_SUPPORT_POP]: Compile pop.c conditionally. * mu/mu.c (mutool_nosys): New function. (mutool_action_tab): Compile pop support conditionally.
Sergey Poznyakoff authored -
-
* maidag/forward.c (check_forward_permissions): Keep track of the processed files. Refuse to process a file twice. (process_forward): Rewrite using streams instead of FILE. (maidag_forward): Accept absolute file names (mainly for testing). * maidag/maidag.c (forward_checks): New keyword "owner". (cb2_forward_file_checks): New keyword "none". (main): Require at least one recipient in MDA mode. * maidag/maidag.h (FWD_OWNER): New mask. * maidag/tests/forward.at: New file. * maidag/tests/Makefile.am (TESTSUITE_AT): Add forward.at * maidag/tests/testsuite.at: Include forward.at.
Sergey Poznyakoff authored
-