[Mew-dist 06115] partial and %D, etc. (Re: MsgDBFile)

Motonori Nakamura motonori at example.com
1998年 8月 23日 (日) 10:29:59 JST


>>>>> On Sat, 22 Aug 1998 20:24:10 +0900, OKUNISHI Fujikazu <fuji0924 at example.com> said:

fuji0924> ゑ、MsgDBFile を指定しないでもいいようになってますよね。。

> 94 (98/07/02) mew-dist release

> * imjoin now takes absolute file pathes to get along with Mew's
> Virtual mode.

fuji0924> からでしたか。Mew が MsgDB の面倒を見てくれないので今は DB 
fuji0924> を使ってないですが、ちゃんと Mew 上から merge できています。

ほー。知りませんでした ^^;

fuji0924> partial ネタでついでに要望が一つあります。scan format で 
fuji0924> "%D" を指定していますが、Message/Partial の時は "D" mark を
fuji0924> 吐き出さないようになると嬉しいです。

fuji0924> ;; partial があるかどうか気づかずに x することが まま あります(^_^;;

partial で別々に送られてくるメッセージの Message-Id は本来異なる
べきだとおもうのですが、これが同じになって届いているということ
でしょうか? そうであれば、発信側に問題があるように思います。

まぁ、partial なメッセージは稀なので、今のところは D をつけないように
するのでも良いとは思います。

では、パッチを添付します。

o Message/partial だと %m に P が入る
o Message/partial だと %D に D を入れない
o 全ての(SMTP)サーバに接続できなかった場合のメッセージの出力レベルを
  notice から err に変更した
o +folder, =folder に加えて、/folder の解釈を追加

あ、ごめん。im-97 へのパッチだけど、大丈夫だよね。

*** 00usage-	Sun Aug 23 08:37:36 1998
--- 00usage	Sun Aug 23 08:39:16 1998
***************
*** 163,169 ****
        %S    indented MIME decoded Subject (same as %i+%s)
        %b    a part of body extracted with heuristic
        %m    Multipart type
! 		'S'igned, 'E'ncrypt, 'M'ultipart, or none
        %p    mark '*' if the message is destined to you
        %D    mark 'D' if the message is duplicated
        %M    %p+%D
--- 163,169 ----
        %S    indented MIME decoded Subject (same as %i+%s)
        %b    a part of body extracted with heuristic
        %m    Multipart type
! 		'S'igned, 'E'ncrypt, 'M'ultipart, 'P'artial or none
        %p    mark '*' if the message is destined to you
        %D    mark 'D' if the message is duplicated
        %M    %p+%D
*** imcat.in-	Sun Aug 23 09:17:05 1998
--- imcat.in	Sun Aug 23 09:49:45 1998
***************
*** 90,96 ****
      foreach (@$data) {
  	print;
      }
! } elsif ($opt_src =~ /^[+=]/) {
      # Mail/News folder
      require IM::Folder && import IM::Folder qw(message_name);
  
--- 90,96 ----
      foreach (@$data) {
  	print;
      }
! } elsif ($opt_src =~ /(^[+=~\/])|(^[a-zA-Z]:)/) {
      # Mail/News folder
      require IM::Folder && import IM::Folder qw(message_name);
  
*** imls.in-	Fri Aug 14 19:48:44 1998
--- imls.in	Sun Aug 23 09:38:37 1998
***************
*** 115,121 ****
  	im_die("must specify just one folder.\n");
      }
      $_ = $opt_src[0];
!     if (/^[+=.\/~]/) {
  	require IM::Folder && import IM::Folder qw(get_message_paths);
  	local_files($_, @ARGV);
      } elsif (/^-(.*)$/) {
--- 115,121 ----
  	im_die("must specify just one folder.\n");
      }
      $_ = $opt_src[0];
!     if (/(^[+=.\/~])|(^[a-zA-Z]:)/) {
  	require IM::Folder && import IM::Folder qw(get_message_paths);
  	local_files($_, @ARGV);
      } elsif (/^-(.*)$/) {
*** IM.in/Alias.pm.in-	Fri Aug 14 15:37:06 1998
--- IM.in/Alias.pm.in	Sun Aug 23 08:16:19 1998
***************
*** 85,91 ****
  	}
  
  	unless (open(ALIAS, "<$ali")) {
! 	    im_notice("can't open mail-aliases file: $ali\n");
  	    next;
  	}
  
