Commit graph

59 commits

Author SHA1 Message Date
Jeremy Sowden 5d9eb1eb11 wmbiff: tidy up socket connexions.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-06-28 16:26:47 +01:00
Jeremy Sowden 1d9d06f152 wmbiff: correct the address size passed to connect(2).
`addr` is a `struct sockaddr_in`, not a `struct sockaddr`; using `sizeof
var` instead of `sizeof (type)` ensures that the right size is used.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-06-28 16:26:47 +01:00
Jeremy Sowden 3c0016eb79 wmbiff: regulo_match modifies instructions[i].destination, so remove const.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-06-28 16:26:47 +01:00
Jeremy Sowden 759e9a363a wmbiff: use temporary variables and remove casts.
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-06-28 16:26:47 +01:00
Torrance, Douglas b904bd01b0 wmbiff: Bump to version 0.4.33 2019-03-01 11:49:03 +00:00
Torrance, Douglas 9527870311 wmbiff: Remove unnecessary loop.
The last release of wmbiff included a patch by Nye Liu from Debian
bug #917467 [1].  However, the second part of that patch is not necessary.
From Andreas Metzler's comment

    I am not sure about the second part of the patch. I understand wmbiff
    breaking on GNUTLS_E_AGAIN from gnutls_read, because this only started
    to happen recently (with TLS1.3) on blocking sockets.

    What I do not get from my rudimentary understanding C programmimg is the
    second part, this is in the else of "if (scs->tls_state)", so, afaiui for
    non-encrypted connections. Is the change necessary there at all, is it
    the right thing to retry read on EAGAIN then?

We revert the second part of the patch.

[1] https://bugs.debian.org/917467
2019-03-01 11:49:03 +00:00
Torrance, Douglas e807986e6e wmbiff: Bump to version 0.4.32. 2019-02-13 02:32:15 +00: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 219e04f6ad Update mailing list links to new Google Groups. 2018-05-14 23:34:53 +01:00
Doug Torrance ad780663d9 wmbiff: Bump to version 0.4.31. 2017-06-24 17:07:02 +01:00
Doug Torrance bba01f1b6a wmbiff: Remove #define _GNU_SOURCE; already defined in CFLAGS. 2017-06-24 17:07:02 +01:00
Doug Torrance 3b000774cc wmbiff: Manually copy mailbox path.
Patch by Demi <m@tfiu.de> to fix Debian bug #621690.

From https://bugs.debian.org/621690:

> wmbiff change path of my mailboxes next nearest.
>
> For example wmbiff change 'gleb' to 'glil' for second and fourth mailboxes.
> However the 1st, 3rd and 5th mailboxes have correct path.

Well, the indices don't really enter.  I'm actually surprised this
isn't more trouble.

The underlying reason is that in wmbiff.c:parse_mbox_path, the
program calls

  mboxCreate((&mbox[item]), mbox[item].path);

which for maildirs calls

  int maildirCreate(Pop3 pc, const char *str)

in maildirClient.c.  str in this way is an alias for pc->path.

In maildirCreate, after some char acrobatics, the program eventually
does

  strncpy(pc->path, str + 8 + i, BUF_BIG - 1);

to cut off the leading stuff from the maildir.  The result of this
operation is not defined, as pc->path and str point to the same
memory and thus the arguments overlap, which strncpy outlaws.

A simple fix is to copy manually, like this:

		DM(pc, DEBUG_ERROR, "maildir '%s' is too long.\n", str + 8 + i);
		memset(pc->path, 0, BUF_BIG);
	} else {
+		const char *sp = str + 8 + i;
+		char *dp = pc->path;
+
+		while (*sp && sp-str<BUF_BIG-1) {
+			*dp++ = *sp++;
+		}
+		*dp = 0;
-		strncpy(pc->path, , BUF_BIG - 1);	/* cut off ``maildir:'' */
	}

