From: lpsolit%gmail.com <> Date: Tue, 25 Mar 2008 06:08:16 +0000 (+0000) Subject: Bug 92274: email_in.pl using the From address doesn't work with emailsuffix - Patch... X-Git-Tag: bugzilla-3.0.4~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=369758331bab5c55bd5738f5ab1083308fb80668;p=thirdparty%2Fbugzilla.git Bug 92274: email_in.pl using the From address doesn't work with emailsuffix - Patch by Frédéric Buclin r/a=mkanat --- diff --git a/email_in.pl b/email_in.pl index 422b886f76..5d1368e4a3 100644 --- a/email_in.pl +++ b/email_in.pl @@ -370,6 +370,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 });