diff options
Diffstat (limited to 'tests/mime01.at')
-rw-r--r-- | tests/mime01.at | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/tests/mime01.at b/tests/mime01.at new file mode 100644 index 0000000..ce451c1 --- /dev/null +++ b/tests/mime01.at @@ -0,0 +1,83 @@ +# This file is part of GNU Anubis testsuite. -*- autotest -*- +# Copyright (C) 2003-2024 The Anubis Team. +# +# GNU Anubis is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 3 of the License, or (at your option) +# any later version. +# +# GNU Anubis 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with GNU Anubis. If not, see <http://www.gnu.org/licenses/>. +AT_SETUP([Pass a MIME encoded message (read-entire-body)]) +AT_KEYWORDS([mime]) +AT_ANUBIS_CONFIG([anubis.rc], +[BEGIN CONTROL +logfile $PWD/etc/anubis.log +local-mta $abs_builddir/mta -bs -d $PWD/etc/mta.log +read-entire-body yes +use-pam no +END +]) +AT_DATA([input], +[HELO localhost +MAIL FROM:<gray@gnu.org> +RCPT TO:<polak@gnu.org> +DATA +Received: from Mirddin.farlep.net (localhost [127.0.0.1]) + by Mirddin.farlep.net with ESMTP id g6CLhIb05086 + for <gray@mirddin.farlep.net>; Sat, 13 Jul 2002 00:43:18 +0300 +Message-Id: <200207122143.g6CLhIb05086@Mirddin.farlep.net> +To: Foo Bar <foobar@nonexistent.net> +Subject: Simple MIME +MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----- =_aaaaaaaaaa0" +Content-ID: <5082.1026510189.0@Mirddin.farlep.net> +Date: Sat, 13 Jul 2002 00:43:18 +0300 +From: Sergey Poznyakoff <gray@Mirddin.farlep.net> + +------- =_aaaaaaaaaa0 +Content-Type: text/plain; name="msg.1"; charset="us-ascii" +Content-ID: <5082.1026510189.1@Mirddin.farlep.net> +Content-Description: How doth + +How doth the little crocodile +Improve his shining tail, +And pour the waters of the Nile +On every golden scale! + +`How cheerfully he seems to grin, +How neatly spread his claws, +And welcome little fishes in +With gently smiling jaws! + +------- =_aaaaaaaaaa0 +Content-Type: application/octet-stream; name="msg.21" +Content-ID: <5082.1026510189.2@Mirddin.farlep.net> +Content-Description: Father William Part I +Content-Transfer-Encoding: base64 + +YFlvdSBhcmUgb2xkLCBGYXRoZXIgV2lsbGlhbSwnIHRoZSB5b3VuZyBtYW4gc2FpZCwKYEFuZCB5 +b3VyIGhhaXIgaGFzIGJlY29tZSB2ZXJ5IHdoaXRlOwpBbmQgeWV0IHlvdSBpbmNlc3NhbnRseSBz +dGFuZCBvbiB5b3VyIGhlYWQtLQpEbyB5b3UgdGhpbmssIGF0IHlvdXIgYWdlLCBpdCBpcyByaWdo +dD8nCgpgSW4gbXkgeW91dGgsJyBGYXRoZXIgV2lsbGlhbSByZXBsaWVkIHRvIGhpcyBzb24sCmBJ +IGZlYXJlZCBpdCBtaWdodCBpbmp1cmUgdGhlIGJyYWluOwpCdXQsIG5vdyB0aGF0IEknbSBwZXJm +ZWN0bHkgc3VyZSBJIGhhdmUgbm9uZSwKV2h5LCBJIGRvIGl0IGFnYWluIGFuZCBhZ2Fpbi4nCgo= + +------- =_aaaaaaaaaa0-- +. +QUIT +]) +AT_CHECK([ +anubis --norc --relax-perm-check --altrc etc/anubis.rc --stdio < input | tr -d '\r' +], +[0], +[ignore], +[ignore]) +AT_CHECK([diff input etc/mta.log]) +AT_CLEANUP |