Subject: Bug (ID DJ577): Fcc is computed incorrectly if using mail-box format of address

From: Andrej Borsenkow <[email-masked]>
Date: Wed, 20 Mar 1996 22:47:04 +0300 (MOW)

The problem:

Pine 3.92 seems to have a (minor?) bug in computing Fcc for a given
address. If I use a mail-box format of To: address (just the address
without angle brackets, e.g. [email-masked]) Fcc is ALWAYS
set to sent-mail, though fcc-name-rule is set to "by-recipient".

If I use route-address (e.g. <[email-masked]>), the Fcc is
correctly set to pine-info.

To reproduce:

start Pine;

set fcc-name-rule to "by-recipient";

go to Compose; give any address in the To: field, press
RETURN; you won't get Fcc header. If you look into it with ^R you will see
just sent-mail.

now cancel composer and start once again; give the same address in angle
brackets - you correctly get Fcc set to user name.

I checked it with Pine 3.91 - it works correctly there.

The same problem with address book entries. If address is given without
angle brackets, Fcc: is always set to sent-mail.

the configuration I use is almost the same as with Pine 3.91 - a couple of
features changed against default values.

Andrej Borsenkow 		Fax:   +7 (095) 252 01 05
SNI ITS Moscow			Tel:   +7 (095) 252 13 88

NERV:  borsenkow.msk		E-Mail: [email-masked]
-------------------------------------------------------------------------
Pine built Wed Mar 20 19:32:42 MOW 1996 on host: itsmx1
========== struct pine * ==========
ui:	login = bor, full =
	home = /home/bor
home_dir=	/home/bor
hostname=	itsmx1
localdom=	itsmx1
userdom=	itsmx1.mow.sni.de
maildom=	itsmx1.mow.sni.de
cur_cntxt=	[]
cur_fldr=	INBOX
actual mbox=	/var/mail/bor
msgmap: tot=1, cur=1, del=0, hid=0, exld=0, slct=0, sort=OrderedSubj
inbox is mail_stream
term type=97801, ttyname=/dev/pts/0, size=24x80, speed=normal
======= Current_val options set =======
        personal-name : Andrej Borsenkow
              user-id : bor
          user-domain : itsmx1.mow.sni.de
          nntp-server : news.sni.de
           inbox-path : INBOX
     incoming-folders : "SendMail" .Mail/NEWS/comp.mail.sendmail
                      : "SAMBA" .Mail/samba
                      : "meshhelp" .Mail/meshhelp
                      : "Pine" .Mail/pine-info
                      : "Perl/announce" .Mail/NEWS/comp.lang.perl.announce
                      : "Win95NetBugs" .Mail/win95netbugs
   folder-collections : .Mail/[]
     news-collections : *{news.sni.de/nntp}[]
          default-fcc : sent-mail
 default-saved-msg-fo : saved-messages
     postponed-folder : postponed-msgs
       mail-directory : mail
       signature-file : .elm/rsignature
         address-book : .sni
                      : .addressbook
         feature-list : enable-bounce-cmd
                      : enable-full-header-cmd
                      : enable-incoming-folders
                      : enable-suspend
                      : enable-tab-completion
                      : enable-unix-pipe-cmd
                      : signature-at-bottom
                      : enable-flag-cmd
                      : enable-aggregate-command-set
                      : delete-skips-deleted
                      : news-post-without-validation
                      : save-will-advance
                      : news-approximates-new-status
                      : enable-jump-shortcut
                      : enable-8bit-esmtp-negotiation
                      : enable-8bit-nntp-posting
                      : reply-always-uses-reply-to
                      : tab-visits-next-new-message-only
 initial-keystroke-li : i
      customized-hdrs : Reply-To: [email-masked]
  saved-msg-name-rule : by-from
        fcc-name-rule : by-recipient
             sort-key : OrderedSubj
   addrbook-sort-rule : fullname-with-lists-last
        character-set : iso-8859-1
 composer-wrap-column : 74
  reply-indent-string : >
 use-only-domain-name : no
              printer : rsh itsmx2 lpr -ws=G203 -pb2 -mar=10
 personal-print-comma : rsh itsmx2 lpr -ws=G203 -pb2 -mar=10
     standard-printer : lp
 last-time-prune-ques : 96.3
    last-version-used : 3.92
        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
 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 (/home/bor/.pinerc) =======
        personal-name : Andrej Borsenkow
          user-domain : itsmx1.mow.sni.de
          nntp-server : news.sni.de
           inbox-path : INBOX
     incoming-folders : "SendMail" .Mail/NEWS/comp.mail.sendmail
                      : "SAMBA" .Mail/samba
                      : "meshhelp" .Mail/meshhelp
                      : "Pine" .Mail/pine-info
                      : "Perl/announce" .Mail/NEWS/comp.lang.perl.announce
                      : "Win95NetBugs" .Mail/win95netbugs
   folder-collections : .Mail/[]
       signature-file : .elm/rsignature
         address-book : .sni
                      : .addressbook
         feature-list : enable-bounce-cmd
                      : enable-full-header-cmd
                      : enable-incoming-folders
                      : enable-suspend
                      : enable-tab-completion
                      : enable-unix-pipe-cmd
                      : signature-at-bottom
                      : enable-flag-cmd
                      : enable-aggregate-command-set
                      : delete-skips-deleted
                      : news-post-without-validation
                      : save-will-advance
                      : news-approximates-new-status
                      : enable-jump-shortcut
                      : enable-8bit-esmtp-negotiation
                      : enable-8bit-nntp-posting
                      : reply-always-uses-reply-to
                      : tab-visits-next-new-message-only
 initial-keystroke-li : i
      customized-hdrs : Reply-To: [email-masked]
  saved-msg-name-rule : by-from
        fcc-name-rule : by-recipient
             sort-key : OrderedSubj
        character-set : iso-8859-1
              printer : rsh itsmx2 lpr -ws=G203 -pb2 -mar=10
 personal-print-comma : rsh itsmx2 lpr -ws=G203 -pb2 -mar=10
 last-time-prune-ques : 96.3
    last-version-used : 3.92
