Commit 49341628 authored by Steve Holme's avatar Steve Holme
Browse files

ftpserver.pl: Moved specifying the test number from the RCPT address

...to the client address as this frees the RCPT strings to contain
just an email address and by passing the test number into curl as the
client address remains consistent with POP3 and IMAP tests as they are
specified in the URL.
parent ab7e6afd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ To: another
body
</stdin>
 <command>
smtp://smtp.1320:%SMTPPORT/user --mail-rcpt 1320@example.com --mail-from 1320@example.com -T - -p -x %HOSTIP:%PROXYPORT
smtp://smtp.1320:%SMTPPORT/1320 --mail-rcpt 1320@example.com --mail-from 1320@example.com -T - -p -x %HOSTIP:%PROXYPORT
</command>
</client>

@@ -46,7 +46,7 @@ smtp://smtp.1320:%SMTPPORT/user --mail-rcpt 1320@example.com --mail-from 1320@ex
^User-Agent: curl/.*
</strip>
<protocol>
EHLO user
EHLO 1320
MAIL FROM:<1320@example.com>
RCPT TO:<1320@example.com>
DATA
+3 −3
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ To: another
body
</file>
 <command>
smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 1406@example.com --mail-rcpt 1406@foobar.example.com --mail-from 1406@example.com -T log/test1406.eml --libcurl log/test1406.c
smtp://%HOSTIP:%SMTPPORT/1406 --mail-rcpt 1406@example.com --mail-rcpt 1406@foobar.example.com --mail-from 1406@example.com -T log/test1406.eml --libcurl log/test1406.c
</command>
</client>

@@ -40,7 +40,7 @@ smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 1406@example.com --mail-rcpt 1406@foob
# Verify data after the test has been "shot"
<verify>
<protocol>
EHLO user
EHLO 1406
MAIL FROM:<1406@example.com> SIZE=38
RCPT TO:<1406@example.com>
RCPT TO:<1406@foobar.example.com>
@@ -73,7 +73,7 @@ int main(int argc, char *argv[])

  hnd = curl_easy_init();
  curl_easy_setopt(hnd, CURLOPT_INFILESIZE_LARGE, (curl_off_t)38);
  curl_easy_setopt(hnd, CURLOPT_URL, "smtp://%HOSTIP:%SMTPPORT/user");
  curl_easy_setopt(hnd, CURLOPT_URL, "smtp://%HOSTIP:%SMTPPORT/1406");
  curl_easy_setopt(hnd, CURLOPT_HEADER, 1L);
  curl_easy_setopt(hnd, CURLOPT_UPLOAD, 1L);
  curl_easy_setopt(hnd, CURLOPT_USERAGENT, "stripped");
+2 −2
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ To: another
body
</stdin>
 <command>
smtp://%HOSTIP:%SMTPPORT/user
smtp://%HOSTIP:%SMTPPORT/1507
</command>
</client>

@@ -40,7 +40,7 @@ smtp://%HOSTIP:%SMTPPORT/user
# Verify data after the test has been "shot"
<verify>
<protocol>
EHLO user
EHLO 1507
MAIL FROM:<1507-realuser@example.com>
RCPT TO:<1507-recipient@example.com>
DATA
+2 −2
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ To: another
body
</stdin>
 <command>
smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 900@example.com --mail-from 900@example.com -T -
smtp://%HOSTIP:%SMTPPORT/900 --mail-rcpt 900@example.com --mail-from 900@example.com -T -
</command>
</client>

@@ -34,7 +34,7 @@ smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 900@example.com --mail-from 900@exampl
# Verify data after the test has been "shot"
<verify>
<protocol>
EHLO user
EHLO 900
MAIL FROM:<900@example.com>
RCPT TO:<900@example.com>
DATA
+2 −2
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ To: another
body
</stdin>
 <command>
smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 901@example.com --mail-from 901@example.com -T -
smtp://%HOSTIP:%SMTPPORT/901 --mail-rcpt 901@example.com --mail-from 901@example.com -T -
</command>
</client>

@@ -40,7 +40,7 @@ smtp://%HOSTIP:%SMTPPORT/user --mail-rcpt 901@example.com --mail-from 901@exampl
# Verify data after the test has been "shot"
<verify>
<protocol>
EHLO user
EHLO 901
MAIL FROM:<901@example.com>
RCPT TO:<901@example.com>
DATA
Loading