Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1123093

Summary: logwatch encode=base64 generates invalid mime block
Product: Red Hat Enterprise Linux 7 Reporter: Jerry McCarthy <jerry>
Component: logwatchAssignee: Jan Synacek <jsynacek>
Status: CLOSED ERRATA QA Contact: Mirek Długosz <mzalewsk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.2CC: jerry, jkejda, mzalewsk
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 14:43:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1465901    
Attachments:
Description Flags
naive fix
none
reproducer none

Description Jerry McCarthy 2014-07-24 20:32:42 UTC
Description of problem:
logwatch.pl base64 encodes multiple segments and concatenates the encoded parts instead of concatenating the segments and then encoding a single text block.  This creates imbedded "end" equal signs in the mime block which causes decode errors.

Version-Release number of selected component (if applicable):
7.4

How reproducible:
Any time any segment but the last has a length not divisible by three and encode = base64 was specified in the logwatch.conf file.

Steps to Reproduce:
1. specify encode = base64 in logwatch.conf
2. 
3.

Actual results:
invalid mime block in email.

Expected results:
valid mime block in email.

Additional info:

Comment 3 Jan Synacek 2016-03-16 13:25:55 UTC
How can I actually reproduce this? Making some parts not divisible by 3 before encoding them still produces valid output.

Comment 4 Jan Synacek 2016-03-16 13:29:51 UTC
Created attachment 1137033 [details]
naive fix

Comment 5 Jerry McCarthy 2016-03-19 23:58:42 UTC
The naive fix works for me.  Without the fix I get invalid email, with the fix I get valid email.  Not knowing perl it is difficult for me to provide a test case.

Comment 8 Mike McCune 2016-03-28 22:49:28 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 12 Jan Synacek 2017-10-03 11:25:15 UTC
Created attachment 1333603 [details]
reproducer

Comment 16 errata-xmlrpc 2018-04-10 14:43:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0822