精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>电脑技术>>● UNIX>>◆网络知识◆>>[转载]elm FAQ(中文)

主题:[转载]elm FAQ(中文)
发信人: [email protected]()
整理人: wwwyyyxxx(1999-08-23 22:11:19), 站内信件
出  处: rose.dlut.edu.cn

elm中文FAQ(Frequently Asked Questions)
Version: 0.1
Editor: [email protected]

 /* 版权没有,喜欢就好 */
 /* Any comments, please mail to [email protected]   */

1.  如何使elm去读除了"/usr/local/mail/<user>"的mailbox呢?

    elm是根据"MAIL"这个环境变数来读取正确的mailbox,所以如果想
    读取其它的mailbox只须type "setenv MAIL another-mailbox".

2.  如何存一个message而可以不用在save之後把它删除呢?


    按 C)opy(大写的C)来存,而不要按 s)aving来存.

3.  如何造出签名档(signature)?

    请在您的home directory造一个`.signature`的新档,编辑自己所
    喜爱的signature,然後在edit .elm/elmrc这个file如下:
    # remote ".signature" file to append to appropriate messages...
    remotesignature = ~/.signature
    localsignature = ~/.signature
    sigdashes = ON

4.  如何同时寄信给一大群人?

    type "fastmail -b `cat recipients` -s "subject" messages"

    recipients里放收信人的 full email addresses.

5.  如何确定寄出的信件是否被对方收到?

    请在$HOME/.elm底下造`elmheaders`这个file,并放进以下的内容:

     Return-Receipt-To: your email address

    这样所寄出的信件被对方系统收到以後,就会送一封回函给您.

6.  如何设定自动回信(Autoreplying)?

    执行`vacation`这个程式即可(这是一个interactive program),
    取消自动回信只须把`$HOME/.forward`这个file拿掉即可.

7.  include他人的信件时,系统设定是前面会加上">",如何改成其它的字元?

    修改`$HOME/.elm/elmrc`中"prefix"这个变数即可.

8.  在reply信件时,可否加上一小段引言让收信人晓得原信是由发出的呢?

    修改`$HOME/.elm/elmrc`,加上:
    # attribution string for replies ('%s' is the author of original
    # message)
    attribution = In our previous episode, %s said:

9.  如何造出/使用"alias"?

    9.1 User Aliases

        编辑"$HOME/.elm/aliases.text"这个file,档案内容由三个部份
        组成:

        aliasname = user real name = email address

        e.g.
        # Mail aliases for Tsay Yuh Dean
        sycheng = Cheng Hsiao Yang = [email protected]
        ching = Li Ching = [email protected]

    9.2 Group Aliases

        编辑"$HOME/.elm/aliases.text"这个file,档案内容由三个部份
        组成:

        aliasname = group name = email addresses (以","分隔)

        e.g.
        ta = TAs of CSIE = skhuang, chenjl, cmwang, jjyang

    9.3 Installing New Aliases

        当"$HOME/.elm/aliases.text"这个file编辑完成之後,请
        下"newalias"来安装它.

    9.4 Using Aliases

        在elm的主功能表底下按 a)lias, 然後再按 m)ail to alias 即可.

10. 习惯使用"mail"的我,是否能把".mailrc"转成".elm/aliases.text",
    然後改用"elm"而不必重建alias呢?


有的,提供您以下的程式:


              An awk Script for Translating Aliases
              from a Berkeley Mail .mailrc File
              to an Elm .elm/aliases.text File


BEGIN { print "# Elm .elm/aliases.text file, from a .mailrc file..."
     print ""
     }
next_line == 1 {
     next_line = 0;
     group = ""
     for (i = 1; i <= NF; i++) {
if (i == NF && $i == "\\") sep = ""
else sep = ", "
if ($i == "\\") {
group = sprintf("%s,", group)
next_line = 1;
}
else if (length(group) > 0)
         group = sprintf("%s%s%s", group, sep, $i);
       else
         group = $i;
       }
       print "\t" group
     }
