email_in.pl using the From address doesn't work with emailsuffix

RESOLVED FIXED in Bugzilla 3.0

Status

()

Bugzilla
Incoming Email
RESOLVED FIXED
16 years ago
9 years ago

People

(Reporter: Bruce Edge, Assigned: Frédéric Buclin)

Tracking

2.12
Bugzilla 3.0
Bug Flags:
approval +
approval3.0 +

Details

Attachments

(1 attachment)

739 bytes, patch
Max Kanat-Alexander
: review+
Details | Diff | Splinter Review
(Reporter)

Description

16 years ago
The distributed bug_email.pl does not deal with local user names. It requires a
complete domain name.
Also, if the assigned_to field is omitted from an email, it is not gnerated
correctly.
Here is the diff to fix both issues:

diff bug_email.pl.orig bug_email.pl
91a92
> my $EmailSender;
444c445
< 	Reply( $SenderShort, $Message_ID, "Bugzilla Error", "Permission denied.\n\n" .
---
> 	Reply( $EmailSender, $Message_ID, "Bugzilla Error", "Permission denied.\n\n" .
760a762
> $EmailSender = $SenderShort;
952c954
< $Control{'assigned_to'} = DBname_to_id($Control{'assigned_to'}, $forceAssignedOK);
---
> # Already a number !! $Control{'assigned_to'} =
DBname_to_id($Control{'assigned_to'}, $forceAssignedOK);
1267c1269
<     Reply( $SenderShort, $Message_ID,"Bugzilla success (ID $id)", $reply );
---
>     Reply( $EmailSender, $Message_ID,"Bugzilla success (ID $id)", $reply );
1282c1284
<     Reply( $SenderShort, $Message_ID, "Bugzilla Error", $errreply );
---
>     Reply( $EmailSender, $Message_ID, "Bugzilla Error", $errreply );
Target Milestone: --- → Bugzilla 2.18
-> Bugzilla product
Component: Bugzilla → Bugzilla-General
Product: Webtools → Bugzilla
Version: Bugzilla 2.12 → 2.12

Comment 2

15 years ago
When setting up the mail interface in conjunction with local user names 
(restricting access to Bugzilla by automatically adding "@domain.tl"), I 
stumbled over this issue. The version I'm using is Bugzilla 2.14.1.

The diff from the description didn't completely solve the problem - maybe 
version dependent. For me, the follwoing seems to work:


diff bug_email.pl bug_email.pl.orig 
92d91
< my $EmailSender;
445c444
<       Reply( $EmailSender, $Message_ID, "Bugzilla Error", "Permission 
denied.\n\n" .
---
>       Reply( $SenderShort, $Message_ID, "Bugzilla Error", "Permission 
denied.\n\n" .
763,765d761
< $EmailSender = $SenderShort;
< print "EmailSender = $EmailSender\n";
< 
838c834
< if (! CheckPermissions("CreateBugs", $EmailSender ) ) {
---
> if (! CheckPermissions("CreateBugs", $SenderShort ) ) {
1260c1256
<     Reply( $EmailSender, $Message_ID,"Bugzilla success (ID $id)", $reply );
---
>     Reply( $SenderShort, $Message_ID,"Bugzilla success (ID $id)", $reply );
1275c1271
<     Reply( $EmailSender, $Message_ID, "Bugzilla Error", $errreply );
---
>     Reply( $SenderShort, $Message_ID, "Bugzilla Error", $errreply );

Comment 3

15 years ago
Just a heads up: the above diff is backwards.
OS: Linux → All
Hardware: PC → All
Whiteboard: bug_email
Blocks: 94850
CCing Dan Berlin, who from stuff I've seen around, I know is actually using the
bug_email stuff.  I'd appreciate any input or fixes you'd be willing to provide
on these bugs :-)
I'm not sure I follow what the provided diff is trying to accomplish...  but
that file is pretty ugly anyway.
Assignee: justdave → nobody
Target Milestone: Bugzilla 2.18 → Bugzilla 2.20

Updated

12 years ago
Target Milestone: Bugzilla 2.20 → Future

Updated

12 years ago
Blocks: 322955

Updated

12 years ago
No longer blocks: 94850

Updated

11 years ago
QA Contact: mattyt-bugzilla → default-qa
Target Milestone: Future → ---
(Assignee)

Updated

10 years ago
Duplicate of this bug: 396692
(Assignee)

Updated

9 years ago
Assignee: nobody → LpSolit
Component: Bugzilla-General → Incoming Email
Whiteboard: bug_email
Target Milestone: --- → Bugzilla 3.0
(Assignee)

Comment 7

9 years ago
Copying the bug summary of bug 396692, which is much more explicit.
Summary: bug_email.pl, assigned_to generation and local addresses → email_in.pl using the From address doesn't work with emailsuffix
(Assignee)

Comment 8

9 years ago
Created attachment 311484 [details] [diff] [review]
patch, v1
Attachment #311484 - Flags: review?(mkanat)

Comment 9

9 years ago
Comment on attachment 311484 [details] [diff] [review]
patch, v1

Yeah, that looks right to me.
Attachment #311484 - Flags: review?(mkanat) → review+

Updated

9 years ago
Flags: approval3.0+
Flags: approval+
(Assignee)

Comment 10

9 years ago
tip:

Checking in email_in.pl;
/cvsroot/mozilla/webtools/bugzilla/email_in.pl,v  <--  email_in.pl
new revision: 1.15; previous revision: 1.14
done

3.0.3:

Checking in email_in.pl;
/cvsroot/mozilla/webtools/bugzilla/email_in.pl,v  <--  email_in.pl
new revision: 1.5.2.9; previous revision: 1.5.2.8
done
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.