aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
Commit message (Collapse)AuthorAgeFilesLines
* Align with legacy_6x.Matthias Andree2019-08-251-10/+2
| | | | | | * Normalize include order. * Backport missed bug fixes. * Remove dead code.
* Comment on EXISTS in response to EXPUNGE.Matthias Andree2019-08-051-1/+3
|
* Drop socket when receiving unexpected untagged * BYE.Matthias Andree2019-05-121-0/+4
| | | | | | Reported against 6.3.26 by minorwiping@vfemail.net when polling from imap.yandex.com and it looped on "* BYE Autologout; idle for too long" in response to a A0001 CAPABILITY request.
* Add line termination when reporting unexpected untagged * BYE contents.Matthias Andree2019-05-121-1/+1
|
* imap_delete(): clean up delflags[_seen] variables.Matthias Andree2018-06-211-6/+1
|
* In-depth fix for to64frombits() BASE64 encoder buffer sizing.Matthias Andree2018-04-141-1/+1
|
* TLS overhaul, bumping version to 6.4Matthias Andree2015-01-261-17/+19
| | | | | | | | | | | | | | | Removes SSLv2, enables TLSv1.1 and v1.2 more easily, permits SSLv3 (only if specified) and newer TLSv1.1+ for STLS/STARTTLS. Only negotiates TLSv1 and newer by default, SSLv3 must now be specified explicitly, as a consequence of the POODLE attack. This is meant to be a minimally upgraded version, and cannot be usefully done as a 6.3.X release. It is strongly recommended that users review their configuration - especially --sslproto - per instructions in the NEWS file and manual page. It has changed semantics and in many cases --sslproto auto or perhaps --sslproto tls1.2+ should be used now.
* fetchmail workaround for a bug in Microsoft ExchangeSunil Shetye2012-05-101-1/+1
| | | | | | | treat missing header in response to a FETCH command as a transient error (Reported by John Connett) if there are too many transient errors, log it.
* fetchmail workaround for a bug in ZimbraMikulas Patocka2011-11-221-1/+2
| | | | | | | | | | | | | | | | | Zimbra occasionally returns this response: fetchmail: IMAP> A0007 FETCH 1 RFC822.HEADER fetchmail: IMAP< * 1 FETCH () fetchmail: IMAP< A0007 OK FETCH completed It happens when there is a corrupted message without a header in the database. (I don't know how this message could be created, I just see it there). When fetchmail encounters such resonse, it gives up and disconnects. This patch changes it so that PS_TRANSIENT is returned in this case and fetchmail continues to fetch following messages correctly.
* Drop FETCHMAIL_IMAP_DELETED_REMAINS_UNSEEN dud again.Matthias Andree2011-05-261-11/+2
|
* Run S(TART)TLS negotiation under timeout alarm.Matthias Andree2011-05-261-2/+4
| | | | Reported missing by Thomas Jarosch.
* Handle socket errors on CAPABILITY probes.Matthias Andree2011-05-221-3/+9
|
* Fixup: remove unused variables.Matthias Andree2011-05-041-1/+1
|
* Do not search for UNSEEN messages in ranges.Sunil Shetye2011-05-041-48/+26
| | | | | | | | | | Add gen_recv_split() to split long protocol messages when the message prefix matches Order of search commands: IMAP> A010 SEARCH UNSEEN UNDELETED (IMAP4 or higher) IMAP> A011 SEARCH UNSEEN IMAP> A012 FETCH 1:n FLAGS
* Add FETCHMAIL_IMAP_DELETED_REMAINS_UNSEEN env' var.Matthias Andree2011-05-031-6/+23
| | | | | Requested by Jonathan Buschmann, to suppress read-notifications on servers such as MS Exchange or HP OpenMail.
* Hack: support quoted string in imap_fetch_body()Matthias Andree2010-12-101-0/+7
| | | | | This is seen on Yahoo in * 123 FETCH (BODY[TEXT] ""), reported by Yasin Malli.
* Do STARTTLS/STLS negotiation in IMAP/POP3 if it is mandatory ignoring server ↵Sunil Shetye2010-11-191-5/+2
| | | | capabilities
* Distinguish between server not advertising TLS capability and server failing ↵Sunil Shetye2010-11-101-9/+5
| | | | | | during upgradation to TLS. Send a NOOP only after a failed STARTTLS in IMAP.
* Factor out common NTLM code.Matthias Andree2010-10-091-47/+3
|
* Fix dead assignments.Matthias Andree2010-10-091-1/+1
|
* Remove some unneeded SASL cancellations.Matthias Andree2010-09-251-7/+0
|
* Cancel SASL AUTH properly on GSSAPI errors.Matthias Andree2010-09-251-1/+0
|
* Don't try to match trailing literals in sscanf,Matthias Andree2010-08-281-5/+16
| | | | | but rather note how much input was consumed, stop short of the string, and use strncasecmp to match explicitly.
* parse response to FETCH in a more flexible mannerSunil Shetye2010-08-281-37/+39
| | | | remove for loop in imap_fetch_headers()
* Avoid wedging Exchange 2007 with GSSAPI.Matthias Andree2010-08-211-1/+1
| | | | | | | | | Exchange 2007 wedges if we try GSSAPI authentication and fail for lack of suitable credentails (for instance, because the user did not run kinit). Only try GSSAPI automatically if we have credentials. Reported by Patrick Rynhart, Debian Bug #568455, and Alan Murrell, to the fetchmail-users list.
* Add --sslcertfile option and FETCHMAIL_NO_DEFAULT_X509_PATHS env var,Matthias Andree2010-04-181-1/+1
| | | | and always load the default X.509 trust stores, unless the latter is set.
* Fix lots of warnings, most around string literals...Matthias Andree2010-03-181-1/+1
| | | | | | | ...that were converted to char* when they should have been converted to const char *. Use braces for empty if/else statements.
* Fix input type for isalnum().Matthias Andree2010-02-041-1/+1
| | | | svn path=/branches/BRANCH_6-3/; revision=5477
* Stricter validation of IMAP responses containing byte or message counts.Matthias Andree2010-02-041-12/+33
| | | | svn path=/branches/BRANCH_6-3/; revision=5469
* IMAP SEARCH fixes & FETCH fallback by Sunil ShetyeMatthias Andree2010-02-041-39/+130
| | | | | | | | | | | | | | | | | * The IMAP client now uses "SEARCH UNSEEN" rather than "SEARCH UNSEEN NOT DELETED" again on IMAP2, to fix a regression in fetchmail 6.2.5 reported by Will Stringer in June 2004. (Sunil Shetye) * The IMAP client now uses "SEARCH UNSEEN UNDELETED" on IMAP4 and IMAP4r1 servers (Sunil Shetye). * Workaround: The IMAP client now falls back to "FETCH n:m FLAGS" if the server does not support "SEARCH". (Sunil Shetye) * The IMAP client now requests message numbers in batches of 1,000 to avoid problems if there are more than 1860 unseen messages. (Sunil Shetye) Note that this wasn't security relevant because fetchmail would only read up to the maximum buffer size and leave the remainder of the string unread, going out of synch afterwards. svn path=/branches/BRANCH_6-3/; revision=5468
* Clarify IMAP BYE response logging.Matthias Andree2010-01-221-1/+1
| | | | svn path=/branches/BRANCH_6-3/; revision=5462
* Fix IMAP IDLE and untagged (* ...) response parser, by Sunil Shetye.Matthias Andree2010-01-221-139/+159
| | | | | | | | | | | | | The IMAP client no longer skips messages from several IMAP servers including Dovecot if fetchmail's "idle" is in use. Causes were that fetchmail (a) ignored some untagged responses when it should not (b) relied on EXISTS messages in response to EXPUNGE, which aren't mandated by RFC-3501 (the IMAP standard) and aren't sent by Dovecot either. Fix by Sunil Shetye (the fix also consolidates IMAP response handling, improving overall robustness of the IMAP client), bug report and testing by Matt Doran, with further hints from Timo Sirainen. svn path=/branches/BRANCH_6-3/; revision=5459
* Preliminary Yahoo/Zimbra IMAP ID ("guid" "1") support. Not ready for prime-time.Matthias Andree2009-06-301-0/+9
| | | | svn path=/branches/BRANCH_6-3/; revision=5363
* Support NIL as body length (Exchange). Fixes Berlios Bug #11980.Matthias Andree2009-04-231-0/+7
| | | | svn path=/branches/BRANCH_6-3/; revision=5269
* Fix a few compiler warnings around implicit conversion or extra ";".Matthias Andree2009-01-141-2/+2
| | | | svn path=/branches/BRANCH_6-3/; revision=5261
* Merge Daniel Richard G.'s --sslcommonname option.Matthias Andree2008-03-071-7/+12
| | | | | | | | Exception from no-features policy on 6.3.X is made to keep people away from doing more dangerous things in order to get rid of CommonName mismatch warnings. svn path=/branches/BRANCH_6-3/; revision=5165
* Fix Berlios Bug #11797, imap_mark_seen doesn't consider expunged messagesMatthias Andree2007-12-261-0/+4
| | | | | | | (and marks the wrong messages seen after expunges, leading to data loss in 'keep flush' configurations). Report and patch by Alexander Cherepanov. Thanks\! svn path=/branches/BRANCH_6-3/; revision=5147
* Patch by Sunil Shetye:Matthias Andree2006-12-161-3/+15
| | | | | | | Track IDLE start time for IMAP, some servers do not reset their internal counters when sending information asynchronously. svn path=/branches/BRANCH_6-3/; revision=4990
* Trash shroud store.Matthias Andree2006-11-271-0/+2
| | | | svn path=/branches/BRANCH_6-3/; revision=4965
* First step towards really fixing TLS vuln, CVE-2006-5867, still incomplete.Matthias Andree2006-11-261-53/+55
| | | | svn path=/branches/BRANCH_6-3/; revision=4962
* Fix TLS issue: fail if sslfingerprint, sslproto tls1 or sslcertck are ↵Matthias Andree2006-11-121-62/+58
| | | | | | configured and STARTTLS fails. Only by omitting all of these options, fetchmail will try opportunistic TLS. svn path=/branches/BRANCH_6-3/; revision=4929
* Snapshot 6.3.6-rc1.Matthias Andree2006-11-011-2/+9
| | | | svn path=/branches/BRANCH_6-3/; revision=4925
* Add IMAP AUTH=EXTERNAL support. BerliOS Patch #1095.Matthias Andree2006-08-141-2/+36
| | | | | | | Courtesy of Götz 'nimrill' Babin-Ebell. This patch also makes --sslproto arguments case insensitive. svn path=/branches/BRANCH_6-3/; revision=4896
* Log opportunistic TLS upgrades in verbose mode.Matthias Andree2006-08-071-2/+7
| | | | svn path=/branches/BRANCH_6-3/; revision=4881
* * IMAP4 patch by Sunil Shetye:Matthias Andree2006-05-211-14/+18
| | | | | | | - do not depend on server updating RECENT counts at all - also enter IDLE loop when messages are present on the server. svn path=/branches/BRANCH_6-3/; revision=4847
* Make IMAP4 IDLE work on servers that do not update RECENT counts. Reported ↵Matthias Andree2006-05-151-3/+5
| | | | | | by Lars Tewes. svn path=/branches/BRANCH_6-3/; revision=4842
* Add two missing comments.Matthias Andree2006-05-151-2/+2
| | | | svn path=/branches/BRANCH_6-3/; revision=4840
* When using NTLM authentication, use regular IMAP response code handler after Matthias Andree2006-05-121-4/+2
| | | | | | | completing NTLM handshake, for robustness and consistency. Taken from the NetBSD portable packages collection, patch-ac. svn path=/branches/BRANCH_6-3/; revision=4825
* Further cleanups to compile with C++ compiler.Matthias Andree2006-03-151-1/+1
| | | | svn path=/branches/BRANCH_6-3/; revision=4744
* Do not send EXPUNGE after NOOP-idling (Sunil Shetye's patch, fetchmail-users@).Matthias Andree2006-03-141-10/+17
| | | | svn path=/branches/BRANCH_6-3/; revision=4739