$1 ~ /[Aa]lias | [Gg]roup/ {
     if ( NF == 3)
       print $2 " = user alias = " $3;
     else {
       group = ""
       for (i = 3; i <= NF; i++) {
if (i == NF && $i == "\\") sep = ""
else sep = ", "
if ($i == "\\") {
group = sprintf("%s,", group)
next_line = 1;
}
else if (length(group) > 0)
           group = sprintf("%s%s%s", group, sep, $i);
         else
           group = $i;
         }
         print $2 " = group alias = " group;
       }
     }


--

Yuh-Dean Tsay ( 蔡 育 典 )
--------------------------
Email: [email protected]
Phone: 886-035-712121 ext:3707,3708,3709(office)
                          3745454545(lab)
       886-08-8322997(home)
------------------------------------------------

=== == === == === == === == === == === == === == === == === == === == === ==

发信人: Olies@phoenix (吉尔菲艾斯), 信区: Unix
标  题: Re: ELM 问题
发信站: 交大资工凤凰城资讯站 (Sep 24 19:39:57 1993)
转信站: phoenix dragon cis_nctu

==> 在 soonly 的文章内提到 ...
:
:    各位网友:
:
:        最近刚知道有ELM 这东西,好奇之下试了一试,可是原来在MAIL下可以
:    显示中文的,到了ELM 下却无法显示,我该如何做才能显示中文?另外那里
:    可以找到ELM 的USER GUIDE?
:
:                                                      SOONLY
你可以在ELM中,将display mode 由内建改为 more ,方法进入ELM,再按 "o"
之後就按照它的提示去修改。若你的shell为tcsh,则set 你的环境变数
setenv LC_CTYPE iso_8859_1 即可,因为ELM有支援8 bits

=== == === == === == === == === == === == === == === == === == === == === ==
发信人: [email protected] (), 信区: Unix
标  题: Re: elm and joe
发信站: 交大资工天龙新闻社 (Dec 29 21:47:03 1993)
转信站: bbsnews dragon cis_nctu

Jason Lien ([email protected]) wrote:
:   我在elm下用joe编辑一封信,信会寄出去,可是收信人却没办法看到信的
: 内容。如果我把ediotr改程vi的话,就没问题。请问要如何更改joe才能使
: 信件的内容让收信人才能看的到。

   使用 joe 时,信件的最後一列要额外加一列空白,就可以了。


=== == === == === == === == === == === == === == === == === == === == === ==
发信人: junlin@cis_nctu (陈俊麟), 信区: Unix
标  题: Re: Where get the elm guide
发信站: 交大资科系_BBS (Nov  6 14:31:12 1993)
转信站: cis_nctu

==>[Author]: "daniel" on board 'Unix'
> 发信站: 交大资工天龙新闻社 (Nov  2 11:32:08 1993)
>
> :        I need elm guide for study. Where I can get it?
>    dsinc.dsi.com:/elm/elm.ps.tar.Z

    嗨,
     CCCA 有一份 mirror, 在 /packages/mail/elm 下.
     我想这对 TANET 使用者会方便一点.
     J.L. Chen

=== == === == === == === == === == === == === == === == === == === == === ==
发信人: [email protected] (Shung-I You), 信区: Unix
标  题: Re: 有关 elm ?????
发信站: 交大资工 News Server (Wed Mar  2 12:03:14 1994)
转信站: daniel info4 news.csie bbsgate bbsnews dragon cis_nctu

樱木花道 (Fucc@nctu_csie_bbs) wrote:
:      我在看完 elm 的信後,不小心按错,把所有的信放入了 received ...:~~~

:      有没有办法再 load 回来 ????

    elm -f received

=== == === == === == === == === == === == === == === == === == === == === ==
发信人: [email protected] (Jackie Yeh), 信区: Unix
标  题: [Q]elm problem 发信站: 交大资工天龙新闻社 (Nov 26 20:42:36 1993)
转信站: bbsnews dragon cis_nctu

当我在elm □寄信出去的时後,总会多收到一封信,抬头为:
        (Whenever I send a e-mail in elm, I always received one more
         mail subjected :  )
    Returned mail:Service unaviliable

内容的一部份为:
(Part of the mail are:)

   ----- Transcript of session follows -----
Cannot exec '/bin/sh' errno=13
554 "|/usr/ucb/vacation u7913039"... Service unavailable
   ----- Unsent message follows -----
Return-Path: <u7913039>
Received: from ccsun33.cc.nctu.edu.tw by cc.nctu.edu.tw (4.1/SMI-4.1)
          (以下略) (skiped)

