Bug 447342

Summary: long MIME encoded-word subject lines appear as a single =
Product: [Fedora] Fedora Reporter: Jeff Bastian <jbastian>
Component: alpineAssignee: Joshua Daniel Franklin <joshuadfranklin>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8CC: jima, rdieter
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://mailman1.u.washington.edu/pipermail/alpine-info/2008-May/000745.html
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-09-11 20:56:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jeff Bastian 2008-05-19 16:07:00 UTC
Description of problem:
alpine-1.10 displays the subject line as a single '='
character if the subject line is long and in MIME encoded-word (RFC 2047)
base64 syntax.

I haven't yet determined how long is "long", but here are some examples to
demonstrate. This
  Subject: =?UTF-8?B?wqFIb2xhLCBzZcOxb3Ih?=
correctly appears as
  Subject: ¡Hola, señor!

However, this very long subject line
  Subject:
=?UTF-8?B?wqFIb2xhLCBzZcOxb3IhIMKhSG9sYSwgc2XDsW9yISDCoUhvbGEsIHNlw7FvciEgwqFIb2xhLCBzZcOxb3IhIMKhSG9sYSwgc2XDsW9yISDCoUhvbGEsIHNlw7FvciEgwqFIb2xhLCBzZcOxb3IhIMKhSG9sYSwgc2XDsW9yISDCoUhvbGEsIHNlw7FvciEgwqFIb2xhLCBzZcOxb3IhIMKhSG9sYSwgc2XDsW9yISDCoUhvbGEsIHNlw7FvciEgwqFIb2xhLCBzZcOxb3IhIA==?=
is displayed in alpine-1.10 as just
  Subject: =

Other email clients correctly show
  Subject: ¡Hola, señor! ¡Hola, señor! ¡Hola, señor! ¡Hola, señor! ¡Hola, señor!
¡Hola, señor! ¡Hola, señor! ¡Hola, señor! ¡Hola, señor! ¡Hola, señor! ¡Hola,
señor! ¡Hola, señor! ¡Hola, señor! 


Version-Release number of selected component (if applicable):
alpine-1.10-4.fc8.i386


How reproducible:
Every time

Steps to Reproduce:
1. send yourself an email with a long MIME/Base64 encoded subject line as shown
above
2. look at the email when it's received

  
Actual results:
Subject line appears as a single '=' character

Expected results:
Subject line should be decoded and shown

Additional info:
Also reported to alpine-info list at
http://mailman1.u.washington.edu/pipermail/alpine-info/2008-May/000745.html

Comment 1 Jeff Bastian 2008-05-19 18:31:56 UTC
According to RFC 2047, alpine is doing the right thing by not decoding long
subject lines:
   An 'encoded-word' may not be more than 75 characters long, including
   'charset', 'encoding', 'encoded-text', and delimiters.  If it is
   desirable to encode more text than will fit in an 'encoded-word' of
   75 characters, multiple 'encoded-word's (separated by CRLF SPACE) may
   be used.

   While there is no limit to the length of a multiple-line header
   field, each line of a header field that contains one or more
   'encoded-word's is limited to 76 characters.

However, other popular email clients like Outlook and Thunderbird violate the
standard and decode the long subject lines anyway, so they appear to work to the
end-user while alpine appears broken... :(

Comment 2 Joshua Daniel Franklin 2008-05-19 18:41:02 UTC
So since MRC apparently fixed this in the non-public alpine tree, we just need
to wait. I see you marked it low priority, my policy is normally to update
alpine after a message goes out to

http://www.washington.edu/alpine/alpine-info/alpine-announce.html

Does that sound good to you Jeff?

Comment 3 Jeff Bastian 2008-05-19 18:58:21 UTC
That sounds good to me.  I just wanted to track this for Fedora with this BZ.


Comment 4 Joshua Daniel Franklin 2008-09-10 17:44:44 UTC
OK, alpine 2.00 is in updates-testing:

su -c 'yum --enablerepo=updates-testing update alpine' 

You can provide feedback for the update here:
http://admin.fedoraproject.org/updates/F8/FEDORA-2008-7290

Please let me know if this fixes the bug. If you find any
unrelated bug, please file on the alpine 2.00 update bugzilla:

https://bugzilla.redhat.com/show_bug.cgi?id=460332#c14

Comment 5 Jeff Bastian 2008-09-11 00:41:25 UTC
No, I'm still seeing a single '=' with alpine-2.00 on certain emails.  The behavior doesn't seem to have changed between alpine-1.10 and alpine-2.00.

What's interesting, though, is that this seems to depend somewhat on the IMAP server software.  I've got folders on both a Zimbra 5 server and a Cyrus 2.2.12 server.  The same email -- copied from one server to the other with alpine -- displays differently on the different IMAP servers.  On the Cyrus server, alpine shows:
  Subject: =
but the same email on the Zimbra server shows:
  Subject: ¡Hola, señor! ¡Hola, señor! ....

I've played with the number of '¡Hola, señor!' copies in the Subject line and found that by shortening it just a bit, it displays correctly on the Cyrus server (with both alpine-1.10 and 2.00), even though it's still much longer than 75 characters.

Strange...

Comment 6 Jeff Bastian 2008-09-11 00:43:03 UTC
If you want to close this as WONTFIX or CANTFIX, I'm okay with that.  If this ever gets fixed in upstream alpine, it'll make its way to Fedora automatically.

Comment 7 Joshua Daniel Franklin 2008-09-11 20:56:09 UTC
OK, this does seem to be in the IMAP server and not alpine. Thunderbird 2.0.0.16 does not display it correctly in a local store (such as Sent) or dovecot-1.0.7-2.el5 either, but if I copy it to Gmail via IMAP both Thunderbird and alpine (1.10 or 2.00) display all the Holas. 

Jeff, you've found a tricky one, I guess we should report this to Cyrus and dovecot. And GMail doesn't display correctly when sending from the web interface, only via IMAP. :)

I bet MRC actually fixed the UW-IMAP server and not alpine at all. Rex, you might want to check UW-IMAP but I don't think there's been a recent snapshot.

I'm going to close NOTABUG.


And FYI, for future reference the alpine-info mailing list is now on a new server. The new URL for the thread referenced above is:

http://mailman2.u.washington.edu/pipermail/alpine-info/2008-May/thread.html#745