im-153/0000755000000000000000000000000012776700721010500 5ustar rootrootim-153/dot.im/0000755000000000000000000000000012776700423011671 5ustar rootrootim-153/dot.im/getchk.sbr.postpet0000644000000000000000000000036312776700423015345 0ustar rootroot# do not get messages from PostPet sub getchk_sub { local($href) = shift; if ($href->{'x-mailer'} =~ /PostPet/i && $href->{'content-type'} =~ /multipart.+kiritorisen/i) { return 0; # skip it } return 1; # get it } 1; im-153/dot.im/get.sbr.refile0000644000000000000000000000333212776700423014426 0ustar rootroot# Auto refiling for imget -*-Perl-*- use IM::File qw(im_rename); sub get_sub ($$$) { my($folder, $first, $last) = @_; my($header, $flie, $new_folder, $new_file, $tmp_str, $dir, $msg); my($touch_file, $touch_file_m, $touch_file_n); return if ($folder ne &inbox_folder()); $dir = &expand_path($folder); $touch_file = "$dir/.im_getsbr_touch"; if (-e $touch_file) { $touch_file_m = -M $touch_file; $touch_file_n = 0; if (open(FH, $touch_file)) { while () { chomp; $touch_file_n = $_; } close(FH); } for ($msg = $last; $msg >= $first; $msg--) { $file = &message_name($folder, $msg); if (! -e $file) { last; } if (-M $file > $touch_file_m) { last; } if (-M $file == $touch_file_m && $msg <= $touch_file_n) { last; } } $first = $msg + 1; } for ($msg = $first; $msg <= $last; $msg++) { $file = &message_name($folder, $msg); if (open(MSG, "$file")) { $tmp_str = $/; $/ = "\n\n"; $header = ; $/ = $tmp_str; $new_folder = $folder; if ($header =~ /(^|\n)X-Bogosity: Yes/i) { $new_folder = '+spam'; } elsif ($header =~ /(^|\n)X-Spam-Flag: Yes/i) { $new_folder = '+spam'; } elsif ($header =~ /(^|\n)X-Spam: yes/i) { $new_folder = '+spam'; # } elsif ($header =~ /(^|\n)X-ML-Name: mew-dist/i) { # $new_folder = '+mew-dist'; } if ($new_folder ne $folder) { if (&create_folder($new_folder) == 0) { $new_file = &message_name($new_folder, 'new') || die $!; &im_notice("refiling $folder/$msg to $new_folder.\n"); &im_rename($file, $new_file) || die $!; } } close(MSG); } } if (open(FH, ">$touch_file")) { print FH "$last\n"; close(FH); } } 1; im-153/dot.im/password0000644000000000000000000000047012776700423013457 0ustar rootroot# pop/POP mail.mew.org kiki brown pop/APOP mail.mew.org jiji black imap/AUTH mail.foo.com user secret imap/LOGIN mail.foo.com user secret http/Basic www.bar.org user secret http/Basic www.bar.org/~abc/ user secret http/Basic www.bar.org:8080/def/ user secret im-153/dot.im/scan.sbr.sample10000644000000000000000000000152712776700423014673 0ustar rootroot$symbol_table{'W'} = 'wdate:'; $NEEDSAFE_HASH{'wdate:'} = 1; # if the field contains JIS characters sub scan_sub { local($href) = shift; if (${$href}{'date'} =~ /([A-Z][a-z][a-z]), /) { if ($+ eq 'Mon') { ${$href}{'wdate:'} = '$B7n(B'; } elsif ($+ eq 'Tue') { ${$href}{'wdate:'} = '$B2P(B'; } elsif ($+ eq 'Wed') { ${$href}{'wdate:'} = '$B?e(B'; } elsif ($+ eq 'Thu') { ${$href}{'wdate:'} = '$BLZ(B'; } elsif ($+ eq 'Fri') { ${$href}{'wdate:'} = '$B6b(B'; } elsif ($+ eq 'Sat') { ${$href}{'wdate:'} = '$BEZ(B'; } elsif ($+ eq 'Sun') { ${$href}{'wdate:'} = '$BF|(B'; } else { ${$href}{'wdate:'} = "$+"; } } else { ${$href}{'wdate:'} = '??'; } } im-153/dot.im/Config0000644000000000000000000001463212776700423013027 0ustar rootroot################################################################ ### ### Sample ~/.im/Config ### ### Syntax:: ### key=value ### ### * "key=value" is equivalent to "--key=value" style command option. ### * "key" must start at the beginning of the line. ### * "=" must follow after "key" without white spaces. ### * White spaces are allowed between "=" and "value". ### * ":" can be used instead of "=". ### * Characters after "#" are ignored. ### ### The following examples are all the same: ### key=value ### key= value ### key:value ### key: value ### ### $variable will be expanded. ### '~' will be expanded. ### ## ## Individual information ## Address=_login_name_@_your_domain_,_login_name2_@_your_domain2_ FromDomain=_domain_of_your_mail_address_ ToDomain=_domain_when_domain_part_is_omitted_ #Name=Full Name # commentary name for my mail address # should not contain 8bit characters #AddrRegex= #Org=The Mew Organization # for news posting #User=user_name ## ## Default global parameters ## ### Directories (relative to ~/) #MailDir=Mail #NewsDir=News # for saved news ### Folders in $MailDir #InboxFolder=+inbox # default destination of imget #DraftFolder=+draft #TrashFolder=+trash # default destination of message removal in Mew ### Folder style in $NewsDir (saved news articles) #PreserveDot=off # off: /news/group/, on: /news.group/ ### Mode for creation #FolderMode=0700 #MsgMode=0600 ### To keep state of IM commands (CurrentFolder, etc.) #ContextFile=Context # relative to ~/.im/ ## ## Default settings ## ## Address Book #AddrBookFile=Addrbook # relative to ~/.im/ #AddrBookFile=${HOME}/Mail/Addrbook # if you share Addrbook with Mew 2 ## Mail address aliases #AliasesFile=Aliases # relative to ~/.im/ ## PetName: mail address aliases for displaying #PetnameFile=Petnames # relative to ~/.im/ ## Message-ID database #MsgDBFile=msgiddb # location (relative to ~/.im/) #MsgDBType=DB # type of database (DB, NDBM, SDBM) ## To call user defined subroutines (relative to ~/.im/) #GetChkSbr=getchk.sbr # hooks for imget #GetSbr=get.sbr # hooks for imget #ScanSbr=scan.sbr # hooks for imget/imls ## Working folders #Src=$InboxFolder # default source of most commands #Imrm.Src=$TrashFolder # default source for message cleanups ## imget/imls specific #ScanSbr=scan.sbr # hook for special processing (rel. to ~/.im/) #Form=%+5n %m%d %-14A %S || %b # default format for scanning #AllowCRLF=no # saved messages may contain CRLF (DOS style) #Width=80 # default width for scanning #JisSafe=on # escape seq. of JIS char. should be managed #Indent=2 # indent step for threading ## Servers #Smtpservers=localhost # default server for SMTP #EmgSmtpSvrs=12.34.56.78,localhost # SMTP server just for error return #NntpServers=localhost # default server for NNTP ## imget specific #GetSbr=get.sbr # hook for special processing (rel. to ~/.im/) #Imget.Src=local # default source of imget (local mailbox) #lock=flock # locking style of local mailbox #rpath=append # conversion of UNIX From into Return-Path: #PopHistory=pophist-{POPSERVERID} # to save last state (relative to ~/.im/) #NntpHistory=newshist # to save last state (relative to ~/.im/) #MboxFilter=bogofilter -p -M -I # filter for mbox file #MboxFilter=spamoracle mark #MBoxFilter=bsfilter --spam-cutoff 0.85 --pipe --insert-flag --mbox 2>/dev/null #MBoxStyle=qmail # in case of qmail (maildir format) #Imget.Src=local:${HOME}/Maildir #UseCL=no # Use value of Content-Length header #NoSync=no # Do not need fsync(2) on writing file #FsyncNumber=0 # if 0, system call number of fsync is guessed #SshPath=/usr/bin/ssh # Path name of SSH program #Imget.Src=pop #PopAccount=/APOP@localhost # account info for POP access #PopAccount=/APOP:user@host # account info with user name #PopAccount=/APOP:user@host/110 # account info with user name and port number #Keep=7 # preserve read messages on server #ProtoKeep=UIDL # how to know which message is unread # (UIDL, LAST, STATUS, MSGID) #IgnorePostPet=yes # leave messages for PostPet on POP server #Imget.Src=imap%INBOX #ImapAccount=/AUTH@localhost # account info for IMAP access #ImapAccount=/AUTH:user@host # account info with user name #HttpProxy=proxy-server:8080 # proxy server for HTTP access #NoProxy=http://.*my.domain/ # URL regex not to use Proxy server #UsePwAgent=yes # use password agent #PwAgentPort=0 # Port to connect pwagent with TCP/IP # 0 to use UNIX domain socket # NOTE: non-0 (e.g. 6543) is insecure # on multi-user system #PwAgentTmpDir=pwagtmp # temporary directory (relative to ~/.im/) # be careful on security if you wish to use PwFiles! #UsePwFiles=yes # use password files #PwFiles=password # password files (relative to ~/.im/) #MailFoldersFile=~/Mail/.folders #UseTouchFile=yes # use time-stamp file #TouchFile=.mew-touch # time-stamp file for message folders #NamazuV2=yes # use Namazu version 2 (1.9.x or late) #NamazuDir=Namazu # relative to ~/ #NamazuLockDir=nmzlock # lock directory (relative to ~/.im/) #MknmzOptions=--decode-base64 # additional options for mknmz #MknmzIncludeFile=~/Namazu/mknmz-inc.pl # mknmz -I #MknmzIgnoreFoldersRegex=\+(attach|draft|trash|queue|postq|schedule) ## imput specific #FccDir=$MailDir # directory for FCC folders #QueueDir=queue # directory for to store messages to be sent #UseXDispatcher=yes # use X-Dispatcher field #MsgIdUser=${USER} # user part for creation of Message-Id: #MsgIdDomain=${HOST} # if you want to use FQDN of dispatching host #ObeyMTAdomain=yes # do not append domainpart to addresses by imput #NoMsgIdForNews=yes # do not insert Message-Id: when posting as news #NewsGMTdate=yes # use GMT for Date: when posting as news #UseLines=yes # generate Lines header line #JPheader=yes # encode ISO-2022-JP with RFC2047 #Defcode=EUC # default code in case no way to judge SJIS/EUCj #JPconv=yes # convert SJIS/EUCj to ISO-2022-JP #NoHdrFolding=yes # do not fold long header line when encoding #HdrQEncoding=yes # use Q-encoding to encode ISO-2022-JP #NameInComment=yes # yes: (Full Name) Addr, no: Full Name #Lines=3000 # unit to split a message to partial #Annotate=yes # annotate on parent messages (MsgDB required) # Common operational settings #Help=no #Quiet=no #Noharm=no #Verbose=no #Debug= #case mew #FromDomain=mew.org #case queue #JustQueuing=yes #Queuing=yes #case news #Assoc= +inbox=nntp:fj.mail.system.sendmail;\ # +inbox=nntp:fj.mail #Count=10 #case default # -- global setting again -- im-153/dot.im/get.sbr0000644000000000000000000000140612776700423013161 0ustar rootroot# -*-Perl-*- # A user customizable subroutine for imget. # 'get_sub' is called if "GetSbr=get.sbr" is specified in your "Config". # The argments are the folder name, the start of the range, and the end # of the range. %hash = (); sub get_sub ($$$) { my($folder, $first, $last) = @_; my $dir = expand_path($folder); my($name, $val); open(SEQ, "$dir/.mh_sequences") || return; while () { chomp; ($name, $val) = split(': '); $hash{$name} = $val; } close(SEQ); if (defined($hash{'unseen'})) { if ($first == $last) { $hash{'unseen'} .= " $first"; } else { $hash{'unseen'} .= " $first-$last"; } open(SEQ, ">$dir/.mh_sequences"); foreach (keys %hash) { print SEQ "$_: $hash{$_}\n"; } close(SEQ); } } 1; im-153/dot.im/getchk.sbr0000644000000000000000000000145712776700423013655 0ustar rootroot# get messages sent to me directly sub getchk_sub { local($href) = shift; # if (my_addr($href->{'to'}, $href->{'cc'}) { if ($href->{'to'} =~ /motonori/i || $href->{'cc'} =~ /motonori/i) { return 1; # get it } return 0; # skip it } sub my_addr (@) { my @addrs = @_; my $addr; unless (defined($ADDRESS_HASH{'init'})) { $ADDRESS_HASH{'addr'} = addresses_regex(); unless ($ADDRESS_HASH{'addr'}) { $ADDRESS_HASH{'addr'} = '^' . quotemeta(address()) . '$'; $ADDRESS_HASH{'addr'} =~ s/(\\\s)*\\,(\\\s)*/\$|\^/g; } $ADDRESS_HASH{'init'} = 1; } return 0 if ($ADDRESS_HASH{'addr'} eq ""); foreach $addr (@addrs) { my $a; while (($a, $addr) = fetch_addr($addr, 1), $a ne "") { return 1 if ($a =~ /$ADDRESS_HASH{'addr'}/io); } } return 0; } 1; im-153/dot.im/Petnames0000644000000000000000000000004612776700423013370 0ustar rootrootbrown@mew.org Kiki black@mew.org Jiji im-153/dot.im/scan.sbr0000644000000000000000000000172412776700423013331 0ustar rootroot # raw header fields does not have ':' in its name (e.g. $href->{'from'}) # processed header fields should have ':' in its name (e.g. $href->{'from:'}) $symbol_table{'x'} = 'anno:'; # can be referenced with %x in Form $symbol_table{'{from}'} = 'fromaddr:'; # can be referenced with %{from} in Form # in case JIS version of substr() is required to handle this field. #$NEEDSAFE_HASH{'fromaddr:'} = 1; # in case definition of $href->{'from:'} is omitted # because there is no reference for %f in Form option parameter. #$REF_SYMBOL{'from:'} = 1; sub scan_sub { local($href) = shift; # annotation mark if ($href->{'replied'} ne '') { $href->{'anno:'} = 'R'; } elsif ($href->{'forwarded'} ne '') { $href->{'anno:'} = 'F'; } elsif ($href->{'resent'} ne '') { $href->{'anno:'} = 'r'; } else { $href->{'anno:'} = ' '; } # extract pure address portion of sender header address (From:) $href->{'fromaddr:'} = &extract_addr($href->{'from'}); } im-153/dot.im/scan.sbr.sample20000644000000000000000000000110712776700423014666 0ustar rootroot%subject_substitute_list = ( '+ML/mew-dist' => 's/\[Mew-dist [0-9][0-9]*\] //g', '+ML/installer' => 's/\[installer [0-9][0-9]*\] //g', '+ML/ptl' => 's/\[ptl [0-9][0-9]*\] //g', '+ML/j2' => 's/j2 Digest //' ); sub scan_sub { local($href) = shift; my($folder, $pattern); my($eval_string); $folder = $href->{'folder:'}; $pattern = $subject_substitute_list{$folder}; if ($pattern ne '') { $eval_string = "\$href->{'subject:'} =~ $pattern;"; eval "$eval_string"; $href->{'indent-subject:'} = $href->{'indent:'} . $href->{'subject:'}; } } 1; im-153/00readme0000644000000000000000000000713312776700430012021 0ustar rootroot Internet Message Kazu Yamamoto Tatsuya Kinoshita Oct 10, 2016 <<>> IM (Internet Message) provides a series of user interface commands (imput, imget, imls, ...) and backend Perl5 modules to integrate E-mail and NetNews user interface. They are designed to be used both from Mew version 1.x and on command line. The folder style of IM is exactly the same as that of MH. So, you can replace MH with this package without any migration works. Moreover, you are able to operate your messages both by IM and MH with consistent manner. IM is copyrighted by IM developing team. You can redistribute it and/or modify it under the modified BSD license. See 00copyright for more details. IM/MD5.pm is derived from md5.pl copyrighted by NAKAMURA, Motonori . It is converted to Perl4 from C version derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm. install-sh is under the X11 license. <<>> * Install Perl 5.004_04 or later if not installed. For more information, see 00perl. Please note that Perl 5.004 is buggy. * Execute "configure". % ./configure If you want to use RPOP, execute "configure" with the "--enable-rpop" option. % ./configure --enable-rpop If you specify this option, "imget" will be made as "setuid root" for RPOP. APOP is the default. (Set Imget.Src as you like according the syntax that "imget -h" displays.) * To set the im commands, just type it. (You can run the current commands in place!) % ./imls * Install them if necessary. If you have the root privilege or the Perl directory is writable for you, type as follows: % su # make install * Setup "/usr/local/lib/im/SiteConfig" and "~/.im/Config". An example is found in "cnf.im/SiteConfig" and "dot.im/Config", respectively. 'imsetup' would help you. <<> * Install Perl 5.004 or later to a writable directory if not installed. For more information, see 00perl. * If you want to install the im* commands to /your/home/bin, the IM perl modules to /your/home/lib/IM, SiteConfig to /your/home/lib/im, specify the "--prefix" option as follows: % ./configure --prefix=/your/home The "--bindir", "--with-perldir", and "--sysconfdir" option overrides for each. For instance, if you want install the IM perl modules to "/other/place/perl/IM", do as follows: % ./configure --prefix=/your/home --with-perldir=/other/place/perl Note that the "--enable-rpop" option is meaningless because you don't have the root privilege. * Install them by "make install". % make install <<>> Please send comments, bug reports, and patches to the current maintainer Tatsuya Kinoshita For the latest news of IM, please see IM (Internet Message) Official Site http://tats.hauN.org/im/ You can download IM from Debian mirror sites. For more information of the Debian im package, please see http://packages.qa.debian.org/im <<>> Junichiro ITO Yoshiaki KASAHARA Motonori NAKAMURA Kazunori NISHI Yoshinari NOMURA Hidenori OHTA Fujikazu OKUNISHI Kiyotaka SAKAI Toshihiko SHIMOKAWA Fumitoshi UKAI Kazumasa UTASHIRO Kazu YAMAMOTO im-153/cnf.im/0000755000000000000000000000000012776700423011651 5ustar rootrootim-153/cnf.im/SiteConfig.in0000644000000000000000000001377112776700423014244 0ustar rootroot################################################################ ### ### Sample /usr/local/lib/im/SiteConfig ### ### Syntax:: ### key=value ### ### * "key=value" is equivalent to "--key=value" style command option. ### * "key" must start at the beginning of the line. ### * "=" must follow after "key" without white spaces. ### * White spaces are allowed between "=" and "value". ### * ":" can be used instead of "=". ### * Characters after "#" are ignored. ### ### The following examples are all the same: ### key=value ### key= value ### key:value ### key: value ### ### $variable will be expanded. ### '~' will be expanded. ### ## ## Site information ## FromDomain=@im_hostname@ # domain of your mail address ToDomain=@im_hostname@ # domain when domain part is omitted #Org=The Mew Organization # for news posting ## ## Default global parameters ## ### Directories (relative to ~/) #MailDir=Mail #NewsDir=News # for saved news ### Folders in $MailDir #InboxFolder=+inbox # default destination of imget #DraftFolder=+draft #TrashFolder=+trash # default destination of message removal in Mew ### Folder style in $NewsDir (saved news articles) #PreserveDot=off # off: /news/group/, on: /news.group/ ### Mode for creation #FolderMode=0700 #MsgMode=0600 ### To keep state of IM commands (CurrentFolder, etc.) #ContextFile=Context # relative to ~/.im/ ## ## Default settings ## ## Address Book #AddrBookFile=Addrbook # relative to ~/.im/ #AddrBookFile=${HOME}/Mail/Addrbook # if you share Addrbook with Mew 2 ## Mail address aliases #AliasesFile=Aliases # relative to ~/.im/ ## PetName: mail address aliases for displaying #PetnameFile=Petnames # relative to ~/.im/ ## Message-ID database #MsgDBFile=msgiddb # location (relative to ~/.im/) #MsgDBType=DB # type of database (DB, NDBM, SDBM) ## To call user defined subroutines (relative to ~/.im/) #GetChkSbr=getchk.sbr # hooks for imget #GetSbr=get.sbr # hooks for imget #ScanSbr=scan.sbr # hooks for imget/imls ## Working folders #Src=$InboxFolder # default source of most commands #Imrm.Src=$TrashFolder # default source for message cleanups ## imget/imls specific #ScanSbr=scan.sbr # hook for special processing (rel. to ~/.im/) #Form=%+5n %m%d %-14A %S || %b # default format for scanning #AllowCRLF=no # saved messages may contain CRLF (DOS style) #Width=80 # default width for scanning #JisSafe=on # escape seq. of JIS char. should be managed #Indent=2 # indent step for threading ## Servers #Smtpservers=localhost # default server for SMTP #EmgSmtpSvrs=12.34.56.78,localhost # SMTP server just for error return #NntpServers=localhost # default server for NNTP ## imget specific #GetSbr=get.sbr # hook for special processing (rel. to ~/.im/) #Imget.Src=local # default source of imget (local mailbox) #lock=flock # locking style of local mailbox #rpath=append # conversion of UNIX From into Return-Path: #PopHistory=pophist-{POPSERVERID} # to save last state (relative to ~/.im/) #NntpHistory=newshist # to save last state (relative to ~/.im/) #MboxFilter=bogofilter -p -M -I # filter for mbox file #MboxFilter=spamoracle mark #MBoxFilter=bsfilter --spam-cutoff 0.85 --pipe --insert-flag --mbox 2>/dev/null #MBoxStyle=qmail # in case of qmail (maildir format) #Imget.Src=local:${HOME}/Maildir UseCL=@im_usecl@ # Use value of Content-Length header NoSync=@im_nosync@ # Do not need fsync(2) on writing file #FsyncNumber=@im_fsync_no@ # if 0, system call number of fsync is guessed #SshPath=/usr/bin/ssh # Path name of SSH program #Imget.Src=pop #PopAccount=/APOP@localhost # account info for POP access #PopAccount=/APOP:user@host # account info with user name #PopAccount=/APOP:user@host/110 # account info with user name and port number #Keep=7 # preserve read messages on server #ProtoKeep=UIDL # how to know which message is unread # (UIDL, LAST, STATUS, MSGID) #IgnorePostPet=yes # leave messages for PostPet on POP server #Imget.Src=imap%INBOX #ImapAccount=/AUTH@localhost # account info for IMAP access #ImapAccount=/AUTH:user@host # account info with user name #HttpProxy=proxy-server:8080 # proxy server for HTTP access #NoProxy=http://.*my.domain/ # URL regex not to use Proxy server #UsePwAgent=yes # use password agent #PwAgentPort=0 # Port to connect pwagent with TCP/IP # 0 to use UNIX domain socket # NOTE: non-0 (e.g. 6543) is insecure # on multi-user system #PwAgentTmpDir=pwagtmp # temporary directory (relative to ~/.im/) # be careful on security if you wish to use PwFiles! #UsePwFiles=yes # use password files #PwFiles=password # password files (relative to ~/.im/) #MailFoldersFile=~/Mail/.folders #UseTouchFile=yes # use time-stamp file #TouchFile=.mew-touch # time-stamp file for message folders #NamazuV2=yes # use Namazu version 2 (1.9.x or late) #NamazuDir=Namazu # relative to ~/ #NamazuLockDir=nmzlock # lock directory (relative to ~/.im/) #MknmzOptions=--decode-base64 # additional options for mknmz #MknmzIncludeFile=~/Namazu/mknmz-inc.pl # mknmz -I #MknmzIgnoreFoldersRegex=\+(attach|draft|trash|queue|postq|schedule) ## imput specific #FccDir=$MailDir # directory for FCC folders #QueueDir=queue # directory for to store messages to be sent #UseXDispatcher=yes # use X-Dispatcher field #MsgIdUser=${USER} # user part for creation of Message-Id: #MsgIdDomain=${HOST} # if you want to use FQDN of dispatching host #ObeyMTAdomain=yes # do not append domainpart to addresses by imput #NoMsgIdForNews=yes # do not insert Message-Id: when posting as news #NewsGMTdate=yes # use GMT for Date: when posting as news #UseLines=yes # generate Lines header line #JPheader=yes # encode ISO-2022-JP with RFC2047 #Defcode=EUC # default code in case no way to judge SJIS/EUCj #JPconv=yes # convert SJIS/EUCj to ISO-2022-JP #NoHdrFolding=yes # do not fold long header line when encoding #HdrQEncoding=yes # use Q-encoding to encode ISO-2022-JP #NameInComment=yes # yes: (Full Name) Addr, no: Full Name #Lines=3000 # unit to split a message to partial #Annotate=yes # annotate on parent messages (MsgDB required) im-153/gitlog2imchanges0000755000000000000000000000452012776700430013652 0ustar rootroot#!/usr/bin/perl =head1 NAME gitlog2imchanges - tiny tool to convert Git commit logs to IM's 00changes =head1 SYNOPSIS git log | gitlog2imchanges > 00changes git log --no-merges --decorate | gitlog2imchanges > 00changes (Use --no-merges to ignore merge commits. Use --decorate to show version tags.) =head1 SEE ALSO IM: =head1 COPYRIGHT Copyright (c) 2013 Tatsuya Kinoshita Redistribution and use in source and binary forms, with or without modification, are permitted without restriction, with NO WARRANTY. You may regard this as a work that is placed in the public domain. =cut use strict; use warnings; my $PRODUCT = "IM"; my $OWNER = "Tatsuya Kinoshita "; my $author = ""; my $date = ""; my $comment = ""; my $version = "xxx"; my $pre_version = ""; sub print_entry { print "* "; $comment =~ s/\n([ \t]*\n)+/\n/g; $comment =~ s/\n+$//; $comment =~ s/\n/\n /g; $comment =~ s/^\* //; print "$comment\n"; my $name = $author; $name =~ s/<([^@]+)@[^>]+>/<$1>/; if ($name ne $OWNER) { print "\t$name\n"; } $author = ""; $date = ""; $comment = ""; } while (<>) { if (/^Author:[ \t]+([^\n]+)/) { $author = $1; } elsif (/^Date:[ \t]+(Sun|Mon|Tue|Wed|Thu|Fri|Sat) +(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) +(\d+) +\d+:\d+:\d+ +(\d+)/) { # Assume git log --date=default or --date=local my $mm = $2; my $dd = $3; my $yyyy = $4; $mm =~ s/Jan/01/; $mm =~ s/Feb/02/; $mm =~ s/Mar/03/; $mm =~ s/Apr/04/; $mm =~ s/May/05/; $mm =~ s/Jun/06/; $mm =~ s/Jul/07/; $mm =~ s/Aug/08/; $mm =~ s/Sep/09/; $mm =~ s/Oct/10/; $mm =~ s/Nov/11/; $mm =~ s/Dec/12/; $dd =~ s/^(\d)$/0$1/; $date = "$yyyy/$mm/$dd"; } elsif (/^Date:[ \t]+(\d+-\d+-\d+)/) { # Assume git log --date=short or --date=iso $date = $1; $date =~ s!-!/!g; } elsif (/^Date:[ \t]+(.+)$/) { $date = $1; } elsif (/^ (.*)$/) { $comment .= "$1\n"; } elsif (/^commit /) { if ($author && $date) { &print_entry; } if (/\((tag: v\d[^\),]+)[^\)]*\)$/) { $version = $1; $version =~ s/tag: v//g; } } if ($version ne $pre_version && $date ne "") { print "\n" if $pre_version ne ""; print "$PRODUCT " if $PRODUCT ne ""; print "$version ($date)\n\n"; $pre_version = $version; } } if ($author && $date) { &print_entry; } im-153/Makefile.in0000644000000000000000000000737212776700423012555 0ustar rootroot################################################################ ### ### Makefile ### ### Author: Internet Message Group ### Created: Apr 23, 1997 ### Revised: Mar 22, 2003 ### SHELL= /bin/sh INSTALL=@INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ chmod= @im_path_chmod@ mkdir= @im_path_mkdir@ rm= @im_path_rm@ mv= @im_path_mv@ sed= @im_path_sed@ prefix= @prefix@ exec_prefix=@exec_prefix@ # --bindir bindir=@bindir@ # --sysconfdir sysconfdir=@sysconfdir@ # --with-perldir perldir=@im_path_siteperl@ # If you modify imsysconfdir, you should also modify IM/Config. imsysconfdir= $(sysconfdir)/im moddir= $(perldir)/IM RPOP= @im_rpop@ PROG = imali imcat imcd imclean \ imgrep imhist imhsync imjoin imls \ immknmz immv impack impath imput \ impwagent imrm imsetup imsort imstore imtar ALLPROG = $(PROG) imget CNF = config.h config.status config.cache config.log configure.lineno all: @echo everything has been done by configure. @echo you only need to do "make install". install:: installbin installdata installbin:: -if test ! -d $(DESTDIR)$(bindir); then \ $(mkdir) -p $(DESTDIR)$(bindir) && $(chmod) 755 $(DESTDIR)$(bindir); \ fi for f in $(PROG); do \ $(sed) -e '/###DELETE-ON-INSTALL###/d' $${f} > $${f}.tmp ; \ $(INSTALL) -m 755 $${f}.tmp $(DESTDIR)$(bindir)/$${f} ; \ $(rm) -f $${f}.tmp ; \ done $(sed) -e '/###DELETE-ON-INSTALL###/d' imget > imget.tmp $(INSTALL) $(RPOP) imget.tmp $(DESTDIR)$(bindir)/imget $(rm) -f imget.tmp installdata:: -if test ! -d $(DESTDIR)$(moddir); then \ $(mkdir) -p $(DESTDIR)$(moddir); \ fi $(chmod) 755 $(DESTDIR)$(moddir) for f in IM/*.pm; do \ $(INSTALL_DATA) $${f} $(DESTDIR)$(moddir) ; \ done -if test ! -d $(DESTDIR)$(imsysconfdir); then \ $(mkdir) -p $(DESTDIR)$(imsysconfdir); \ fi $(chmod) 755 $(DESTDIR)$(imsysconfdir) for cnf_im in SiteConfig ; do \ if test ! -f $(DESTDIR)$(imsysconfdir)/$$cnf_im; then \ $(INSTALL_DATA) cnf.im/$$cnf_im $(DESTDIR)$(imsysconfdir); \ else \ $(INSTALL_DATA) cnf.im/$$cnf_im $(DESTDIR)$(imsysconfdir)/$$cnf_im.new; \ fi ;\ done clean:: $(rm) -f $(ALLPROG) $(rm) -f cnf.im/SiteConfig $(rm) -f IM/Config.pm distclean:: clean $(rm) -f Makefile $(CNF) ### Copyright (C) 1997, 1998, 1999 IM developing team ### All rights reserved. ### ### Redistribution and use in source and binary forms, with or without ### modification, are permitted provided that the following conditions ### are met: ### ### 1. Redistributions of source code must retain the above copyright ### notice, this list of conditions and the following disclaimer. ### 2. Redistributions in binary form must reproduce the above copyright ### notice, this list of conditions and the following disclaimer in the ### documentation and/or other materials provided with the distribution. ### 3. Neither the name of the team nor the names of its contributors ### may be used to endorse or promote products derived from this software ### without specific prior written permission. ### ### THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND ### ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ### PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ### BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ### WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE ### OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN ### IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. im-153/00perl0000644000000000000000000000427112776700423011530 0ustar rootroot Perl5 FAQ <<>> You can find the latest and greatest release of Perl5 from the following CPAN URL, which directs you to the nearest site from you maybe: http://www.perl.com/CPAN/src/5.0/ <<>> (1) Type "./Configure -d" to let "Configure" check your system configuration. The "-d" option lets Perl5 choose default values rather than asking questions to you. "Configure" creates the "config.sh" file as a result. % cd _somewhere_perl5_locates_ % ./Configure -d (2) Edit "config.sh" at the final stage of "Configure" using shell escape. e.g. !vi config.sh If you want to use RPOP, "sperl" is required. To gain "sperl", ensure that "d_dosuid" is 'defined' in "config.sh". e.g. d_dosuid='define' Unfortunately dynamic loading doesn't work on some OSes. In this case, ensure that Perl5 uses static loading instead. e.g. dynamic_ext='' static_ext='DB_File Fcntl IO NDBM_File Opcode POSIX SDBM_File Socket' You may want to modify "libs" to pacify warning concerned with locale. See below. (3) When you finish editing, "Configure" reflects "config.sh" to all Makefiles and etc. Then type "make", "make test", and "make install". % make % make test % su # make install <<>> Perl5 warns if appropriate locale for "LANG" is not found. On FreeBSD, you should link Perl5 to the "xpg4" library. This is accomplished by adding "-libxpg4" to "libs" in "config.sh". An example is as follows: libs='-lxpg4 -lm -lc -lcrypt' Ensure that "-lxpg4" is on the top of the list. Of course, you need to reflect this modification to all sub-directory files and make Perl5. Even if your Perl5 is locale ready, Perl5 warns. This is because path is missing. Suppose that you set "LANG" "japanese" on BSD/OS 3.0. Perl5 warns as follows: warning: setlocale(LC_CTYPE, "") failed. warning: LC_ALL = "(null)", LC_CTYPE = "(null)", LANG = "japanese", warning: falling back to the "C" locale. The best solution is to create an alias link to one of existing locales. For instance, BSD/OS has /usr/share/locale/Japanese-EUC. So, create "japanese" link, which is the value of "LANG", to it. % su # cd /usr/share/locale # ln -s Japanese-EUC japanese im-153/imhsync.in0000644000000000000000000001736612776700430012514 0ustar rootroot#! @im_path_perl@ ################################################################ ### ### imhsync ### ### Author: Internet Message Group ### Created: Jul 02, 1998 ### Revised: Apr 23, 2007 ### BEGIN { @im_my_siteperl@ @im_src_siteperl@ }; $Prog = 'imhsync'; my $VERSION_DATE = "20161010"; my $VERSION_NUMBER = "153"; my $VERSION = "${Prog} version ${VERSION_DATE}(IM${VERSION_NUMBER})"; my $VERSION_INFORMATION = "${Prog} (IM ${VERSION_NUMBER}) ${VERSION_DATE} Copyright (C) 1999 IM developing team This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. "; ## ## Require packages ## use Fcntl; use IM::Config; use IM::History; use IM::Message; use IM::Util; use integer; use strict; use vars qw($Prog $EXPLANATION @OptConfig @Hdr %Folder $opt_db $opt_folder $opt_verbose $opt_debug $opt_help $opt_version); ## ## Environments ## $EXPLANATION = "$VERSION refile mail/news messages by another DB Usage: imhsync [OPTIONS] "; @OptConfig = ( 'db;s;;' => 'reference DB', 'folder;s;;' => 'folder to be refiled', 'verbose;b;;' => 'With verbose messages', 'debug;d;;' => "With debug message", 'help;b;;' => "Display this help and exit", 'version,V;b;;' => "Output version information and exit", ); ## ## Profile and option processing ## init_opt(\@OptConfig); read_cfg(); read_opt(\@ARGV); # help? print("${VERSION_INFORMATION}") && exit $EXIT_SUCCESS if $opt_version; help($EXPLANATION) && exit $EXIT_SUCCESS if $opt_help; debug_option($opt_debug) if $opt_debug; ## ## Main ## if (msgdbfile() eq '') { im_die("MsgDBFile is not defined.\n"); } if ($opt_db eq '') { im_die("--db option is not specified.\n"); } if (! -f $opt_db) { im_die("$opt_db is not found.\n"); } if ($opt_folder eq '') { im_die("--folder is not specified.\n"); } { my $p = expand_path($opt_folder); if (-d $p) { # folder if (my_history_open($opt_db) < 0) { exit $EXIT_ERROR; } folder_db_refile($p, $opt_folder); my_history_close(); } else { im_warn("no message found to refile.\n"); exit $EXIT_ERROR; } } exit $EXIT_SUCCESS; sub db_refile($$) { my($msg, $folder) = @_; my($multi_folder); local(@Hdr) = (); if (im_open(\*MSG, "<$msg")) { &read_header(\*MSG, \@Hdr, 0); close(MSG); my $mid = &header_value(\@Hdr, 'Message-ID'); my $dest = my_history_lookup($mid, 0); my($f, $df); $multi_folder = 0; $df = ''; foreach $f (split(',', $dest)) { $f =~ s|/[^/]*$||; if ($df eq '') { $df = $f; } elsif ($df ne $f) { $multi_folder = 1; } } if ($df ne '') { if ($folder ne $df && $multi_folder == 0) { # system("immv --src=$folder $df $msg"); $Folder{$df} .= " $msg"; } else { print "keep $folder/$msg\n"; } } return 0; } return -1; } sub folder_db_refile($$) { my($dir, $folder) = @_; $dir =~ s|/$||; im_info("Refiling folder $dir\n"); chdir($dir); unless (opendir(FOLDER, $dir)) { im_warn("can't read $dir\n"); return -1; } my @lower = (); my $f; foreach $f (readdir(FOLDER)) { if ($f eq '.' || $f eq '..') { } elsif ($f =~ /^\d+$/ && -f $f) { # print(" $f\n"); db_refile($f, $folder); } } foreach $f (keys %Folder) { my $m = join(' ', sort(split(' ', $Folder{$f}))); im_info("$f:$Folder{$f}\n"); system("immv --src=$folder $f $Folder{$f}"); } closedir(FOLDER); } use vars qw($DBtype $nodbfile $DB_HASH %History); sub my_history_open($$) { my($dbfile) = @_; $DBtype = msgdbtype(); # package global unless ($DBtype) { $DBtype = 'DB'; } if ($dbfile eq '') { $nodbfile = 1; return -2; } if ($DBtype eq 'DB') { require DB_File && import DB_File; $DB_HASH->{'cachesize'} = 100000 ; } elsif ($DBtype eq 'NDBM') { require NDBM_File && import NDBM_File; } elsif ($DBtype eq 'SDBM') { require SDBM_File && import SDBM_File; } elsif ($DBtype eq '') { im_err("no DB type defined.\n"); return -2; } else { im_err("DB type $DBtype is not supported.\n"); return -2; } im_debug("history database: $dbfile\n") if (&debug('history')); my($db, $fd); if ($DBtype eq 'DB') { $db = tie %History, 'DB_File', $dbfile, O_RDONLY(), 0444; } elsif ($DBtype eq 'NDBM') { $db = tie %History, 'NDBM_File', $dbfile, O_RDONLY(), 0444; } elsif ($DBtype eq 'SDBM') { if (&win95p || &os2p) { $db = tie %History, 'SDBM_File', $dbfile, O_RDONLY(), 0444; } else { $db = tie %History, 'SDBM_File', $dbfile, O_RDONLY(), 0444; } } unless ($db) { im_err "history: cannot access $dbfile ($!).\n"; return -1; } if ($DBtype eq 'DB') { $fd = $db->fd; if ($fd < 0) { im_err "history: cannot access $dbfile (fd = $fd)\n"; return -1; } } return 0; } sub my_history_close() { if ($nodbfile) { im_err("no database specified.\n"); return; } untie %History; } sub my_history_lookup($$) { if ($nodbfile) { im_err("no database specified.\n"); return (); } my($msgid, $field) = @_; $msgid =~ s/^<(.*)>$/$1/; if (defined($History{$msgid})) { if ($field == LookUpAll) { return split("\t", $History{$msgid}); } else { my @flds = split("\t", $History{$msgid}); return $flds[$field]; } } else { if ($field == LookUpAll) { return (); } else { return ''; } } } __END__ =head1 NAME imhsync - refile mail/news messages by another DB =head1 SYNOPSIS B [OPTIONS] =head1 DESCRIPTION The I command handles mail/news messages by another DB. This command is provided by IM (Internet Message). =head1 OPTIONS =over 5 =item I<-d, --db=STRING> reference DB. =item I<-f, --folder=STRING> folder to be refiled. =item I<-v, --verbose={on,off}> Print verbose messages when running. =item I<--debug=DEBUG_OPTION> Print debug messages when running. =item I<-h, --help> Display help message and exit. =item I<--version> Output version information and exit. =back =head1 COPYRIGHT IM (Internet Message) is copyrighted by IM developing team. You can redistribute it and/or modify it under the modified BSD license. See the copyright file for more details. =cut ### Copyright (C) 1997, 1998, 1999 IM developing team ### All rights reserved. ### ### Redistribution and use in source and binary forms, with or without ### modification, are permitted provided that the following conditions ### are met: ### ### 1. Redistributions of source code must retain the above copyright ### notice, this list of conditions and the following disclaimer. ### 2. Redistributions in binary form must reproduce the above copyright ### notice, this list of conditions and the following disclaimer in the ### documentation and/or other materials provided with the distribution. ### 3. Neither the name of the team nor the names of its contributors ### may be used to endorse or promote products derived from this software ### without specific prior written permission. ### ### THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND ### ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ### PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ### BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ### WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE ### OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN ### IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ### Local Variables: ### mode: perl ### End: im-153/00copyright.jis0000644000000000000000000000303612776700423013360 0ustar rootroot($BCm(B) $B0J2<$OF|K\8l$NJ}$,J,$+$j$d$9$$?M$N$?$a$K!"1Q8l$NCx:n8"I=<($rLu$7(B $B$?J8>O$G$"$k!#@5<0$JCx:n8"$O!"1Q8l$N86K\$K=>$&!#(B Copyright (C) 1997, 1998, 1999 IM developing team. All rights reserved. $BJQ99$NM-L5$K$+$+$o$i$:!"%=!<%9$*$h$S%P%$%J%j7A<0$N:FG[I[$*$h$SMxMQ$O!"(B $B0J2<$N>r7o$rK~$?$7$F$$$l$P!"$3$l$r5v2D$9$k!#(B 1. $B%=!<%9!&%3!<%I$N:FG[I[$O!">e5-$NCx:n8"I=<(!"$3$N>r7o9`L\!"$*$h$S!"(B $B0J2<$NLH@U;v9`$rJ]B8$7$J$1$l$P$J$i$J$$!#(B 2. $B%P%$%J%j7A<0$N:FG[I[$O!">e5-$NCx:n8"I=<(!"$3$N>r7o9`L\!"$*$h$S!"0J(B $B2<$NLH@U;v9`$r!"$=$NG[I[$KIU?o$9$k@bL@=q!"$"$k$$$O$=$NB>$N;qNA$N$$$:$l(B $B$+$KL@5-$7$J$1$l$P$J$i$J$$!#(B 3. $BA0$b$C$FFCJL$K5vBz$rF@$J$$8B$j!"$3$N%=%U%H%&%'%"$+$iGI@8$7$?@=IJ$N(B $B?d>)$dHNGdB%?J$N$?$a$K!"$3$N%A!<%`L>$H9W8%A0$rMxMQ$7$F$O$J$i$J(B $B$$!#(B $B$3$N%=%U%H%&%'%"$O!V$3$N$^$^$N7A$G!WDs6!$5$l!"L@<(E*$"$k$$$O8@30$NJ]>Z(B $B$O!">&MQMxMQ$*$h$SFCDjL\E*$X$NE,9g$KBP$9$k8@30$NJ]>Z$b4^$_!"$^$?$3$l$i(B $B$@$1$K8B$i$:!"B8:_$7$J$$!#$?$H$(0J2<$N$h$&$JB;32$N2DG=@-$r<(:6$5$l$F$$(B $B$?$H$7$F$b!"$I$N$h$&$J7A$K$7$m$3$N%=%U%H%&%'%"$NMxMQ$+$iH/@8$7$?LdBj$K(B $B$*$$$F!"$3$N%A!<%`$H9W8%@\E*$K!"4V@\E*$K!"6vA3$K!"FCJL$K!"D(H3>e!"$"$k$$$O!"I,A3E*$K@8$8(B $B$F$7$^$C$?B;32$KBP$7@UG$$O$J$/!"$$$+$J$k@UG$M}O@>e$G$b7@Ls$NM-L5$K78$o(B $B$i$:87L)$J@UG$$O$J$/!"$^$?(B($B2a<:$"$k$$$O$=$NB>$r4^$`(B)$BITK!9T0Y$KBP$7$F$b(B $B@UG$$O$J$$!#(B im-153/impack.in0000644000000000000000000001143112776700430012271 0ustar rootroot#! @im_path_perl@ ################################################################ ### ### impack ### ### Author: Internet Message Group ### Created: Apr 23, 1997 ### Revised: Apr 23, 2007 ### BEGIN { @im_my_siteperl@ @im_src_siteperl@ }; $Prog = 'impack'; my $VERSION_DATE = "20161010"; my $VERSION_NUMBER = "153"; my $VERSION = "${Prog} version ${VERSION_DATE}(IM${VERSION_NUMBER})"; my $VERSION_INFORMATION = "${Prog} (IM ${VERSION_NUMBER}) ${VERSION_DATE} Copyright (C) 1999 IM developing team This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. "; ## ## Require packages ## use IM::Config; use IM::Folder; use IM::File; use IM::Util; use integer; use strict; use vars qw($Prog $EXPLANATION @OptConfig $opt_src $opt_noharm $opt_verbose $opt_debug $opt_help $opt_version); ## ## Environments ## $EXPLANATION = "$VERSION pack mail/news messages in a folder Usage: $Prog [OPTIONS] [FOLDER] "; @OptConfig =( 'src;F;;' => "Set source folder", 'noharm;b;;' => "No packing. Show what will happen", 'verbose;b;;' => 'With verbose messages', 'debug;d;;' => "With debug message", 'help;b;;' => "Display this help and exit", 'version,V;b;;' => "Output version information and exit", ); ## ## Profile and option processing ## init_opt(\@OptConfig); read_cfg(); read_opt(\@ARGV); # help? print("${VERSION_INFORMATION}") && exit $EXIT_SUCCESS if $opt_version; help($EXPLANATION) && exit $EXIT_SUCCESS if $opt_help; debug_option($opt_debug) if $opt_debug; ## ## Main ## impack($opt_src); exit $EXIT_SUCCESS; ################################################## ## ## Work horse ## sub impack($) { my $folder = shift; my $msg = 1; my $dst; chk_folder_existance($folder); # not return in case false. my @paths = get_impath($folder, 'all'); print "packing messages in $opt_src..." unless $opt_noharm; flush('STDOUT') unless $opt_noharm; foreach (@paths) { $dst = $_; if (-f $dst) { do { $dst =~ s|[^/]+$|$msg++|e; } while ($_ ne $dst && -e $dst); if ($_ ne $dst) { im_rename($_, $dst) || die $@; # XXX } } } print "done\n" unless $opt_noharm; touch_folder($folder) unless $opt_noharm; } __END__ =head1 NAME impack - pack mail/news messages in a folder =head1 SYNOPSIS B [OPTIONS] [FOLDER] =head1 DESCRIPTION The I command packs mail/news messages in a folder. This command is provided by IM (Internet Message). =head1 OPTIONS =over 5 =item I<-s, --src=FOLDER> Set source folder. Default value is "+inbox". "--src=+xxx" is equivalent to "+xxx". =item I<-n, --noharm={on,off}> No packing. Show what will happen. =item I<-v, --verbose={on,off}> Print verbose messages when running. =item I<--debug=DEBUG_OPTION> Print debug messages when running. =item I<-h, --help> Display help message and exit. =item I<--version> Output version information and exit. =back =head1 COPYRIGHT IM (Internet Message) is copyrighted by IM developing team. You can redistribute it and/or modify it under the modified BSD license. See the copyright file for more details. =cut ### Copyright (C) 1997, 1998, 1999 IM developing team ### All rights reserved. ### ### Redistribution and use in source and binary forms, with or without ### modification, are permitted provided that the following conditions ### are met: ### ### 1. Redistributions of source code must retain the above copyright ### notice, this list of conditions and the following disclaimer. ### 2. Redistributions in binary form must reproduce the above copyright ### notice, this list of conditions and the following disclaimer in the ### documentation and/or other materials provided with the distribution. ### 3. Neither the name of the team nor the names of its contributors ### may be used to endorse or promote products derived from this software ### without specific prior written permission. ### ### THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND ### ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ### PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ### BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ### WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE ### OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN ### IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ### Local Variables: ### mode: perl ### End: im-153/install-sh0000755000000000000000000003253712776700423012515 0ustar rootroot#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: im-153/config.guess0000755000000000000000000012536412776700430013030 0ustar rootroot#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2016 Free Software Foundation, Inc. timestamp='2016-04-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || \ echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case "${UNAME_MACHINE_ARCH}" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; *:Sortix:*:*) echo ${UNAME_MACHINE}-unknown-sortix exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") UNAME_MACHINE=alpha ;; "EV5 (21164)") UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = hppa2.0w ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH=hppa2.0w else HP_ARCH=hppa64 fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; e2k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; k1om:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; SX-ACE:SUPER-UX:*:*) echo sxace-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: im-153/imcat.in0000644000000000000000000002635312776700430012133 0ustar rootroot#! @im_path_perl@ ################################################################ ### ### imcat ### ### Author: Internet Message Group ### Created: May 5, 1997 ### Revised: Apr 23, 2007 ### BEGIN { @im_my_siteperl@ @im_src_siteperl@ }; $Prog = 'imcat'; my $VERSION_DATE = "20161010"; my $VERSION_NUMBER = "153"; my $VERSION = "${Prog} version ${VERSION_DATE}(IM${VERSION_NUMBER})"; my $VERSION_INFORMATION = "${Prog} (IM ${VERSION_NUMBER}) ${VERSION_DATE} Copyright (C) 1999 IM developing team This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. "; ## ## Require packages ## use IM::Config; use IM::Util; use integer; use strict; use vars qw($Prog $EXPLANATION @EnvConfig @OptConfig @servers $opt_src $opt_join $opt_boundary $opt_verbose $opt_debug $opt_help $opt_version); ## ## Environments ## $EXPLANATION = "$VERSION display mail/news message Usage: $Prog [OPTIONS] [FOLDER] MSG "; @EnvConfig = ( 'NNTPSERVERS;s;;' => "Default NNTP servers.", ); @OptConfig = ( 'src;F;;' => "Folder", 'join;b;;' => "join partial messages", 'boundary;b;;' => "Print start boundary for Mew", 'SSHServer,S;s;localhost;SSH_server' => 'SSH port relay server', 'verbose;b;;' => 'With verbose messages', 'debug;d;;' => "With debug message", 'help;b;;' => "Display this help and exit", 'version,V;b;;' => "Output version information and exit", ); ## ## Profile and option processing ## init_opt(\@OptConfig); read_env(\@EnvConfig); read_cfg(); read_opt(\@ARGV); # help? print("${VERSION_INFORMATION}") && exit $EXIT_SUCCESS if $opt_version; help($EXPLANATION) && exit $EXIT_SUCCESS if $opt_help; debug_option($opt_debug) if $opt_debug; ## ## Main ## my $msg = $ARGV[0]; my $BOUNDARY="---BEGIN-IMGET-MESSAGE---\n"; unless ($msg) { im_die("no message specified.\n"); } binmode(STDOUT); if ($msg =~ /^http:/i) { require IM::Http && import IM::Http qw(http_process); my($rc, $data) = http_process($msg, httpproxy(), noproxy()); if ($rc < 0) { im_die("can't access to message $msg.\n"); } print $BOUNDARY if $opt_boundary; foreach (@$data) { print; } } elsif ($opt_src =~ /(^[+=~\/])|(^[a-zA-Z]:)/) { # Mail/News folder require IM::Folder && import IM::Folder qw(message_name); if ($msg =~ /\@/) { require IM::History && import IM::History qw(history_open history_lookup history_close); if (history_open(0) < 0) { im_die("cannot open history.\n"); exit $EXIT_ERROR; } my $msg = history_lookup($msg, 'LookUpMsg'); history_close(); if ($msg eq '') { im_info("message is not found.\n"); exit $EXIT_ERROR; } &join_msg($msg) if ($opt_join); print $BOUNDARY if $opt_boundary; foreach (split(',', $msg)) { my $path = &expand_path($_); if (im_open(\*MSG, "<$path")) { while () { print; } close(MSG); exit $EXIT_SUCCESS; } } im_warn("message $msg is missing.\n"); exit $EXIT_ERROR; } else { my $path = &message_name($opt_src, $msg); &join_msg($path) if ($opt_join); print $BOUNDARY if $opt_boundary; if (im_open(\*MSG, "<$path")) { while () { print; } close(MSG); } else { im_warn("no message $msg in folder $opt_src.\n"); } } } elsif ($opt_src =~ /^-/) { # News spool (-group[@server]) require IM::Nntp && import IM::Nntp qw(nntp_get_message); my($rc, $art) = nntp_get_message($opt_src, $msg); im_die($art) if ($rc < 0); print $BOUNDARY if $opt_boundary; foreach (@$art) { print; } } elsif ($opt_src =~ /^(%.*)/) { # IMAP folder (%folder[:[user[/auth]]@server]) require IM::Imap && import IM::Imap; require IM::GetPass && import IM::GetPass; my($folder, $auth, $user, $host); $folder = $1; if ($folder !~ /[:\@]/) { # Use ImapAccount spec, unless user or host is specified. (my $dummy, $auth, $user, $host) = imap_spec(''); $folder =~ s/^%//; } else { ($folder, $auth, $user, $host) = imap_spec($folder); } my($pass, $agtfound, $interact) = getpass('imap', $auth, $host, $user); im_warn("accessing IMAP/$auth:$user\@$host\n") if (&verbose); my($rc, $HANDLE) = &imap_open($auth, $host, $user, $pass); if ($rc < 0) { my $prompt = lc("imap/$auth:$user\@$host"); im_err("invalid password ($prompt).\n"); &savepass('imap', $auth, $host, $user, '') if ($agtfound && &usepwagent()); exit $EXIT_ERROR; } &savepass('imap', $auth, $host, $user, $pass) if ($interact && $pass ne '' && &usepwagent()); my $msgs = &imap_select($HANDLE, $folder, 1); if ($msgs < 0) { &imap_close($HANDLE); im_die("can't access to $folder\n"); } else { my($rc, $message) = &imap_get($HANDLE, $msg); &imap_close($HANDLE); if ($rc < 0) { im_die("can't access to message $msg in \%$folder.\n"); } elsif ($rc > 0) { im_die("message $msg not found in \%$folder\n"); } print $BOUNDARY if $opt_boundary; foreach (@$message) { print; } } } exit $EXIT_SUCCESS; sub join_msg($) { my $msg = shift; my $path; local $_; require IM::History && import IM::History qw(history_open history_lookup history_close); # get master Message-ID my $header = ''; foreach (split(',', $msg)) { if (/^\+/) { $path = &expand_path($_); } else { $path = $_; } if (im_open(\*MSG, "<$path")) { $/ = "\n\n"; $header = ; $/ = "\n"; close(MSG); last; } } if ($header eq '') { im_err("specified message is not found at $path.\n"); exit $EXIT_ERROR; } $header =~ s/\n\s+//g; $header =~ s/[ \t]+//g; $header =~ s/\n/;\n/g; $header = "\n$header"; my $master = ''; if ($header =~ m|\nContent-Type:Message/partial;(.*;)?id=([^;]+);|i) { $master = $2; $master =~ s/^"(.*)"$/$1/; } else { im_err("specified message is not a partial.\n"); exit $EXIT_ERROR; } im_notice("Master Message-ID: $master.\n"); # get Message-IDs of partial if (history_open(0) < 0) { im_err("cannot open history.\n"); exit $EXIT_ERROR; } my $ids = history_lookup("partial:$master", 'LookUpMsg'); if ($ids eq '') { im_err("information on partial messages is not found in history.\n"); exit $EXIT_ERROR; } im_notice("partial Message-IDs: $ids.\n"); # get path and part number on each part my @paths; my $total = 0; foreach (split(',', $ids)) { my $locate = history_lookup($_, 'LookUpMsg'); if ($locate eq '') { im_warn("message $_ not found, skipping.\n"); next; } my $path = &expand_path($locate); if ($path eq '') { im_warn("no path for message $locate, skipping.\n"); next; } if (im_open(\*MSG, "<$path")) { $/ = "\n\n"; $header = ; $/ = "\n"; close(MSG); } $header =~ s/\n\s+//g; $header =~ s/[ \t]+//g; $header =~ s/\n/;\n/g; $header = "\n$header"; my $number = 0; my $this_total = 0; if ($header =~ /\nContent-Type:Message\/partial(;[^\n]+)\n/i) { my $rest = $1; if ($rest =~ /;number=(\d+);/i) { $number = $1; } if ($rest =~ /;total=(\d+);/i) { $this_total = $1; } } if ($number == 0 || $this_total == 0) { im_warn("$_: not a partial message, skipping.\n"); next; } if ($total) { if ($total != $this_total) { im_warn("$_: total of partial messages mismatch, skipping.\n"); next; } } else { $total = $this_total; } $paths[$number] = $path; im_notice("$path is part $number.\n"); } history_close(); # check existance of all partial messages my $missing = 0; my $i; for ($i = 1; $i <= $#paths; $i++) { if ($paths[$i] eq '') { im_err("part $i is missing.\n"); exit $EXIT_SUCCESS; } } # show in sequence for ($i = 1; $i <= $#paths; $i++) { if (im_open(\*MSG, "<$paths[$i]")) { $/ = "\n\n"; if ($i == 1) { # first partial message my $header = ; # header of enclosing message my $skip = 0; foreach (split("\n", $header)) { next if (/^[ \t]/ && $skip); $skip = 0; if (/^(Content-|Subject|Message-ID|Encrypted|MIME-Version)/i) { $skip = 1; next; } last if (/^$/); print "$_\n"; } $header = ; # header of enclosed message $skip = 0; foreach (split("\n", $header)) { next if (/^[ \t]/ && $skip); $skip = 0; unless (/^(Content-|Subject|Message-ID|Encrypted|MIME-Version)/i || /^[ \t]/) { $skip = 1; next; } last if (/^$/); print "$_\n"; } print "\n"; } else { # skip header part ; } $/ = "\n"; while () { print; } close(MSG); } } exit $EXIT_SUCCESS; } __END__ =head1 NAME imcat - display mail/news message =head1 SYNOPSIS B [OPTIONS] [FOLDER] MSG =head1 DESCRIPTION The I command shows the contents of the mail/news message stored in a folder. This command is provided by IM (Internet Message). =head1 OPTIONS =over 5 =item I<-s, --src=FOLDER> Folder name. Default value is "+inbox". "--src=+xxx" is equivalent to "+xxx". =item I<-j, --join={on,off}> Join partial messages. =item I<-b, --boundary={on,off}> Print start boundary for Mew version 1.x. =item I<-S, --sshserver=SERVER> SSH port relay server. =item I<-v, --verbose={on,off}> Print verbose messages when running. =item I<--debug=DEBUG_OPTION> Print debug messages when running. =item I<-h, --help> Display help message and exit. =item I<--version> Output version information and exit. =back =head1 COPYRIGHT IM (Internet Message) is copyrighted by IM developing team. You can redistribute it and/or modify it under the modified BSD license. See the copyright file for more details. =cut ### Copyright (C) 1997, 1998, 1999 IM developing team ### All rights reserved. ### ### Redistribution and use in source and binary forms, with or without ### modification, are permitted provided that the following conditions ### are met: ### ### 1. Redistributions of source code must retain the above copyright ### notice, this list of conditions and the following disclaimer. ### 2. Redistributions in binary form must reproduce the above copyright ### notice, this list of conditions and the following disclaimer in the ### documentation and/or other materials provided with the distribution. ### 3. Neither the name of the team nor the names of its contributors ### may be used to endorse or promote products derived from this software ### without specific prior written permission. ### ### THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND ### ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ### PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ### BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ### WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE ### OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN ### IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ### Local Variables: ### mode: perl ### End: im-153/imgrep.in0000644000000000000000000001713212776700430012314 0ustar rootroot#! @im_path_perl@ ################################################################ ### ### imgrep :: Internet Message g/RE/p ### ### Author: Internet Message Group ### Created: Apr 23, 1997 ### Revised: Apr 23, 2007 ### BEGIN { @im_my_siteperl@ @im_src_siteperl@ }; $Prog = 'imgrep'; my $VERSION_DATE = "20161010"; my $VERSION_NUMBER = "153"; my $VERSION = "${Prog} version ${VERSION_DATE}(IM${VERSION_NUMBER})"; my $VERSION_INFORMATION = "${Prog} (IM ${VERSION_NUMBER}) ${VERSION_DATE} Copyright (C) 1999 IM developing team This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. "; ## ## Require packages ## use IM::Config; use IM::Folder; use IM::Grep; use IM::Util; use integer; use strict; use vars qw($Prog $EXPLANATION @OptConfig $opt_format @opt_src $opt_casefold $opt_expression $opt_delimiter $opt_dupchecktarget $opt_verbose $opt_debug $opt_quiet $opt_help $opt_version); ## ## Environments ## $opt_format = 'number'; # use number, folder, or path $opt_casefold = 'yes'; # default case-insensitive my @default_ranges = (); my @opt_folders = (); my $eval_string = ''; # store search engine # regexp for range syntax (sequence not supported) my $range_element = '(\\d+|cur|first|last|next|prev|new)'; my $range_regexp = "($range_element(-$range_element|:[+-]?\\d+)?|all)"; my $ranges_regexp = "$range_regexp(,$range_regexp)?"; $EXPLANATION = "$VERSION search for mail/news messages Usage: $Prog [OPTIONS] [FOLDER] [RANGE] "; @OptConfig = ( 'src;F@;;' => 'msg source: "+folder:[range[,range..]]"', 'format;s;;' => 'Output format: "number", "folder", or "path"'. "\n\t\t(default: \"number\" for single target folder". "\n\t\t \"path\" for multiple target folders)", 'casefold;b;on;' => 'Case sensitivity'. "\n\t\t(This option affects both fieldname and pattern)", 'expression;s;;' => 'Search expression:'. "\n\n\t\tUsable keyword". "\n\t\t\t& && logical AND". "\n\t\t\t| || logical OR". "\n\t\t\t! logical NOT". "\n\t\t\t( ) parens". "\n\t\t\tfieldname=pattern search pattern for the field". "\n\n\t\tSpecial fieldname:". "\n\t\t\thead Entire header". "\n\t\t\tbody Entire body". "\n\t\t\tall Entire message", 'delimiter;s;\n\n|\n----\n;' => 'Mail header delimiter', 'dupchecktarget,D;s;none;' => 'Duplicate Check Target', 'quiet;b;;' => 'Suppress informational messages', 'verbose;b;;' => 'With diagnostic messages', 'debug;d;;' => 'With debug messages', 'help;b;;' => "Display this help and exit", 'version,V;b;;' => "Output version information and exit", ); ## ## Profile and option processing ## init_opt(\@OptConfig); read_cfg(); read_opt(\@ARGV); # help? print("${VERSION_INFORMATION}") && exit $EXIT_SUCCESS if $opt_version; help($EXPLANATION) && exit $EXIT_SUCCESS if $opt_help; debug_option($opt_debug) if $opt_debug; ## ## Main ## my $default_folder = cur_folder(); # must set here # # Fix some valuables # @opt_src = sortuniq(@opt_src); @opt_src or @opt_src = ($default_folder); @default_ranges = (@ARGV ? @ARGV : 'all'); if ($opt_format eq 'number' and @opt_src > 1) { $opt_format = 'path'; } # # Compile expression # $eval_string = parse_expression($opt_expression, $opt_casefold); # # Iterate each folder # my $matched = 0; FOLDER: foreach (@opt_src) { my($folder, $ranges) = (/^(.*?)(:$ranges_regexp)?$/); $ranges =~ s/^:(.*)$/$1/; my $folder_dir; my @ranges = split(',', $ranges); my @messages = (); if ($folder =~ /^\-/) { im_warn("Newsspool $folder search not supported (ignored)\n"); next FOLDER; } @ranges = ($ranges ? @ranges : @default_ranges); $folder_dir = expand_path($folder); @messages = grep_folder($folder_dir, $eval_string, $opt_dupchecktarget, @ranges); if (@messages) { $matched += @messages; foreach (@messages) { print "$folder:" if ($opt_format eq 'folder'); print "$folder_dir/" if ($opt_format eq 'path'); print "$_\n"; # flush('STDOUT'); } } } $matched or do { if ($opt_quiet) { exit $EXIT_ERROR; } else { im_die2("no message matches specifications\n"); } }; exit $EXIT_SUCCESS; ## ## End of Main ## ################################################## __END__ =head1 NAME imgrep - search for mail/news messages =head1 SYNOPSIS B [OPTIONS] [FOLDER] [RANGE] =head1 DESCRIPTION The I command enumerates mail/news messages matched given patterns. This command is provided by IM (Internet Message). =head1 OPTIONS =over 5 =item I<-s, --src=FOLDER,FOLDER...> message source: "+folder:[range[,range..]]". "--src=+xxx" is equivalent to "+xxx". =item I<-f, --format=STRING> Output format: "number", "folder", or "path". (default: "number" for single target folder, "path" for multiple target folders) =item I<-c, --casefold={on,off}> Case sensitivity. (This option affects both fieldname and pattern.) Default value is "on". =item I<-e, --expression=STRING> Search expression: Usable keyword & && logical AND | || logical OR ! logical NOT ( ) parens fieldname=pattern search pattern for the field Special fieldname: head Entire header body Entire body all Entire message =item I<-d, --delimiter=STRING> Mail header delimiter. Default value is "\n\n|\n----\n". =item I<-D, --dupchecktarget=STRING> Duplicate check target ('none', 'message-id', or 'message-id+subject'). Default value is 'none'. =item I<-q, --quiet={on,off}> Do not show any messages. =item I<-v, --verbose={on,off}> Print verbose messages when running. =item I<--debug=DEBUG_OPTION> Print debug messages when running. =item I<-h, --help> Display help message and exit. =item I<--version> Output version information and exit. =back =head1 COPYRIGHT IM (Internet Message) is copyrighted by IM developing team. You can redistribute it and/or modify it under the modified BSD license. See the copyright file for more details. =cut ### Copyright (C) 1997, 1998, 1999 IM developing team ### All rights reserved. ### ### Redistribution and use in source and binary forms, with or without ### modification, are permitted provided that the following conditions ### are met: ### ### 1. Redistributions of source code must retain the above copyright ### notice, this list of conditions and the following disclaimer. ### 2. Redistributions in binary form must reproduce the above copyright ### notice, this list of conditions and the following disclaimer in the ### documentation and/or other materials provided with the distribution. ### 3. Neither the name of the team nor the names of its contributors ### may be used to endorse or promote products derived from this software ### without specific prior written permission. ### ### THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND ### ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ### PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ### BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ### WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE ### OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN ### IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ### Local Variables: ### mode: perl ### End: im-153/00changes0000644000000000000000000015236312776700430012202 0ustar rootroot153 (2016/10/10) * Fix redeclaring my in my for Perl 5.24 * Update config.guess and config.sub with autotools-dev 20160430.1 * Support SMTP Authentication (experimental) - To specify a submission server, add "/587" to Smtpservers - To use AUTH LOGIN, set SmtpAccount=/PLAIN:user@host (PLAIN only) - With a bug fix for "SIZE=" Murata Takashi * Update gitlog2imchanges to fix version tags 152 (2015/12/20) * Fix unescaped left brace in regex is deprecated for Perl 5.22 * Update config.guess and config.sub with autotools-dev 20150820.1 * Add gitlog2imchanges to easily generate 00changes 151 (2011/05/25) * IM/Config.pm.in, IM/Scan.pm: Don't use defined(%hash) for Perl 5.12. * Makefile.in, IM/Config.pm.in: Use `sysconfdir' instead of `libdir' for the configuration file. * Makefile.in: $(DESTDIR) is prepended to each installed target. * impwagent.in, IM/Config.pm.in: Use tats@vega.ocn.ne.jp instead of img@mew.org to report bugs. * config.guess, config.sub: Updated with Debian autotools-dev 20110511.1. * configure: Updated with Debian autoconf 2.68-1. * install-sh: Updated with Debian libtool 2.4-2. 150 (2010/02/15) * IM/Pop.pm: Move exec_getsbrfile() from pop_repr() to pop_inc() to work GetSbr correctly. (Thanks to Jacques Garrigue) * imput.in: Add msgid, nomsgid, nomime, noverbose, version and help to @CmpConfig, and Doc fix. (Thanks to HAT) * IM/EncDec.pm (mime_encode_string): Fix that iso-2022-jp strings are garbled to iso-8859-1. * IM/EncDec.pm (mime_decode): Use local variables $bq and $str instead of numbered variables. (Thanks to Kiyoshi OHGISHI) * IM/Config.pm.in: Set NamazuV2=yes as the default value. * IM/Config.pm.in: New subroutine mknmz_options. * immknmz.in: Use mknmz_options. * imsetup.in, cnf.im/SiteConfig.in, dot.im/Config: Add comment for MknmzOptions. * IM/Scan.pm, imput.in: Typo fix. * configure: Update using Debian autoconf 2.65-3. * config.guess, config.sub: Update using Debian autotools-dev 20090611.1. 149 (2007/04/23) * IM/Pop.pm (pop_open): Don't allow non-ASCII characters for APOP timestamp. [CVE-2007-1558] * IM/Imap.pm (imap_get, imap_head, imap_from, imap_scan_folder): More tolerant regexp to fetch imap message. * IM/EncDec.pm (mime_decode): Supporting MS_Kanji and Windows-31J. * dot.im/get.sbr.refile: Ignore case to match header. 148 (2005/03/08) * IM/Imap.pm (imap_get): Fix regexp to fetch imap message. * 00readme: Typo fix. * dot.im/get.sbr.refile: Use create_folder() when refiling. 147 (2004/07/04) * imsetup.in, cnf.im/SiteConfig.in, dot.im/Config: Add `MsgIdUser'. * imput.in: New option `--msgiduser'. * dot.im/get.sbr.refile: New file. A sample file for auto-refiling. * imsetup.in, cnf.im/SiteConfig.in, dot.im/Config: Add samples for using `MboxFilter'. * New config variable `MboxFilter'. (Thanks to Jacques GARRIGUE) * im*.in: Accept `--version' option. * imsetup.in, cnf.im/SiteConfig.in, dot.im/Config: Add %INBOX for IMAP. * imget.in: Doc fix, describe how to set IMAP folder. 146 (2003/10/28) * IM/TcpTransaction.pm, IM/Pop.pm, IM/Nntp.pm, IM/Imap.pm: Don't use $! as an error indicator. * IM/Nntp.pm (nntp_head_as_string): Don't use `next' outside a loop block. 145 (2003/06/01) * IM/LocalMbox.pm (process_maildir): Fix for modern delivery identifiers in a maildir according to `http://cr.yp.to/proto/maildir.html'. * Fix that setuid imget fails with tainted variables. * imsetup.in, cnf.im/SiteConfig.in, dot.im/Config: Add comments for MailFoldersFile, NamazuDir, MknmzIncludeFile, MknmzIgnoreFoldersRegex and UseXDispatcher. * IM/Config.pm.in (use_xdispatcher): New subroutine. * IM/Config.pm.in (UseXDispatcher): New config variable. * immknmz.in: Doc fix. * immknmz.in: Use END block for tempfile and lockdir. * immknmz.in: Fix NMZ.stamp handling. * IM/Config.pm.in (MailFoldersFile, NamazuDir, MknmzIncludeFile, MknmzIgnoreFoldersRegex) New config variable. * IM/Config.pm.in (mail_folders_file, namazu_dir, namazu_path, mknmz_include_file, mknmz_ignore_folders_regex): New subroutines. * IM/Config.pm.in: Set Immknmz.Src to blank. * immknmz.in: New option, `--src'. Folders can be specified. (Thanks to Hideyuki SHIRAI, [Mew-dist 13633] on 13 Jul 2000) * Message fixes. * imget.in: Doc fix. * IM/Scan.pm (parse_body): Revise regexp. 144 (2003/03/22) * IM/Util.pm: Fix `$osname' for Darwin. (Thanks to WATANABE Hideyuki) * IM/Scan.pm (parse_body): Regexp fix. * 00readme: Doc fix. * imput.in: Doc fix. * imsetup.in, cnf.im/SiteConfig.in, dot.im/Config: Add comments for `UseTouchFile' and `TouchFile'. * Fix im_info messages. * immknmz.in: Use $ENV{TMPDIR}, $ENV{TEMP}, $ENV{TMP}, or `/tmp'. * configure.in, configure: New option, `--enable-usecl'. * configure.in, configure: Bug fix for `--disable_rpop'. * configure.in, configure: Trimming for `im_fsync_no'. * cnf.im/SiteConfig.in: Use `@im_fsync_no@'. * Makefile.in: Set mode to 755 instead of 555 for excutables. 143 (2002/12/13) * The number of the fsync system call is guessed on run time by default. If `FsyncNumber' is set to non-0 in Config, it is preferred. * imsetup.in, cnf.im/SiteConfig.in, dot.im/Config: Modify comments for `FsyncNumber'. * IM/MsgStore.pm (fsync): Use `preferred_fsync_no', guessed number, and `fsync_no'. * IM/Config.pm.in (preferred_fsync_no, fsync_no): Divide from `fsync_no'. `preferred_fsync_no' uses `$FsyncNumber'. * imsetup.in, cnf.im/SiteConfig.in, dot.im/Config: Modify comments for `SshPath'. * IM/Config.pm.in: Don't export `$SSH_PATH'. * IM/Ssh.pm: Use `ssh_path()' instead of `$SSH_PATH'. * IM/Config.pm.in (@CfgConfig): Add `SshPath'. * IM/Config.pm.in (ssh_path): New subroutine. * 00diff: New file. 142 (2002/12/07) * New maintainer, Tatsuya Kinoshita . I obtained previous maintainer's consent. I disclaim my copyright for this work. * 00readme: Revised. * Revise documents. Manuals in nroff source form can be generated by pod2man. * Revise help messages. * OS2/00readme: Add comment that OS2 support is outdated. * Coding style fix. * imput.in (trash_message): Fix im_notice string. * Makefile.in (CNF): New variable. * configure.in, configure: Set mode to 755 instead of 555 for excutables. * imsetup.in, cnf.im/SiteConfig.in, dot.im/Config: Modify comments for FsyncNumber. * IM/Config.pm.in ($FsyncNumber): New variable. * configure.in, configure: New option, `--with-fsyncno'. * configure.in, configure: New option, `--with-hostname'. * IM/LocalMbox.pm (process_file): Bug fix for getchk_sub. * IM/Alias.pm, IM/Scan.pm: Regexp fix. * IM/Config.pm.in, IM/EncDec.pm: Prevent a warning of `called too early to check prototype'. * IM/MsgStore.pm (new_message): Use message_number() instead of $MsgNum++. * install-sh: Bug fix from GNU libtool 1.4.3. This file is under the X11 license. * imhsync.in, immknmz.in, IM/Ssh.pm: Clarify copyright notice. * imcat.in: `-S' option for SSHServer. 141+tats20021028 (2002/10/28) unofficial release * impwagent.in, immknmz.in: Local security fix. [CAN-2002-1395] * imsetup.in, cnf.im/SiteConfig.in, dot.im/Config: Modify comments for `NamazuV2', `NamazuLockDir', and `PwAgentTmpDir'. * impwagent.in, IM/GetPass.pm: Use pwagent_tmp_path(). * impwagent.in: mkdir race condition fix. * IM/Config.pm.in (pwagent_tmp_dir, pwagent_tmp_path): New subroutines. * IM/Config.pm.in (@CfgConfig): Set `PwAgentTmpDir' to `pwagtmp' (relative to ~/.im/). * immknmz.in: Use namazu_lock_path(). * immknmz.in: Generate unique name for temporary file. * IM/Config.pm.in (namazu_lock_dir, namazu_lock_path): New subroutines. * IM/Config.pm.in (@CfgConfig): Set `NamazuLockDir' to `nmzlock' (relative to ~/.im/). 141+tats20021001 (2002/10/01) unofficial release * imsetup.in (read_conf): Fix garbled $mail/$news problem for Perl 5.8.0. 141+tats20020413 (2002/04/13) unofficial release * imsetup.in: Use site configuration for UseCL and NoSync. * IM/Config.pm.in (use_cl): New function. 141+tats20020127 (2002/01/27) unofficial release * imsetup.in: `MBoxStyle=qmail' support. (Thanks to Kazuhiro NISHIYAMA, [img 00564]) * imsetup.in, cnf.im/SiteConfig.in, dot.im/Config: Replace `/MailDir#' with `/Maildir #'. Add comments for sharing Addrbook with Mew 2. * Makefile.in: Avoid `[ ... ] || ( ... )' for portability. (Thanks to SAKAI Kiyotaka, [img 00528]) * IM/Scan.pm (substr_safe): Non-ascii G0 fix for gb2312-1980. 141+tats20020108 (2002/01/08) unofficial release * IM/Scan.pm: Big5 support. (Thanks to Issei Numata, [img 00562], [mew-dist 19969]) 141+tats20011114 (2001/11/14) unofficial release * IM/TcpTransaction.pm (pool_priv_sock): Add no strict 'subs' for AF_INET6. (Thanks to ISHIKAWA Mutsumi) 141+tats20011108 (2001/11/08) unofficial release * IM/TcpTransaction.pm: Apply a patch for IPv6. IPv6 and IPv4 are supported when the Socket6 module (http://www.cpan.org/modules/by-module/Socket6/) is installed. (Thanks to Hajimu UMEMOTO, [Mew-dist 12680]) * IM/MD5.pm: Fix 64bit integer problem. (Thanks to Yasuhisa Itoh, [Mew-dist 15884], [Mew-dist 17097]) * imsetup.in: Add support for `User='. ([Mew-dist 17097]) * IM/Pop.pm: Allow multiple spaces. ([mew-dist 17988]) * immknmz.in: Fix race condition problem for local security. (Thanks to Koga Youichirou, [mew-dist 18577]) 141 (2000/04/14) mew-dist release * IMAP password hack. Ryoji KATO * A bug fix for NNTPAuth. Tatsuya Kinoshita * A bug fix for word_iso2022jp_mimefy. Takashi Kawachi * immknmz hack. Hideyuki SHIRAI * ISO-2022-JP-3 Hideyuki SHIRAI 140 (2000/02/28) mew-release releas * Patches for namazu. Hideyuki SHIRAI 139 (2000/02/21) mew-dist release * Patches for namazu. Hideyuki SHIRAI 138 (2000/02/15) mew-dist release * Managing SMTP servers correctly. SAKAI Kiyotaka * im_getaddrinfo patch. Hajimu UMEMOTO * SSH path in configure.in. Hajimu UMEMOTO * SSH port patch. Hajimu UMEMOTO * binmode vs open patch Shuichi KITAGUCHI Hideyuki SHIRAI 137 (2000/01/28) mew-dist release * X-Dispatcher fix. SAKAI Kiyotaka 136 (2000/01/13) mew-dist release * Bug fixes for a side-effect of connect_server. * Touch folder hack. Shuichi KITAGUCHI * QueuePath instead of QueueFolder to get along with Mew 1.94. * Fixing TcpTransaction.pm. Hajimu UMEMOTO 135 (2000/01/05) mew-dist release * Y2K fixes for broken year and no Date: field. SAITO Tetsuya * MailDir hack. nosuzuki@e-mail.ne.jp (Norio Suzuki) * A bug fix for SMTP server selection. Masatoshi Tsuchiya * Fixing Resent-* stuff. Koga Youichirou * A bug fix for "Fcc: =folder" Carlo Strozzi * IN-USE patch for Pop.pm. SAKAI Kiyotaka * touch_folder for +queue. Hideyuki SHIRAI * Making get_impath( , 'new') faster. Kazumasa Utashiro Hideaki YOSHIFUJI 134 (99/11/24) mew-dist release * imput uses +queue. * Change "-s" to "-S" for the SSH option. SAKAI Kiyotaka * Skip "This is a multi-part message in MIME format". Makoto Fujiwara 133 (99/10/25) mew-dist release * The SSHServer option for several commands. Motomichi Matsuzaki * Supporting RPOP/IPv6. Hajimu UMEMOTO * pureaddr: fix. * A patch for Nntp.pm. Ninomiya Hideyuki * Preventing creating unnecessary directories in immknmz. Hideyuki SHIRAI * A patch for immknmz. Shuichi KITAGUCHI 132 (99/10/07) mew-dist release * NNTP error check. Motonori NAKAMURA * SSH patch Hideyuki Suzuki Masatoshi Tsuchiya 131 (99/10/07) mew-dist release * SMTP error handling. Motonori NAKAMURA * Configure patch for OS/2. OKUNISHI -GTO- Fujikazu * immknmz. Shuichi KITAGUCHI * SSH support. Masatoshi Tsuchiya * Comment out PetnameFile. Takashi.Murata@nsgnet.co.jp * A patch for IM/Imap.pm. Hideyuki SHIRAI 130 (99/09/05) mew-release release * Only version change for stable release. 127 (99/09/03) mew-dist release * NNTPauthuser. Koga Youichirou 126 (99/08/26) mew-dist release * Removing local messages when immv and imrm are used for IMAP. SAKAI Kiyotaka * Imap auth separator was changed from '/' to '//'. SAKAI Kiyotaka 125 (99/08/23) mew-dist release * Removing $`, $&, and $'. Kazumasa Utashiro * Syncing imsetup, SiteConfig, and Config. SAKAI Kiyotaka 124 (99/08/20) mew-dist release * Several bug fixes for Imap.pm. SAKAI Kiyotaka Hideyuki SHIRAI * A bug fix for conv_euc_from_sjis. * Removing conftest.c. SAKAI Kiyotaka * Sync hacks. SAKAI Kiyotaka * Appending sever-id to PopHistory. Shuichi KITAGUCHI 123 (99/08/18) mew-dist release * fsync() hack. SAKAI Kiyotaka * NNTP vs password. SAKAI Kiyotaka * CDP: for imput. SAKAI Kiyotaka * Flush STDERR after getting password. Hideyuki SHIRAI * A patch to parse the assoc option. 122 (99/08/18) mew-dist release * Allowing user commands in Scan form. SAKAI Kiyotaka * The boundary option for imcat. * invalid password for xxx -> invalid password (xxx) To allow SPCs in proto/auth:user@host. * A bug fix for imls's grep. 121 (99/08/16) mew-dist release * Duplicate check in imgrep. SAKAI Kiyotaka * ScanHeaderPick. SAKAI Kiyotaka * A patch for the --scaninboxonly. OHARA Shigeki * Two patches for Imap.pm. SAKAI Kiyotaka 120 (99/08/16) mew-dist release * start/stop for impwagent. SAKAI Kiyotaka * getpass displays proto/auth:user@host. * A bug fix for inbox_folder(). 119 (99/08/13) mew-dist release * Case's inbox should become Imget.Dst. * Making cases case-sensitive. * Fixed imsort's Y2K problem. Masaki KONUMA * Brush up the IMAP completion. Motonori NAKAMURA * A typo fix in Config.pm. Kenichi Nabeya 118 (99/07/31) mew-dist release * Alias vs Addrbook hack. * Fixes for IMAP. Yoshiki Hayashi * Continuous lines for Petname in Addrbook. SAKAI Kiyotaka * Comment out thread stuff in Imap.pm, anyway. SAKAI Kiyotaka * Don't clear password in impwagent when connection is not established. TAKAHASHI Masafumi * binmode for imls. Shuichi KITAGUCHI 117 (99/06/23) mew-dist release * Removing Notes domain for Nickname. Shun-ichi TAHARA * Addrbook hack. (Only for Japanese, sigh.) * A thread patch preferring In-Reply-To: to References:. SAKAI Kiyotaka Hideyuki SHIRAI * A patch for Makefile.PL. Shuichi KITAGUCHI * A timezone patch. "Hideaki YOSHIFUJI" 116 (99/06/04) mew-dist release * Enabling specification of POP/IMAP/SMTP Server by imsetup. Teruyuki Morimura * A bug fix for quote vs. RFC2047. SAKAI Kiyotaka * Copying domain name from SiteConfig by imsetup. SAKAI Kiyotaka * Insecure hack. Motonori NAKAMURA * Resent hack. Motonori NAKAMURA 115 (99/04/25) mew-dist release * Allowing SPC in folder names. miz@qb3.so-net.ne.jp * A patch for Japanese folders. kyota@po.ntts.co.jp (Kyotaro HORIGUCHI) * Refiling NetNes articles. SAKAI Kiyotaka * A warning message for Virtual mode. Hideyuki SHIRAI 114 (99/04/05) mew-dist release * One more namazu patch. Hideyuki SHIRAI * Noscan hack. SAKAI Kiyotaka * PopHistory=ph-{POPSERVERID} Motonori NAKAMURA * Directory check hack. SAKAI Kiyotaka * Bug fixes for immv. SAKAI Kiyotaka 113 (99/04/01) mew-dist release * IMAP and NetNews hack. SAKAI Kiyotaka * Japanese.pm hack. SAKAI Kiyotaka * 0 padding message. SAKAI Kiyotaka * namazu patch. Hideyuki SHIRAI 112 (99/03/29) mew-dist release * Petname existence. FUJIE Masanori * Miscellaneous patches. Motonori NAKAMURA * Multiple folder hack. SAKAI Kiyotaka * Supporting messages start with "0". Murata Takashi * message_list stuff. SAKAI Kiyotaka * A bug fix for Addrbook. "YAMAGUCHI, Shuhei" 111 (99/03/23) mew-dist release * Addrbook support. Only for nickname. Not support aliases. * Numeric folder hack. SAKAI Kiyotaka 110 (99/03/09) mew-dist release * Charset handling: (GB2312, CN-GB), (Big5, CN-Big5), and HZ-GB-2312. * Conversion from Big5 to Mule's ctext. * Conversion from KOI8-R to ctext. * A buf fix for the use primitive. SAKAI Kiyotaka * A bug fix for folding. SAKAI Kiyotaka 109 (99/03/02) mew-dist release * imsetup hack to copy fullpath aliases. SAKAI Kiyotaka * Merging Header.pm into Message.pm. SAKAI Kiyotaka * Removing unnecessary code of config_cases. Motonori Nakamura * The default of Form is now "%+5n %m%d %-14A %S || %b". This is because the beginning of the body doesn't contain useful information in many cases. Moreover, imls can't decode MIME-encoded body currently. 108 (99/02/27) mew-dist release * impath --path displays ConfigCaseInbox for Mew. * Introducing the 'use' primitive. Makoto MATSUSHITA * imls warns if characters in Scan form after %n is not either a space, %D, %p, %M. SAKAI Kiyotaka * Comments for Config.pm and syncing imsetup with dot.im/Config. SAKAI Kiyotaka 107 (99/02/25 Happy Birthday!) mew-dist release * Convert tis-620 to ctext. * Obsolete address syntax support. Motonori Nakamura * Destination and annotation hack. Motonori Nakamura * Range vs drive separator (i.e. ":") conflict hack. Yoshiaki Kasahara * Skip "foo*0*" style parameter in Scan.pm. 106 (99/02/12) mew-dist release * the src option of imget is fixed to pop[/auth][:user][@server[/port]]. Motonori Nakamura * imsort treats Date: without timezone as GMT. Yoshinari NOMURA * flock fix for Win95. Shuichi Kitaguchi 105 (99/02/08) mew-dist release * qmail "cur" support. Hiroki Nakano * A fix for imsort. kyota@po.ntts.co.jp * Nntp.px fix to allow selected. Motonori Nakamura * Nntp.pm fix to specify port. Naoki ESAKA * $& fix for Grep.pm. Kazumasa Utashiro * Bcc/Dcc fix. Motonori Nakamura * Null pattern handing for Grep.pm. SAKAI Kiyotaka Kazumasa Utashiro * Message-ID: check for annotation. Motonori Nakamura * A bug fix for mimedecodequoted SAKAI Kiyotaka 104 (98/11/24) mew-dist release * The mimedecodequoted option. SAKAI Kiyotaka * Removing srcdir from Makefile.in. Masashi Fujita * Requires MsgStore.pm in Nntp.pm. Motonori Nakamura * The "@" fix for Grep.pm SAKAI Kiyotaka * dig_dir hack for msdos file system. Kazumasa Utashiro 103 (98/11/04) mew-dist release * -o is equal to --scaninboxonly of imput. * Bug fix for regex creation of Address. * Grep.pm fixes. Kazumasa Utashiro 102 (98/10/19) mew-dist release * "default" label can be also *comma-separated*. Motonori Nakamura * --scaninboxonly for imget. Motonori Nakamura * NNTP vs auth patch. Maybe TABOO * O_XXX -> O_XXX(). * imgrep patch. Kazumasa Utashiro 101 (98/09/23) mew-dist release * message/partial fixes. OBATA Noboru Motonori Nakamura Hideyuki SHIRAI * umask hack. SAKAI Kiyotaka * imhsync Motonori Nakamura * OS2 update OKUNISHI Fujikazu 100 (98/09/05) mew-release release (for Mew 1.93 stable) * config.guess hack for NEC. Maybe TABOO * Makefile.PL fix. Makoto MATSUSHITA * inet6 hack again. Hajimu UMEMOTO * OS/2 update again. OKUNISHI Fujikazu * typo fix for dot.im/scan.sbr.sample2. Tsutomu Okada * clean up configure options. prefix, bindir, libdir, and with-perldir. * Imget.dst fix. SAKAI Kiyotaka * OS/2 update. OKUNISHI Fujikazu * inet6 hack. SAKAI Kiyotaka * bindir hack for configure.in. Makoto MATSUSHITA * Yet another patch of Makefile for run-in-place. SAKAI Kiyotaka * GetPass patch. Shuichi Kitaguchi * New Makefile.PL. SAKAI Kiyotaka * Use the install command in Makefile. * The IM.in directory was obsoleted. * usecl patch. Makoto MATSUSHITA * New config.* from automake. * nosync hack. nakaji@zeisei.dpri.kyoto-u.ac.jp * binmod for newshist. Shuichi Kitaguchi * uname fix for configure.in. Motonori Nakamura * Refine Grep.pm Kazumasa Utashiro * Newshist patch Shuichi Kitaguchi * UseCL=yes for Solaris in SiteConfig. Motonori Nakamura * Back to warning in TcpTransaction.pm. Motonori Nakamura * Grep.pm fix Kazumasa Utashiro * Do not decode strings surrounded quote with RFC 2047. SAKAI Kiyotaka * "use lib" will be deleted at installation. Motonori Nakamura * A tiny patch for Japanese.pm. KIZU takashi 99 (98/08/24) mew-release release * Copyright is changed from GPL2 into AS IS. * Perl 5.005 support. * The --enable-inet6 option!! Hajimu UMEMOTO * / -> --src=/ rule. SHIMADA Nobutaka * Ad hoc %D hack for message/partial. Motonori Nakamura * RMail support. SAKAI Kiyotaka * Dcc vs Config patch for imput. Motonori Nakamura * A patch fo alias. SAKAI Kiyotaka 98 (98/08/22) mew-dist release * A patch for alias. Murata Takashi * Dcc: patch. Motonori Nakamura * Home dir hack. * Multiple alias files for impath --path. 97 (98/08/15) mew-dist release * impath --path displays AliasFile. * Lines for mail. SAKAI Kiyotaka * New Alias.pm. SAKAI Kiyotaka * Ensuring two digits for Date: Murata Takashi 96 (98/08/12) mew-dist release * Log patch. Motonori Nakamura * Bug fix for imclean -v. KOIE Hidetaka * One patch to Japanese.pm. SAKAI Kiyotaka * Eliminating jcode.pl. SAKAI Kiyotaka 95 (98/07/27) mew-dist release * A patch to imjoin. Shun-ichi GOTO * imsetup accepts an absolute path. HATA Ryuji * Fix for unnecessary commas on address fields. Motonori Nakamura * touch_folder patch. Shuichi Kitaguchi * binmode and \1 patch. SAKAI Kiyotaka * Make clean preserves the IM directory. SAKAI Kiyotaka 94 (98/07/02) mew-dist release * exec_getsbrfile pachtes. Taguchi Takeshi * GetPass.pm fixes. Motonori Nakamura * Described user_name for convenience. Shuichi Kitaguchi * imjoin now takes absolute file pathes to get along with Mew's Virtual mode. 93 (98/06/08) mew-dist release * IM can now be installed without the root privilege. Yoshinari NOMURA * immv catched up Mew. Yoshinari NOMURA * Executable even if the IM directory is installed in user's home. Yoshinari NOMURA * From is inherited from the original message. Motonori Nakamura 92 (98/05/22) mew-dist release * Removed # for NoSync in imsetup. KOIE Hidetaka * Removed # for UseCL in imsetup. Motonori Nakamura * NNTP error handing patch. Gorochan ^o^ * A patch for imput to add appropriate fields. Motonori Nakamura * tcp_rcv_siz patch. "SAKANAKA, Tatsumi" * Touch fixes for imput. Motonori Nakamura * Brushed up imtar. OKUNISHI Fujikazu * 2022 ESC sequence patch. SAKAI Kiyotaka 91 (98/05/06) mew-dist release * RcvBufSiz is now customizable. "SAKANAKA, Tatsumi" * Many timeout values are now customizable. Shigechika AIKAWA * imtar. OKUNISHI Fujikazu * A patch to make imsetup incorporated with IMAPAccount. SAKAI Kiyotaka * Fcc bug fix. Motonori Nakamura * DB bug fix. Motonori Nakamura * list:; bug fix. Motonori Nakamura 90 (98/04/07) mew-dist release * Version patch for imjoin. OKUNISHI Fujikazu * fsync patch. Motonori Nakamura * impath displays ConfigCases. 89 (98/04/07) mew-dist release * if getlogin returns root, use getpwuid instead. Motonori Nakamura * Delete a null file when file system is full. Motonori Nakamura * Fix $| problem. Motonori Nakamura oota@LSi.nec.co.jp * immv creats folders if not exist. OKUNISHI Fujikazu * not-for-mail patch Masachika ISHIZUKA 88 (98/04/06) img release * binmode() for imcat. OKUNISHI Fujikazu * Some imput fixes. Motonori Nakamura * Ignore PostPet. (for April fool joke) Motonori Nakamura * Japanese string grep. Kazumasa Utashiro * Bug fix for boundary skip. * Null value bug fix. Motonori Nakamura * ctext hack. SAKAI Kiyotaka 87 (98/03/02) mew-dist release * binmode patch for imcat. OKUNISHI Fujikazu * substr_safe patch. SAKAI Kiyotaka * EUC_JP & Shift_JIS support. SAKAI Kiyotaka * Unfolding patch for encoded lines. SAKAI Kiyotaka * IMAP patch. wkenji@flab.fujitsu.co.jp * Several bug fix patches. Hideyuki SHIRAI 86 (98/02/19) img release * impath prints ImapAccount. * ctext hack for iso-8859-?, cn-gb, euc-kr. SAKAI Kiyotaka * Don't GetPass unless IMAP. Yuuichi Teranishi 85 (98/02/10) mew-dist release * EUC speed up patch. SAKAI Kiyotaka * imjoin for message/partial. SAKAI Kiyotaka * Never load History.pm unless required. SAKAI Kiyotaka * Timestamp hack for imput. Mito * Buf fix for --assoc of imget. Ian Fraser * Default value for QueueDir. SAKAI Kiyotaka * timezone support. IMAZU Hideyo * MsgDB for Win NT. Shuichi Kitaguchi * The new configure.cmd. OKUNISHI Fujikazu * Some alias fixes. Murata Takashi * metaquote for alias, again. SAKAI Kiyotaka 84 (98/01/28) mew-dist release * configure replaces @im_file_attr@ to O_RDWR|O_CREAT|O_EXCL. * impath --path returns queue_path(). * queue_path(). * metaquote for alias. Motonori Nakamura * SDBM support. Hideyuki SHIRAI * IMAP bug fix. Yuuichi Teranishi * --ignorecase -> --casefold "YAMAGUCHI, Shuhei" * Require folder_mode in Folder.pm. INOUE Hiroyuki 83 (98/01/19) mew-dist release * IMAP & imget hack. Yuuichi Teranishi * filter patch for Win32. Shuichi Kitaguchi * typo fix. Shirai@rdmg.mgcs.mei.co.jp * IMAP fix for immv and imrm. Hajimu UMEMOTO * NoSync msg. Motonori Nakamura * bug fix for ObeyMTAdomain=yes. Masahiro MURATA * imget fix. Motonori Nakamura * Another imget fix. Motonori Nakamura * imsetup fsync patch. SAKAI Kiyotaka * Logic reverse patch. SAKAI Kiyotaka 82 (98/01/14) mew-dist release * several patches for fsync. Motonori Nakamura * imali patch. SAKAI Kiyotaka * Jumbo patch for IMAP loading and Util.pm. SAKAI Kiyotaka * imhist patch. Motonori Nakamura 81 (98/01/10) img release * Clean up options. SAKAI Kiyotaka * Bug fix for "Subject: 0". Motonori Nakamura * OS2/configure.cmd patch. OKUNISHI Fujikazu 80 (97/12/25) mew-dist release * imget -q patch. Yoshiaki KATAYAMA * $ADDRESS_HASH{'addr'} hack. Masahiro MURATA * IMAP support. wkenji@flab.fujitsu.co.jp * MMDF null line hack. Motonori Nakamura * Makefile hack. NAKAJI Hiroyuki * Alias is now case-insensitive. SAKAI Kiyotaka * {B,Q}_encode -> {b,q}_encode. SAKAI Kiyotaka * meta quote patch. SAITO Tetsuya 79 (97/12/15) mew-dist release * Explicitly ignores --debug=off. * /^yes|on|true|1$/i) -> /^(yes|on|true|1)$/i). * Don't mark with 'M' unless MIME-Version exists. * Fix to number: field. Fumitoshi UKAI * A patch to imsetup. SAKAI Kiyotaka * Appropriate abbreviation option hack. SAKAI Kiyotaka * %b fix. SAKAI Kiyotaka * Typo fix. SAKAI Kiyotaka 78 * Config priority. SAKAI Kiyotaka * OS2/configure.cmd patch OKUNISHI Fujikazu * ad-hoc definition of alarm_func to die somehow. 77 (97/11/06) img release * Grep.pm. yamagus@kw.netlaputa.or.jp (YAMAGUCHI, Shuhei) * imclean. SAKAI Kiyotaka * '+' for default scan form. SAKAI Kiyotaka * login_name() -> im_getlogin(). SAKAI Kiyotaka 76 (97/10/25) mew-release release * s -> s@ for MultipartAdd of imput. HUDOH Kazuyuki * %+3n patch. SAKAI Kiyotaka * %P patch. SAKAI Kiyotaka * login_name patch. SAKAI Kiyotaka * imsetup update. SAKAI Kiyotaka * Pop.pm bug fix. Shuichi Kitaguchi 75 (97/10/22) img release * fix on appending X-Dispatcher: in case of BCC. * skip to next nntp server if temporary failure reported (imcat, imget,..) * to support CRLF messages with imls specify AllowCRLF=yes in config file to use this feature * --rpath switch added to imget * convert Newsgroups: header into X-Newsgroups: in case the message will be sent with SMTP * support BNewsgroups: header Motonori Nakamura 74 (97/10/12) img release * imsetup.in revised SAKAI Kiyotaka * Header.pm.in created (some func. moved from Message.pm.in) * strip needless spaces (LocalMbox.pm.in) * return number of got messages (Pop.pm.in) * suport IPv6 style addressing on server specification (Pop.pm.in/Imap.pm.in) * support port specification (Pop.pm.in/Imap.pm.in) * typo fixed (impwagent.in) * support ISO-2022-JP codes in Form (Scan.pm.in) * strip "\r"s to share saved messages with DOS (Scan.pm.in) * support =folder for parameter of --assoc (imget.in) Motonori Nakamura * fix a problem around getlogin (GetPass.pm.in) * ignore EOF on Win32 (imput.in) * avoid "foreach my $ver"s (imgrep.in) Shuichi Kitaguchi * do not set mark D on duplicated messages unless subject is same Shigeya Suzuki 73 (97/09/29) img release * New imgrep.in. Yoshiaki Kasahara * imhist hack. Motonori Nakamura * AF_INET hack. Motonori Nakamura * New EncDec.in. Motonori Nakamura * read_petnames warns (rather than dies!) if Petname not exist. Kazunori NISHI 72 (97/09/28) img release * touch_folder() hack. Shuichi Kitaguchi * --buffer option for imls and imget. * Yet another patch to prevent "no messages" for IMAP. wkenji@flab.fujitsu.co.jp * IM is now IPv6 ready. v^^) Motonori Nakamura * BADFREE hack for im.cmd. OKUNISHI Fujikazu * New configure.el and config-def.el yamagus@kw.netlaputa.or.jp (YAMAGUCHI, Shuhei) * New imsort.in. "Takashi P.KATOH" * FCC: bug fix for imput . Fumitoshi UKAI * imsort mode patch. "Takashi P.KATOH" * configure.el patch and config-def.el. yamagus@kw.netlaputa.or.jp (YAMAGUCHI, Shuhei) * Yet another summer time patch. Motonori Nakamura 71 (97/09/18) mew-release release * F@ patch. Fumitoshi UKAI * OS2/configure.cmd patch. OKUNISHI Fujikazu * Summer time patch. Motonori Nakamura * A patch to dot.im/password. AOSASA Shigeru * A patch to prevent "no messages" for IMAP. wkenji@flab.fujitsu.co.jp * A patch to configure.el. "yamagus@kw.netlaputa.or.jp (YAMAGUCHI, Shuhei) * Removed foo{IO} for Win32. "yamagus@kw.netlaputa.or.jp (YAMAGUCHI, Shuhei) * Miscellaneous patches. Motonori Nakamura * MD5.pm patch. Fumitoshi UKAI * Makefile.PL patch. Fumitoshi UKAI 70 (97/09/17) mew-dist beta release * scan.sbr patch. Motonori Nakamura * SiteConfig patch. Motonori Nakamura * Yet another strict patch. Fumitoshi UKAI * help patch. Motonori Nakamura * win32p -> win95p in imput. "yamagus@kw.netlaputa.or.jp (YAMAGUCHI, Shuhei) * impwagent patch. Motonori Nakamura 69 (97/09/15) mew-dist beta release * Comment out 'use strict' from TcpTransaction.pm. * fix on "do $SCANFORM" problem * revert to unuse FileHandle ukai@jp.hpl.hp.com * fix on Win32::LoginName problem on OS/2 OKUNISHI Fujikazu * password management with file AOSASA Shigeru * password management with process(impwagent) * --NoMsgIdForNews option for strip Message-Id: header for NNTP (imput) * --count option for limit getting news articles (imget) * timeout processing added for imget Motonori Nakamura * fix on Return-Path: header syntax reported by Shuhei KOBAYASHI 68 (97/09/09) img release * fix fcc bug ukai@jp.hpl.hp.com * Use integer ukai@jp.hpl.hp.com * clean up debug related functions. SAKAI Kiyotaka * File handling after dispatching. Motonori Nakamura * Modify IM assoc list. Motonori Nakamura * Remove $ErrMsg. Motonori Nakamura * Use strict. ukai@jp.hpl.hp.com 67 (97/09/08) img release * Support no XOVER news server. Motonori Nakamura * Fix ObeyMTAdomain option bug. Shigeki Fujii * Speed improvement of too long header mail. SAKAI Kiyotaka * Support %a option at scan form. SAKAI Kiyotaka * Third RPOP authentication patch. Motonori Nakamura * imsort improvement. Daisuke Kanda * Fix imsetup bug. 66 (97/08/30) img release * Second RPOP authentication patch. Motonori Nakamura * $0 fix for imget. TOYAMA Sumio * Message/Partial fix. Motonori Nakamura * message/partial support. Motonori Nakamura * config.guess tiny change. 65 (97/08/26) mew-release release * Many IMAP improvements. wkenji@flab.fujitsu.co.jp * Modified many documents. * '%s' contains a space if Subject: is the bottom. This was fixed. SAKAI Kiyotaka 64 (97/08/26) personal release * Eliminated 'my' in 'for' for Win 32. Motonori Nakamura * prototype. SAKAI Kiyotaka * Space fix for IMAP. Motonori Nakamura * Remove white spaces between 'encoded-word's. Motonori Nakamura * Tiny fix for the following. Motonori Nakamura * IMAP and qmail patch. Motonori Nakamura 63 (97/08/24) mew-dist release * 1 line patch for qmail. Yoshitomi Kentaro * qmail support. Motonori Nakamura * %p fix. SAITO Tetsuya * HTTP fixes. SAKAI Kiyotaka * Typo fixes. SAKAI Kiyotaka * POP patch. Motonori Nakamura * news: and --stdin for imget SAKAI Kiyotaka * Iso2022jp bug fix. Motonori Nakamura * imgrep pattern bug fix. Yoshiaki Kasahara * Basic authentication of HTTP access Motonori Nakamura 62 (97/08/20) mew-dist release * 'F' instead of 'f' for imcat. * Close check. NAKAMURA Motonori * Header sort. NAKAMURA Motonori * Multi-lingual bug fix. NAKAMURA Motonori * Recode history when annotate. NAKAMURA Motonori * Variable typo fix. NAKAMURA Motonori * Annotate patch. NAKAMURA Motonori * RPOP bug fix. NAKAMURA Motonori 61 (97/08/17) img release * http access supported with imcat (Http.pm created) * fix on string truncation unless jissafe specified (Scan.pm) * fix on infinite loop by parsing list:addr; syntax (Message.pm_ * make more consistent on return codes (0:success, -1:failure) * speed improvement of Scan.pm by passing all header lines at a time * detection of filesystem-full (MsgStore.pm) * fix on POP processing when --keep=0 * localization of "$_"s 60 (97/08/15) img release * Use reference instead of typeglob. * add type check declaration. * $Cur_server and $Session_log are TcpTransaction.pm local. SAKAI Kiyotaka * extract_addr() patch NAKAMURA Motonori * connect_server() patch. NAKAMURA Motonori * Pop.pm patch. NAKAMURA Motonori * 00readme patch. Shigeya Suzuki * the first line patch. Shigeya Suzuki * MsgDBFile fix. NAKAMURA Motonori * speed improvement of imget patch. NAKAMURA Motonori * GetSbrFile patch. SAKAI Kiyotaka 59 (97/08/13) img release * Makefile.pl -> Makefile.PL. * add "-- # -*-Perl-*-" in all files. * add "1;" at the end of all *.pm files. * change indentation to "hardtab = 8, soft tab = 4" in all files. 58 (97/08/13) img release * Config: continuous line and speed improvement patch. NAKAMURA Motonori * convert_scan_form patch. NAKAMURA Motonori * parse_body patch. SAKAI Kiyotaka * change imget mode name (inc -> get). SAKAI Kiyotaka 57 (97/08/11) img release 56 (97/08/06) mew-dist release (same as 55 + patch1) * Delete 'use IM::Debug' from Recipient.pm SAKAI Kiyotaka * Alias.pm patch SAKAI Kiyotaka * Iso2022jp.pm typo fixes. SAKAI Kiyotaka * ScanSBR patch. Makoto MATSUSHITA * Typo fixes. NAKAMURA Motonori * Delete an old CV variable from imstore. Tomoaki Tsumura 55 (97/08/06) mew-dist release * Deleted the --batch option imget. NAKAMURA Motonori * IM error routines and imget brush up. NAKAMURA Motonori * Case default hack. NAKAMURA Motonori 54 (97/08/05) img release * //i -> //is. ksakai@netwk.ntt-at.co.jp * Commented out read_env(). ksakai@netwk.ntt-at.co.jp * One more patch. NAKAMURA Motonori * Debug -> Config, MIME -> EncDec, deleted PAGER from imcat, --config for imget. NAKAMURA Motonori * Newsgroup patch. NAKAMURA Motonori 53 (97/08/03) img release * New configure.cmd and im.cmd.in. OKUNISHI Fujikazu * Deleted Fcc.pm. * \t -> ' ' for Scan.pm. ksakai@netwk.ntt-at.co.jp * hostname for imsetup. ksakai@netwk.ntt-at.co.jp * Use shift for nntp_article(). ksakai@netwk.ntt-at.co.jp * import IM::Folder for imcat. ksakai@netwk.ntt-at.co.jp * SMTP/NNTP Error related patch. ksakai@netwk.ntt-at.co.jp * Module dependency patch for Message.pm. ksakai@netwk.ntt-at.co.jp * Module dependency patch. ksakai@netwk.ntt-at.co.jp * Petname fix. tetuya-s@is.aist-nara.ac.jp * Date fix. y-koga@w3.mag.keio.ac.jp * Name changes for autoconf. fujimoto@oscar.elec.waseda.ac.jp itojun@itojun.org * Fcc: bug fix. NAKAMURA Motonori * %Head bug fix for NNTP. NAKAMURA Motonori * taint check patch NAKAMURA Motonori 52 (97/07/30) img release * Simplified overview for imls. * my_addr patch. SAKAI Kiyotaka * STRUCTURED for Scan.pm. SAKAI Kiyotaka * Annotation patch. NAKAMURA Motonori * Eliminating $' family for many files. SAKAI Kiyotaka * Eliminating debug printing. NAKAMURA Motonori 51 (97/07/30) img release * Continuous field bug fix. NAKAMURA Motonori * One more patch for Config.pm SAKAI Kiyotaka * Mark fix and eliminating $' family for Scan.pm SAKAI Kiyotaka * PWD and eliminating $' family for Config.pm SAKAI Kiyotaka * Use pack. NAKAMURA Motonori 50 (97/07/29) img release * Infinite loop of fetch_addr() was fixed. * Eliminated printf(). SAKAI Kiyotaka * Use pack instead of substr. SAKAI Kiyotaka * Try to reduce calls of friendly_addr(). NAKAMURA Motonori * fetch_addr() hack. NAKAMURA Motonori * Date fix. SAKAI Kiyotaka * Prevent waring when -w. SAKAI Kiyotaka * store_header(). NAKAMURA Motonori * Allow ., /, ~ as folder. SAKAI Kiyotaka 49 (97/07/29) img release * "%5n %m%d%-14A %-18S %b" -> "%5n %m%d %-14A %-18S %b" * TZ fix. Takeshi Chiba * Fix for path hard coding of imstore. Makoto MATSUSHITA * One more putlog bug fix. NAKAMURA Motonori * putlog bug fix. NAKAMURA Motonori * im_die2 for imgrep. * New Iso2022jp.pm.in with one more patch NAKAMURA Motonori * User name omitting patch. SAITO Tetsuya * imget help patch. NAKAMURA Motonori * Delimiter patch. SAKAI Kiyotaka * Enrich date stuff. Maybe TABOO 48 (97/07/28) mew-dist release * Eliminated setgid. NAKAMURA Motonori 47 (97/07/26) img release * Case-ignore for options. NAKAMURA Motonori * flock patch. NAKAMURA Motonori * Deleted nntpservers and imapservers from OptConfig of imcat and imls. * Yet another $Head{'body'} bug fix. * $Head{'body'} bug fix. NAKAMURA Motonori * nntp_spec bug fix. * references -> references: akira yamada * configure.el yamagus@kw.netlaputa.or.jp (YAMAGUCHI, Shuhei) * Another IMAP patch. NAKAMURA Motonori * System Config remaines if exists. Naoto Morishima * IMAP support, TZ support in gen_date, and login name getting for Win. NAKAMURA Motonori 46 (97/07/21) mew-dist beta release * Cooked keys were named "key:" in Scan.pm * New Pop.pm. NAKAMURA Motonori * imget creates +inbox if not exist. NAKAMURA Motonori * DB type check again. NAKAMURA Motonori * DB type check. NAKAMURA Motonori * DB check for Makefile.pl ukai@jp.hpl.hp.com * New configure.cmd OKUNISHI Fujikazu 45 (97/07/19) mew-alpha release * imls --grep bug fix. * imsetup hack. Shigeya Suzuki * Support of folder and range for imrm. Yoshinari NOMURA * Safe manner for strings which include '@' on imgrep. kasahara@nc.kyushu-u.ac.jp * DB hack. NAKAMURA Motonori * Typo fixes for Imap.pm wkenji@flab.fujitsu.co.jp * Petnames -> PetnameFile NAKAMURA Motonori * %K for Scan.pm Kazumasa Utashiro 44 (97/07/18) mew-alpha release * s/14f/14A/g for all files. * A patch to eliminate unnecessary options for imput. NAKAMURA Motonori * imput manual NAKAMURA Motonori * Empty case patch. NAKAMURA Motonori * Allow "," for config selector. NAKAMURA Motonori * Makefile.pl ukai@jp.hpl.hp.com * rename fix. Yoshinari NOMURA * typo fix. toshi@tea.forus.or.jp 43 (97/07/15) img release * imstore. SAKAI Kiyotaka * -v and -q for imrm. SAKAI Kiyotaka * Minor fix for Config.pm. NAKAMURA Motonori * Pop secure patch. NAKAMURA Motonori * scansbrfile, petnamefile, nntpservers, pophistoryfile -> Config.pm. And remove Queue.pm. touch_folder revival. NAKAMURA Motonori * touch_folder hack. Yoshinari NOMURA 42 (97/07/13) img release * BigPatch again and again ;) NAKAMURA Motonori * BigPatch again :) NAKAMURA Motonori * skip rename() if PC. Yoshinari NOMURA * range hack for imsort. Yoshinari NOMURA * petname support for imget. Junji SAKAI * fetch_addr. NAKAMURA Motonori * +. support for imls. SAKAI Kiyotaka 41 (97/07/09) img release * File.pm fix Yoshinari NOMURA * File.pm & imsort Yoshinari NOMURA * Header separator fix for imgrep. Yoshiaki Kasahara * Garbage collectionos. ukai@jp.hpl.hp.com Kazu@Mew.org * Small path to make history optional. NAKAMURA Motonori * Big patch to fix error_exit and so on. NAKAMURA Motonori 40 (97/07/01) mew-dist beta release * To:dest from me bug fix. * imls typo. tetuya-s@is.aist-nara.ac.jp * %D bug fix. Yoshinari NOMURA * sortuniq hack Kazumasa Utashiro * Support of "=". Yoshinari NOMURA * help patch NAKAMURA Motonori * imput patch NAKAMURA Motonori * 'D' mark for duplicated messages. Kazunori NISHI * CLOSE label for Scan.pm. * "+" means "--src=+" while "=" means "--src==". * imls --grep hack. * im_warn patch. NAKAMURA Motonori * Typo patch SAKAI Kiyotaka * New history patch NAKAMURA Motonori 39 (97/06/30) mew-alpha release * imgrep strict keyword patch SAKAI Kiyotaka * Folder.pm were re-written. utashiro@iij.ad.jp * -w type was removed from imgrep. * NNTPSERVERS -> NNTPSERVER SAKAI Kiyotaka * Typos for im_warn were fixed. * Many parts of Scan.pm were re-written. 38 (97/06/27) mew-alpha release * win32p() for getwuid() OKUNISHI Fujikazu * GetPass hack. * Many fixes from motonori including support of absolute path for MailDir. NAKAMURA Motonori * im_{msg,warn,err,die} * Scan erase "-- PGP hoge --" for body. * '=' support for impath. * \ -> / in $HOME_DIR. "/home/" -> "/home" * impath --list fix for OS/2. * typo fix for Getpass.pm. * Support [a-zA-Z]:/patch on expand_path yamagus@kw.netlaputa.or.jp (YAMAGUCHI, Shuhei) * Pop.pm error patch Yuuichi Teranishi 37 (97/06/24) mew-alpha release * Many remedies for Win95. * unixp win95p wntp os2p. * A patch to make imget faster. SAKAI Kiyotaka * im.cmd.in OKUNISHI Fujikazu * "\nFrom" check instead of "^From" check. NAKAMURA Motonori * Comment out alarm() to rescue Win95. 36 (97/06/23) mew-alpha release * Comment out getservbyname() and getprotobyname(). * Win95/*.bat scripts. This is really temporary. * Prepare OS2 and Win95 directory. * GetPass for Win95. * User customizable Form patch Kazunori NISHI * nntpserver -> nntpservers. SAKAI Kiyotaka 35 (97/06/18) mew-alpha release * '@' support for help(). * flush() for imgrep, imls. * NNTPSERVER*S*, SMTPSERVER*S*. * vscan support for imls. * "can not" -> cannot. 34 (97/06/15) mew-alpha release * Selector support. * Removed '*.xxx' style from all Configs. * local -> my for imsetup. SAKAI Kiyotaka * preservedot -> preserve_dot. im-153/immv.in0000644000000000000000000002063112776700430011777 0ustar rootroot#! @im_path_perl@ ################################################################ ### ### immv ### ### Author: Internet Message Group ### Created: Apr 23, 1997 ### Revised: Apr 23, 2007 ### BEGIN { @im_my_siteperl@ @im_src_siteperl@ }; $Prog = 'immv'; my $VERSION_DATE = "20161010"; my $VERSION_NUMBER = "153"; my $VERSION = "${Prog} version ${VERSION_DATE}(IM${VERSION_NUMBER})"; my $VERSION_INFORMATION = "${Prog} (IM ${VERSION_NUMBER}) ${VERSION_DATE} Copyright (C) 1999 IM developing team This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. "; ## ## Require packages ## use IM::Config; use IM::Folder; use IM::File; use IM::MsgStore; use IM::Util; use integer; use strict; use vars qw($Prog $EXPLANATION @OptConfig @msgs $opt_link $opt_noharm $opt_src @opt_dst $opt_verbose $opt_debug $opt_help $opt_version); ## ## Environments ## my %NewMsgCache = (); $EXPLANATION = "$VERSION file mail/news message in other folders Usage: $Prog [OPTIONS] FOLDER... MSGS... "; @OptConfig = ( 'src;f;;' => "Set source folder", 'dst;F@;;' => "Set destination folders", 'link;b;;' => "Remain original msg in src folder", 'SSHServer,S;s;localhost;SSH_server' => 'SSH port relay server', 'noharm;b;;' => "Display the commands but do not actually execute them", 'verbose;b;;' => 'With verbose messages', 'debug;d;;' => "With debug message", 'help;b;;' => "Display this help and exit", 'version,V;b;;' => "Output version information and exit", ); ## ## Profile and option processing ## init_opt(\@OptConfig); read_cfg(); read_opt(\@ARGV); # help? print("${VERSION_INFORMATION}") && exit $EXIT_SUCCESS if $opt_version; help($EXPLANATION) && exit $EXIT_SUCCESS if $opt_help; debug_option($opt_debug) if $opt_debug; ## ## Main ## @opt_dst = uniq(@opt_dst); @opt_dst || im_die "no folder specified.\n"; @ARGV || im_die "no message specified.\n"; @msgs = @ARGV; immv($opt_src, \@opt_dst, \@msgs); exit $EXIT_SUCCESS; ################################################## ## ## Work horse ## sub immv($$$) { my($src, $dsts, $msgs) = @_; my(@imap_dsts, @local_dsts); my($imap_src, $imap_dst, $news_src, $news_dst) = (0, 0, 0, 0); if ($src =~ /^-/) { $news_src = 1; } elsif ($src =~ /^%/) { $imap_src = 1; } foreach (@$dsts) { if (/^-/) { $news_dst = 1; } elsif (/^%/) { $imap_dst = 1; push(@imap_dsts, $_); } else { push(@local_dsts, $_); } } if ($news_dst) { im_die "refile to News folder is not permitted.\n"; } if ($news_src) { require IM::Nntp && import IM::Nntp qw(nntp_get_message); } if ($imap_src || $imap_dst) { require IM::Imap && import IM::Imap; require IM::GetPass && import IM::GetPass; } chk_folder_existance($src, @{$dsts}); $opt_link = 1 if (grep($src eq $_, @{$dsts})); @{$dsts} = grep($src ne $_, @{$dsts}); if (($imap_src && imap_open_folders(0, $src) < 0) || ($imap_dst && imap_open_folders(1, @imap_dsts) < 0)) { exit($EXIT_ERROR); } if ($src =~ /^%/) { imap2local($src, \@local_dsts, $msgs) if (scalar(@local_dsts) > 0); imap2imap($src, \@imap_dsts, $msgs) if (scalar(@imap_dsts) > 0); } elsif ($src =~ /^-/) { news2local($src, \@local_dsts, $msgs) if (scalar(@local_dsts) > 0); news2imap($src, \@imap_dsts, $msgs) if (scalar(@imap_dsts) > 0); } else { local2local($src, \@local_dsts, $msgs) if (scalar(@local_dsts) > 0); local2imap($src, \@imap_dsts, $msgs) if (scalar(@imap_dsts) > 0); } if ($imap_src || $imap_dst) { imap_close_folders(); } return 0; } sub local2local($$$) { my($src, $dsts, $msgs) = @_; my @msg_paths = get_impath($src, @$msgs); foreach (@msg_paths) { refile_one($src, $dsts, $_) if (-f $_); } } sub imap2local($$$) { my($src, $dsts, $msgs) = @_; my($msg, $Message); foreach $msg (@$msgs) { $Message = imap_get_message($src, $msg); refile_one("", $dsts, $Message); } imap_delete_message($src, @$msgs) unless ($opt_link); } sub news2local($$$) { my($src, $dsts, $msgs) = @_; my($msg, $rc, $Message); foreach $msg (@$msgs) { ($rc, $Message) = nntp_get_message($src, $msg); im_die($Message) if ($rc < 0); refile_one("", $dsts, $Message); } } sub refile_one($$$) { my($src, $dsts, $msg) = @_; my($dst, $dst_path, $link_it); foreach $dst (@{$dsts}) { if ($NewMsgCache{$dst}) { $NewMsgCache{$dst} =~ s|([^/]+)$|$1+1|e; # increment cache $dst_path = $NewMsgCache{$dst}; } else { $dst_path = $NewMsgCache{$dst} = get_impath($dst, 'new'); } if ($opt_link && $src ne "") { im_link($msg, $dst_path) || die $@; } elsif ($link_it) { im_link($link_it, $dst_path) || die $@; } else { if ($src eq "") { if (store_message($msg, $dst, 1) < 0) { im_warn("can't store msg to $dst folder.\n"); } } else { im_rename($msg, $dst_path) || die $@; } $link_it = $dst_path; } touch_folder($dst_path) unless ($opt_noharm); } } sub local2imap($$$) { my($src, $dsts, $msgs) = @_; my $msg; foreach $msg (@$msgs) { my $src_path = get_impath($src, ($msg)); if (-f $src_path) { imap_put_file($src, $dsts, $src_path); im_unlink($src_path); } } } sub news2imap($$$) { my($src, $dsts, $msgs) = @_; my($msg, $rc, $Message); foreach $msg (@$msgs) { ($rc, $Message) = nntp_get_message($src, $msg); im_die($Message) if ($rc < 0); imap_put_message($Message, $dsts); } } sub imap2imap($$$) { imap_refile(@_); } sub uniq(@) { my @array = @_; my %hash; foreach (@array) { $hash{$_} = $_; } return keys(%hash); } __END__ =head1 NAME immv - file mail/news message in other folders =head1 SYNOPSIS B [OPTIONS] FOLDER... MSGS... =head1 DESCRIPTION The I command moves messages from the source folder to the destination folders. This command is provided by IM (Internet Message). =head1 OPTIONS =over 5 =item I<-s, --src=FOLDER> Set source folder. Default value is "+inbox". =item I<-d, --dst=FOLDER,FOLDER...> Set destination folders. "--dst=+xxx" is equivalent to "+xxx". =item I<-l, --link={on,off}> Remain original msg in src folder. =item I<-S, --sshserver=SERVER> SSH port relay server. =item I<-n, --noharm={on,off}> Display the commands but do not actually execute them. =item I<-v, --verbose={on,off}> Print verbose messages when running. =item I<--debug=DEBUG_OPTION> Print debug messages when running. =item I<-h, --help> Display help message and exit. =item I<--version> Output version information and exit. =back =head1 COPYRIGHT IM (Internet Message) is copyrighted by IM developing team. You can redistribute it and/or modify it under the modified BSD license. See the copyright file for more details. =cut ### Copyright (C) 1997, 1998, 1999 IM developing team ### All rights reserved. ### ### Redistribution and use in source and binary forms, with or without ### modification, are permitted provided that the following conditions ### are met: ### ### 1. Redistributions of source code must retain the above copyright ### notice, this list of conditions and the following disclaimer. ### 2. Redistributions in binary form must reproduce the above copyright ### notice, this list of conditions and the following disclaimer in the ### documentation and/or other materials provided with the distribution. ### 3. Neither the name of the team nor the names of its contributors ### may be used to endorse or promote products derived from this software ### without specific prior written permission. ### ### THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND ### ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ### PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ### BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ### WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE ### OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN ### IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ### Local Variables: ### mode: perl ### End: im-153/imsort.in0000644000000000000000000001762712776700430012357 0ustar rootroot#! @im_path_perl@ ################################################################ ### ### imsort ### ### Author: Internet Message Group ### Created: Jul 2, 1997 ### Revised: Apr 23, 2007 ### BEGIN { @im_my_siteperl@ @im_src_siteperl@ }; $Prog = 'imsort'; my $VERSION_DATE = "20161010"; my $VERSION_NUMBER = "153"; my $VERSION = "${Prog} version ${VERSION_DATE}(IM${VERSION_NUMBER})"; my $VERSION_INFORMATION = "${Prog} (IM ${VERSION_NUMBER}) ${VERSION_DATE} Copyright (C) 1999 IM developing team This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. "; ## ## Require packages ## use IM::Config; use IM::Folder; use IM::File; use IM::Util; use integer; use strict; use vars qw($Prog $EXPLANATION @OptConfig $opt_field $opt_mode $opt_noharm $opt_src $opt_verbose $opt_debug $opt_help $opt_version); ## ## Environments ## $EXPLANATION = "$VERSION sort mail/news messages Usage: $Prog [OPTIONS] FOLDER [MSGS...] "; @OptConfig = ( 'src;F;;' => "Set source folder", 'field;s;date;'=> "Sort by the specified field", 'mode;s;date;' => "Set sort mode to date, num, text or ml", 'noharm;b;;' => "Display the commands but do not actually execute them", 'verbose;b;;' => 'With verbose messages', 'debug;d;;' => "With debug message", 'help;b;;' => "Display this help and exit", 'version,V;b;;' => "Output version information and exit", ); ## ## Profile and option processing ## init_opt(\@OptConfig); read_cfg(); read_opt(\@ARGV); # help? print("${VERSION_INFORMATION}") && exit $EXIT_SUCCESS if $opt_version; help($EXPLANATION) && exit $EXIT_SUCCESS if $opt_help; debug_option($opt_debug) if $opt_debug; ## ## Main ## my @msgs = @ARGV; @msgs = ('all') if (!@ARGV); my $msgs = \@msgs; $opt_src || im_die "no folder specified.\n"; @msgs || im_die "no message specified.\n"; $opt_field || im_die "no field specified.\n"; $opt_mode =~ /^(date|num|text|ml)$/ || im_die "Wrong mode $opt_mode.\n"; # # Set date relative magic values. # my @TBL = (0, 306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275); my %ZONE = ('PST', -8, 'PDT', -7, 'MST', -7, 'MDT', -6, 'CST', -6, 'CDT', -5, 'EST', -5, 'EDT', -4, 'AST', -4, 'NST', -3, 'UT' , +0, 'GMT', +0, 'BST', +1, 'MET', +1, 'EET', +2, 'JST', +9,); my %MONTH = ('Jan', 1, 'Feb', 2, 'Mar', 3, 'Apr', 4, 'May', 5, 'Jun', 6, 'Jul', 7, 'Aug', 8, 'Sep', 9, 'Oct', 10, 'Nov', 11, 'Dec', 12); sub rxp_or { join('|', @_); } my $m_rxp = rxp_or(keys(%MONTH)); my $z_rxp = rxp_or(keys(%ZONE), '[-+]\d{4}'); # # do it. # imsort($opt_src, $msgs, $opt_mode, $opt_field); exit $EXIT_SUCCESS; ################################################## ## ## Work horse ## sub imsort($$$$) { my($src, $msgs, $mode, $field) = @_; my($i, $path, $from, $to, $tmp, @msg_all, @msg_paths, @sorted_index); my @param = (); my $HOLE_PATH = get_impath($src, 'new'); @msg_all = get_impath($src, @{$msgs}); foreach $path (@msg_all) { if (-f $path) { push(@msg_paths, $path); push(@param, get_field_value($path, $field, $mode)); } } if (($mode eq 'text') || ($mode eq 'ml')) { @sorted_index = sort { $param[$a] cmp $param[$b] } 0 .. $#msg_paths; } else { @sorted_index = sort { $param[$a] <=> $param[$b] } 0 .. $#msg_paths; } $tmp = $#msg_paths + 1; for $i (0 .. $#msg_paths) { next if $i == $sorted_index[$i] or $sorted_index[$i] < 0; $msg_paths[$tmp] = $HOLE_PATH; $sorted_index[$tmp] = $i; $to = $tmp; do { $from = $sorted_index[$to]; if ($sorted_index[$from] < 0) { $from = $tmp; } $sorted_index[$to] = -1; im_rename($msg_paths[$from], $msg_paths[$to]) || die; } while ($to = $from) != $tmp; $#msg_paths = $#sorted_index = $tmp - 1; } touch_folder($src) unless $opt_noharm; } sub get_field_value($$$) { my($path, $field, $smode) = @_; local $_; local $/ = ''; my($ml, $num); if (im_open(\*MSG, "< $path")) { ($_ = ) =~ s/\n\s+/ /g; close(MSG); } else { im_die("Can't open $path. (Nothing was done.)\n"); } ($_) = /^$field:\s+([^\n]*)/imo; if (lc($field) eq 'subject') { if ($smode eq 'ml') { if (s/^[\[\(]([^\]\)]*)[\]\)]\s*//i) { $1 =~ /^(.*)[:,\s](.*)$/; $ml=$1; $num=$2; s/^(re:\s*)(.*)$/$2$1/i; $_ = $ml . $_ . $num; } } else { s/^(re:\s*)(.*)$/$2$1/i; } } if ($smode eq 'num') { m/(\d+)\D*$/; $_ = $1; } if ($smode eq 'date') { if (/(\d+)\s+($m_rxp)\s+(\d+)\s+(\d+):(\d+)(:(\d+))?\s*($z_rxp)?/io) { ## Y2K: conform to drums if ($3 < 50) { return sec_from_epoc($3 + 2000, $MONTH{$2}, $1, $4, $5, $7+0, $8); } elsif ($3 < 100) { return sec_from_epoc($3 + 1900, $MONTH{$2}, $1, $4, $5, $7+0, $8); } else { return sec_from_epoc($3, $MONTH{$2}, $1, $4, $5, $7+0, $8); } } return (stat($path))[9]; } return $_; } sub sec_from_epoc($$$$$$$) { my($y, $m, $d, $hh, $mm, $ss, $tz) = @_; $tz = ($ZONE{$tz} * 3600) || (int($tz/100)*3600 + ($tz%100)*60); $y-- if ($m < 3); ($y * 365 + int($y/4) - int($y/100) + int($y/400) + $TBL[$m] + $d - 719469) * 86400 + $hh * 3600 + $mm * 60 + $ss - $tz; } __END__ =head1 NAME imsort - sort mail/news messages =head1 SYNOPSIS B [OPTIONS] FOLDER [MSGS...] =head1 DESCRIPTION The I command sorts mail/news messages in a folder. This command is provided by IM (Internet Message). =head1 OPTIONS =over 5 =item I<-s, --src=FOLDER> Set source folder. Default value is "+inbox". "--src=+xxx" is equivalent to "+xxx". =item I<-f, --field=STRING> Sort by the specified field. Default value is "date". =item I<-m, --mode=STRING> Set sort mode to date, num, text or ml. Default value is "date". =item I<-n, --noharm={on,off}> Display the commands but do not actually execute them. =item I<-v, --verbose={on,off}> Print verbose messages when running. =item I<--debug=DEBUG_OPTION> Print debug messages when running. =item I<-h, --help> Display help message and exit. =item I<--version> Output version information and exit. =back =head1 COPYRIGHT IM (Internet Message) is copyrighted by IM developing team. You can redistribute it and/or modify it under the modified BSD license. See the copyright file for more details. =cut ### Copyright (C) 1997, 1998, 1999 IM developing team ### All rights reserved. ### ### Redistribution and use in source and binary forms, with or without ### modification, are permitted provided that the following conditions ### are met: ### ### 1. Redistributions of source code must retain the above copyright ### notice, this list of conditions and the following disclaimer. ### 2. Redistributions in binary form must reproduce the above copyright ### notice, this list of conditions and the following disclaimer in the ### documentation and/or other materials provided with the distribution. ### 3. Neither the name of the team nor the names of its contributors ### may be used to endorse or promote products derived from this software ### without specific prior written permission. ### ### THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND ### ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ### PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ### BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ### WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE ### OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN ### IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ### Local Variables: ### mode: perl ### End: im-153/imclean.in0000644000000000000000000001507712776700430012447 0ustar rootroot#! @im_path_perl@ ################################################################ ### ### imclean ### ### Author: Internet Message Group ### Created: Apr 23, 1997 ### Revised: Apr 23, 2007 ### BEGIN { @im_my_siteperl@ @im_src_siteperl@ }; $Prog = 'imclean'; my $VERSION_DATE = "20161010"; my $VERSION_NUMBER = "153"; my $VERSION = "${Prog} version ${VERSION_DATE}(IM${VERSION_NUMBER})"; my $VERSION_INFORMATION = "${Prog} (IM ${VERSION_NUMBER}) ${VERSION_DATE} Copyright (C) 1999 IM developing team This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. "; ## ## Require packages ## use IM::Config; use IM::Util; use IM::Folder; use IM::File; use integer; use strict; use vars qw($Prog $EXPLANATION @OptConfig $opt_src $opt_noharm $opt_quiet $opt_verbose $opt_debug $opt_help $opt_version); ## ## Environments ## $EXPLANATION = "$VERSION mail/news garbage cleanup Usage: $Prog [OPTIONS] [FOLDER] [MSGS...] "; @OptConfig = ( 'src;F;;' => "Set a folder to be cleaned up", 'SSHServer,S;s;localhost;SSH_server' => 'SSH port relay server', 'noharm;b;;' => "Do not delete files, show what will be performed", 'quiet;b;;' => "Do not show any messages", 'verbose;b;;' => 'With verbose messages', 'debug;d;;' => "With debug message", 'help;b;;' => "Display this help and exit", 'version,V;b;;' => "Output version information and exit", ); ## ## Profile and option processing ## init_opt(\@OptConfig); read_cfg(); read_opt(\@ARGV); # help? print("${VERSION_INFORMATION}") && exit $EXIT_SUCCESS if $opt_version; help($EXPLANATION) && exit $EXIT_SUCCESS if $opt_help; debug_option($opt_debug) if $opt_debug; ## ## Main ## my @msgs = @ARGV; @msgs = ('all') if (!@ARGV); imclean($opt_src, @msgs); exit $EXIT_SUCCESS; ## ## work horse sub imclean($@) { my($folder, @msgs) = @_; my(@paths, $set, $HANDLE); if ($folder !~ /^%/) { @paths = get_message_paths($folder, @msgs); if (scalar(@paths) == 0) { im_warn("no msgs in $folder\n"); return; } } else { # IMAP folder (%folder[:[user[/auth]]@server]) require IM::Imap && import IM::Imap; require IM::GetPass && import IM::GetPass; my($ifld, $auth, $user, $host); $ifld = $folder; if ($ifld !~ /[:\@]/) { # Use ImapAccount spec, unless user or host is specified. (my $dummy, $auth, $user, $host) = imap_spec(''); $ifld =~ s/^%//; } else { ($ifld, $auth, $user, $host) = imap_spec($ifld); } my($pass, $agtfound, $interact) = getpass('imap', $auth, $host, $user); im_warn("accessing IMAP/$auth:$user\@$host\n") if (&verbose); (my $rc, $HANDLE) = imap_open($auth, $host, $user, $pass); if ($rc < 0) { my $prompt = lc("imap/$auth:$user\@$host"); im_err("invalid password ($prompt).\n"); &savepass('imap', $auth, $host, $user, '') if ($agtfound && &usepwagent()); exit $EXIT_ERROR; } &savepass('imap', $auth, $host, $user, $pass) if ($interact && $pass ne '' && &usepwagent()); my $exists = imap_select($HANDLE, $ifld, 1); if ($exists < 0) { imap_close($HANDLE); im_die("can't access to $folder\n"); } elsif ($exists == 0) { imap_close($HANDLE); im_warn("no msgs in $folder\n"); return; } $set = imap_range2set($HANDLE, @msgs); } print "unlinking msgs in $folder..." unless ($opt_noharm || $opt_quiet); print "\n" if $opt_verbose; flush('STDOUT') unless $opt_noharm; if ($folder !~ /^%/) { my $i = 0; foreach (@paths) { if (! -f $_) { im_die("invalid message specification (unlinked $i message(s))\n"); } im_unlink($_); $i++; } } else { imap_delete($HANDLE, $set); imap_close($HANDLE); } print "done\n" unless ($opt_noharm || $opt_quiet); if ($folder !~ /^%/) { touch_folder($folder) unless $opt_noharm; } } __END__ =head1 NAME imclean - mail/news garbage cleanup =head1 SYNOPSIS B [OPTIONS] [FOLDER] [MSGS...] =head1 DESCRIPTION The I command delete all mail/news messages from +trash folder. If you do not want to delete all messages, specify message numbers. This command is provided by IM (Internet Message). =head1 OPTIONS =over 5 =item I<-s, --src=FOLDER> Set a folder to be cleaned up. "--src=+xxx" is equivalent to "+xxx". Default value is "+trash". =item I<-S, --sshserver=SERVER> SSH port relay server. =item I<-n, --noharm={on,off}> Do not delete files, show what will be performed. =item I<-q, --quiet={on,off}> Do not show any messages. =item I<-v, --verbose={on,off}> Print verbose messages when running. =item I<--debug=DEBUG_OPTION> Print debug messages when running. =item I<-h, --help> Display help message and exit. =item I<--version> Output version information and exit. =back =head1 COPYRIGHT IM (Internet Message) is copyrighted by IM developing team. You can redistribute it and/or modify it under the modified BSD license. See the copyright file for more details. =cut ### Copyright (C) 1997, 1998, 1999 IM developing team ### All rights reserved. ### ### Redistribution and use in source and binary forms, with or without ### modification, are permitted provided that the following conditions ### are met: ### ### 1. Redistributions of source code must retain the above copyright ### notice, this list of conditions and the following disclaimer. ### 2. Redistributions in binary form must reproduce the above copyright ### notice, this list of conditions and the following disclaimer in the ### documentation and/or other materials provided with the distribution. ### 3. Neither the name of the team nor the names of its contributors ### may be used to endorse or promote products derived from this software ### without specific prior written permission. ### ### THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND ### ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ### IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR ### PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE ### LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ### CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ### SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR ### BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ### WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE ### OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN ### IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ### Local Variables: ### mode: perl ### End: im-153/00usage0000644000000000000000000001354412776700423011675 0ustar rootroot IM Usage <<>> IM treats local mail folders, local/remote newsgroup spools, and local news folders. For historical reasons, mail folders start with "+" (e.g. "+inbox). Newsgroup spools are identified by the "-" keyword (e.g. "-gnu.emacs.sources"). Directories to store locally saved news messages are indicated by the "=" keyword (e.g. "=comp.lang.perl"). <<