Closed Bug 836213 Opened 12 years ago Closed 12 years ago

log bugmail sent to the syslog

Categories

(bugzilla.mozilla.org :: General, defect)

Production
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: glob, Assigned: glob)

References

Details

Attachments

(1 file)

Attached patch patch v1Splinter Review
for diagnostic, auditing, and graphing purposes, i'd like to see all sent bugmail result in a syslog entry. the attached patch generates lines which look like: > [bugmail] byron.jones@gmail.com (CC) bug-1599 query doesnt show all bugs recipient, reason, bug-id, and subject.
Attachment #708020 - Flags: review?(dkl)
Comment on attachment 708020 [details] [diff] [review] patch v1 Review of attachment 708020 [details] [diff] [review]: ----------------------------------------------------------------- Had to do: -use Encode qw(find_encoding); +use Encode qw(find_encoding decode_utf8); to allow it to work. After that it was fine. Question: do we need to santize the subject for emails that are in one or more secure groups? dkl ::: extensions/BMO/Extension.pm @@ +968,5 @@ > + $message_type ||= '?'; > + > + $subject =~ s/[\[\(]Bug \d+[\]\)]\s*//; > + > + openlog('apache', 'cons', 'pid', 'local4'); openlog('apache', 'cons,pid', 'local4');
Attachment #708020 - Flags: review?(dkl) → review+
(In reply to David Lawrence [:dkl] from comment #1) > Question: do we need to santize the subject for emails that are in one or > more secure groups? no, that syslog already contains things of a sensitive nature, so it's tightly secured.
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.0/ modified extensions/BMO/Extension.pm Committed revision 8469. Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.0/ modified extensions/BMO/Extension.pm Committed revision 8470. Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2/ modified extensions/BMO/Extension.pm Committed revision 8534.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
jobqueue was not able to deliver quite a few emails due to a wide character issue and so i have committed a small change to disable the feature for now until we can sort it out. Filed bug 839282 to ask for a BMO code push. Error: Wide character in syswrite at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/Sys/Syslog.pm line 765. at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/Sys/Syslog.pm line 765 Sys::Syslog::_syslog_send_socket('<165>Feb 7 05:22:55 apache[2970]: [bugma From my understanding of the docs (and I should have seen this before when doing the review :() we need to encode_utf8 instead of decode_utf8 as syslog needs the characters in bytestream (binary) format or octets. So maybe we just need to make one simple change? @@ -962,7 +960,7 @@ $subject =~ s/[\[\(]Bug \d+[\]\)]\s*//; openlog('apache', 'cons,pid', 'local4'); - syslog('notice', decode_utf8("[bugmail] $recipient ($message_type) $bug_id $subject")); + syslog('notice', encode_utf8("[bugmail] $recipient ($message_type) $bug_id $subject")); closelog(); } dkl
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
See Also: → 839282
nuts. looks like this fix has been committed and pushed.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Blocks: 839357
ah, the logging was disabled, not fixed. to make it easier to track, i've filed a bug 839357
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: