[Dovecot] script to test CATENATE

Mike Abbott michael.abbott at apple.com
Tue Jul 23 01:17:37 EEST 2013


Attached please find a perl script which tests the CATENATE support in dovecot.  I used this to test my CATENATE implementation a few years ago and it runs fine against dovecot in OS X Server.  When run against dovecot-2.2.4 though it always fails or hangs, which in some cases means we interpreted RFCs differently and in other cases means it's finding bugs; both conditions are worthy of scrutiny.  (It's random-number driven so every run is different.)  A couple months ago I reported a few simple bugs which this script found and you fixed them; thanks.  Then it started finding problems for which it's harder to isolate simple reproducible test cases.  Vacations and other work interceded but now Apple is pleased to give you the script itself to allow you to iterate faster.

Here are some examples of it running.  One time only, pass the --init argument to store some template messages used by the real tests:
$ ./catenate.pl --host your.test.server --user testuser --password 1234 --init
connecting (imaps)...
capability...
logging in...
deleting old templates mailbox...
creating templates mailbox...
append1...
Append succeeded
append2...
Append succeeded
logout...
success
$ ./catenate.pl --host your.test.server --user testuser --password 1234
connecting (imaps)...
capability...
logging in...
append1...
Append failed as it should have (bad url): <append1 NO [BADURL ;invalid;] Invalid IMAP URL: Unexpected IMAP URL path segment: `;invalid;'.>
append2...
Append failed as it should have (bad url): <append2 NO [BADURL /inbox/;uid=99999999] Message not found.>
append3...
Append succeeded
[...]
All tests passed.
$ 

If it concludes with anything other than "All tests passed" or hangs then it found something that it didn't expect and that should be examined.  Use the --verbose option to see the entire client-server conversation.

We hope that you find this script helpful to harden your CATENATE code.  I will be happy to answer any questions.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: catenate.pl
Type: text/x-perl-script
Size: 20045 bytes
Desc: not available
URL: <http://dovecot.org/pipermail/dovecot/attachments/20130722/c85c6515/attachment-0001.bin>


More information about the dovecot mailing list