- 01 Jan, 2017 1 commit
-
-
- 01 Dec, 2016 1 commit
-
-
After successful delivery, maidag would switch back to root privileges too early, due to which the mailbox would be closed when running with root UID. I the property file (.mu-prop) did not exist, it would therefore be created by root. Subsequent attempts to open it by user would fail. One of consequences is that the UIDVALIDITY value would be recalculated each time the mailbox is opened. This would force imap4 clients to rescan mailboxes infinitely, as each scan would change the UIDVALIDITY again. This patch fixes the initialization of UIDVALIDITY and fixes maidag to switch back to root privileges only after closing the mailbox. It also makes sure MH and Maildir mailboxes write .mu-prop upon closing, not upon destroying the mailbox. * libmailutils/base/amd.c (amd_close): Save property. (_amd_scan0): Use mailbox modification time as initial uidvalidity value. * maidag/deliver.c (deliver_to_mailbox): Remove uselsess UID/GID transitions.
Sergey Poznyakoff authored
-
- 22 Jan, 2016 1 commit
-
-
- 27 Oct, 2015 1 commit
-
-
When delivering message, the library may need to know the email address of the user on behalf of whom maidag is called. In particular, that happens when using the vacation extension. In that case the library would construct the email by concatenating user name, obtained as a result of mu_get_auth_by_uid, and current domain name. Avoid this by remembering email address the message is being delivered to. * libmailutils/base/usremail.c (mu_set_user_email): NULL argument clears email. (mu_get_user_email): Use EUID instead of UID. * maidag/deliver.c (do_delivery): Set user email prior to delivery. * maidag/maidag.c (default_domain): New variable. (maidag_cfg_param): New setting "domain". * maidag/maidag.h (default_domain): New extern.
Sergey Poznyakoff authored
-
- 02 Mar, 2015 1 commit
-
-
- 06 Feb, 2014 1 commit
-
-
* include/mailutils/mailbox.h (mu_mailbox_set_notify) (mu_mailbox_unset_notify): New protos. * include/mailutils/sys/mailbox.h (_mu_mailbox) <notify_user> <notify_fd,notify_sa>: New members. * libmailutils/mailbox/Makefile.am (libmailbox_la_SOURCES): Add biffnotify.c * libmailutils/mailbox/biffnotify.c: New file. * libmailutils/mailbox/mailbox.c (_mailbox_create_from_record): Initialize notify_fd. (mu_mailbox_destroy): Free notify_sa. (mu_mailbox_close): Close notify_fd. (mu_mailbox_flush): Rewrite to handle append-only mailboxes effectively. * libmailutils/server/msrv.c (server_cfg_param): Fix docstring. * libmailutils/stream/file_stream.c (fd_open): Open fd read-write if both MU_STREAM_APPEND and MU_STREAM_READ are requested. * libproto/mbox/mbox.c (mbox_expunge0): Rescan the mailbox if messages_count == 0. Special handling for append-only mailboxes. * maidag/deliver.c: Use library notification mechanism. * mh/inc.c: New option --notify. * movemail/movemail.c: Likewise.
Sergey Poznyakoff authored
-
- 05 Feb, 2014 1 commit
-
-
- 05 Jan, 2012 1 commit
-
-
- 08 Dec, 2011 1 commit
-
-
* examples/mta.c (make_tmp): Use gmtime + mu_c_streamftime to create From_ line. * libmailutils/mailbox/msgenv.c (message_envelope_date): Use gmtime. * maidag/deliver.c (make_tmp): Likewise. * maidag/lmtp.c (cfun_data): Likewise. * readmsg/readmsg.c (print_unix_header): Use gmtime.
Sergey Poznyakoff authored
-
- 02 Jan, 2011 1 commit
- 28 Dec, 2010 1 commit
-
-
* imap4d/imap4d.h (util_format_attribute_flags): New prototype. * imap4d/sync.c: Rewrite using flag table to keep attribute flags, mu_mailbox_translate to convert uids to message numbers and MU_EVT_MAILBOX_MESSAGE_EXPUNGE event to report expunged messages. * imap4d/util.c (_imap4d_attrlist): Remove \Recent (util_attribute_to_type): Handle \Recent separately. (util_format_attribute_flags): New function. (util_print_flags): Rewrite as an extra entry point to the above. mailboxes: New event MU_EVT_MAILBOX_MESSAGE_EXPUNGE. * include/mailutils/observer.h: Rearrange and partially rename event constants (all uses updated): MU_EVT_MESSAGE_APPEND => MU_EVT_MAILBOX_MESSAGE_APPEND MU_EVT_AUTHORITY_FAILED => MU_EVT_FOLDER_AUTHORITY_FAILED (MU_EVT_MAILBOX_MESSAGE_EXPUNGE): New event. * libproto/mbox/mbox.c: Generate MU_EVT_MAILBOX_MESSAGE_EXPUNGE. * libproto/pop/mbox.c: Likewise. * libmailutils/base/amd.c: Likewise.
Sergey Poznyakoff authored
-
- 25 Nov, 2010 1 commit
-
-
* include/mailutils/stream.h (mu_temp_file_stream_create): Change signature. * include/mailutils/sys/Makefile.am (sysinclude_HEADERS): Add temp_file_stream.h * include/mailutils/util.h (mu_tempfile_hints): Remove const qualifiers. * libmailutils/stream/temp_file_stream.c: Include sys/temp_file_stream.h. (fd_temp_open): Use data from struct _mu_temp_file_stream. (fd_temp_done): New function. (mu_temp_file_stream_create): Take hints and flags as arguments. * examples/mta.c: Update calls to mu_temp_file_stream_create. * libproto/mbox/mbox.c: Likewise. * libproto/pop/mbox.c: Likewise. * maidag/deliver.c: Likewise. * maidag/lmtp.c: Likewise. * mh/burst.c: Likewise. * mh/prompter.c: Likewise.
Sergey Poznyakoff authored
-
- 27 Oct, 2010 1 commit
-
-
*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
-
- 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
-
- 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
-
- 09 Oct, 2010 1 commit
-
-
- 08 Oct, 2010 2 commits
-
-
* maidag/deliver.c (make_tmp): Return mu_message_t. Use mu_stream_to_message function. (mda): Remove. (maidag_stdio_delivery): Inline mda. * maidag/maidag.h (mda): Remove.
Sergey Poznyakoff authored -
* maidag/maidag.c (mda_mode,lmtp_mode,url_option): Remove. (maidag_mode): New variable. (parse_opt): The --lmtp, --url and --mda options set the delivery-mode configuration statement. (cb_delivery_mode): New callback. (maidag_cfg_param) <delivery-mode>: New statement. (main): Redo delivery mode selection. * maidag/maidag.h (maidag_mode): New enum. (maidag_mode): New extern. (mda_mode,lmtp_mode,url_option): Remove. (maidag_delivery_fn): New typedef. (maidag_stdio_delivery,mda): Change signature. (deliver_to_url, deliver_to_user): New prototypes. * maidag/deliver.c (mda): Take delivery function as a parameter. (maidag_stdio_delivery): Likewise. (deliver_to_user): Rename to deliver_to_mailbox. (deliver_url): Rename to do_delivery. (deliver): Rename to deliver_to_url. (deliver_to_user): New function. * maidag/forward.c (process_forward): Use deliver_to_user. * maidag/lmtp.c (dot_deliver): Likewise.
Sergey Poznyakoff authored
-
- 07 Oct, 2010 1 commit
-
-
* configure.ac: Add maidag/tests * maidag/Makefile.am (SUBDIRS): Add tests. * maidag/deliver.c (make_tmp): Write a message delimiter. (is_remote_url, is_mailer_url): Remove. (deliver_url): Allow for URLs without user name. * maidag/lmtp.c (lmtp_set_privs): Empty group list means do not switch to any groups. * maidag/maidag.c (mda_mode): New variable. (options): New option --mda. (cb_group, cb2_group): Create the list even if it is empty. (main): Handle --mda. * maidag/tests/.gitignore: New file. * maidag/tests/Makefile.am: New file. * maidag/tests/atlocal.in: New file. * maidag/tests/input.msg: New file. * maidag/tests/lmtp.at: New file. * maidag/tests/mda.at: New file. * maidag/tests/testsuite.at: New file. * maidag/tests/url-mbox.at: New file. * maidag/tests/input.msg: New file.
Sergey Poznyakoff authored
-
- 06 Oct, 2010 1 commit
-
-
* libmailutils/file_stream.c (mu_fd_stream_create): Mark stream as open, do not call mu_stream_open explicitly. * libmailutils/message_stream.c (mu_stream_to_message): Bugfixes, wrong owner given to mu_envelope_set_ calls. * libmailutils/stream.c (_MU_STR_FLUSH_ALL) (_MU_STR_FLUSH_KEEP): New macros for _stream_flush_buffer. (_stream_flush_buffer): Change the meaning of the last argument. All callers updated. (mu_stream_seek): Fix operation with MU_SEEK_END. Call _mu_stream_cleareof on success. (mu_stream_read): Call _stream_flush_buffer in buffered mode. (mu_stream_getdelim, mu_stream_readdelim): Call _stream_flush_buffer. * libmailutils/streamcpy.c (mu_stream_copy): Reset size if mu_stream_seek fails. * libmailutils/temp_file_stream.c (mu_temp_file_stream_create): Set full buffering mode by default. * maidag/mailtmp.c: Remove. * maidag/Makefile.am (maidag_SOURCES): Remove mailtmp.c * po/POTFILES.in: Likewise. * maidag/deliver.c (make_tmp): Rewrite. Return mu_mailbox_t. All callers changed. * maidag/lmtp.c (lmtp_transcript): Remove static. (lmpt_transcript): New function. (lmtp_reply): Use mu_stream_t instead of FILE. (xlatnl): Remove. Superseded by mu_rtrim_cset and family. (mtmp, mbox): Remove globals. (mesg): New global. (cfun_unknown, cfun_mail_from, cfun_rcpt_to) (dot_temp_fail, dot_deliver, cfun_rset) (cfun_lhlo, cfun_quit, cfun_help): Use mu_stream_t instead of FILE. (cfun_data): Rewrite. (cfun_dot): Remove. (to_fgets): Rewrite using mu_stream_t. (lmtp_loop): Change signature. Rewrite using mu_stream_t. (lmtp_connection, maidag_lmtp_server): Update accordingly. * maidag/maidag.c (maidag_transcript): New global. (options, parse_opt): New option --transcript. * maidag/maidag.h (maidag_transcript): New extern. (mail_tmp_begin, mail_tmp_add_line, mail_tmp_finish) (mail_tmp_destroy): Remove.
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
-
- 19 May, 2009 1 commit
-
-
* maidag/deliver.c: Run filter scripts with user privileges. * maidag/script.c (apply_script): Use stat, not access, to check for the existence of the script file. Access takes into account accessibility of intermediate directories, which is irrelevant in this case. * mailbox/mutil.c (mu_expand_path_pattern): Bugfix. Remove the % format specifiers after expanding them.
Sergey Poznyakoff authored
-
- 07 Apr, 2009 1 commit
-
-
* NEWS: Update. * configure.ac (MU_LIB_REMOTE): Remove. (AC_CONFIG_FILES): Remove libproto/remote/Makefile. * include/mailutils/registrar.h (mu_remote_mbox_record): Remove. (MU_REMOTE_MBOX_PRIO): Remove. * libproto/Makefile.am (SUBDIRS): Remove remote. * libproto/include/mailer0.h (_mu_mailer_mailbox_init) (_mu_mailer_folder_init): New protos. * libproto/include/registrar0.h (_url_smtp_init) (_mailer_smtp_init): Remove. (_mu_mailer_sendmail_init, _mu_mailer_prog_init): Add prototype. * libproto/include/url0.h (struct _mu_url._uplevel): New member. * libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES): Remove url_sendmail.c and url_smtp.c. * libproto/mailer/mbox.c: Move from ../remote. * libproto/mailer/url_sendmail.c: Remove. * libproto/mailer/url_smtp.c: Remove. * libproto/mailer/prog.c: Fix namespace. * libproto/mailer/sendmail.c: Likewise. * libproto/mailer/smtp.c: Likewise. * libproto/mailer/remote.c: New file. * libproto/remote/: Remove. * maidag/Makefile.am (maidag_LDADD): Remove ${MU_LIB_REMOTE}. * maidag/deliver.c (deliver_url): Remove `remote+' hack. (deliver): Fix error message. * maidag/guile.c: Fix indentation. * maidag/maidag.c: Support `remote+' mailboxes for backward compatibility. * mailbox/mailbox.c (_create_mailbox0): Call u_init after ensuring that url->scheme coincides with record->scheme. * mailbox/url.c (mu_url_uplevel): Use url->_uplevel, if defined. * libmu_argp/mu_argp.h (mu_check_option): Remove duplicate and incorrect prototype.
Sergey Poznyakoff authored
-
- 24 Mar, 2009 1 commit
-
-
* include/mailutils/guile.h (mu_guile_init, mu_guile_load) (mu_guile_eval, mu_guile_mailbox_apply, mu_guile_message_apply) (mu_guile_safe_exec, mu_guile_safe_proc_call): New protos. * libmu_scm/Makefile.am: Add mu_guile.c * libmu_scm/mu_guile.c: New file. * libmu_scm/mu_mailbox.c (struct mu_mailbox): Kludge: new member noclose. (mu_scm_mailbox_free): Do not close/destroy mailbox if it is marked noclose. (mu_scm_mailbox_create0): Kludge: new function. * libmu_scm/mu_message.c (mu_scm_message_print): Bugfix. * maidag/Makefile.am: Add guile.c and sieve.c. * maidag/deliver.c (maidag_stdio_delivery) [WITH_GUILE]: Remove block. (deliver_url): Call script_apply, instead of sieve_test. * maidag/maidag.c: Rewrite scripting support in a modular way. Remove options: --sieve, --source (and the corresponding config statements). Add options: --language, --script. Add configure statement: filter (block). * maidag/maidag.h (progfile_pattern, sieve_pattern): Remove. (script_list, sieve_debug_flags, message_id_header, sieve_enable_log): New prototypes. [WITH_GUILE]: Remove. (maidag_script_fun, struct maidag_script): New data type. (script_handler): New extern. (script_lang_handler, script_suffix_handler) (script_register, script_apply): New protos. (scheme_check_msg, sieve_check_msg): New protos. * maidag/script.c: Rewrite. Provide general-purpose serialized script support. * guimb/guimb.h (struct guimb_data): Remove. * guimb/main.c: Rewrite in a cleaner way, using functions from mu_guile.c. * guimb/collect.c (guimb_catch_body, guimb_catch_handler) (guimb_exit): Remove. * guimb/scm/sieve-core.scm (sieve-current-message, sieve-mailbox): Public. (sieve-run-current-message): New public function. (sieve-run): Call sieve-run-current-message for each message. * guimb/scm/sieve.scm.in (sieve-save-program): Change code generation to suit both per-mailbox and per-message invocation. This kicks mail.local out of whack. * maidag/guile.c: New file. * maidag/sieve.c: New file.
Sergey Poznyakoff authored
-
- 05 Nov, 2008 2 commits
-
-
* maidag/forward.c: New file. * maidag/Makefile.am (maidag_SOURCES): Add forward.c. * maidag/deliver.c (deliver_url): Call maidag_forward for local users. * maidag/maidag.c (forward_file, forward_file_checks): New variables. (maidag_cfg_param): New keywords forward-file and forward-file-checks. * maidag/maidag.h (FWD_IWGRP, FWD_IWOTH, FWD_LINK, FWD_DIR_IWGRP) (FWD_DIR_IWOTH, FWD_ALL): New defines. (forward_file, forward_file_checks): New variables. (enum maidag_forward_result): New data type. (maidag_forward): New prototype.
Sergey Poznyakoff authored -
* maidag/deliver.c (mda): Pass msg as a 1st argument to deliver. (deliver_to_user): Remove 1st argument. (deliver): Change type of the 1st argument to mu_message_t. * maidag/lmtp.c (dot_deliver): Pass msg as a 1st argument to deliver. * maidag/maidag.c (sieve_test): Change type of the 2nd argument to mu_message_t. * maidag/maidag.h (sieve_test, deliver): Pass mu_message_t, instead of mu_message_t. * mailbox/mailer.c (mu_mailer_create_from_url): Set default debug level. * sql/mysql.c (mu_mysql_connect): Avoid coredumps if conn->server is NULL.
Sergey Poznyakoff authored
-
- 28 Oct, 2008 1 commit
-
-
This makes it possible to `deliver' mails to mailers without explicitly specifying `remote+mailer' mailbox URLs. In particular, it is handy for implementing mailing lists using `prog' mailers (as with Mailman). * maidag/deliver.c (notify_action): Do nothing if biff_user_name is empty. (deliver_to_user): Remove `name' argument. Allow for auth==NULL. (is_remote_url): Use case-sensitive comparison. (is_mailer_url): New function. (deliver_url): Handle mailer URLs as if they were corresponding `remote+' mailbox URLs. This allows to handle mailing lists. * maidag/lmtp.c (lmtp_groups): New global. (lmtp_set_privs): New function. Sets primary and supplementary group privileges. (maidag_lmtp_server): Call lmtp_set_privs. * maidag/maidag.c (lmtp_group): Remove. It is superceded by lmtp_groups. (maidag_cfg_param): Allow to specify supplementary groups. * maidag/maidag.h (lmtp_group): Replace with lmtp_groups.
Sergey Poznyakoff authored
-
- 18 Oct, 2008 1 commit
-
-
* NEWS: Update. * doc/texinfo/libmuauth.texi: Update. * doc/texinfo/mailutils.texi: Update. * doc/texinfo/programs.texi: Update. * include/mailutils/mailbox.h (mu_mailbox_create_from_url): New function. * include/mailutils/mutil.h (mu_aget_user_email_domain): New function. * libproto/include/address0.h: Remove obsolete comment. * libproto/remote/mbox.c (remote_mbox_append_message): If recipient address is not given, try to construct it from the URL. * mailbox/mailbox.c (mu_mailbox_create_from_url): New function. * mailbox/mutil.c (mu_aget_user_email_domain): New function. * maidag/deliver.c (deliver_to_user): Mailbox and auth must be freed by the caller. (deliver_url): New function. (deliver): Rewrite to allow for delivering to mailboxes explicitly specified by URLs (--url command line option). * maidag/maidag.c (options): New option --url. (main): Handle --url. * maidag/maidag.h (url_option): New global. * maidag/mailquota.c (check_quota): Return if auth == NULL.
Sergey Poznyakoff authored
-
- 03 Mar, 2008 1 commit
-
-
* maidag/deliver.c, maidag/maidag.h, maidag/mailtmp.c: Rename mailer_err to maidag_error. * maidag/util.c (mailer_err): Rename to maidag_error. Print to stderr only if log_to_stderr is set.
Sergey Poznyakoff authored
-
- 30 Dec, 2007 1 commit
-
-
* frm/testsuite/frm/test.exp: Call mu_init with -noflags option. Use --mail-folder option when necessary. * messages/testsuite/messages/test.exp: Likewise. * readmsg/testsuite/readmsg/test.exp: Likewise. * sieve/testsuite/lib/sieve.exp: Likewise. * sieve/testsuite/sieve/action.exp: Likewise. * sieve/testsuite/scripts/fileinto.sv: Use +file, instead of %file. * imap4d/imap4d.c: Register mailbox formats before parsing configuration. * imap4d/util.c (util_wcard_match): Replaced with a more efficient implementation, based on wildmat from GNU Radius. * imap4d/testsuite/imap4d/list.exp: Expect two non-mailbox files to appear in the list output (see libproto/mbox/folder.c, 2007-12-28). * libargp/common.c: New option --mail-folder. * libcfg/common.c: New statement mailbox/folder * libproto/maildir/folder.c (_maildir_is_scheme): Never return MU_FOLDER_ATTRIBUTE_DIRECTORY bit: maildir folders cannot contain subfolders. * libproto/maildir/mbox.c (maildir_msg_init): Bugfix: use full file name. Print additional diagnostics if stat fails. * libproto/mbox/folder.c (list_helper): Take additional argument, record, specifying a mu_record_t object to match entries against. If it is NULL, mu_registrar_lookup is used. Fix descending into subdirectories. * maidag/deliver.c (deliver): Split off deliver_to_user function; call it with user privileges. This fixes privileges of any created maildir folders. * maidag/maidag.c (set_debug_flags): Bugfix. * mail/mail.c (main): Open the mailbox with MU_STREAM_CREAT flag. * mailbox/amd.c (amd_open): Do not initialize amd->mtime to trigger initial scanning. (_amd_message_save): Check rename return value. (amd_is_updated): Do not check for msg_count==0, rely on the timestamp. * mailbox/mailbox.c (mu_mailbox_set_default_proto): Accept an argument without trailing semicolon. * mailbox/mbx_default.c (mu_set_mail_directory): Accept NULL argument. (mu_set_mailbox_pattern): Likewise. (mu_mailbox_create_default): Use FOLDER or MAIL environment variables only if _mu_mailbox_pattern is not set. In other words, setting mail-spool in the configuration file overrides these variables.
Sergey Poznyakoff authored
-
- 10 Nov, 2007 1 commit
-
-
* frm/common.c, imap4d/sync.c, libsieve/runtime.c, mh/scan.c: Update declaration of observable actions . * imap4d/select.c, imap4d/status.c, mh/anno.c, mh/forw.c, mh/repl.c: Use mu_mailbox_sync instead of mu_mailbox_save_attributes. * include/mailutils/mailbox.h (mu_mailbox_sync): New function. (mu_mailbox_save_attributes): Deprecated. * include/mailutils/message.h (mu_message_get_qid) (mu_message_set_qid): New functions. * include/mailutils/observer.h (MU_EVT_MESSAGE_APPEND): New event. (mu_observer_set_action_data): New function. Registers action-specific data. (mu_observable_notify): Get call-specific data as the third argument. * include/mailutils/types.hin (mu_message_qid_t): New data type. * libproto/imap/folder.c, libproto/imap/mbox.c, libproto/include/amd.h, libproto/maildir/mbox.c, libproto/mailer/sendmail.c, libproto/mailer/smtp.c, libproto/mbox/mboxscan.c, libproto/mh/mbox.c, libproto/nntp/mbox.c, libproto/pop/mbox.c, mailbox/folder.c, mailbox/mailer.c : Update calls to mu_observable_notify. * libproto/include/mailbox0.h (struct _mu_mailbox): Rename _save_attributes to _sync. * mailbox/amd.c: Likewise (_quick_get_message): New member. (MAILBOX_NOTIFY): Remove. * libproto/include/message0.h (struct _mu_message): New member _get_qid. * libproto/include/observer0.h (struct _mu_observer): New member _action_data. * libproto/mbox/mbox.c: Implement mbox_message_qid. Update calls to mu_observable_notify. (mbox_append_message): Report MU_EVT_MESSAGE_APPEND * mailbox/observer.c (mu_observer_destroy): Call _destroy with _action_data as its third argument. (mu_observer_action, mu_observable_notify): Takes third argument (call data) (mu_observer_set_action, mu_observer_set_destroy): Update signature. (mu_observer_set_action_data): New function. * libproto/mbox/mbox0.h, mail.local/main.c: Minor change. * mail.local/Makefile.am (mail_local_LDADD): Add MU_LIB_MAILER * mailbox/file_stream.c (_file_open): Fix handling of MU_STREAM_APPEND. Remove assertion. * mailbox/mailbox.c (mu_mailbox_quick_get_message): New function (mu_mailbox_sync): New function (mu_mailbox_get_size): Implement brute-force approach in case the mailbox does not provide a method. * mailbox/message.c (mu_message_get_qid, mu_message_set_qid): New function. * maildag/: New directory. A general-purpose mail delivery agent. * maildag/deliver.c: New file. * maildag/lmtp.c: New file. * maildag/maidag.c: New file. * maildag/maidag.h: New file. * maildag/mailtmp.c: New file. * maildag/mailquota.c: New file. * maildag/script.c: New file. * maildag/util.c: New file. * maildag/Makefile.am: New file. * maildag/.cvsignore: New file.
Sergey Poznyakoff authored
-