From 6daf06596dcdf0422624ce283ebcccbfe528bb24 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 25 Mar 2008 06:06:16 +0000 Subject: Bug 92274: email_in.pl using the From address doesn't work with emailsuffix - Patch by Frédéric Buclin r/a=mkanat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- email_in.pl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'email_in.pl') 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 }); -- cgit v1.2.3-24-g4f1b