Closed Bug 92274 Opened 24 years ago Closed 17 years ago

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

Categories

(Bugzilla :: Incoming Email, defect)

2.12
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: bedge, Assigned: LpSolit)

References

Details

Attachments

(1 file)

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
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 );
Just a heads up: the above diff is backwards.
OS: Linux → All
Hardware: PC → All
Whiteboard: bug_email
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
Target Milestone: Bugzilla 2.20 → Future
Blocks: 322955
No longer blocks: bz-email-in
QA Contact: mattyt-bugzilla → default-qa
Target Milestone: Future → ---
Assignee: nobody → LpSolit
Component: Bugzilla-General → Incoming Email
Whiteboard: bug_email
Target Milestone: --- → Bugzilla 3.0
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
Attached patch patch, v1Splinter Review
Attachment #311484 - Flags: review?(mkanat)
Comment on attachment 311484 [details] [diff] [review] patch, v1 Yeah, that looks right to me.
Attachment #311484 - Flags: review?(mkanat) → review+
Flags: approval3.0+
Flags: approval+
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
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: