Closed
Bug 396692
Opened 17 years ago
Closed 17 years ago
email_in.pl using the From address doesn't work with emailsuffix
Categories
(Bugzilla :: Incoming Email, defect)
Bugzilla
Incoming Email
Tracking
()
People
(Reporter: rickdynarski, Unassigned)
Details
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; InfoPath.1)
Build Identifier: Bugzilla 3.0.1
The new inbound email interface does not handle installations where the usernames are stored undecorated in Bugzilla. Since email_in.pl always uses the From address, it fails to find valid users in the database. The previous script in contrib always cut out the @realm portion of the email address.
I created a patch for email_in.pl which works in both cases. By simply checking data/params/emailsuffix email_in.pl can determine which way to process the inbound email address. The patch is:
[bugzilla@bugzilla bugzilla-3.0.1]$ diff email_in.pl email_in.pl.ORIG
382,397c382
< #
< # Depending upon the configuration you may need to strip
< # the email address of the @realm portion in order to look
< # up the user in the database. This should only be done for
< # configuration where the parameters are configured to supply
< # the @realm portion. Meaning that only undecorated user names
< # can be used to look up the user.
< #
< chomp ( $username );
< print STDERR "fullname = $username \n";
< my $hack = $username;
< if ( Bugzilla->params->{'emailsuffix'} ne '' ) {
< $hack =~ s/^([^@]+).*/$1/;
< print STDERR "sendershort = $hack\n";
< }
< my $user = Bugzilla::User->new({ name => $hack })
---
> my $user = Bugzilla::User->new({ name => $username })
Reproducible: Always
Steps to Reproduce:
1. Configure your Bugzilla installation to not use decorated usernames
2. Send inbound email
3.
See the diff in the detailed description for the basic changes.
Comment 1•17 years ago
|
||
The better way to handle this would be to make sure the email address in "From" matches the username *with emailsuffix*.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Summary: email_in.pl always using the From address to find the user not always a valid configuration → email_in.pl using the From address doesn't work with emailsuffix
Comment 2•17 years ago
|
||
Unless I miss something, this is a very old bug. bug_email.pl was the old name and version of email_in.pl, but we are talking about the same issue here.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•