--- 85,91 ----
  	}
  
  	unless (open(ALIAS, "<$ali")) {
! 	    im_notice("can't open mail-aliases file: $ali, ignored.\n");
  	    next;
  	}
  
***************
*** 174,180 ****
   	$ali = expand_path($ali);
  
  	unless (open(ALIAS, "<$ali")) {
! 	    im_notice("can't open host-aliases file: $ali\n");
  	    next;
  	}
  	im_debug("host alias file $ali opened\n") if &debug('alias');
--- 174,180 ----
   	$ali = expand_path($ali);
  
  	unless (open(ALIAS, "<$ali")) {
! 	    im_notice("can't open host-aliases file: $ali, ignored.\n");
  	    next;
  	}
  	im_debug("host alias file $ali opened\n") if &debug('alias');
*** IM.in/Config.pm.in-	Sun Aug 23 09:14:42 1998
--- IM.in/Config.pm.in	Sun Aug 23 09:49:01 1998
***************
*** 422,428 ****
  		splice(@$argref, $ref, 1);
  	    }
  	    set_value($desc, $vnam, $val, 'opt');
! 	} elsif (/^[+\-=%.\/~]/ && $O_FOPT) {
  	    $name = $O_FOPT;
  	    $val = $_;
  	    $desc = $O_DESC{$name} || im_die("unknown option $name\n"); # must be F or F@
--- 422,428 ----
  		splice(@$argref, $ref, 1);
  	    }
  	    set_value($desc, $vnam, $val, 'opt');
