Commit graph

12 commits

Author SHA1 Message Date
Jeremy Sowden
5c213e9e77 wmbiff: use size_t for password-lengths.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-06-28 16:26:47 +01:00
Jeremy Sowden
897886a68c wmbiff: fixed endianness problems parsing server-ports.
`regulo_atoi` expects a pointer-to-int and `PCU.serverPort` is a
`uint16_t`, so `&PCU.serverPort` is not compatible and we need to use an
`int` temporary variable to avoid endianness problems.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-06-28 16:26:47 +01:00
Torrance, Douglas
01cdccc241 wmbiff: handle EAGAIN or GNUTLS_E_AGAIN
From Debian bug #917467, reported by Nye Liu <nyet@nyet.org> [1]:

If gnutls_read() or read() report EAGAIN, tlscomm_expect() fails:

wmbiff/nyet  comm: wrote a000 CAPABILITY
wmbiff/nyet  comm: imap.***.***:993: expecting: * CAPABILITY
wmbiff/nyet  comm: imap.***.***:993: gnutls error reading: Resource temporarily unavailable, try again.
wmbiff/nyet  imap4: unable to query capability stringwmbiff/nyet  comm: wrote a002 LOGOUT
wmbiff/nyet  comm: imap.***.***:993: closing.

[1] https://bugs.debian.org/917467
2019-02-13 02:32:15 +00:00
Doug Torrance
bba01f1b6a wmbiff: Remove #define _GNU_SOURCE; already defined in CFLAGS. 2017-06-24 17:07:02 +01:00
Doug Torrance
08f8c13a77 wmbiff: Add #define _GNU_SOURCE to avoid "implicit declaration" warnings. 2016-12-01 10:51:29 +00:00
Doug Torrance
3149adc321 wmbiff: Close mailbox before we call status on it.
Additional patch by Nye Liu <nyet@nyet.org> to fix Debian bug #830889 [1].

[1] https://bugs.debian.org/830889
2016-07-20 11:26:09 +01:00
Doug Torrance
1d84a1d8e4 wmbiff: EXAMINE before STATUS
Patch by Nye Liu <nyet@nyet.org> to fix Debian bug #830889 [1].

Dear Maintainer,

Outlook Office365 IMAP servers now expect a client to issue at least one
EXAMINE before STATUS, or UNSEEN is always zero:

"unsub" folder has two messages, one unseen.

Broken:

56:04.84 > CJFK1 LOGIN "nyet@xxx" "xxx"
56:21.99 < CJFK1 OK LOGIN completed.
56:21.99 > CJFK2 STATUS unsub (MESSAGES UNSEEN)
56:22.20 < * STATUS unsub (MESSAGES 2 UNSEEN 0)
56:22.20 < CJFK2 OK STATUS completed.

Works:

56:46.04 > BPEB1 LOGIN "nyet@xxx" "xxx"
56:51.43 < BPEB1 OK LOGIN completed.
56:51.43 > BPEB2 EXAMINE unsub
56:51.67 < * 2 EXISTS
56:51.67 < * 0 RECENT
56:51.67 < * FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
56:51.67 < * OK [PERMANENTFLAGS ()] Permanent flags
56:51.67 < * OK [UNSEEN 2] Is the first unseen message
56:51.67 < * OK [UIDVALIDITY 164] UIDVALIDITY value
56:51.67 < * OK [UIDNEXT 16] The next unique identifier value
56:51.67 < BPEB2 OK [READ-ONLY] EXAMINE completed.
56:51.67 > BPEB3 STATUS unsub (MESSAGES UNSEEN)
56:51.89 < * STATUS unsub (MESSAGES 2 UNSEEN 1)
56:51.89 < BPEB3 OK STATUS completed.

Attached is a patch to always issue EXAMINE before a STATUS.

It doesn't seem like it has to be done before every STATUS, just at least once.
Is only a proof of concept. I don't presume to know the best way to handle
optimizing it.

[1] https://bugs.debian.org/830889
2016-07-12 19:32:49 +01:00
Doug Torrance
fbdfe22ddd wmbiff: Use PACKAGE_BUGREPORT instead of hardcoding address. 2014-11-08 11:20:02 +00:00
Doug Torrance
eeacc3014a wmbiff: Allow usernames with more than 32 characters.
Patch by Tommaso Parisi <tommasop.ml@libero.it>.

For more information, see:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626393
2014-11-08 11:20:02 +00:00
Doug Torrance
612921ae43 Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
Gabriel VLASIU
4e9e018b22 Update gnutls code (require at least 2.2.0). 2013-04-08 18:03:34 +01:00
Carlos R. Mafra
eea379d833 Strip off version numbers from dir name 2012-02-12 22:50:31 +00:00
Renamed from wmbiff-0.4.27/wmbiff/Imap4Client.c (Browse further)