diff options
author | Ihor Antonov <ihor@antonovs.family> | 2019-11-28 18:42:12 -0800 |
---|---|---|
committer | Ihor Antonov <ihor@antonovs.family> | 2019-11-28 18:42:12 -0800 |
commit | f9510a207accd69454148f94c50e7b1d406c2a5a (patch) | |
tree | 7e3aa02cc7d66d4c85d425fd02f003fb6d3aa94a | |
parent | Merge branch 'master' into portable (diff) | |
download | OpenSMTPD-f9510a207accd69454148f94c50e7b1d406c2a5a.tar.xz OpenSMTPD-f9510a207accd69454148f94c50e7b1d406c2a5a.zip |
rm: removed unused tests
30 files changed, 0 insertions, 991 deletions
diff --git a/regress/config/Makefile b/regress/config/Makefile deleted file mode 100644 index ba2dded8..00000000 --- a/regress/config/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -FILES = test0.conf -FILES+= test1.conf -FILES+= test2.conf -FILES+= test3.conf -FILES+= test4.conf -FILES+= test5.conf -FILES+= test6.conf -FILES+= test7.conf -FILES+= test8.conf -FILES+= test9.conf -FILES+= test10.conf -FILES+= test11.conf - -test: -.for FILE in $(FILES) - smtpd -n -f $(FILE) -.endfor diff --git a/regress/config/include.conf b/regress/config/include.conf deleted file mode 100644 index 667bc640..00000000 --- a/regress/config/include.conf +++ /dev/null @@ -1 +0,0 @@ -table sources { 127.0.0.1 } diff --git a/regress/config/test0.conf b/regress/config/test0.conf deleted file mode 100644 index cbd2a2f1..00000000 --- a/regress/config/test0.conf +++ /dev/null @@ -1,3 +0,0 @@ -listen on lo0 - -accept for local deliver to mbox diff --git a/regress/config/test1.conf b/regress/config/test1.conf deleted file mode 100644 index 8983f6c8..00000000 --- a/regress/config/test1.conf +++ /dev/null @@ -1,5 +0,0 @@ -listen on lo0 - -include "include.conf" - -accept from <sources> for local deliver to mbox diff --git a/regress/config/test10.conf b/regress/config/test10.conf deleted file mode 100644 index b40480d6..00000000 --- a/regress/config/test10.conf +++ /dev/null @@ -1,6 +0,0 @@ -listen on lo0 - -accept from any for local deliver to mbox -accept from any for local deliver to maildir -accept from any for local deliver to maildir "~/Maildir" -accept from any for local deliver to mda "/bin/cat" diff --git a/regress/config/test11.conf b/regress/config/test11.conf deleted file mode 100644 index 3b43f72d..00000000 --- a/regress/config/test11.conf +++ /dev/null @@ -1,25 +0,0 @@ -listen on lo0 - -accept for any relay -accept for any relay as example -accept for any relay as "@example.org" -accept for any relay as example@example.org - -accept for any relay backup mx1.example.org -accept for any relay backup mx1.example.org as example -accept for any relay backup mx1.example.org as "@example.org" -accept for any relay backup mx1.example.org as example@example.org - -accept for any relay via mx1.example.org -accept for any relay via smtp://mx1.example.org -accept for any relay via smtp://mx1.example.org:25 -accept for any relay via tls://mx1.example.org:25 -accept for any relay via smtps://mx1.example.org - -accept for any relay via mx1.example.org as example@example.org -accept for any relay via smtp://mx1.example.org as example@example.org -accept for any relay via smtp://mx1.example.org:25 as example@example.org -accept for any relay via tls://mx1.example.org:25 as example@example.org -accept for any relay via smtps://mx1.example.org as example@example.org - - diff --git a/regress/config/test2.conf b/regress/config/test2.conf deleted file mode 100644 index dc67a4e4..00000000 --- a/regress/config/test2.conf +++ /dev/null @@ -1,5 +0,0 @@ -listen on lo0 - -expire 4d - -accept for local deliver to mbox diff --git a/regress/config/test3.conf b/regress/config/test3.conf deleted file mode 100644 index 8ca91bf4..00000000 --- a/regress/config/test3.conf +++ /dev/null @@ -1,5 +0,0 @@ -listen on lo0 - -hostname test.org - -accept for local deliver to mbox diff --git a/regress/config/test4.conf b/regress/config/test4.conf deleted file mode 100644 index 6e5f4b04..00000000 --- a/regress/config/test4.conf +++ /dev/null @@ -1,4 +0,0 @@ -listen on lo0 port 25 -listen on lo0 port smtp - -accept for local deliver to mbox diff --git a/regress/config/test5.conf b/regress/config/test5.conf deleted file mode 100644 index dc1c42ad..00000000 --- a/regress/config/test5.conf +++ /dev/null @@ -1,9 +0,0 @@ -listen on lo0 port 25 -listen on lo0 port smtp - -table aliases_dynamic "/etc/mail/aliases" -table aliases_static { root => test } - -accept for local alias <aliases_dynamic> deliver to mbox -accept for local alias <aliases_static> deliver to mbox -accept for local alias { k => v } deliver to mbox diff --git a/regress/config/test6.conf b/regress/config/test6.conf deleted file mode 100644 index a2a6ded2..00000000 --- a/regress/config/test6.conf +++ /dev/null @@ -1,5 +0,0 @@ -listen on lo0 - -max-message-size 1G - -accept for local deliver to mbox diff --git a/regress/config/test7.conf b/regress/config/test7.conf deleted file mode 100644 index 274273bd..00000000 --- a/regress/config/test7.conf +++ /dev/null @@ -1,12 +0,0 @@ -listen on lo0 - -table sources { 192.168.1.2 } - -accept from any for local deliver to mbox -accept from local for local deliver to mbox -accept from 192.168.1.0/24 for local deliver to mbox -accept from 192.168.1.1 for local deliver to mbox -accept from { 192.168.1.1 } for local deliver to mbox -accept from { 192.168.1.1, 192.168.1.2 } for local deliver to mbox -accept from <sources> for local deliver to mbox - diff --git a/regress/config/test8.conf b/regress/config/test8.conf deleted file mode 100644 index 9cf0c269..00000000 --- a/regress/config/test8.conf +++ /dev/null @@ -1,13 +0,0 @@ -listen on lo0 - -table aliases "/etc/mail/aliases" -table domains { example.org, example.com } - -accept from any for any deliver to mbox -accept from any for local deliver to mbox -accept from any for domain example.org deliver to mbox -accept from any for domain example.org alias <aliases> deliver to mbox -accept from any for domain <domains> deliver to mbox -accept from any for domain <domains> alias <aliases> deliver to mbox -accept from any for domain { example.org, example.com } deliver to mbox -accept from any for domain { example.org, example.com } alias <aliases> deliver to mbox diff --git a/regress/config/test9.conf b/regress/config/test9.conf deleted file mode 100644 index 7bcb1fcb..00000000 --- a/regress/config/test9.conf +++ /dev/null @@ -1,8 +0,0 @@ -listen on lo0 - -table vusers "/etc/mail/aliases" -table domains { example.org, example.com } -accept from any for domain "*" virtual <vusers> deliver to mbox -accept from any for domain example.org virtual <vusers> deliver to mbox -accept from any for domain <domains> virtual <vusers> deliver to mbox -accept from any for domain { example.org, example.com } virtual <vusers> deliver to mbox diff --git a/regress/expand/Makefile b/regress/expand/Makefile deleted file mode 100644 index aa1781c9..00000000 --- a/regress/expand/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -PROG= expand -NOMAN= 1 - -LDFLAGS+= -lutil - -.include <bsd.prog.mk> diff --git a/regress/expand/expand.c b/regress/expand/expand.c deleted file mode 100644 index bfed154b..00000000 --- a/regress/expand/expand.c +++ /dev/null @@ -1,129 +0,0 @@ -/* $OpenBSD: expand.c,v 1.18 2012/10/10 18:02:37 eric Exp $ */ - -/* - * Copyright (c) 2009 Gilles Chehade <gilles@poolp.org> - * Copyright (c) 2012 Eric Faurot <eric@openbsd.org> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include <err.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <util.h> - -#define MAX_LINE_SIZE 2048 - -static char * -strip(char *s) -{ - size_t l; - - while (*s == ' ' || *s == '\t') - s++; - - for (l = strlen(s); l; l--) { - if (s[l-1] != ' ' && s[l-1] != '\t') - break; - s[l-1] = '\0'; - } - - return (s); -} - -static int -expand_line_split(char **line, char **ret) -{ - static char buffer[MAX_LINE_SIZE]; - int esc, i, dq, sq; - char *s; - - bzero(buffer, sizeof buffer); - esc = dq = sq = i = 0; - for (s = *line; (*s) && (i < (int)sizeof(buffer)); ++s) { - if (esc) { - buffer[i++] = *s; - esc = 0; - continue; - } - if (*s == '\\') { - esc = 1; - continue; - } - if (*s == ',' && !dq && !sq) { - *ret = buffer; - *line = s+1; - return (1); - } - - buffer[i++] = *s; - esc = 0; - - if (*s == '"' && !sq) - dq ^= 1; - if (*s == '\'' && !dq) - sq ^= 1; - } - - if (esc || dq || sq || i == sizeof(buffer)) - return (-1); - - *ret = buffer; - *line = s; - return (i ? 1 : 0); -} - -int -expand_line(const char *s) -{ - char buffer[MAX_LINE_SIZE]; - char *p, *subrcpt; - int ret; - - bzero(buffer, sizeof buffer); - if (strlcpy(buffer, s, sizeof buffer) >= sizeof buffer) - return 0; - - p = buffer; - while ((ret = expand_line_split(&p, &subrcpt)) > 0) { - printf(" -> [%s]", subrcpt); - printf(" (%s)\n", strip(subrcpt)); - } - - if (ret >= 0) - return 1; - return 0; -} - -int -main(int argc, char **argv) -{ - FILE *fp; - char *line; - size_t len; - size_t lineno; - - fp = fopen(argv[1], "r"); - if (fp == NULL) - err(1, "fopen"); - - while ((line = fparseln(fp, &len, &lineno, NULL, 0)) != NULL) { - printf("=> [%s]\n", line); - if (! expand_line(line)) - printf("error!\n"); - free(line); - } - - return (0); -} diff --git a/regress/expand/test0 b/regress/expand/test0 deleted file mode 100644 index 456f6a67..00000000 --- a/regress/expand/test0 +++ /dev/null @@ -1,7 +0,0 @@ -# -/dev/null # test -/dev/null, eric, foo, bar, |/some/mda "test,comma" -a b \, \" \' d -a"bc'd", e'fg"h'i, "zer,tyu", 'qsd,fgh' -lsf qls mksq jmlq ksjmlsq kf -lskdjf ,,fsk ,foskfs,,,fsdf,s,f,sf diff --git a/regress/filters/Makefile b/regress/filters/Makefile deleted file mode 100644 index dcbb48d2..00000000 --- a/regress/filters/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -CFLAGS = -I../../smtpd/ -LDFLAGS = -L../../smtpd/libsmtpdfilter -lsmtpdfilter -levent -lutil - -SRCS = filter.c - -INSTALLPATH= /usr/libexec/smtpd - -all: - $(CC) -o $(INSTALLPATH)/filter $(CFLAGS) $(SRCS) $(LDFLAGS) diff --git a/regress/smtp/test.base b/regress/smtp/test.base deleted file mode 100755 index 02e76cdb..00000000 --- a/regress/smtp/test.base +++ /dev/null @@ -1,56 +0,0 @@ -#! /usr/bin/smtpscript -# -# This file is simply used to test the grammar and the behaviour of -# the scripting engine. Not SMTP related. -# - -test-case no-autoconnect { -} - -test-case no-autoconnect expect fail { - fail "on purpose" -} - -test-case no-autoconnect { - fail "ahaha! I failed" -} - -test-case no-autoconnect skip { - fail "should be skipped!" -} - -test-case no-autoconnect { - sleep 500 -} - -test-case no-autoconnect { - connect "localhost" port 25 -} - -proc proc0 %foo %bar { - sleep 1 - sleep 2 - sleep 3 -} - -proc proc1 { - noop -} - -test-case no-autoconnect { - - repeat 2 repeat 3 repeat 4 sleep 7 - sleep 8 - { - call proc0 - sleep 10 - } - - repeat 5 random { - call proc1 - { sleep 1 } - { sleep 2 } - } - - random {} -} diff --git a/regress/smtp/test.mailfrom b/regress/smtp/test.mailfrom deleted file mode 100644 index 0420f1c2..00000000 --- a/regress/smtp/test.mailfrom +++ /dev/null @@ -1,110 +0,0 @@ -proc init-helo { - expect smtp ok - writeln "HELO regress" - expect smtp helo -} - -# Allow emtpy MAIL FROM address (bounce messages) -test-case name "mailfrom.empty" { - call init-helo - writeln "MAIL FROM: <>" - expect smtp ok -} - -# Allow emtpy MAIL FROM address (bounce messages) -test-case name "mailfrom.at-sign" { - call init-helo - writeln "MAIL FROM: <@>" - expect smtp ok -} - -# Reject address without an '@' -test-case name "mailfrom.no-at-sign" { - call init-helo - writeln "MAIL FROM: <a>" - expect smtp permfail -} - -# Reject address with empty domain -test-case name "mailfrom.no-domain" { - call init-helo - writeln "MAIL FROM: <a@>" - expect smtp permfail -} - -# Reject address with empty user -test-case name "mailfrom.no-user" { - call init-helo - writeln "MAIL FROM: <@a>" - expect smtp permfail -} - -# Accept address after source-route stripping -test-case name "mailfrom.src-route" { - call init-helo - writeln "MAIL FROM: <whatever:a@a>" - expect smtp ok -} - -# Reject address with empty user after source-route stripping -test-case name "mailfrom.src-route-no-user" { - call init-helo - writeln "MAIL FROM: <a:@a>" - expect smtp permfail -} - -# Reject space as user -test-case name "mailfrom.space-as-user" { - call init-helo - writeln "MAIL FROM: < @a>" - expect smtp permfail -} - -# Reject space as domain -test-case name "mailfrom.space-as-domain" { - call init-helo - writeln "MAIL FROM: <a@ >" - expect smtp permfail -} - -# Reject unsupported options -test-case name "mailfrom.option" { - call init-helo - writeln "MAIL FROM: <user@domain> OPT" - expect smtp permfail -} - -# Allow SIZE=* -test-case name "mailfrom.option-size" { - call init-helo - writeln "MAIL FROM: <user@domain> SIZE=3005" - expect smtp ok -} - -# Allow BODY=7BIT -test-case name "mailfrom.option-7bit" { - call init-helo - writeln "MAIL FROM: <user@domain> BODY=7BIT" - expect smtp ok -} - -# Allow BODY=8BITMIME -test-case name "mailfrom.option-8bitmime" { - call init-helo - writeln "MAIL FROM: <user@domain> BODY=8BITMIME" - expect smtp ok -} - -# Allow multiple options -test-case name "mailfrom.option-8bitmime-size" { - call init-helo - writeln "MAIL FROM: <user@domain> BODY=8BITMIME SIZE=100" - expect smtp ok -} - -# Allow AUTH= (ignored) -test-case name "mailfrom.option-auth" { - call init-helo - writeln "MAIL FROM: <user@domain> AUTH=WHATEVER" - expect smtp ok -} diff --git a/regress/smtp/test.rcptto b/regress/smtp/test.rcptto deleted file mode 100644 index f6cfd888..00000000 --- a/regress/smtp/test.rcptto +++ /dev/null @@ -1,112 +0,0 @@ -proc init-helo-mailfrom { - expect smtp ok - writeln "HELO regress" - expect smtp helo - writeln "MAIL FROM: <>" - expect smtp ok -} - -# RCPT TO can't be empty -test-case name "rcptto.empty" { - call init-helo-mailfrom - writeln "RCPT TO: <>" - expect smtp permfail -} - -# RCPT TO can't be empty -test-case name "rcptto.at-sign" { - call init-helo-mailfrom - writeln "RCPT TO: <@>" - expect smtp permfail -} - -# Reject address without a '@' -test-case name "rcptto.no-at-sign" { - call init-helo-mailfrom - writeln "RCPT TO: <a>" - expect smtp permfail -} - -# Reject address with empty domain -test-case name "rcptto.no-domain" { - call init-helo-mailfrom - writeln "RCPT TO: <a@>" - expect smtp permfail -} - -# Reject address with empty user -test-case name "rcptto.no-user" { - call init-helo-mailfrom - writeln "RCPT TO: <@a>" - expect smtp permfail -} - -# Accept address after source-route stripping -test-case name "rcptto.src-route" { - call init-helo-mailfrom - writeln "RCPT TO: <whatever:a@a>" - expect smtp ok -} - -# Reject address with empty user after source-route stripping -test-case name "rcptto.src-route-no-user" { - call init-helo-mailfrom - writeln "RCPT TO: <a:@a>" - expect smtp permfail -} - -# Reject address with space as user -test-case name "rcptto.space-as-user" { - call init-helo-mailfrom - writeln "RCPT TO: < @a>" - expect smtp permfail -} - -# Reject address with space as domain -test-case name "rcptto.space-as-domain" { - call init-helo-mailfrom - writeln "RCPT TO: <a@ >" - expect smtp permfail -} - -# Reject options -test-case name "rcptto.option" { - call init-helo-mailfrom - writeln "RCPT TO: <user@domain> OPT" - expect smtp permfail -} - -# Reject options -test-case name "rcptto.option-size" { - call init-helo-mailfrom - writeln "RCPT TO: <user@domain> SIZE=3005" - expect smtp permfail -} - -# Reject options -test-case name "rcptto.option-7bit" { - call init-helo-mailfrom - writeln "RCPT TO: <user@domain> BODY=7BIT" - expect smtp permfail -} - -# Reject options -test-case name "rcptto.option-8bitmime" { - call init-helo-mailfrom - writeln "RCPT TO: <user@domain> BODY=8BITMIME" - expect smtp permfail -} - -# Reject options -test-case name "rcptto.option-8bitmime-size" { - call init-helo-mailfrom - writeln "RCPT TO: <user@domain> BODY=8BITMIME" - expect smtp permfail -} - -# Reject options -test-case name "rcptto.option-auth" { - call init-helo-mailfrom - writeln "RCPT TO: <user@domain> AUTH=WHATEVER" - expect smtp permfail -} diff --git a/regress/smtp/test.smtp0 b/regress/smtp/test.smtp0 deleted file mode 100755 index c56d002e..00000000 --- a/regress/smtp/test.smtp0 +++ /dev/null @@ -1,89 +0,0 @@ -#! /usr/bin/smtpscript -# -# Simple test cases for the SMTP server. -# - -# Make sure we get an smtp welcome message -test-case { - expect smtp -} - -# Make sure that the server accept QUIT and disconnect immediatly -test-case { - expect smtp - writeln "QUIT" - expect smtp ok - expect disconnect -} - -# Make sure that the server rejects an empty HELO -test-case { - expect smtp - writeln "HELO" - expect smtp permfail -} - -# Make sure that the server rejects an empty EHLO -test-case { - expect smtp - writeln "EHLO" - expect smtp permfail -} - -# Make sure that the server accepts HELO -test-case { - expect smtp - writeln "HELO myself" - expect smtp ok -} - -# Make sure that the server accepts EHLO -test-case { - expect smtp - writeln "EHLO myself" - expect smtp helo -} - -# Make sure that the server doesn't accept mail before HELO -test-case { - expect smtp - writeln "MAIL FROM: <me@localhost>" - expect smtp permfail -} - -# Simple mail transfer test, without pipelining -test-case { - expect smtp - writeln "EHLO fkf" - expect smtp helo - writeln "MAIL FROM: <test@blabla>" - expect smtp ok - writeln "RCPT TO: <gilles -@localhost>" - expect smtp ok -# writeln "DATA" -# expect smtp ok -# writeln "foo" -# writeln "." -# expect smtp ok -# writeln "QUIT" -# expect smtp -# expect disconnect -} - -# Simple mail transfer test, with pipelining -test-case { - expect smtp - writeln "EHLO fkf" - expect smtp helo - writeln "MAIL FROM: <test@blabla>" - writeln "RCPT TO: <test@localhost>" - writeln "DATA" - repeat 3 expect smtp ok - writeln "foo" - writeln "." - expect smtp ok - writeln "QUIT" - expect smtp - expect disconnect -} diff --git a/regress/smtp/test.smtp1 b/regress/smtp/test.smtp1 deleted file mode 100755 index 9d4d8c43..00000000 --- a/regress/smtp/test.smtp1 +++ /dev/null @@ -1,88 +0,0 @@ -#! /usr/bin/smtpscript -# -# Simple test cases for the SMTP server. -# - -# Make sure we get an smtp welcome message -test-case { - expect smtp -} - -# Make sure that the server accept QUIT and disconnect immediatly -test-case { - expect smtp - writeln "QUIT" - expect smtp ok - expect disconnect -} - -# Make sure that the server rejects an empty HELO -test-case { - expect smtp - writeln "HELO" - expect smtp permfail -} - -# Make sure that the server rejects an empty EHLO -test-case { - expect smtp - writeln "EHLO" - expect smtp permfail -} - -# Make sure that the server accepts HELO -test-case { - expect smtp - writeln "HELO myself" - expect smtp ok -} - -# Make sure that the server accepts EHLO -test-case { - expect smtp - writeln "EHLO myself" - expect smtp helo -} - -# Make sure that the server doesn't accept mail before HELO -test-case { - expect smtp - writeln "MAIL FROM: <me@localhost>" - expect smtp permfail -} - -# Simple mail transfer test, without pipelining -test-case { - expect smtp - writeln "EHLO fkf" - expect smtp helo - writeln "MAIL FROM: <test@blabla>" - expect smtp ok - writeln "RCPT TO: <gilles@localhost>" - expect smtp ok - writeln "DATA" - expect smtp ok - writeln "foo" - writeln "." - expect smtp ok - writeln "QUIT" - expect smtp - expect disconnect -} - -# Simple mail transfer test, with pipelining -test-case { - expect smtp - writeln "EHLO fkf" - expect smtp helo - writeln "MAIL FROM: <test@blabla>" - writeln "RCPT TO: <gilles@localhost>" - writeln "DATA" - repeat 3 expect smtp ok - writeln "foo" - writeln "." - expect smtp ok - writeln "QUIT" - expect smtp - expect disconnect -} diff --git a/regress/smtp/test.smtp2 b/regress/smtp/test.smtp2 deleted file mode 100755 index 1d5fb841..00000000 --- a/regress/smtp/test.smtp2 +++ /dev/null @@ -1,50 +0,0 @@ -#! /usr/bin/smtpscript -# -# Make sure that the SMTP limits are ok -# - -# Make sure the server disconnects on the 5th useless command -test-case { - expect smtp - repeat 4 { - writeln "FOO" - expect smtp permfail - } - writeln "FOO" - expect disconnect -} - -# 1000 RCPT per message -test-case { - expect smtp - writeln "EHLO fkf" - expect smtp helo - writeln "MAIL FROM: <test@blabla>" - expect smtp ok - repeat 1000 { - writeln "RCPT TO: <test@localhost>" - expect smtp ok - } - writeln "RCPT TO: <test@localhost>" - expect smtp tempfail -} - -# 100 messages per session -test-case { - expect smtp - writeln "EHLO fkf" - expect smtp helo - repeat 100 { - writeln "MAIL FROM: <test@blabla>" - expect smtp ok - writeln "RCPT TO: <test@foo.bar>" - expect smtp ok - writeln "DATA" - expect smtp ok - writeln "foo" - writeln "." - expect smtp ok - } - writeln "MAIL FROM: <test@blabla>" - expect smtp tempfail -} diff --git a/regress/smtp/test.smtp4 b/regress/smtp/test.smtp4 deleted file mode 100755 index a2c5299e..00000000 --- a/regress/smtp/test.smtp4 +++ /dev/null @@ -1,155 +0,0 @@ -#! /usr/bin/smtpscript -# -# Make sure that broken sessions are handled as they should -# - -test-case { - expect smtp - writeln "EHLO" - expect smtp permfail -} - -test-case { - expect smtp - writeln "HELO" - expect smtp permfail -} - -test-case { - expect smtp - writeln "HELO " - expect smtp permfail -} - -test-case { - expect smtp - writeln " HELO " - expect smtp permfail -} - -test-case { - expect smtp - writeln "HELO l" - expect smtp helo -} - - -test-case { - expect smtp - writeln "HELO l" - expect smtp ok -} - -test-case { - expect smtp - writeln "EHLO l" - expect smtp helo -} - -test-case { - expect smtp - writeln "EHLO l" - expect smtp helo - writeln "RCPT TO:" - expect smtp permfail -} - -test-case { - expect smtp - writeln "EHLO l" - expect smtp helo - writeln "DATA" - expect smtp permfail -} - -test-case { - expect smtp - writeln "EHLO l" - expect smtp helo - writeln "MAIL FROM" - expect smtp permfail -} - -test-case { - expect smtp - writeln "EHLO l" - expect smtp helo - writeln "MAIL FROM:<opensmtpd@opensmtpd.org>" - expect smtp ok - writeln "DATA" - expect smtp permfail -} - -test-case { - expect smtp - writeln "EHLO l" - expect smtp helo - writeln "MAIL FROM:<opensmtpd@opensmtpd.org>" - expect smtp ok - writeln "RCPT TO:" - expect smtp permfail -} - -test-case { - expect smtp - writeln "EHLO l" - expect smtp helo - writeln "MAIL FROM:<opensmtpd@opensmtpd.org>" - expect smtp ok - writeln "RCPT TO:<root@localhost>" - expect smtp ok - writeln "RSET" - expect smtp ok - writeln "DATA" - expect smtp permfail -} - -test-case { - expect smtp - writeln "EHLO l" - expect smtp helo - writeln "MAIL FROM:<opensmtpd@opensmtpd.org>" - expect smtp ok - writeln "RCPT TO:<root@localhost>" - expect smtp ok - writeln "RSET" - expect smtp ok - writeln "MAIL FROM:<opensmtpd@opensmtpd.org>" - expect smtp ok - writeln "DATA" - expect smtp permfail -} - -test-case { - expect smtp ok - writeln "EHLO l" - expect smtp helo - writeln "MAIL FROM:<opensmtpd@opensmtpd.org>" - expect smtp ok - writeln "RCPT TO:<root@localhost>" - expect smtp ok - writeln "RSET" - expect smtp ok - writeln "MAIL FROM:<opensmtpd@opensmtpd.org>" - expect smtp ok - writeln "RCPT TO:<root@localhost>" - expect smtp ok - writeln "DATA" - expect smtp ok -} - -test-case { - expect smtp ok - writeln "EHLO l" - expect smtp helo - writeln "MAIL FROM:<opensmtpd@opensmtpd.org> SIZE=1000" - expect smtp ok -} - -test-case { - expect smtp ok - writeln "HELO l" - expect smtp ok - writeln "MAIL FROM:<opensmtpd@opensmtpd.org> SIZE=1000" - expect smtp ok -} diff --git a/regress/smtp/test.tls b/regress/smtp/test.tls deleted file mode 100644 index f7ebdf19..00000000 --- a/regress/smtp/test.tls +++ /dev/null @@ -1,10 +0,0 @@ -test-case name "starttls" { - expect smtp ok - writeln "EHLO regress" - expect smtp helo - writeln "STARTTLS" - expect smtp ok - starttls - writeln "EHLO regress" - expect smtp helo -} diff --git a/tests/certificate_test/smtpd.conf b/tests/certificate_test/smtpd.conf deleted file mode 100644 index 34887103..00000000 --- a/tests/certificate_test/smtpd.conf +++ /dev/null @@ -1,13 +0,0 @@ -pki_domain = "localhost" -pki $pki_domain cert "/etc/ssl/private/sites/fullchain.cer" -pki $pki_domain key "/etc/ssl/private/sites/site.key" - -#Encrypted password is "password" -table passwords {"user"="$6$tf940h4BpywpeKID$pWYiqoWywVPybeHaEcqHSRBD/7UxBmYhx7iHvxj/B3LBxCWwnFx7.3JwMISsN9EpPMwEZELvbNehVLl0IvvZo/"} - -listen on localhost tls hostname $pki_domain pki $pki_domain auth-optional <passwords> -listen on localhost port 465 smtps hostname $pki_domain pki $pki_domain auth-optional <passwords> -listen on localhost port 587 tls-require hostname $pki_domain pki $pki_domain auth <passwords> - -action "local" maildir "/tmp/" -match auth from any for any action "local" diff --git a/tests/certificate_test/test.sh b/tests/certificate_test/test.sh deleted file mode 100755 index 1eb50b40..00000000 --- a/tests/certificate_test/test.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -set -euxo pipefail -BASEDIR=$(dirname $0) - -# Setup TLS -mkdir -p /etc/ssl/private/sites/ -openssl genrsa -out /etc/ssl/private/sites/site.key 4096 -openssl req -new -x509 -key /etc/ssl/private/sites/site.key -out /etc/ssl/private/sites/fullchain.cer -subj "/CN='localhost'" -chmod 600 /etc/ssl/private/sites/site.key -chmod 644 /etc/ssl/private/sites/fullchain.cer - -smtpd -dv -f "$BASEDIR/smtpd.conf" & - -#Wait for smtpd to be ready to receive connections -sleep 3 - -#OpenSSL is crazy and will treat a capital "R" or "Q" as a command without the -quiet flag -#OpenSMTPD doesn't support pipelining, so wait 0.1 seconds between lines -awk '{print $0; system("sleep .1");}' "$BASEDIR/../test_email.txt" | \ - openssl s_client -quiet -connect localhost:25 -starttls smtp diff --git a/tests/test_all.sh b/tests/test_all.sh deleted file mode 100755 index ca619479..00000000 --- a/tests/test_all.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -set -euxo pipefail -BASEDIR=$(dirname $0) - -echo "Testing TLS" -"$BASEDIR/certificate_test/test.sh" diff --git a/tests/test_email.txt b/tests/test_email.txt deleted file mode 100644 index 4fd3acfd..00000000 --- a/tests/test_email.txt +++ /dev/null @@ -1,13 +0,0 @@ -HELO localhost -AUTH LOGIN -dXNlcg== -cGFzc3dvcmQ= -MAIL FROM:<_smtpd@localhost> -RCPT TO:<_smtpd@localhost> -DATA -Subject: Test Email - -It works - -. -QUIT |