! 	} elsif (/(^[+\-=%.\/~])|(^[a-zA-Z]:)/ && $O_FOPT) {
  	    $name = $O_FOPT;
  	    $val = $_;
  	    $desc = $O_DESC{$name} || im_die("unknown option $name\n"); # must be F or F@
***************
*** 571,577 ****
  	if ($desc =~ /F/) { # xxx how about f
  	    my ($i, $N) = (0, scalar(@val));
  	    while ($i < $N) {
! 		$val[$i] = "+$val[$i]" unless $val =~ /^[+\-=%~]/;
  		$i++;
  	    }
  	}
--- 571,578 ----
  	if ($desc =~ /F/) { # xxx how about f
  	    my ($i, $N) = (0, scalar(@val));
  	    while ($i < $N) {
! 		$val[$i] = "+$val[$i]"
! 		    unless $val =~ /(^[+\-=%~\/])|(^[a-zA-Z]:)/;
  		$i++;
  	    }
  	}
***************
*** 600,606 ****
  	    }
  	} elsif ($desc =~ /F/) {  # xxx how about f
  	    # +inbox -> + inbox -> --src +inbox
! 	    if ($val =~ /^[+\-=%~]/) {
  		${$vnam} = $val;
  	    } else {
  		${$vnam} = "+$val";
--- 601,607 ----
  	    }
  	} elsif ($desc =~ /F/) {  # xxx how about f
  	    # +inbox -> + inbox -> --src +inbox
! 	    if ($val =~ /(^[+\-=%~\/])|(^[a-zA-Z]:)/) {
  		${$vnam} = $val;
  	    } else {
  		${$vnam} = "+$val";
***************
*** 630,636 ****
  	}
      } elsif ($desc =~ /F/) {  # xxx how about f
  	# +inbox -> + inbox -> --src +inbox
! 	if ($val =~ /^[+\-=%]/) {
  	    $case->{$vnam} = $val;
  	} else {
  	    $case->{$vnam} = "+$val";
--- 631,637 ----
  	}
      } elsif ($desc =~ /F/) {  # xxx how about f
  	# +inbox -> + inbox -> --src +inbox
! 	if ($val =~ /(^[+\-=%\/])|(^[a-zA-Z]:)/) {
  	    $case->{$vnam} = $val;
  	} else {
  	    $case->{$vnam} = "+$val";
*** IM.in/Scan.pm.in-	Sun Aug 23 08:31:27 1998
--- IM.in/Scan.pm.in	Sun Aug 23 08:36:34 1998
***************
*** 86,92 ****
        %S    indented MIME decoded Subject (same as %i+%s)
        %b    a part of body extracted with heuristic
        %m    Multipart type
! 		'S'igned, 'E'ncrypt, 'M'ultipart, or none
        %p    mark '*' if the message is destined to you
        %D    mark 'D' if the message is duplicated
        %M    %p+%D
--- 86,92 ----
        %S    indented MIME decoded Subject (same as %i+%s)
        %b    a part of body extracted with heuristic
        %m    Multipart type
! 		'S'igned, 'E'ncrypt, 'M'ultipart, 'P'artial or none
        %p    mark '*' if the message is destined to you
        %D    mark 'D' if the message is duplicated
        %M    %p+%D
***************
*** 485,493 ****
      ##
      $href->{'multipart:'} = ' ';
      if (defined($href->{'mime-version'}) &&
! 	defined($href->{'content-type'}) &&
! 	$href->{'content-type'} =~ /Multipart\/(...)/i) {
! 	$href->{'multipart:'} = $multipart_mark{lc($1)} || 'M';
      }
  
      ##
--- 485,496 ----
      ##
      $href->{'multipart:'} = ' ';
      if (defined($href->{'mime-version'}) &&
! 	defined($href->{'content-type'})) {
! 	if ($href->{'content-type'} =~ /Multipart\/(...)/i) {
! 	    $href->{'multipart:'} = $multipart_mark{lc($1)} || 'M';
! 	} elsif ($href->{'content-type'} =~ /Message\/Partial/i) {
! 	    $href->{'multipart:'} = 'P';
! 	}
      }
  
      ##
***************
*** 533,539 ****
      }
  
      if ($::opt_dupchecktarget eq "" or $::opt_dupchecktarget eq "message-id") {
! 	if ($href->{'message-id'} && $message_id{$href->{'message-id'}}++) {
  	    $href->{'mark:'} = $href->{'duplicate:'} = 'D';
  	} else {
  	    $href->{'duplicate:'} = ' ';
--- 536,543 ----
      }
  
      if ($::opt_dupchecktarget eq "" or $::opt_dupchecktarget eq "message-id") {
! 	if ($href->{'multipart:'} ne 'P'
! 	    && $href->{'message-id'} && $message_id{$href->{'message-id'}}++) {
  	    $href->{'mark:'} = $href->{'duplicate:'} = 'D';
  	} else {
  	    $href->{'duplicate:'} = ' ';
*** IM.in/TcpTransaction.pm.in-	Wed May 20 15:47:33 1998
--- IM.in/TcpTransaction.pm.in	Sun Aug 23 09:12:29 1998
***************
*** 152,158 ****
  	      = gethostbyname ($s);
  	    alarm(0) unless win95p();
  	    unless ($he_name) {
! 		im_notice("address unknown for $s\n");
  		@Response = ("address unknown for $s");
  		if ($proto eq 'smtp') {
  		    &log_action($proto, $Cur_server,
--- 152,158 ----
  	      = gethostbyname ($s);
  	    alarm(0) unless win95p();
  	    unless ($he_name) {
! 		im_warn("address unknown for $s\n");
  		@Response = ("address unknown for $s");
  		if ($proto eq 'smtp') {
  		    &log_action($proto, $Cur_server,
***************
*** 219,225 ****
  			$main::Newsgroups, $r, @Response);
  	}
      }
!     im_notice("$proto connection was not established.\n");
      return '';
  }
  
--- 219,225 ----
  			$main::Newsgroups, $r, @Response);
  	}
      }
!     im_err("$proto connection was not established.\n");
      return '';
  }
  
*** IM.in/Util.pm.in-	Sun Aug 23 08:18:22 1998
--- IM.in/Util.pm.in	Sun Aug 23 09:07:54 1998
***************
*** 126,131 ****
--- 126,139 ----
  ### message
  ###
  
+ # im_msg    - display desired information
+ # im_debug  - display debugging information (with --debug or something)
+ # im_info   - display informational messages (hidden with --quiet)
+ # im_notice - display process tracing information (shown with --verbose)
+ # im_warn   - display problem report -- the problem may be ignored
+ # im_err    - display critical error messages -- process will be aborted
+ # im_die    - display critical error messages and exit
+ 
  sub im_msg ($) {
      my $msg = shift;
      print progname(), ': ', $msg;



Mew-dist メーリングリストの案内