diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2014-06-08 17:49:21 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2014-06-08 17:49:21 +0100 |
commit | f77cff22db0bbb4d71a16becb5512e19d86ed63a (patch) | |
tree | ccfd91707e4e55eeba6a3a5e9aa52d174502b3c9 | |
parent | c50e5871c141ea24777fc916de1fc0cb2e96c37d (diff) |
Testcase for udpsend
-rw-r--r-- | test/aux-fixed/0601.udpserver | 22 | ||||
-rw-r--r-- | test/confs/0601 | 20 | ||||
-rw-r--r-- | test/log/0601 | 1 | ||||
-rw-r--r-- | test/rejectlog/0601 | 1 | ||||
-rw-r--r-- | test/scripts/0000-Basic/0601 | 16 | ||||
-rw-r--r-- | test/stdout/0601 | 2 |
6 files changed, 62 insertions, 0 deletions
diff --git a/test/aux-fixed/0601.udpserver b/test/aux-fixed/0601.udpserver new file mode 100644 index 000000000..5513402b0 --- /dev/null +++ b/test/aux-fixed/0601.udpserver @@ -0,0 +1,22 @@ +#!/usr/bin/perl +use IO::Socket::INET; +use IO::Select; + +if (fork != 0) { + sleep 1; + exit 0; +} + +my ($select,$socket,$received_data); + +$socket = new IO::Socket::INET ( + LocalPort => '1223', + Proto => 'udp', +) or die "ERROR in Socket Creation : $!\n"; + +$select = IO::Select->new($socket) or die "IO::Select $!"; + +if (scalar ($select->can_read(5)) == 1) { + $socket->recv($recieved_data,1024); + print "received: $recieved_data\n"; +} diff --git a/test/confs/0601 b/test/confs/0601 new file mode 100644 index 000000000..58b47d517 --- /dev/null +++ b/test/confs/0601 @@ -0,0 +1,20 @@ +# Exim test configuration 0601 +# udpsend + +exim_path = EXIM_PATH +spool_directory = DIR/spool +log_file_path = DIR/spool/log/%slog + +# ----- Main settings ----- + +acl_smtp_connect = check + + +# ----- ACL ----- + +begin acl + +check: + warn udpsend = <; 127.0.0.1 ; 1223 ; message from exim + +# End diff --git a/test/log/0601 b/test/log/0601 new file mode 100644 index 000000000..1d4157f7f --- /dev/null +++ b/test/log/0601 @@ -0,0 +1 @@ +1999-03-02 09:44:33 U=CALLER rejected connection in "connect" ACL diff --git a/test/rejectlog/0601 b/test/rejectlog/0601 new file mode 100644 index 000000000..1d4157f7f --- /dev/null +++ b/test/rejectlog/0601 @@ -0,0 +1 @@ +1999-03-02 09:44:33 U=CALLER rejected connection in "connect" ACL diff --git a/test/scripts/0000-Basic/0601 b/test/scripts/0000-Basic/0601 new file mode 100644 index 000000000..c126c06fb --- /dev/null +++ b/test/scripts/0000-Basic/0601 @@ -0,0 +1,16 @@ +# udpsend +#need_ipv4 +# +# +perl aux-fixed/0601.udpserver +**** +# +exim -bs -odi +mail from:someone@some.domain +rcpt to:CALLER@HOSTNAME +data +This is a test message. +. +quit +*** +sleep 4 diff --git a/test/stdout/0601 b/test/stdout/0601 new file mode 100644 index 000000000..75968f3de --- /dev/null +++ b/test/stdout/0601 @@ -0,0 +1,2 @@ +received: message from exim +550 Administrative prohibition
|