Subject: Bug (ID Z330B): line endings treatment in ESMTP

From: Ed Greshko <[email-masked]>
Date: Wed, 8 Jan 1997 17:34:29 +0800 (GMT)

Hi,

	I'm running pine3.95 on Solaris.  

	I've run into a problem with an MTA which is ESMTP 8BITMIME
compliant.  This MTA also supports downgrading when passing a message
to the next hop.  If the next hop does not support 8BITMIME it will
attempt to downgrade.

	If pine is set to enable-8bit-esmtp-negotiation the attachments
it produces encoded in base64 will have their end of lines like so:

di5jYy5udGh1LmVkdS50dz4NClJlY2VpdmVkOiBmcm9tIGNkc2h1YjEwMC5j^M
ZGMuY29tIGJ5IGNhbHZpbi50d250cGUuY2RjLmNvbSB3aXRoIEVTTVRQOyBU^M
dWUsIDcgSmFuIDE5OTcgMTA6MjU6NDAgKzA4MDANClJlY2VpdmVkOiBmcm9t^M

	In other words the lines end in 015 012.

	If pine is set *not* to enable-8bit-esmtp-negotiation the
attachments it produces encoded in base64 will have their end of lines
like so: 

di5jYy5udGh1LmVkdS50dz4NClJlY2VpdmVkOiBmcm9tIGNkc2h1YjEwMC5j
ZGMuY29tIGJ5IGNhbHZpbi50d250cGUuY2RjLmNvbSB3aXRoIEVTTVRQOyBU
dWUsIDcgSmFuIDE5OTcgMTA6MjU6NDAgKzA4MDANClJlY2VpdmVkOiBmcm9t

	In other words they simply end with 012.

	When the MTA needs to perform downgrading it fails if the
line ends with 015 012 stating that the attachment is invalid base64.

	Regards,

		Ed

-- 
Edward M. Greshko                  Technical Manager, Electronic Commerce
                                   Control Data Asia/Pacific Region
Voice: +886-2-715-2222 x287        6/F, 131 Nanking East Road, Section 3
FAX  : +886-2-712-9197             Taipei, Taiwan R.O.C
Pine built Thu Sep 12 11:14:58 GMT 1996 on host: hobbes
========== struct pine * ==========
ui:	login = egreshko, full = Ed Greshko
	home = /usr1/egreshko
home_dir=	/usr1/egreshko
hostname=	hobbes.twntpe.cdc.com
localdom=	twntpe.cdc.com
userdom=	NULL
maildom=	hobbes.twntpe.cdc.com
cur_cntxt=	{calvin.twntpe.cdc.com}mail/[]
cur_fldr=	outbox
actual mbox=	{calvin.twntpe.cdc.com}mail/outbox
msgmap: tot=69, cur=69, del=0, hid=0, exld=0, slct=0, sort=Date
actual inbox=	{calvin.twntpe.cdc.com}INBOX
inbox map: tot=108, cur=107, del=0, hid=0, exld=0, slct=0, sort=Date
term type=xterm, ttyname=/dev/pts/5, size=24x80, speed=normal
======= Current_val options set =======
        personal-name : Ed Greshko
              user-id : egreshko
          smtp-server : calvin.twntpe.cdc.com
          nntp-server : news.cdc.com
           inbox-path : {calvin.twntpe.cdc.com}INBOX
     incoming-folders : "pine" {calvin.twntpe.cdc.com}mail/pine
                      : "mhforum" {calvin.twntpe.cdc.com}mail/mhforum
                      : "mime" {calvin.twntpe.cdc.com}mail/info-mime
   folder-collections : calvin-mail {calvin.twntpe.cdc.com}mail/[]
     news-collections : *{news.cdc.com/nntp}[]
          default-fcc : outbox
 default-saved-msg-fo : saved-messages
     postponed-folder : postponed-msgs
       mail-directory : mail
       signature-file : .signature
         address-book : .addressbook
         feature-list : delete-skips-deleted
                      : enable-aggregate-command-set
                      : enable-bounce-cmd
                      : enable-flag-cmd
                      : enable-full-header-cmd
                      : enable-incoming-folders
                      : enable-jump-shortcut
                      : enable-mail-check-cue
                      : enable-suspend
                      : enable-tab-completion
                      : enable-unix-pipe-cmd
                      : expanded-view-of-addressbooks
                      : expanded-view-of-folders
                      : signature-at-bottom
                      : enable-alternate-editor-cmd
                      : save-will-advance
                      : include-text-in-reply
                      : auto-zoom-after-select
                      : quell-dead-letter-on-cancel
                      : show-cursor
                      : allow-talk
                      : pass-control-characters-as-is
                      : enable-mouse-in-xterm
                      : enable-newmail-in-xterm-icon
                      : enable-dot-files
                      : enable-flag-screen-implicitly
                      : show-selected-in-boldface
                      : enable-goto-in-file-browser
                      : news-post-without-validation
                      : enable-8bit-esmtp-negotiation
  saved-msg-name-rule : default-folder
        fcc-name-rule : default-fcc
             sort-key : Date
   addrbook-sort-rule : fullname-with-lists-last
        character-set : ISO-8859-1
               editor : /usr1/egreshko/bin/mkpgp
 composer-wrap-column : 74
  reply-indent-string : > 
 empty-header-message : Undisclosed recipients
 use-only-domain-name : no
              printer : newone [] /usr1/egreshko/bin/pine.print
 personal-print-comma : newone [] /usr1/egreshko/bin/pine.print
 personal-print-categ : 3
     standard-printer : lp
 last-time-prune-ques : 97.1
    last-version-used : 3.95
        bugs-fullname : Pine Developers
         bugs-address : [email-masked]
     suggest-fullname : Pine Developers
      suggest-address : [email-masked]
       local-fullname : Local Support
        local-address : postmaster
  kblock-passwd-count : 1
        alt-addresses : Ed Greshko <[email-masked]>
                      : Edward M Greshko <[email-masked]>
                      : Ed Greshko <[email-masked]>
                      : [email-masked]
                      : [email-masked]
                      : Ed Greshko <[email-masked]>
       viewer-overlap : 2
        scroll-margin : 0
 status-message-delay : 0
  mail-check-interval : 150
       elm-style-save : no
      header-in-reply : no
        feature-level : sapling
      old-style-reply : no
       save-by-sender : no