-- it's what I'm doing now.  But I give you that's a bit pedestrian.
2017-06-24 17:07:02 +01:00
Doug Torrance 4eadda20b1 wmbiff: Bump to verson 0.4.30. 2016-12-01 10:51:29 +00:00
Doug Torrance 08f8c13a77 wmbiff: Add #define _GNU_SOURCE to avoid "implicit declaration" warnings. 2016-12-01 10:51:29 +00:00
Doug Torrance 2bea3d42e0 wmbiff: Use unsigned data type for port number. 2016-12-01 10:51:29 +00:00
Doug Torrance 25353b9708 wmbiff: Fix typos. 2016-07-20 16:37:37 +01:00
Doug Torrance 464744a386 wmbiff: Bump to version 0.4.29. 2016-07-20 11:26:09 +01: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 0703ba0b82 wmbiff: Add missing command line options to documentation.
Closes Debian bug #770117 [1].

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770117
2015-10-26 09:44:23 -04:00
Rodolfo García Peñas (kix) 6957f3efdc wmbiff: FTBFS with initialize_gnutls
The first argument for the function initialize_gnutls is an intptr_t
so wmbiff fails to build from source. This patch changes the current
int to intptr_t.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2015-08-16 11:40:20 +01:00
Doug Torrance ccf80e0891 wmbiff: Release version 0.4.28. 2014-11-08 11:20:02 +00:00
Doug Torrance 00f05fb75a wmbiff: Update ChangeLog (used git2cl). 2014-11-08 11:20:02 +00:00
Doug Torrance 6960461477 wmbiff: Remove sourceforgeupload target from Makefile; no longer needed. 2014-11-08 11:20:02 +00:00
Doug Torrance f2d751486e wmbiff: Update email address. 2014-11-08 11:20:02 +00:00
Doug Torrance fbdfe22ddd wmbiff: Use PACKAGE_BUGREPORT instead of hardcoding address. 2014-11-08 11:20:02 +00:00
Doug Torrance c4fd282e12 wmbiff: Update FAQ. 2014-11-08 11:20:02 +00:00
Doug Torrance e2ad0cfece wmbiff: Fix cast to pointer from integer of different size compiler warning. 2014-11-08 11:20:02 +00:00
Doug Torrance 5280405ca6 wmbiff: Fix compiler warnings from deprecated gnutls types. 2014-11-08 11:20:02 +00:00
Doug Torrance ef5a71aa20 wmbiff: Fix manpages.
In particular, fix spelling-error-in-manpage, hyphen-used-as-minus-sign,
and manpage-has-errors-from-man Lintian warnings from the Debian package.
2014-11-08 11:20:02 +00:00
Doug Torrance acdd1c28f7 wmbiff: Remove arguments to AM_INIT_AUTOMAKE in configure.ac.
This patch serves two purposes:
- Avoid a " AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated"
  warning when running autoreconf.
- Fix "syntax error near unexpected token" when running configure.
2014-11-08 11:20:02 +00:00
Doug Torrance 4c22da9b04 wmbiff: Remove INSTALL; automatically generated by autotools. 2014-11-08 11:20:02 +00:00
Doug Torrance 535c1653ea wmbiff: Increase number of actions to 40.
Patch by Alberto Morales <amd77@gulic.org>.

For more information, see:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589408
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 1981a52fdf wmbiff: Fix connection leak.
Patch by Arnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>.

For more information, see:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=663876
2014-11-08 11:20:02 +00:00
Doug Torrance 0293ad1117 wmbiff: Fix security.debian.rb script.
Patch by Lothar Ketterer <lketterer@users.sourceforge.net>

For more information, see:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525749
2014-11-08 11:20:02 +00:00
Doug Torrance b0006da45a wmbiff: Remove LZO compression.
GnuTLS LZO support was removed in version 3.0.0.  Based on the patch by
Andreas Metzler <ametzler@debian.org>:
http://sources.debian.net/src/wmbiff/0.4.27-2.3/debian/patches/15_no_more_LZO.diff/

For more information, see:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=638736
2014-11-08 11:20:02 +00:00
Doug Torrance 612921ae43 Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
Gabriel VLASIU 96fe4bccb0 Enable classic mode. 2013-04-08 18:04:30 +01:00
Gabriel VLASIU 4e9e018b22 Update gnutls code (require at least 2.2.0). 2013-04-08 18:03:34 +01:00
Gabriel VLASIU b00adb9607 Remove gnomeicu from wmbif's manual. 2013-04-08 18:02:06 +01:00
Gabriel VLASIU 8d972d5f44 wmbiff: Fix segfault when -display or -geometry argument is missing. 2013-04-04 18:11:13 +01:00
Gabriel VLASIU 3849e598ac wmbiff: Free memory when using a custom skin. 2013-04-04 18:11:13 +01:00
Gabriel VLASIU 75ad28585c wmbiff: Fix wmbiff restart. 2013-04-04 18:11:13 +01:00
Gabriel VLASIU ef01fb39db wmbiff: More gnutls casts. 2013-04-04 18:11:13 +01:00
Gabriel VLASIU 55ae2b61fe wmbiff: Fix memory leaks pointed out by valgrind. 2013-04-04 18:11:13 +01:00
Gabriel VLASIU 8b1a26f4ba wmbiff: Remove unused files. 2013-04-04 18:11:12 +01:00
Gabriel VLASIU 6962c80435 wmbiff: XKeycodeToKeysym is deprecated. 2013-04-03 18:34:44 +01:00
Gabriel VLASIU ffd089ef58 wmbiff: Remove unused variable. 2013-04-03 18:33:54 +01:00
Gabriel VLASIU 7b53eab0b4 wmbiff: Fix signedness and/or cast. 2013-04-03 18:33:23 +01:00