[Mew-dist 10263] Re: imap環境でimmvできない

SAKAI Kiyotaka ksakai at example.com
1999年 8月 20日 (金) 13:59:11 JST


>> In article <19990820125643C.sai at example.com>, SAITO Atsunori <sai at example.com> writes:

> 現在IMAP環境にてmewを使用しています。immvでサーバ上のフォルダ
> からサーバ上の別フォルダへメールを移動しようとしているのですが、
> 移動できません。現バージョンのmewでは不可能なのでしょうか?

ImapAccount のフォーマットが変換になったことへの対応が、 imap_spec() 
関数にも必要だったのと、そもそも immv, imrm のときは ImapAccount を見
ていませんでした。

以下のパッチで動くと思います。
-- 
酒井 清隆 (E-mail: ksakai at example.com)
-------------- next part --------------
Index: Imap.pm
===================================================================
RCS file: /home/ksakai/cvsroot/im-123/IM/Imap.pm,v
retrieving revision 1.1.1.1
diff -u -c -r1.1.1.1 Imap.pm
*** Imap.pm	1999/08/20 00:40:38	1.1.1.1
--- Imap.pm	1999/08/20 04:52:50
***************
*** 602,608 ****
  sub imap_spec ($) {
      my $spec = shift;
  
!     if ($spec eq '') {
  	my $s = imapaccount();
  	if ($s !~ /^[\/\@:]/) {
  	    if ($s =~ /\@/) {
--- 602,608 ----
  sub imap_spec ($) {
      my $spec = shift;
  
!     if ($spec eq '' || $spec =~ /^%([^%:\@\/]+)$/) {
  	my $s = imapaccount();
  	if ($s !~ /^[\/\@:]/) {
  	    if ($s =~ /\@/) {
***************
*** 611,633 ****
  		$s = "\@$s";
  	    }
  	}
! 	$spec = $s if ($s ne '');
      }
!  
      my ($folder, $auth, $host) = ('INBOX', 'auth', 'localhost');
      my $user = $ENV{'USER'} || $ENV{'LOGNAME'} || im_getlogin();
  
!     if ($spec =~ /^%([^%:\@]+)(.*)/) {	# XXX
  	$folder = $1;
  	$spec = $2;
      }
-     if ($spec =~ /(.*)\@(.*)/) {
- 	$host = $2;
- 	$spec = $1;
-     }
      if ($spec =~ /^\/(\w+)(.*)/) {
  	$auth = $1;
  	$spec = $2;
      }
      if ($spec =~ /^:(.*)/) {
  	$user = $1;
--- 611,633 ----
  		$s = "\@$s";
  	    }
  	}
! 	$spec .= $s if ($s ne '');
      }
! 
      my ($folder, $auth, $host) = ('INBOX', 'auth', 'localhost');
      my $user = $ENV{'USER'} || $ENV{'LOGNAME'} || im_getlogin();
  
!     if ($spec =~ /^%([^%:\@\/]+)(.*)/) {	# XXX
  	$folder = $1;
  	$spec = $2;
      }
      if ($spec =~ /^\/(\w+)(.*)/) {
  	$auth = $1;
  	$spec = $2;
+     }
+     if ($spec =~ /(.*)\@(.*)/) {
+ 	$host = $2;
+ 	$spec = $1;
      }
      if ($spec =~ /^:(.*)/) {
  	$user = $1;


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