======= Command_line_val options set =======
======= User_val options set (/usr1/egreshko/.pinerc) =======
          smtp-server : calvin.twntpe.cdc.com
          nntp-server : news.cdc.com
           inbox-path : {calvin.twntpe.cdc.com}INBOX
     incoming-folders : "pine" {calvin.twntpe.cdc.com}mail/pine
                      : "mhforum" {calvin.twntpe.cdc.com}mail/mhforum
                      : "mime" {calvin.twntpe.cdc.com}mail/info-mime
   folder-collections : calvin-mail {calvin.twntpe.cdc.com}mail/[]
          default-fcc : outbox
         feature-list : delete-skips-deleted
                      : enable-aggregate-command-set
                      : enable-bounce-cmd
                      : enable-flag-cmd
                      : enable-full-header-cmd
                      : enable-incoming-folders
                      : enable-jump-shortcut
                      : enable-mail-check-cue
                      : enable-suspend
                      : enable-tab-completion
                      : enable-unix-pipe-cmd
                      : expanded-view-of-addressbooks
                      : expanded-view-of-folders
                      : signature-at-bottom
                      : enable-alternate-editor-cmd
                      : save-will-advance
                      : include-text-in-reply
                      : auto-zoom-after-select
                      : quell-dead-letter-on-cancel
                      : show-cursor
                      : allow-talk
                      : pass-control-characters-as-is
                      : enable-mouse-in-xterm
                      : enable-newmail-in-xterm-icon
                      : enable-dot-files
                      : enable-flag-screen-implicitly
                      : show-selected-in-boldface
                      : enable-goto-in-file-browser
                      : news-post-without-validation
             sort-key : Date
        character-set : ISO-8859-1
               editor : ~/bin/mkpgp
              printer : newone [] /usr1/egreshko/bin/pine.print
 personal-print-comma : newone [] /usr1/egreshko/bin/pine.print
 personal-print-categ : 3
 last-time-prune-ques : 97.1
    last-version-used : 3.95
        alt-addresses : Ed Greshko <[email-masked]>
                      : Edward M Greshko <[email-masked]>
                      : Ed Greshko <[email-masked]>
                      : [email-masked]
                      : [email-masked]
                      : Ed Greshko <[email-masked]>
