跳到主要内容

4. 示例

下面是一个 (刻意简短的) 示例, 用以说明语法:

   ----- cut here -----
//Test JOB
Distribute mail Ack=mail Debug=yes
//To DD *
[email protected] BSMTP
[email protected] BSMTP
[email protected] BSMTP
[email protected] BSMTP
[email protected] BSMTP
/*
//Data DD *,EOF
Date: Tue, 19 Jan 1993 10:57:29 -0500
From: Robert H. Smith <[email protected]>
Subject: Re: Problem with V5.41
To: [email protected]

I agree with Jack, V5.41 is not a stable release. I had to fall back
to V5.40 within 5 minutes of installation...

Bob Smith
----- cut here -----

说明: 其中部分主机名是真实的, 但用户名全是虚构的.

你会收到如下回复:

   --------------------------------------------------------------------
Job "Test" started on 20 Feb 1993 01:09:40

> Distribute mail ack=mail debug=yes
Debug trace information:

ABC.COM goes to SEARN (213) - single recipient
ALPHA.CC.BUFFALO.EDU goes to UBVM (027) - single recipient
LIBRARY.RICE.EDU goes to RICEVM1 (022) - single recipient
TAMVM1 goes to TAIVM1 (247) - single recipient
WS-4.XYZ.EDU goes to SEARN (213) - single recipient

Path information:

TAIVM1 : UGA RICEVM1 TAIVM1
UBVM : UGA UBVM
RICEVM1 : UGA RICEVM1

(Debug) Mail forwarded to LISTSERV@UGA for 3 recipients.
(Debug) Mail posted via BSMTP to [email protected].
(Debug) Mail posted via BSMTP to [email protected].

Job "Test" ended on 20 Feb 1993 01:09:40

Summary of resource utilization
-------------------------------
CPU time: 0.086 sec Device I/O: 6
Overhead CPU: 0.045 sec Paging I/O: 5
CPU model: 9221 DASD model: 3380
--------------------------------------------------------------------

要真正执行分发并获取确认, 你需要把前两行改成如下形式:

   ----- cut here -----
//Test JOB Echo=NO
Distribute mail Ack=mail
--------------------

而你会收到如下回复:

   --------------------------------------------------------------------
Mail forwarded to LISTSERV@UGA for 3 recipients.
Mail posted via BSMTP to [email protected].
Mail posted via BSMTP to [email protected].
--------------------------------------------------------------------

最后, 去掉 "Ack=mail" 关键字, 你就可以执行一次没有任何确认的 "silent" (静默) 分发, 适用于生产模式.