请问我是不是那□设定错了?
(Would you tell me what's wrong with my set-up in elm?)

=== == === == === == === == === == === == === == === == === == === == === ==
发信人: [email protected] (Shih-Kun Huang), 信区: Unix
标  题: Re: [Q]elm problem
发信站: 交大资工天龙新闻社 (Nov 26 23:40:55 1993)
转信站: bbsnews dragon cis_nctu

It's because CC disable "/bin/sh" in sendmail.cf to solve
the recent sendmail security hole.
You can't use any command sequence for pipe or redirection
in your .forward. It's not your problem but the changing of
CC 's sendmail configuration.
Before the sendmail patch released and CC enabling /bin/sh function
for sendmail, you can't use vacation any more.

=== == === == === == === == === == === == === == === == === == === == === ==
发信人: [email protected] (Hsiao-Yang Cheng), 信区: Unix
标  题: Re: [Q]elm problem
发信站: 交大资工天龙新闻社 (Nov 27 01:16:45 1993)
转信站: bbsnews dragon cis_nctu

  Elm has a good utility like "vacation", but it won't use pipe. Please man
"autoreply" for detail. The disadvantage is that system should run a daemon
"arepdaemon" in advance (in rc ?!).

=== == === == === == === == === == === == === == === == === == === == === ==

发信人: ming@cis_nctu (郑宗明), 信区: Unix
标  题: Re: ELM 2.4?
发信站: 交大资科系_BBS (Nov  4 05:45:40 1993)
转信站: cis_nctu

==>[Author]: "Martin" on board 'Unix'
> 发信站: 交大资工凤凰城资讯站 (Nov  2 19:00:27 1993)
>
> 请问 elm 2.4 可否使用中文标题(Subject)? elm2.3pl11 可以吗?
                   ^^^^^^^^^^^^^^^^^^^^^!!
> 谢谢!
> --
>                                          Name : 黄俊杰(Jyun4-jieh2 Huang2)
>                                          E-mail: [email protected]
>                                          交大电信系八六级B班

若从 source code 下手的话, 答案是 [可以], 交大资科计中的
Sun workstations 上的 "cissunXX:/usr/local/bin/elm"
就是修改过的, 使 use 不必做什麽设定, 中文自然可用.

要修改的地方也不是很多, 在 elm source directory 的
  src/builtin.c
  src/curses.c
  src/in_utils.c
这三个档案.

以下就以 [ELM 2.4 PL23] 做示□:
(PS: 若有不当修改的地方, 请让我也知道.)

(1)********* src/builtin.c ***************************************************
   在 function "int next_line(....)" 的尾端:

         ................

          } else if(isprint(*iptr & 0xff)) {
         ------------------------------------> 这列改为 "} else {"
                                               将 if statement 拿掉.
            *optr++ = *iptr++;
            chars_output++;
            --ilen;
      /------------ 这段全数删除 -------------------------------------------\
      |  } else {                                                           |
      |    if(chars_output + 2 <= width) { |
| *optr++ = '^'; |
| *optr++ = (*iptr == '\177' ? '?' : (*iptr&0177) + 'A' - 1); |
| iptr++; --ilen; |
| chars_output += 2; |
| } else { |
| break; |
| } |
\---------------------------------------------------------------------/
}
}
*optr = '\0';
*inputptr = iptr;
*inputlenptr = ilen;
*outputlenptr = chars_output;
return(ret_val);
}

(2)******* src/curses.c ***************************************************
在 function "Writechar(ch)" 的 "#ifdef ASCII_CTYPE" 的地方:

......................

