Commit Graph

23 Commits

Author SHA1 Message Date
Michael Elkins
7cd74a1179 Bunch 'o patches from Oswald Buddenhagen:
i implemented some cool stuff (tm).
first, the long missing "create server-side missing mailboxes". -C now
creates both local and remote boxes; -L and -R create only local/remote.
second, i implemented a 1:1 remote:local folder mapping (-1) with an
optional INBOX exception (inbox/-I). the remote folder is specified with
the folder keyword (or -F switch) and takes precedence over the
namespace setting. the local directory with the mailboxes can now be
specified on the command line, too (-M).

another patch:
- made the -1 switch settable permanently (OneToOne). after all, you
  usually define your mailbox layout once forever. removed -A, as it is
  semantically -a modified by -1.
- cleaned up message output a bit. still, the quiet variable should be
  used throughout the program. at best, create some generic output
  function, which obeys a global verbosity level variable.
- optimized + cleaned up configuration parser slightly
- minor cleanups

add an (almost) unique id to every uploaded message and search for it
right after. i thought about using the message-id, but a) it is not
guaranteed to be unique in a mailbox (imagine you edit a mail and store
the dupe in the same box) and b) some mails (e.g., postponed) don't even
have one. a downside of the current implementation is, that this
id-header remains in the mailbox, but given that it wastes only 27 bytes
per mail and removing it would mean several roundtrips more, this seems
acceptable.
i changed the line-counting loop to use a mmapped file instead of
reading it in chunks, as it makes things simpler and is probably even
faster for big mails.
the amount of goto statements in my code may be scary, but c is simply
lacking a multi-level break statement. :)

this is the "shut up" patch. :) it makes the -q option consequent, so to
say.
additionally it adds an -l option which gathers all defined/found
mailboxes and just outputs the list. don't ask what i need it for. ;)
2002-10-30 02:23:05 +00:00
Michael Elkins
0bd3709a9d fixed missing closedir() call (Joey Hess) 2002-10-30 02:01:32 +00:00
Michael Elkins
85b5c5b8c9 remove debian/files
move dotlocking code to dotlock.c.

dotlocking code fixed to ignore whether or not the lockfile exists on
open().  we only care about whether fcntl() was able to lock it.
2002-06-20 23:33:13 +00:00
Michael Elkins
54d8140f6e fixed unused var warning in imap_open()
locking cleanups from Oswald Buddenhagen <ossi@kde.org>
	* don't need to stat the lockfile since it will always be size 0
	* only remove lockfile when we actually succeeded in locking
2002-06-19 01:11:36 +00:00
Michael Elkins
f6c037c854 updated URL for project
fixed segmentation fault caused by double free() when an error occurred
during the IMAP transmission.

fixed bug where isync could not handle a 0 value UIDVALIDITY
2002-06-18 06:37:55 +00:00
Michael Elkins
2f2b123d71 sync_mailbox() did not update the msg struct when flags were changed,
causing the expunge command to fail

remove bogus strfcpy() line
2002-01-16 22:13:19 +00:00
Michael Elkins
d6fe5a92bd added debian build files
fixed indentation

added bug note to manpage about db file format not being architecture
independent
2002-01-16 21:43:58 +00:00
Michael Elkins
cb0d4b54b3 remove the uid from the db when a message is deleted from the maildir
optimize db fetch/store to not copy the base filename
2002-01-16 21:22:43 +00:00
Michael Elkins
c121ec912f updated year in copyright notice
the uid for each message in the maildir is now stored in a dbm database
rather than the filename.  this change was necessary because isync became
confused if you copied a message to another folder, in which case the uid
was invalid.

as a result of the above change, isync now acquires a mutex on the mailbox
to protect the dbm database from concurrent access.

main() was reworked to continue gracefully when an error is encountered, and
to always call maildir_close() so that the lock can be disabled, and the
database closed.
2002-01-16 19:47:28 +00:00
Michael Elkins
3fe6f3f086 added --create/-C command line option to force creation of the local
maildir-style mailbox if nonexistent

debug.h was not included in isync_SOURCES in Makefile.am
2001-11-20 18:06:09 +00:00
Michael Elkins
bb62e2c18d merge maildir_sync() and maildir_close(). the maxuid in a maildir still
needs to be updated in --fast mode, and the sync code already checks to see
if any changes were made to the mailbox.
2001-11-12 23:03:33 +00:00
Michael Elkins
087fb470e7 update version to 0.7
detect short write in write_strip()

fix compilation warnings with gcc-2.95.4
2001-11-09 00:23:50 +00:00
Michael Elkins
8ca8c2b289 fixed broken code in maildir_clean_tmp() 2001-10-03 17:10:40 +00:00
Michael Elkins
c4050700c0 added code to clean the tmp directory in a maildir to comply with
maildir(5)
2001-10-03 16:48:17 +00:00
Michael Elkins
0f7823a4bf fixed to not expand filenames until they are used inside of maildir_open(),
so that aliases are not required for simple filenames.
[re: http://bugs.debian.org/102255]
2001-07-18 18:49:55 +00:00
Michael Elkins
1b97128b47 rfc2595 compliance patch from Daniel Resare <noa@metamatrix.se>
- CAPABILITY should be reissued after starting TLS since the
	  previous call was not protected
2001-02-19 18:44:15 +00:00
Michael Elkins
91d2f60584 fixed cram compilation error under bsd
updated man page
2001-01-24 07:09:28 +00:00
Michael Elkins
8944538399 always put changed messages in the cur/ subdirectory since they are no
longer new.

don't set \Seen implicitly for messages in the cur/ folder.  Require the S
flag on the message since Mutt will move Old (unread, but not recent)
messges into cur/.
2001-01-09 20:09:35 +00:00
Michael Elkins
acd674f93e allow leading whitespace in config files
now possible to sync multiple mailboxes by specifying multiple aliases on
the command line.  IMAP connections are reused if possible.

don't initialize ssl unless we are going to use it.
2000-12-27 21:14:22 +00:00
Michael Elkins
0527181f45 added MaxSize configuration variable
fixed --fast to work robustly without relying on the \Recent flag in
messages
2000-12-22 07:14:32 +00:00
Michael Elkins
a8f9af4296 RFC822.PEEK is obsolete in RFC2060. Use BODY.PEEK[] instead, which does
the same thing

keep track of the uidvalidity so isync can detect if the mailbox on the
server has changed since the last sync.
2000-12-21 23:10:18 +00:00
Michael Elkins
21bf53b2ab don't fetch deleted messages when expunging
display number of messages that are to be deleted

flags for \Recent messages were not properly fetched

local messages with updated flags were not corrected renamed
2000-12-21 00:30:53 +00:00
Michael Elkins
f47d0d7c11 initial import 2000-12-20 21:41:21 +00:00