summaryrefslogtreecommitdiffstats
path: root/mailbox.h
AgeCommit message (Collapse)Author
2020-12-12Add "headers" parameter to mx_open_message().Kevin McCarthy
This will allow some operations to retrieve only headers, such as ~h pattern matching or the new list menu. Modify the IMAP and POP3 implementation to retrieve only headers when the parameter is set. Headers-only will use the message cache if one exists, but will not populate the message cache (since the body of the message is not downloaded.)
2020-05-31Try to automatically reconnect to an open IMAP mailbox on error.Kevin McCarthy
For the Context, change cmd_handle_fatal() to flag idata->status on the error, but not close the mailbox and disconnect. Then have imap_check_mailbox() reconnect when IMAP_REOPEN_ALLOW is set (so the index is prepared to rebuild with all new headers). Try to merge flag, envelope, and attach_del changes back in. Replace the existing Context pointer with the new values, and swap out the idata passed in on success, so we don't continue to work with the wrong idata. The imap_check_mailbox() changes are purposely coded loosely to try and catch all sorts of errors - not just polling and imap_idle errors. Create a new check_mailbox() return code to indicate a reconnect. Display a more appropriate message in the index, but otherwise treat it the same as a REOPEN.
2018-12-31Remove trailing whitespace.Kevin McCarthy
The result of find . -name "*.[ch]" -exec emacs -batch {} \ --eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \;
2018-12-17Add mx operation save_to_header_cache.Kevin McCarthy
This will be used when reading protected headers, to store the encrypted subject in the header cache so it can be searched with.
2018-07-25Add mx_ops.msg_padding_size to return the padding for a mx type.Kevin McCarthy
Mbox pads with a 1 byte, while mmdf pads with 10. Because compress depends on the child type, we create a mx_ops, which allows compress.c to delegate to the child ops.
2016-08-01Use a different flag in mx_open_mailbox_append() when mailbox doesn't exist.Kevin McCarthy
The previous commit re-used MUTT_NEWFOLDER, but the meaning of that flag is slightly different: it causes mbox to use fopen with mode "w", and is used only for the case of a brand-new mktemp-generated mbox. Setting it for other non-existing mbox files leads to a race condition between the stat and the fopen/lock, and so could end up truncating an existing mailbox created in-between! Create a different flag, MUTT_APPENDNEW to notify the open_append() functions that the mailbox doesn't exist. Change maildir and mh to check for that flag to create their directory structures.
2016-06-18Remove magic member in MESSAGE structureDamien Riegel
The "magic" was copied from the context to the message structure to be able to determine which close function had to be called in mx_close_message. Now that this function is context aware, there is no need to store the magic in the MESSAGE structure and it can be safely removed.
2016-06-18pass context in mx_close_messageDamien Riegel
The mx_close_message is one of the few mx_* functions that don't have a context as parameter. To make them more consistent, pass the context.
2016-06-07Make extended buffy independent of the sidebar.Kevin McCarthy
Add new boolean option $mail_check_stats (default off) and $mail_check_stats_interval. The first turns extended buffy on. The second sets the amount of time in between extended buffy checks (defaulting to 60 seconds). Remove the option $sidebar_refresh_time. Change mutt_buffy_check() to only notify the sidebar to redraw if a mailbox buffy value changes. Remove the #ifdefs around the extended buffy functions. The next patch will merge these functions with the basic functions and pass a parameter instead. Imap is a special case, because it sends out the status in one batch. Change this to perform the comparisons inside cmd_parse_status() and flag the sidebar there. It was previously directly assigning the status counters (unsigned int) to the buffy->new (short). Change this to assign 1/0.
2016-06-04Add neomutt version of sidebar patch. (closes #3829)Richard Russon
This is the patch from neomutt; branch 'devel/win-sidebar'; commit c796fa85f9cacefb69b8f7d8545fc9ba71674180 with the following changes: - move the sample muttrc and vimrc to contrib. - remove the README.sidebar. - empty out the PATCHES file.
2016-05-26Fix header file indentation after M_ prefix renaming.Kevin McCarthy
The use of tabs caused misalignment of various macro definitions.
2016-05-26mx_check_mailbox: remove lock argument in function callDamien Riegel
This function is only called in one place with lock = 0. Basically, all code under if (lock) is dead code, so we can remove it, making the function simpler to factorize.
2016-05-25add open_new_msg operation to struct mx_opsDamien Riegel
The code was already using a function pointer to do this operation. This commit moves this function pointer to the mx_ops structure and the open_new_message functions to their respective source files if it needs to.
2016-05-09Change M_* symbols to MUTT_*Derek Martin
Changeset 23334e967dd7 created a workaround for a namespace conflict with Solaris and derivatives. After some discussion, the team decided it would be best to move away from using the "M_" prefix for macros. This patch was automatically generated by running: perl -wpi -e 's/\bM_(\w+)\b/MUTT_$1/g' `find . -name '*.[ch]' -print` with the exception that sys_socket.h was exempted. (That file will be backed out subsequent to this commit.) Thanks to Andras Salamon for supplying the perl script used to make this change.
2015-01-15Send the IMAP \Draft flag when postponing a message.Kevin McCarthy
This patch adds a mx_open_new_message() flag, M_SET_DRAFT. It also adds a MESSAGE->flags.draft flag. mutt_write_fcc() passes the M_SET_DRAFT flag to mx_open_new_message(), which then sets MESSAGE->flags.draft. Then, imap_append_message() is able to see this flag and so adds the \Draft flag. The imap_append_message() function started to have a bit too many flags, so this version of the patch separates out the flag generating code into a simpler version.
2009-04-29Move Maildir/MH folder detection from mx.c to mh.cRocco Rutte
2005-09-17Gah, forgot the zip code when updating the FSF address...Brendan Cully
2005-09-17Update FSF address (via sed, I hope nothing got mangled). Closes: #2071.Brendan Cully
2002-11-12The maildir_time patch.Michael Elkins
2002-03-28patch-1.3.28-me.emptycheck.1Thomas Roessler
2002-03-20Rename the new M_NEW by M_NEWFOLDER. There was another constant ofThomas Roessler
the same name. Problem noted by Will Yardley's compiler.
2002-03-13Don't fopen mail folders in append mode where we should safe_fopen()Thomas Roessler
them in write mode. Debian bug #138200, noted by Colin Philipps <cph@cph.demon.co.uk>. NEEDS BACKPORTING.
2001-07-31Add mh_sequences support. I hope this works.Thomas Roessler
2001-06-01More concurrent IMAP modification handling from Brendan Cully.Thomas Roessler
2001-02-19Brendan Cully's generic access() wrapper which know about IMAP.Thomas Roessler
2000-10-10Vsevolod Volkov's POP mailbox patch.Thomas Roessler
2000-03-03The FSF apparently has moved.Thomas Roessler
2000-03-03Fix index updates when closing or synching mail folders fails.Thomas Roessler
There were some bug-fixes hidden in that code.
2000-01-06Update copyright notices for unstable.Thomas Roessler
1999-09-01When the user synchronizes a mail folder, do a thorough check.Thomas Roessler
1999-07-01Various patches from last week, including:Thomas Roessler
- new mh/maildir access code. - subscribe/unsubscribe - various fixes.
1999-01-07Get rid of RCS ids in source files. They are getting in our wayThomas Roessler
when merging changes.
1998-10-13Add RCS $Id$ strings to (hopefully) all source files.Thomas Roessler
1998-08-25CVS branch clean-up.Thomas Roessler
1998-06-15Brandon's IMAP patch.Thomas Roessler
1998-06-08Initial revisionThomas Roessler