======= Global_val options set (/usr/local/lib/pine.conf) =======
           inbox-path : inbox
          default-fcc : sent-mail
 default-saved-msg-fo : saved-messages
     postponed-folder : postponed-msgs
       mail-directory : mail
       signature-file : .signature
         address-book : .addressbook
  saved-msg-name-rule : default-folder
        fcc-name-rule : default-fcc
             sort-key : arrival
   addrbook-sort-rule : fullname-with-lists-last
 composer-wrap-column : 74
  reply-indent-string : > 
 empty-header-message : Undisclosed recipients
 use-only-domain-name : no
              printer : attached-to-ansi
     standard-printer : lp
        bugs-fullname : Pine Developers
         bugs-address : [email-masked]
     suggest-fullname : Pine Developers
      suggest-address : [email-masked]
       local-fullname : Local Support
        local-address : postmaster
  kblock-passwd-count : 1
       viewer-overlap : 2
        scroll-margin : 0
 status-message-delay : 0
  mail-check-interval : 150
       elm-style-save : no
      header-in-reply : no
        feature-level : sapling
      old-style-reply : no
       save-by-sender : no
======= Fixed_val options set (NO pine.conf.fixed) =======
========== Feature settings ==========
     allow-talk
  no-assume-slow-link
  no-auto-move-read-msgs
  no-auto-open-next-unread
     auto-zoom-after-select
  no-auto-unzoom-after-apply
  no-compose-cut-from-cursor
  no-compose-maps-delete-key-to-ctrl-d
  no-compose-rejects-unqualified-addrs
  no-compose-send-offers-first-filter
  no-compose-sets-newsgroup-without-confirm
     delete-skips-deleted
  no-disable-config-cmd
  no-disable-default-in-bug-report
  no-disable-busy-alarm
  no-disable-keyboard-lock-cmd
  no-disable-keymenu
  no-disable-password-cmd
  no-disable-update-cmd
  no-disable-signature-edit-cmd
  no-enable-8bit-esmtp-negotiation
  no-enable-8bit-nntp-posting
     enable-aggregate-command-set
     enable-alternate-editor-cmd
  no-enable-alternate-editor-implicitly
  no-enable-background-sending
     enable-bounce-cmd
  no-enable-cruise-mode
  no-enable-cruise-mode-delete
     enable-dot-files
  no-enable-dot-folders
     enable-flag-cmd
     enable-flag-screen-implicitly
     enable-full-header-cmd
     enable-goto-in-file-browser
     enable-incoming-folders
     enable-jump-shortcut
     enable-mail-check-cue
     enable-mouse-in-xterm
     enable-newmail-in-xterm-icon
     enable-suspend
     enable-tab-completion
     enable-unix-pipe-cmd
  no-enable-verbose-smtp-posting
     expanded-view-of-addressbooks
  no-expanded-view-of-distribution-lists
     expanded-view-of-folders
  no-expunge-without-confirm
  no-fcc-on-bounce
  no-include-attachments-in-reply
  no-include-header-in-reply
     include-text-in-reply
  no-news-approximates-new-status
     news-post-without-validation
  no-news-read-in-newsrc-order
     pass-control-characters-as-is
  no-preserve-start-stop-characters
  no-print-offers-custom-cmd-prompt
  no-print-includes-from-line
  no-print-index-enabled
  no-print-formfeed-between-messages
     quell-dead-letter-on-cancel
  no-quell-lock-failure-warnings
  no-quell-status-message-beeping
  no-quell-user-lookup-in-passwd-file
  no-quit-without-confirm
  no-reply-always-uses-reply-to
  no-save-aggregates-copy-sequence
  no-save-will-quote-leading-froms
  no-save-will-not-delete
     save-will-advance
  no-select-without-confirm
     show-cursor
     show-selected-in-boldface
     signature-at-bottom
  no-single-column-folder-list
  no-tab-visits-next-new-message-only
  no-use-current-dir
  no-use-function-keys
  no-use-sender-not-x-sender
  no-use-subshell-for-suspend
