Last Comment Bug 92274 - email_in.pl using the From address doesn't work with emailsuffix
: email_in.pl using the From address doesn't work with emailsuffix
Status: RESOLVED FIXED
:
Product: Bugzilla
Classification: Server Software
Component: Incoming Email (show other bugs)
: 2.12
: All All
: -- normal (vote)
: Bugzilla 3.0
Assigned To: Frédéric Buclin
: default-qa
Mentors:
: 396692 (view as bug list)
Depends on:
Blocks: 322955
  Show dependency treegraph
 
Reported: 2001-07-25 10:40 PDT by Bruce Edge
Modified: 2008-03-24 18:08 PDT (History)
4 users (show)
mkanat: approval+
mkanat: approval3.0+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch, v1 (739 bytes, patch)
2008-03-24 17:50 PDT, Frédéric Buclin
mkanat: review+
Details | Diff | Review

Description Bruce Edge 2001-07-25 10:40:05 PDT
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 );
Comment 1 Dave Miller [:justdave] (justdave@bugzilla.org) 2001-09-23 12:32:25 PDT
-> Bugzilla product
Comment 2 Rudolf Ramler 2002-05-03 07:38:19 PDT
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 Andreas Franke (gone) 2002-05-04 10:38:02 PDT
Just a heads up: the above diff is backwards.
Comment 4 Dave Miller [:justdave] (justdave@bugzilla.org) 2003-03-03 16:09:01 PST
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 :-)
Comment 5 Dave Miller [:justdave] (justdave@bugzilla.org) 2004-01-19 22:16:30 PST
I'm not sure I follow what the provided diff is trying to accomplish...  but
that file is pretty ugly anyway.
Comment 6 Frédéric Buclin 2007-09-20 10:41:28 PDT
*** Bug 396692 has been marked as a duplicate of this bug. ***
Comment 7 Frédéric Buclin 2008-03-17 18:24:24 PDT
Copying the bug summary of bug 396692, which is much more explicit.
Comment 8 Frédéric Buclin 2008-03-24 17:50:44 PDT
Created attachment 311484 [details] [diff] [review]
patch, v1
Comment 9 Max Kanat-Alexander 2008-03-24 17:57:12 PDT
Comment on attachment 311484 [details] [diff] [review]
patch, v1

Yeah, that looks right to me.
Comment 10 Frédéric Buclin 2008-03-24 18:08:30 PDT
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

Note You need to log in before you can comment on or make changes to this bug.