else {


/* <-------------------------------- 加上这个 comment
#ifdef ASCII_CTYPE
if(!isascii(ch) || !isprint(ch))
#else
if(!isprint(ch))
#endif
*/ <-------------------------------- 加上这个 comment

/------------ 再加上这一段 -----------------------------------\
| if ((ch < 0x07) || ((ch >= 0x10) && (ch < 0x1b)) || |
| ((ch > 0x1b) && (ch < 0x20))) |
\------------------------------------------------------------
ch = '?';

if (_col == COLUMNS - 1) {
putchar(ch);
if (!_automargin || _eatnewlineglitch) {
putchar('\r');
putchar('\n');

......................


(3)******* src/in_utils.c ****************************************************
将这个程式内的仅有的两个 "Writechar('\007');" 以下面的 codes 取代:

/---------------------------------------------------------\
| ch &= 0x00ff; |
| if ((ch < 0x07) || ((ch >= 0x10) && (ch < 0x20))) |
| Writechar('\007'); |
| else { |
| escaped = OFF; |
| Writechar(ch); |
| string[iindex++] = ch; |
| } |
\---------------------------------------------------------/

============================== END ==========================================

--
T.M. Jeng
=== == === == === == === == === == === == === == === == === == === == === ==
发信人: [email protected] (Shih-Kun Huang), 信区: Unix
标 题: Re: ELM 2.4?
发信站: 交大资工天龙新闻社 (Nov 5 21:56:26 1993)
转信站: bbsnews dragon cis_nctu

郑宗 (ming@cis_nctu) wrote:
: ==>[Author]: "Martin" on board 'Unix'
: > 发信站: 交大资工凤凰城资讯站 (Nov  2 19:00:27 1993)
: >
: > 请问 elm 2.4 可否使用中文标题(Subject)? elm2.3pl11 可以吗?
:                    ^^^^^^^^^^^^^^^^^^^^^!!
: 若从 source code 下手的话, 答案是 [可以], 交大资科计中的
: Sun workstations 上的 "cissunXX:/usr/local/bin/elm"
: 就是修改过的, 使 use 不必做什麽设定, 中文自然可用.
Since you are using SUN and elm2.4, why not only add the following
lines in the source of "main()" function:
#include <locale.h>
..
main()
{
setlocale(LC_CTYPE,"iso_8859_1");
.....
}

Then chars in the range 0x20 - 0xFE is printable by
isprint test. Since no BIG5 in the range of 0-0x20,
isprint test won't lost.

=== == === == === == === == === == === == === == === == === == === == === ==
发信人: [email protected] (Hsiao-Yang Cheng), 信区: Unix
标  题: Re: ELM 2.4?
发信站: 交大资工天龙新闻社 (Nov  7 12:04:15 1993)
转信站: bbsnews dragon cis_nctu

ming@cis_nctu wrote:

> My original method can work on different platforms of some unix vendors.
> But "setlocale(LC_CTYPE,"iso_8859_1");" is an easy and nice approach on
   ^^^^^^^^^^^ 只要针对不同的 OS 设对此参数即可,
       用不著改 source 那麽大费周章. 这样出
       新版时也能轻易的处理. LOCALE function,
       几乎所有 unix 都有 support.
> Sun workstations.  Thanks for your information.

=== == === == === == === == === == === == === == === == === == === == === ==

发信人: [email protected] (♂cmc), 信区: Unix
标  题: Re: 被无聊男子的email骚扰,如何去refuse 他的mail呢?
发信站: 交大资工凤凰城资讯站 (Wed Jul 26 09:26:45 1995)
转信站: Palmarama!netnews.ntu!news.csie.nctu!phoenix

==> 在 [email protected] (姆莱中将) 的文章中提到:
: ==>[作者]: [email protected](看到□有点动心!) 在 Unix 讨论区中提到:
: >   最近一直被一个男孩用 email 骚扰,请问如何让系统自动拒绝或退回他的信,真的
: > 快被烦得受不了,谢谢你的帮忙.
我记得有一个方法可以耶....
在 ~/.forward中加入一行 "|/usr/local/bin/filter"
(filter是elm所附的utility)
同时在 ~/.elm/filter-rules中加一行
if (from="[email protected]") delete
只要是[email protected]寄来的信就被delete掉耶...

--
         红      尘      有      爱
 □□□□□□□□□□□□□□□□□□□□□□□□□□
 □□    美  丽  的  梦                          □□
 □      留  下  美  丽  的  忧  伤              □□
 □□  □人  间  天  上  、  代  代  相  传      □□
 □□□□□□□□□□□□□□□□□□□□□□□□□□

--
☆ [Origin: ◎椰林风情◎] [From: woju.g1.ntu.edu.tw ] [Login: **] [Post: **]

--
※ 来源:.碧海青天 bbs.dlut.edu.cn.[FROM: 202.118.65.49]

[关闭][返回]