========== Latest keystrokes ==========
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	v	(0x0076)
	 	(0x0020)
	 	(0x0020)
	n	(0x006e)
	 	(0x0020)
	 	(0x0020)
	 	(0x0020)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	i	(0x0069)
	c	(0x0063)
	y	(0x0079)
	RETURN	(0x000d)
	;	(0x003b)
	a	(0x0061)
	TAB	(0x0009)
	v	(0x0076)
	 	(0x0020)
	i	(0x0069)
	TAB	(0x0009)
	v	(0x0076)
	 	(0x0020)
	 	(0x0020)
	i	(0x0069)
	d	(0x0064)
	x	(0x0078)
	y	(0x0079)
	v	(0x0076)
	 	(0x0020)
	 	(0x0020)
	 	(0x0020)
	 	(0x0020)
	 	(0x0020)
	 	(0x0020)
	 	(0x0020)
	 	(0x0020)
	 	(0x0020)
	 	(0x0020)
	i	(0x0069)
	d	(0x0064)
	x	(0x0078)
	y	(0x0079)
	-	(0x002d)
	9	(0x0039)
	2	(0x0032)
	RETURN	(0x000d)
	v	(0x0076)
	 	(0x0020)
	r	(0x0072)
	y	(0x0079)
	RETURN	(0x000d)
	r	(0x0072)
	y	(0x0079)
	RETURN	(0x000d)
	i	(0x0069)
	TAB	(0x0009)
	v	(0x0076)
	 	(0x0020)
	i	(0x0069)
	d	(0x0064)
	x	(0x0078)
	y	(0x0079)
	m	(0x006d)
	s	(0x0073)
	c	(0x0063)
	w	(0x0077)
	RETURN	(0x000d)
	x	(0x0078)
	e	(0x0065)
	y	(0x0079)
	i	(0x0069)
	g	(0x0067)
	RETURN	(0x000d)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	v	(0x0076)
	h	(0x0068)
	h	(0x0068)
	i	(0x0069)
	s	(0x0073)
	p	(0x0070)
	o	(0x006f)
	TAB	(0x0009)
	s	(0x0073)
	^H	(0x0008)
	^H	(0x0008)
	^H	(0x0008)
	^C	(0x0003)
	m	(0x006d)
	s	(0x0073)
	c	(0x0063)
	w	(0x0077)
	p	(0x0070)
	o	(0x006f)
	s	(0x0073)
	t	(0x0074)
	RETURN	(0x000d)
	e	(0x0065)
	i	(0x0069)
	s	(0x0073)
	p	(0x0070)
	o	(0x006f)
	s	(0x0073)
	t	(0x0074)
	p	(0x0070)
	o	(0x006f)
	n	(0x006e)
	e	(0x0065)
	d	(0x0064)
	-	(0x002d)
	m	(0x006d)
	s	(0x0073)
	g	(0x0067)
	s	(0x0073)
	RETURN	(0x000d)
	RETURN	(0x000d)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	u	(0x0075)
	m	(0x006d)
	c	(0x0063)
	y	(0x0079)
	y	(0x0079)
	g	(0x0067)
	^N	(0x000e)
	RETURN	(0x000d)
	s	(0x0073)
	p	(0x0070)
	o	(0x006f)
	s	(0x0073)
	t	(0x0074)
	p	(0x0070)
	o	(0x006f)
	n	(0x006e)
	e	(0x0065)
	d	(0x0064)
	-	(0x002d)
	n	(0x006e)
	m	(0x006d)
	^H	(0x0008)
	s	(0x0073)
	^H	(0x0008)
	^H	(0x0008)
	m	(0x006d)
	s	(0x0073)
	g	(0x0067)
	s	(0x0073)
	RETURN	(0x000d)
	y	(0x0079)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	u	(0x0075)
	c	(0x0063)
	y	(0x0079)
	m	(0x006d)
	i	(0x0069)
	c	(0x0063)
	y	(0x0079)
	y	(0x0079)
	m	(0x006d)
	s	(0x0073)
	c	(0x0063)
	w	(0x0077)
	8	(0x0038)
	RETURN	(0x000d)
	x	(0x0078)
	e	(0x0065)
	y	(0x0079)
	m	(0x006d)
	i	(0x0069)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	b	(0x0062)
	e	(0x0065)
	^H	(0x0008)
	s	(0x0073)
	p	(0x0070)
	s	(0x0073)
	m	(0x006d)
	a	(0x0061)
	s	(0x0073)
	t	(0x0074)
	.	(0x002e)
	^H	(0x0008)
	@	(0x0040)
	c	(0x0063)
	o	(0x006f)
	s	(0x0073)
	m	(0x006d)
	o	(0x006f)
	.	(0x002e)
	t	(0x0074)
	w	(0x0077)
	n	(0x006e)
	t	(0x0074)
	p	(0x0070)
	e	(0x0065)
	.	(0x002e)
	c	(0x0063)
	d	(0x0064)
	c	(0x0063)
	.	(0x002e)
	c	(0x0063)
	o	(0x006f)
	m	(0x006d)
	RETURN	(0x000d)
	RETURN	(0x000d)
	c	(0x0063)
	m	(0x006d)
	o	(0x006f)
	b	(0x0062)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	RETURN	(0x000d)