======= 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 : >
 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
 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 ==========
  no-allow-talk
  no-assume-slow-link
  no-auto-move-read-msgs
  no-auto-open-next-unread
  no-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-keyboard-lock-cmd
  no-disable-keymenu
  no-disable-password-cmd
  no-disable-update-cmd
  no-disable-signature-edit-cmd
     enable-8bit-esmtp-negotiation
     enable-8bit-nntp-posting
     enable-aggregate-command-set
  no-enable-alternate-editor-cmd
  no-enable-alternate-editor-implicitly
     enable-bounce-cmd
  no-enable-cruise-mode
  no-enable-cruise-mode-delete
  no-enable-dot-files
  no-enable-dot-folders
     enable-flag-cmd
  no-enable-flag-screen-implicitly
     enable-full-header-cmd
     enable-incoming-folders
     enable-jump-shortcut
  no-enable-mail-check-cue
  no-enable-mouse-in-xterm
  no-enable-newmail-in-xterm-icon
     enable-suspend
     enable-tab-completion
     enable-unix-pipe-cmd
  no-enable-verbose-smtp-posting
  no-expanded-view-of-addressbooks
  no-expanded-view-of-folders
  no-expunge-without-confirm
  no-fcc-on-bounce
  no-include-attachments-in-reply
  no-include-header-in-reply
  no-include-text-in-reply
     news-approximates-new-status
     news-post-without-validation
  no-news-read-in-newsrc-order
  no-pass-control-characters-as-is
  no-preserve-start-stop-characters
  no-print-offers-custom-cmd-prompt
  no-print-index-enabled
  no-print-formfeed-between-messages
  no-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
     reply-always-uses-reply-to
  no-save-will-quote-leading-froms
  no-save-will-not-delete
     save-will-advance
  no-select-without-confirm
  no-show-cursor
  no-show-selected-in-boldface
     signature-at-bottom
  no-single-column-folder-list
     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 ==========
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	d	(0x0064)
	y	(0x0079)
	x	(0x0078)
	c	(0x0063)
	c	(0x0063)
	c	(0x0063)
	c	(0x0063)
	c	(0x0063)
	c	(0x0063)
	c	(0x0063)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	RETURN	(0x000d)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	RETURN	(0x000d)
	m	(0x006d)
	a	(0x0061)
	RETURN	(0x000d)
	RETURN	(0x000d)
	RETURN	(0x000d)
	RETURN	(0x000d)
	^R	(0x0012)
	^X	(0x0018)
	e	(0x0065)
	y	(0x0079)
	c	(0x0063)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	RETURN	(0x000d)
	RETURN	(0x000d)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	RETURN	(0x000d)
	RETURN	(0x000d)
	RETURN	(0x000d)
	RETURN	(0x000d)
	RETURN	(0x000d)
	y	(0x0079)
	^C	(0x0003)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	RETURN	(0x000d)
	RETURN	(0x000d)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	RETURN	(0x000d)
	RETURN	(0x000d)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	RETURN	(0x000d)
	ESC	(0x001b)
	]	(0x005d)
	RETURN	(0x000d)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	RETURN	(0x000d)
	RETURN	(0x000d)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	RETURN	(0x000d)
	RETURN	(0x000d)
	RETURN	(0x000d)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	RETURN	(0x000d)
	RETURN	(0x000d)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	RETURN	(0x000d)
	RETURN	(0x000d)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	RETURN	(0x000d)
	RETURN	(0x000d)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	RETURN	(0x000d)
	y	(0x0079)
	^C	(0x0003)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	c	(0x0063)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	c	(0x0063)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	RETURN	(0x000d)
	e	(0x0065)
	^R	(0x0012)
	e	(0x0065)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	c	(0x0063)
	o	(0x006f)
	o	(0x006f)
	o	(0x006f)
	o	(0x006f)
	m	(0x006d)
	o	(0x006f)
	b	(0x0062)
	 	(0x0020)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	ESC	(0x001b)
	[	(0x005b)
	B	(0x0042)
	 	(0x0020)
	 	(0x0020)
	ESC	(0x001b)
	[	(0x005b)
	A	(0x0041)
	RETURN	(0x000d)

---

From: Andrej Borsenkow <[email-masked]>
Date: Sat, 23 Mar 1996 16:30:34 +0300 (MOW)

Hi, all!

Here is the reason for the problem. The problem description once more:

  if I enter the To: address in mbox format ([email-masked]), and
  fcc-name-rule rule is set to by-recipient, then fcc is not correctly set;
  it retains the default-fcc value.

  If the same address is entered in route-addr form (<[email-masked]>),
  the fcc is correctly set to "foo".

Reason:

  after user entered the To: address, the address is passed through
  build_address () function for possible rewriting/expansion. It is
  done in call_builder () function in pico/composer.c

  The problem was, if the address was not changed, call_builder didn't try
  to compute new fcc. It is opposed to Pine 3.91, where fcc was ALWAYS
  computed unconditionally.

  Because build_address changes route-addr to mbox (<[email-masked]> ->
  [email-masked]) the fcc was computed in this case; mbox format was not
  changed at all.

I don't know, why the behavior was changed. If it is only for
optimization, it is a clear bug. Probably, there are some othe reasons - I
don't know.

I attach small patch to pico/composer.c; it just reverts to Pine 3.91
scheme to uncoditionally recompute fcc.

I tried modified Pine and it seems to work so far ;-) The original
behaviour was rather frustrating to me.

greetings

--- composer.c.org	Sat Mar 23 16:06:08 1996
+++ composer.c	Sat Mar 23 16:07:33 1996
@@ -2708,6 +2708,7 @@
 	    line = entry->hd_text;
 	    InitEntryText(s, entry);		/* arrange new one */
 	    zotentry(line); 			/* blast old list o'entries */
+        }

 	    /* only look at this if sbuf was changed */
 	    if(headarg){
@@ -2729,7 +2730,9 @@
 		    }
 		}
 	    }
+/*
 	}
+*/

         retval = 1;
     }

---

From: Steve Hubert <[email-masked]>
Date: Sat, 23 Mar 1996 22:54:24 -0800 (PST)

Your fix is reasonable but re-introduces the bug we were trying to fix
when we changed it a couple weeks ago.  That bug has to do with what pops
up in the fcc line when you enter a list in the To line.  There will be a
more comprehensive and hopefully correct fix in 3.93.

Steve Hubert <[email-masked]>
Networks and Distributed Computing, Univ. of Washington, Seattle