sendcontrol "501 Unrecognized parameter\r\n";
}
else {
- my $testno = $smtp_client;
-
- $testno =~ s/^([^0-9]*)//;
- my $testpart = "";
- if ($testno > 10000) {
- $testpart = $testno % 10000;
- $testno = int($testno / 10000);
- }
-
- loadtest("$srcdir/data/test$testno");
-
- my @data = getpart("reply", "data$testpart");
+ my @data = getreplydata($smtp_client);
for my $d (@data) {
sendcontrol $d;
sendcontrol "501 Unrecognized parameter\r\n";
}
else {
- my $testno = $smtp_client;
-
- $testno =~ s/^([^0-9]*)//;
- my $testpart = "";
- if ($testno > 10000) {
- $testpart = $testno % 10000;
- $testno = int($testno / 10000);
- }
-
- loadtest("$srcdir/data/test$testno");
-
- my @data = getpart("reply", "data$testpart");
+ my @data = getreplydata($smtp_client);
for my $d (@data) {
sendcontrol $d;
logmsg "return proof we are we\n";
}
else {
- logmsg "retrieve a mail\n";
-
- my $testno = $selected;
- $testno =~ s/^([^0-9]*)//;
- my $testpart = "";
- if ($testno > 10000) {
- $testpart = $testno % 10000;
- $testno = int($testno / 10000);
- }
-
# send mail content
- loadtest("$srcdir/data/test$testno");
+ logmsg "retrieve a mail\n";
- @data = getpart("reply", "data$testpart");
+ @data = getreplydata($selected);
}
for (@data) {
logmsg "return proof we are we\n";
}
else {
- my $testno = $reference;
-
- $testno =~ s/^([^0-9]*)//;
- my $testpart = "";
- if ($testno > 10000) {
- $testpart = $testno % 10000;
- $testno = int($testno / 10000);
- }
-
- loadtest("$srcdir/data/test$testno");
-
- my @data = getpart("reply", "data$testpart");
+ my @data = getreplydata($reference);
for my $d (@data) {
sendcontrol $d;
sendcontrol "$cmdid BAD Command Argument\r\n";
}
else {
- my $testno = $reference;
-
- $testno =~ s/^([^0-9]*)//;
- my $testpart = "";
- if ($testno > 10000) {
- $testpart = $testno % 10000;
- $testno = int($testno / 10000);
- }
-
- loadtest("$srcdir/data/test$testno");
-
- my @data = getpart("reply", "data$testpart");
+ my @data = getreplydata($reference);
for my $d (@data) {
sendcontrol $d;
sendcontrol "$cmdid BAD Command Argument\r\n";
}
else {
- $testno =~ s/[^0-9]//g;
- my $testpart = "";
- if ($testno > 10000) {
- $testpart = $testno % 10000;
- $testno = int($testno / 10000);
- }
-
- loadtest("$srcdir/data/test$testno");
-
- my @data = getpart("reply", "data$testpart");
+ my @data = getreplydata($testno);
for my $d (@data) {
sendcontrol $d;
sendcontrol "$cmdid BAD Command Argument\r\n";
}
else {
- my $testno = $mailbox;
-
- $testno =~ s/[^0-9]//g;
- my $testpart = "";
- if ($testno > 10000) {
- $testpart = $testno % 10000;
- $testno = int($testno / 10000);
- }
-
- loadtest("$srcdir/data/test$testno");
-
- my @data = getpart("reply", "data$testpart");
+ my @data = getreplydata($mailbox);
for my $d (@data) {
sendcontrol $d;
sendcontrol "$cmdid BAD Command Argument\r\n";
}
else {
- my $testno = $selected;
-
- $testno =~ s/^([^0-9]*)//;
- my $testpart = "";
- if ($testno > 10000) {
- $testpart = $testno % 10000;
- $testno = int($testno / 10000);
- }
-
- loadtest("$srcdir/data/test$testno");
-
- my @data = getpart("reply", "data$testpart");
+ my @data = getreplydata($selected);
for my $d (@data) {
sendcontrol $d;
sendcontrol "$cmdid BAD Command Argument\r\n";
}
else {
- my $testno = $selected;
-
- $testno =~ s/^([^0-9]*)//;
- my $testpart = "";
- if ($testno > 10000) {
- $testpart = $testno % 10000;
- $testno = int($testno / 10000);
- }
-
- loadtest("$srcdir/data/test$testno");
-
- my @data = getpart("reply", "data$testpart");
+ my @data = getreplydata($selected);
for my $d (@data) {
sendcontrol $d;
logmsg "return proof we are we\n";
}
else {
- logmsg "retrieve a mail\n";
-
- $testno =~ s/^([^0-9]*)//;
- my $testpart = "";
- if ($testno > 10000) {
- $testpart = $testno % 10000;
- $testno = int($testno / 10000);
- }
-
# send mail content
- loadtest("$srcdir/data/test$testno");
+ logmsg "retrieve a mail\n";
- @data = getpart("reply", "data$testpart");
+ @data = getreplydata($testno);
}
sendcontrol "+OK Mail transfer starts\r\n";
sendcontrol "-ERR Protocol error\r\n";
}
else {
- my @data;
-
if ($lines == "0") {
logmsg "retrieve header of mail\n";
}
logmsg "retrieve top $lines lines of mail\n";
}
- my $testno = $msg;
- $testno =~ s/^([^0-9]*)//;
- my $testpart = "";
- if ($testno > 10000) {
- $testpart = $testno % 10000;
- $testno = int($testno / 10000);
- }
-
- loadtest("$srcdir/data/test$testno");
-
- @data = getpart("reply", "data$testpart");
+ my @data = getreplydata($msg);
sendcontrol "+OK Mail transfer starts\r\n";