summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2021-02-09 16:41:29 +0200
committerSergey Poznyakoff <gray@gnu.org>2021-02-09 16:41:29 +0200
commit5c74d76a1a96dbff919ccc995422084d99593c78 (patch)
tree56250a32b1d3f9ffb62251de8d665f0009f4cff5
parent87534c026c2c7dade95917b5ce5dd9ff4e996bf8 (diff)
downloadmailutils-5c74d76a1a96dbff919ccc995422084d99593c78.tar.gz
mailutils-5c74d76a1a96dbff919ccc995422084d99593c78.tar.bz2
dotmail: synchronize with the recent changes to mbox
* libproto/dotmail/dotmail.c: Synchronize with the recent changes to mbox. * libproto/dotmail/tests/rospool.at: New test. * libproto/dotmail/tests/Makefile.am: Add new test. * libproto/dotmail/tests/testsuite.at: Add new test.
-rw-r--r--libproto/dotmail/dotmail.c348
-rw-r--r--libproto/dotmail/tests/Makefile.am5
-rw-r--r--libproto/dotmail/tests/rospool.at358
-rw-r--r--libproto/dotmail/tests/testsuite.at1
4 files changed, 604 insertions, 108 deletions
diff --git a/libproto/dotmail/dotmail.c b/libproto/dotmail/dotmail.c
index 212208332..0e30d4445 100644
--- a/libproto/dotmail/dotmail.c
+++ b/libproto/dotmail/dotmail.c
@@ -1078,17 +1078,62 @@ dotmail_get_size (mu_mailbox_t mailbox, mu_off_t *psize)
}
static int
+dotmail_stat (mu_mailbox_t mailbox, struct stat *st)
+{
+ int rc;
+ mu_transport_t trans[2];
+
+ rc = mu_stream_ioctl (mailbox->stream, MU_IOCTL_TRANSPORT,
+ MU_IOCTL_OP_GET, trans);
+ if (rc == 0)
+ {
+ if (fstat ((int) (intptr_t) trans[0], st))
+ rc = errno;
+ }
+ return rc;
+}
+
+static int
+dotmail_set_priv (struct mu_dotmail_mailbox *dmp, struct stat *st)
+{
+ int rc;
+ mu_transport_t trans[2];
+
+ rc = mu_stream_ioctl (dmp->mailbox->stream, MU_IOCTL_TRANSPORT,
+ MU_IOCTL_OP_GET, trans);
+ if (rc == 0)
+ {
+ int fd = (intptr_t) trans[0];
+ if (fchmod (fd, st->st_mode))
+ {
+ mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR,
+ ("%s:%s: chmod failed: %s",
+ __func__, dmp->name, strerror (errno)));
+ rc = errno;
+ }
+ else if (fchown (fd, st->st_uid, st->st_gid))
+ {
+ mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR,
+ ("%s:%s: chown failed: %s",
+ __func__, dmp->name, strerror (errno)));
+ rc = errno;
+ }
+ }
+ return rc;
+}
+
+static int
dotmail_get_atime (mu_mailbox_t mailbox, time_t *return_time)
{
struct mu_dotmail_mailbox *dmp = mailbox->data;
struct stat st;
-
+ int rc;
+
if (dmp == NULL)
return EINVAL;
- if (stat (dmp->name, &st))
- return errno;
- *return_time = st.st_atime;
- return 0;
+ if ((rc = dotmail_stat (mailbox, &st)) == 0)
+ *return_time = st.st_atime;
+ return rc;
}
struct mu_dotmail_flush_tracker
@@ -1286,6 +1331,54 @@ dotmail_flush_temp (struct mu_dotmail_flush_tracker *trk,
return mu_stream_flush (tempstr);
}
+/*
+ * Copy the temporary mailbox stream TEMPSTR to the mailbox referred to by
+ * the tracker TRK.
+ */
+static inline int
+dotmail_copyback (struct mu_dotmail_flush_tracker *trk, mu_stream_t tempstr)
+{
+ int rc;
+ mu_stream_t mbx_stream = trk->dmp->mailbox->stream;
+ mu_off_t size;
+
+ rc = mu_stream_seek (tempstr, 0, MU_SEEK_SET, NULL);
+ if (rc)
+ {
+ mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR,
+ ("%s: can't rewind temporary file: %s",
+ __func__, mu_strerror (rc)));
+ return rc;
+ }
+
+ rc = mu_stream_seek (mbx_stream, 0, MU_SEEK_SET, NULL);
+ if (rc)
+ {
+ mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR,
+ ("%s: can't rewind mailbox %s: %s",
+ __func__, trk->dmp->name, mu_strerror (rc)));
+ return rc;
+ }
+
+ rc = mu_stream_copy (mbx_stream, tempstr, 0, &size);
+ if (rc)
+ {
+ mu_error (_("copying back to mailbox %s failed: %s"),
+ trk->dmp->name, mu_strerror (rc));
+ return rc;
+ }
+ rc = mu_stream_truncate (mbx_stream, size);
+ if (rc)
+ {
+ mu_error (_("cannot truncate mailbox stream: %s"),
+ mu_stream_strerror (mbx_stream, rc));
+ return rc;
+ }
+
+ dotmail_tracker_sync (trk);
+ return 0;
+}
+
/* Flush the mailbox described by the tracker TRK to the stream TEMPSTR.
EXPUNGE is 1 if the MU_ATTRIBUTE_DELETED attribute is to be honored.
Assumes that simultaneous access to the mailbox has been blocked.
@@ -1351,127 +1444,170 @@ dotmail_flush_unlocked (struct mu_dotmail_flush_tracker *trk, int mode)
("%s:%s (%s): %s",
__func__, "mu_stream_printf", dmp->name,
mu_strerror (rc)));
+
}
return 0;
}
-
- /*
- * There is no X-IMAPbase header yet or it is not wide enough to
- * accept the current value. Fall back to reformatting entire
- * mailbox. Clear any other changes that might have been done
- * to its messages.
- */
- dirty = 0;
- dmp->mesg[0]->uid_modified = 1;
-
- for (i = 1; i < dmp->mesg_count; i++)
- {
- struct mu_dotmail_message *dmsg = dmp->mesg[i];
- dmsg->uid_modified = 0;
- dmsg->attr_flags &= ~(MU_ATTRIBUTE_MODIFIED|MU_ATTRIBUTE_DELETED);
- }
- }
- else
- {
- for (dirty = 0; dirty < dmp->mesg_count; dirty++)
+ else
{
- struct mu_dotmail_message *dmsg = dmp->mesg[dirty];
- if (dmsg->uid_modified)
- break;
- mu_dotmail_message_attr_load (dmsg);
- if ((dmsg->attr_flags & MU_ATTRIBUTE_MODIFIED)
- || (dmsg->attr_flags & MU_ATTRIBUTE_DELETED)
- || (dmsg->message && mu_message_is_modified (dmsg->message)))
- break;
+ /*
+ * There is no X-IMAPbase header yet or it is not wide enough to
+ * accept the current value. Fall back to reformatting entire
+ * mailbox. Clear any other changes that might have been done
+ * to its messages.
+ */
+ dirty = 0;
+ dmp->mesg[0]->uid_modified = 1;
+
+ for (i = 1; i < dmp->mesg_count; i++)
+ {
+ struct mu_dotmail_message *dmsg = dmp->mesg[i];
+ dmsg->uid_modified = 0;
+ dmsg->attr_flags &= ~(MU_ATTRIBUTE_MODIFIED|MU_ATTRIBUTE_DELETED);
+ }
}
}
- p = strrchr (dmp->name, '/');
- if (p)
- {
- size_t l = p - dmp->name;
- hints.tmpdir = malloc (l + 1);
- if (!hints.tmpdir)
- return ENOMEM;
- memcpy (hints.tmpdir, dmp->name, l);
- hints.tmpdir[l] = 0;
- }
- else
+ for (dirty = 0; dirty < dmp->mesg_count; dirty++)
{
- hints.tmpdir = mu_getcwd ();
- if (!hints.tmpdir)
- return ENOMEM;
- }
- rc = mu_tempfile (&hints, MU_TEMPFILE_TMPDIR, &tempfd, &tempname);
- if (rc)
- {
- free (hints.tmpdir);
- return rc;
- }
- rc = mu_fd_stream_create (&tempstr, tempname, tempfd,
- MU_STREAM_RDWR|MU_STREAM_SEEK);
- if (rc)
- {
- free (hints.tmpdir);
- close (tempfd);
- free (tempname);
- return rc;
+ struct mu_dotmail_message *dmsg = dmp->mesg[dirty];
+ if (dmsg->uid_modified)
+ break;
+ mu_dotmail_message_attr_load (dmsg);
+ if ((dmsg->attr_flags & MU_ATTRIBUTE_MODIFIED)
+ || (dmsg->attr_flags & MU_ATTRIBUTE_DELETED)
+ || (dmsg->message && mu_message_is_modified (dmsg->message)))
+ break;
}
- rc = dotmail_flush_temp (trk, dirty, tempstr, mode == FLUSH_EXPUNGE);
- mu_stream_unref (tempstr);
- if (rc == 0)
- {
- /* Rename mailbox to temporary copy */
- char *backup = mu_tempname (hints.tmpdir);
- rc = rename (dmp->name, backup);
- if (rc)
+ rc = 0;
+ if (dirty < dmp->mesg_count)
+ {
+ p = strrchr (dmp->name, '/');
+ if (p)
{
- mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR,
- ("%s:%s: failed to rename to backup file %s: %s",
- __func__, dmp->name, tempname,
- mu_strerror (rc)));
- unlink (backup);
+ size_t l = p - dmp->name;
+ hints.tmpdir = malloc (l + 1);
+ if (!hints.tmpdir)
+ return ENOMEM;
+ memcpy (hints.tmpdir, dmp->name, l);
+ hints.tmpdir[l] = 0;
}
else
{
- rc = rename (tempname, dmp->name);
- if (rc == 0)
- {
- /* Success. Synchronize internal data with the counter. */
- dotmail_tracker_sync (trk);
- mu_stream_destroy (&dmp->mailbox->stream);
- rc = dotmail_mailbox_init_stream (dmp);
- }
- else
+ hints.tmpdir = mu_getcwd ();
+ if (!hints.tmpdir)
+ return ENOMEM;
+ }
+ rc = mu_tempfile (&hints, MU_TEMPFILE_TMPDIR, &tempfd, &tempname);
+ if (rc == 0)
+ {
+ rc = mu_fd_stream_create (&tempstr, tempname, tempfd,
+ MU_STREAM_RDWR|MU_STREAM_SEEK);
+ }
+ else if (rc == EACCES)
+ {
+ /*
+ * Mail spool directory is not writable for the user. Fall
+ * back to using temporary stream located elsewhere. When
+ * ready, it will be copied back to the mailbox.
+ *
+ * Reset the tempname to NULL to instruct the code below
+ * which approach to take.
+ */
+ tempname = NULL;
+
+ rc = mu_temp_file_stream_create (&tempstr, NULL, 0);
+ }
+
+ if (rc)
+ {
+ free (hints.tmpdir);
+ close (tempfd);
+ free (tempname);
+ return rc;
+ }
+
+ rc = dotmail_flush_temp (trk, dirty, tempstr, mode == FLUSH_EXPUNGE);
+ if (rc == 0)
+ {
+ if (tempname)
{
- int rc1;
- mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR,
- ("%s: failed to rename temporary file %s %s: %s",
- __func__, tempname, dmp->name,
- mu_strerror (rc)));
- rc1 = rename (backup, dmp->name);
- if (rc1)
+ /* Mail spool is writable. Rename the temporary copy back
+ to mailbox */
+ char *backup;
+ struct stat st;
+
+ if ((rc = dotmail_stat (dmp->mailbox, &st)) != 0)
+ {
+ mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR,
+ ("%s:%s: stat failed: %s",
+ __func__, dmp->name, strerror (errno)));
+ }
+ else
{
- mu_error (_("failed to restore %s from backup %s: %s"),
- dmp->name, backup, mu_strerror (rc1));
- mu_error (_("backup left in %s"), backup);
- free (backup);
- backup = NULL;
+ mu_stream_flush (tempstr);
+ backup = mu_tempname (hints.tmpdir);
+ if (rename (dmp->name, backup))
+ {
+ rc = errno;
+ mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR,
+ ("%s:%s: failed to rename to backup file %s: %s",
+ __func__, dmp->name, tempname,
+ mu_strerror (rc)));
+ unlink (backup);
+ }
+ else
+ {
+ rc = rename (tempname, dmp->name);
+ if (rc == 0)
+ {
+ /* Success. Synchronize internal data with the
+ counter. */
+ dotmail_tracker_sync (trk);
+ mu_stream_destroy (&dmp->mailbox->stream);
+ rc = dotmail_mailbox_init_stream (dmp);
+ if (rc == 0)
+ dotmail_set_priv (dmp, &st);
+ }
+ else
+ {
+ int rc1;
+ mu_debug (MU_DEBCAT_MAILBOX, MU_DEBUG_ERROR,
+ ("%s: failed to rename temporary file %s %s: %s",
+ __func__, tempname, dmp->name,
+ mu_strerror (rc)));
+ rc1 = rename (backup, dmp->name);
+ if (rc1)
+ {
+ mu_error (_("failed to restore %s from backup %s: %s"),
+ dmp->name, backup, mu_strerror (rc1));
+ mu_error (_("backup left in %s"), backup);
+ free (backup);
+ backup = NULL;
+ }
+ }
+ }
+
+ if (backup)
+ {
+ unlink (backup);
+ free (backup);
+ }
+ unlink (tempname);
}
}
+ else
+ {
+ /* Mail spool not writable. Copy the tempstr back to mailbox. */
+ rc = dotmail_copyback (trk, tempstr);
+ }
}
-
- if (backup)
- {
- unlink (backup);
- free (backup);
- }
+ free (tempname);
+ free (hints.tmpdir);
+ mu_stream_unref (tempstr);
}
- unlink (tempname);
- free (tempname);
- free (hints.tmpdir);
-
+
dmp->uidvalidity_changed = 0;
return rc;
diff --git a/libproto/dotmail/tests/Makefile.am b/libproto/dotmail/tests/Makefile.am
index 5aa79b920..ef9314ba2 100644
--- a/libproto/dotmail/tests/Makefile.am
+++ b/libproto/dotmail/tests/Makefile.am
@@ -49,8 +49,9 @@ TESTSUITE_AT += \
append.at\
delete.at\
setattr.at\
- notify.at
-
+ notify.at\
+ rospool.at
+
diff --git a/libproto/dotmail/tests/rospool.at b/libproto/dotmail/tests/rospool.at
new file mode 100644
index 000000000..4a873a523
--- /dev/null
+++ b/libproto/dotmail/tests/rospool.at
@@ -0,0 +1,358 @@
+# GNU Mailutils -- a suite of utilities for electronic mail
+# Copyright (C) 2019-2021 Free Software Foundation, Inc.
+#
+# This library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
+
+AT_SETUP([read-only spool directory])
+
+AT_CHECK([
+mkdir mailspool
+AT_DATA([mailspool/inbox],
+[Received: (from hare@wonder.land)
+ by wonder.land id 3301
+ for alice@wonder.land; Mon, 29 Jul 2002 22:00:06 +0100
+Date: Mon, 29 Jul 2002 22:00:01 +0100
+From: March Hare <hare@wonder.land>
+Message-Id: <200207292200.3301@wonder.land>
+To: Alice <alice@wonder.land>
+Subject: Invitation
+X-IMAPbase: 10 9
+X-UID: 1
+
+Have some wine
+.
+Received: (from alice@wonder.land)
+ by wonder.land id 3302
+ for hare@wonder.land; Mon, 29 Jul 2002 22:00:07 +0100
+Date: Mon, 29 Jul 2002 22:00:02 +0100
+From: Alice <alice@wonder.land>
+Message-Id: <200207292200.3302@wonder.land>
+To: March Hare <hare@wonder.land>
+Subject: Re: Invitation
+X-UID: 2
+
+I don't see any wine
+.
+Received: (from hare@wonder.land)
+ by wonder.land id 3303
+ for alice@wonder.land; Mon, 29 Jul 2002 22:00:08 +0100
+Date: Mon, 29 Jul 2002 22:00:03 +0100
+From: March Hare <hare@wonder.land>
+Message-Id: <200207292200.3303@wonder.land>
+To: Alice <alice@wonder.land>
+Subject: Re: Invitation
+X-UID: 3
+
+There isn't any
+.
+Received: (from alice@wonder.land)
+ by wonder.land id 3304
+ for hare@wonder.land; Mon, 29 Jul 2002 22:00:09 +0100
+Date: Mon, 29 Jul 2002 22:00:04 +0100
+From: Alice <alice@wonder.land>
+Message-Id: <200207292200.3304@wonder.land>
+To: March Hare <hare@wonder.land>
+Subject: Re: Invitation
+X-UID: 4
+
+Then it wasn't very civil of you to offer it
+.
+Received: (from hare@wonder.land)
+ by wonder.land id 3305
+ for alice@wonder.land; Mon, 29 Jul 2002 22:00:10 +0100
+Date: Mon, 29 Jul 2002 22:00:05 +0100
+From: March Hare <hare@wonder.land>
+Message-Id: <200207292200.3305@wonder.land>
+To: Alice <alice@wonder.land>
+Subject: Re: Invitation
+X-UID: 5
+
+It wasn't very civil of you to sit down without being invited
+.
+Received: (from alice@wonder.land)
+ by wonder.land id 3306
+ for hare@wonder.land; Mon, 29 Jul 2002 22:00:11 +0100
+Date: Mon, 29 Jul 2002 22:00:06 +0100
+From: Alice <alice@wonder.land>
+Message-Id: <200207292200.3306@wonder.land>
+To: March Hare <hare@wonder.land>
+Subject: Re: Invitation
+X-UID: 6
+
+I didn't know it was YOUR table, it's laid for a
+great many more than three.
+.
+])
+cp mailspool/inbox mailspool/inbox1
+cp mailspool/inbox mailspool/inbox2
+chmod -w mailspool
+])
+# --------------------------
+
+AT_DATA([commands],
+[3
+set_deleted
+expunge
+count
+# Message 4 becomes 3 after expunge. Re-select it.
+3
+uid
+headers
+])
+
+AT_CHECK([mbop -m mailspool/inbox < commands],
+[0],
+[3 current message
+3 set_deleted: OK
+expunge: OK
+count: 5
+3 current message
+3 uid: 4
+3 headers: Received:(from alice@wonder.land) by wonder.land id 3304 for hare@wonder.land; Mon, 29 Jul 2002 22:00:09 +0100
+Date:Mon, 29 Jul 2002 22:00:04 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3304@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-UID:4
+
+])
+
+AT_DATA([commands1],
+[1
+set_deleted
+2
+set_deleted
+5
+set_deleted
+expunge
+count
+1
+uid
+headers
+2
+uid
+headers
+3
+uid
+headers
+])
+
+AT_CHECK([mbop -m mailspool/inbox1 < commands1|x_imapbase_normalize],
+[0],
+[1 current message
+1 set_deleted: OK
+2 current message
+2 set_deleted: OK
+5 current message
+5 set_deleted: OK
+expunge: OK
+count: 3
+1 current message
+1 uid: 3
+1 headers: Received:(from hare@wonder.land) by wonder.land id 3303 for alice@wonder.land; Mon, 29 Jul 2002 22:00:08 +0100
+Date:Mon, 29 Jul 2002 22:00:03 +0100
+From:March Hare <hare@wonder.land>
+Message-Id:<200207292200.3303@wonder.land>
+To:Alice <alice@wonder.land>
+Subject:Re: Invitation
+X-IMAPbase:10 9
+X-UID:3
+
+2 current message
+2 uid: 4
+2 headers: Received:(from alice@wonder.land) by wonder.land id 3304 for hare@wonder.land; Mon, 29 Jul 2002 22:00:09 +0100
+Date:Mon, 29 Jul 2002 22:00:04 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3304@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-UID:4
+
+3 current message
+3 uid: 6
+3 headers: Received:(from alice@wonder.land) by wonder.land id 3306 for hare@wonder.land; Mon, 29 Jul 2002 22:00:11 +0100
+Date:Mon, 29 Jul 2002 22:00:06 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3306@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-UID:6
+
+])
+
+# ##
+AT_DATA([commands1a],
+[count
+1
+uid
+headers
+2
+uid
+headers
+3
+uid
+headers
+])
+
+AT_CHECK([mbop -m mailspool/inbox1 < commands1a|x_imapbase_normalize],
+[0],
+[count: 3
+1 current message
+1 uid: 3
+1 headers: Received:(from hare@wonder.land) by wonder.land id 3303 for alice@wonder.land; Mon, 29 Jul 2002 22:00:08 +0100
+Date:Mon, 29 Jul 2002 22:00:03 +0100
+From:March Hare <hare@wonder.land>
+Message-Id:<200207292200.3303@wonder.land>
+To:Alice <alice@wonder.land>
+Subject:Re: Invitation
+X-IMAPbase:10 9
+X-UID:3
+
+2 current message
+2 uid: 4
+2 headers: Received:(from alice@wonder.land) by wonder.land id 3304 for hare@wonder.land; Mon, 29 Jul 2002 22:00:09 +0100
+Date:Mon, 29 Jul 2002 22:00:04 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3304@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-UID:4
+
+3 current message
+3 uid: 6
+3 headers: Received:(from alice@wonder.land) by wonder.land id 3306 for hare@wonder.land; Mon, 29 Jul 2002 22:00:11 +0100
+Date:Mon, 29 Jul 2002 22:00:06 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3306@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-UID:6
+
+])
+
+# ##
+AT_DATA([commands2],
+[1
+set_deleted
+3
+set_deleted
+5
+set_deleted
+expunge
+count
+1
+uid
+headers
+2
+uid
+headers
+3
+uid
+headers
+])
+
+AT_CHECK([mbop -m mailspool/inbox2 < commands2|x_imapbase_normalize],
+[0],
+[1 current message
+1 set_deleted: OK
+3 current message
+3 set_deleted: OK
+5 current message
+5 set_deleted: OK
+expunge: OK
+count: 3
+1 current message
+1 uid: 2
+1 headers: Received:(from alice@wonder.land) by wonder.land id 3302 for hare@wonder.land; Mon, 29 Jul 2002 22:00:07 +0100
+Date:Mon, 29 Jul 2002 22:00:02 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3302@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-IMAPbase:10 9
+X-UID:2
+
+2 current message
+2 uid: 4
+2 headers: Received:(from alice@wonder.land) by wonder.land id 3304 for hare@wonder.land; Mon, 29 Jul 2002 22:00:09 +0100
+Date:Mon, 29 Jul 2002 22:00:04 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3304@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-UID:4
+
+3 current message
+3 uid: 6
+3 headers: Received:(from alice@wonder.land) by wonder.land id 3306 for hare@wonder.land; Mon, 29 Jul 2002 22:00:11 +0100
+Date:Mon, 29 Jul 2002 22:00:06 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3306@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-UID:6
+
+])
+
+AT_DATA([commands2a],
+[count
+1
+uid
+headers
+2
+uid
+headers
+3
+uid
+headers
+])
+
+AT_CHECK([mbop -m mailspool/inbox2 < commands2a|x_imapbase_normalize],
+[0],
+[count: 3
+1 current message
+1 uid: 2
+1 headers: Received:(from alice@wonder.land) by wonder.land id 3302 for hare@wonder.land; Mon, 29 Jul 2002 22:00:07 +0100
+Date:Mon, 29 Jul 2002 22:00:02 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3302@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-IMAPbase:10 9
+X-UID:2
+
+2 current message
+2 uid: 4
+2 headers: Received:(from alice@wonder.land) by wonder.land id 3304 for hare@wonder.land; Mon, 29 Jul 2002 22:00:09 +0100
+Date:Mon, 29 Jul 2002 22:00:04 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3304@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-UID:4
+
+3 current message
+3 uid: 6
+3 headers: Received:(from alice@wonder.land) by wonder.land id 3306 for hare@wonder.land; Mon, 29 Jul 2002 22:00:11 +0100
+Date:Mon, 29 Jul 2002 22:00:06 +0100
+From:Alice <alice@wonder.land>
+Message-Id:<200207292200.3306@wonder.land>
+To:March Hare <hare@wonder.land>
+Subject:Re: Invitation
+X-UID:6
+
+])
+
+AT_CLEANUP
diff --git a/libproto/dotmail/tests/testsuite.at b/libproto/dotmail/tests/testsuite.at
index 2c7d38e97..7c9d6a4af 100644
--- a/libproto/dotmail/tests/testsuite.at
+++ b/libproto/dotmail/tests/testsuite.at
@@ -62,4 +62,5 @@ m4_include([delete.at])
m4_include([uidnext.at])
m4_include([autodetect.at])
m4_include([setattr.at])
+m4_include([rospool.at])

Return to:

Send suggestions and report system problems to the System administrator.