ftpserver: don't verify SMTP MAIL FROM names

Rely on tests asking the names to get refused instead - test servers
should be as dumb as possible. Edited test 914, 955 and 959 accordingly.

Closes #5639
This commit is contained in:
Daniel Stenberg 2020-07-02 16:42:55 +02:00
parent 54f21be2e3
commit 1535363e72
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
4 changed files with 11 additions and 7 deletions

View File

@ -8,6 +8,9 @@ SMTP
#
# Server-side
<reply>
<servercmd>
REPLY MAIL 501 not fine enough
</servercmd>
</reply>
#

View File

@ -8,6 +8,9 @@ SMTP
#
# Server-side
<reply>
<servercmd>
REPLY MAIL 501 not fine enough
</servercmd>
</reply>
#

View File

@ -8,6 +8,9 @@ SMTP
#
# Server-side
<reply>
<servercmd>
REPLY MAIL 501 not fine enough
</servercmd>
</reply>
#

View File

@ -835,13 +835,8 @@ sub MAIL_smtp {
}
}
# Validate the from address (only <> and a valid email address inside
# <> are allowed, such as <user@example.com>)
if (($from eq "<>") ||
(!$smtputf8 && $from =~
/^<([a-zA-Z0-9._%+-]+)\@(([a-zA-Z0-9-]+)\.)+([a-zA-Z]{2,4})>$/) ||
($smtputf8 && $from =~
/^<([a-zA-Z0-9\x{80}-\x{ff}._%+-]+)\@(([a-zA-Z0-9\x{80}-\x{ff}-]+)\.)+([a-zA-Z]{2,4})>$/)) {
# this server doesn't "validate" MAIL FROM addresses
if (length($from)) {
my @found;
my $valid = 1;