#!/bin/sh # Maintainer's sanity check OPTIONS="" export OPTIONS TZ=EST5EDT export TZ echo '****************************' >&2 echo '* Sanity check in progress *' >&2 echo '****************************' >&2 #test ! -d confmdtest || find confmdtest -exec chmod u+rwx {} \; #test ! -d confmdtest2 || find confmdtest2 -exec chmod u+rwx {} \; test ! -d confmdtest || chmod -R u+rwx confmdtest test ! -d confmdtest2 || chmod -R u+rwx confmdtest2 rm -rf confmdtest ../maildir/maildirmake confmdtest || exit 1 cat >confmdtest/cur/msg1:2,S < To: Steve , Tom Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="b1" Subject: This is the message foobar --b1 Content-Type: text/plain This is section 1 --b1 Content-Type: text/plain This is section 2 --b1 Content-Type: message/rfc822 Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="b2" Subject: This is message part 3 foobar --b2 Content-Type: text/plain This is section 3.1 --b2 Content-Type: text/plain This is section 3.2 --b2-- --b1 Content-Type: multipart/mixed; boundary="b3" foobar --b3 Content-Type: text/plain This is section 4.1 --b3 Content-Type: message/rfc822 Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="b4" Subject: This is message part 4.2 foobar --b4 Content-Type: text/plain This is section 4.2.1 --b4 Content-Type: multipart/alternative; boundary="b5" foobar --b5 Content-Type: text/plain This is section 4.2.2.1 --b5 Content-Type: text/plain This is section 4.2.2.2 --b5-- --b4-- --b3-- --b1-- EOF inituid() { initdir="$1" if test "$initdir" = "" then initdir="confmdtest" fi initinbox="$2" if test "$initinbox" = "" then initinbox="inbox" else initinbox="inbox.$initinbox" fi env IMAP_BROKENUIDV=1 MAILDIR=$initdir ./imapd >confmdtest.stdout <) a005 fetch 1 (body[1]) a006 fetch 1 (body[1.text]) a007 fetch 1 (body[2]) a008 fetch 1 (body[2.text]) a009 fetch 1 (body[3.header]) a010 fetch 1 (body[3.mime]) a011 fetch 1 (body[3.mime]<10,50>) a012 fetch 1 (body[3.1]) a013 fetch 1 (body[3.2]) a014 fetch 1 (body[4.1]) a015 fetch 1 (body[4.2.header]) a016 fetch 1 (body[4.2.1]) a017 fetch 1 (body[4.2.2.1]) a018 fetch 1 (body[4.2.2.2]) a019 fetch 1 (envelope) a020 fetch 1 (body) a021 fetch 1 (envelope body) a022 fetch 1 (bodystructure) a023 fetch 1 (rfc822.size) a024 fetch 1 (all) a025 fetch 1 (fast) a026 fetch 1 (full) a027 fetch 1 (rfc822.text) a028 fetch 1 (body[header.fields(content-type)]) adone logout EOF rm -f confmdtest/cur/msg1:2,S cat >confmdtest/new/msg2 < To: Steve , Tom Mime-Version: 1.0 Date: Wed, 22 Sep 1999 15:41:09 -0200 Content-Type: multipart/mixed; boundary="b1" Subject: This is the message foobar --b1 Content-Type: text/plain This is section 1 --b1 Content-Type: message/rfc822 Subject: This is message part 4.2 From: dave@example.org To: tom@example.org Cc: steve@example.org Mime-Version: 1.0 content-type: text/plain content-transfer-encoding: quoted-printable M=41ry had a little lamb, it's fleece was white as snow. And everywhere Mary went, the lamb was sure to go. --b1-- EOF inituid cat >confmdtest/new/msg3 <confmdtest/new/msg4 < Content-Description: MIME test message Content-MD5: aaaabbbb test --c1-- EOF touch -t 199901010000 confmdtest/new/msg3 inituid env IMAP_BROKENUIDV=1 MAILDIR=confmdtest ./imapd <confmdtest/maildirsize env IMAP_BROKENUIDV=1 MAILDIR=confmdtest ./imapd <confmdtest/maildirsize env IMAP_BROKENUIDV=1 MAILDIR=confmdtest ./imapd <confmdtest/shared-maildirs env IMAP_BROKENUIDV=1 MAILDIR=confmdtest ./imapd <confmdtest2/.a/new/msg1 <confmdtest2/.a/new/msg2 <confmdtest/new/msg1 <confmdtest/.Trash/new/msg2 <confmdtest/new/msg1 < To: John , Cc: John , Subject: Re[2]: [foo] message 1 Date: Wed, 22 Sep 1999 15:41:09 -0200 message 1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa EOF inituid cat >confmdtest/new/msg2 < To: John , Cc: John , Subject: message 2 Date: Wed, 22 Sep 1999 15:41:00 -0200 message 2 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa EOF inituid cat >confmdtest/new/msg3 < To: John , Cc: John , Subject: message 1 Date: Wed, 22 Sep 1999 15:41:00 -0200 message 3 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa EOF inituid cat >confmdtest/new/msg4 < To: John , Cc: John , Subject: [fwd:message 1] (fwd) Date: Wed, 15 Sep 1999 15:41:00 -0200 message 3 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa EOF inituid env IMAP_BROKENUIDV=1 MAILDIR=confmdtest ./imapd <confmdtest/new/msg1 < Date: Sat, 05 Feb 2000 13:34:02 -0800 message 1 EOF inituid cat >confmdtest/new/msg2 < References: message 2 EOF inituid cat >confmdtest/new/msg3 < message 3 EOF inituid cat >confmdtest/new/msg4 < message 4 EOF inituid cat >confmdtest/new/msg5 < References: message 5 EOF inituid cat >confmdtest/new/msg6 < References: message 6 EOF inituid env IMAP_BROKENUIDV=1 MAILDIR=confmdtest ./imapd <confmdtest/.a/cur/msg1:2,S < To: john Subject: test test EOF env IMAP_KEYWORDS=1 IMAP_MOVE_EXPUNGE_TO_TRASH=1 IMAP_BROKENUIDV=1 MAILDIR=confmdtest ./imapd <confmdtest4/index <confmdtest4/indexa || exit 1 echo "aashared 1 1 `pwd` confmdtest5" >>confmdtest4/indexa || exit 1 echo "user2 1 1 `pwd` confmdtest3" >confmdtest4/indexb || exit 1 IMAP_SHAREDINDEXFILE=`pwd`/confmdtest4/index export IMAP_SHAREDINDEXFILE env AUTHENTICATED=user1 IMAP_KEYWORDS=1 IMAP_MOVE_EXPUNGE_TO_TRASH=1 IMAP_BROKENUIDV=1 MAILDIR=confmdtest2 ./imapd <confmdtest4/indexb <confmdtest4/indexgroup1 || exit 1 env IMAP_SHAREDMUNGENAMES=1 AUTHENTICATED=user1 OPTIONS=sharedgroup=group1 IMAP_KEYWORDS=1 IMAP_MOVE_EXPUNGE_TO_TRASH=1 IMAP_BROKENUIDV=1 MAILDIR=confmdtest2 ./imapd <