diff options
-rw-r--r-- | email_in.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/email_in.pl b/email_in.pl index 248b86bb8..e23da4317 100644 --- a/email_in.pl +++ b/email_in.pl @@ -330,6 +330,11 @@ my $mail_text = join("", @mail_lines); my $mail_fields = parse_mail($mail_text); my $username = $mail_fields->{'reporter'}; +# If emailsuffix is in use, we have to remove it from the email address. +if (my $suffix = Bugzilla->params->{'emailsuffix'}) { + $username =~ s/\Q$suffix\E$//i; +} + my $user = Bugzilla::User->new({ name => $username }) || ThrowUserError('invalid_username', { name => $username }); |