vacation (自动电子邮件响应器)

舞夕之 发表于 2020-07-21 16:30
浏览次数:
在手机上阅读

VOLAGE命令配置自动电子邮件响应器。收到电子邮件后,发件人会收到一封回复电子邮件,说明您将缺席一段时间。

查看英文版

目录

1 vacation 运行系统环境

2 vacation 语法

3 vacation 示例

vacation 运行系统环境

unix

Unix&Linux

vacation 语法

vacation -i [-r interval]
vacation -l
vacation -x
vacation [-a alias] [-d] [-f db] [-m msg] [-j] [-z] login

选项

-a alias 以与接收用户登录名相同的方式处理别名消息。
-d 将消息打印到stderr(标准错误)而不是syslog(系统日志)。
-fdb 使用db作为数据库文件。
-m msg 使用msg作为消息文件。
-j 即使在“To:”或“Cc:”标题中找不到我们的地址,也请回复该消息。此选项非常危险,应格外小心。
-z 将回复邮件的信封发件人设置为“<>”。
-i 初始化休假数据库文件。在修改.forward文件之前,应先使用它。
-r interval 将回复间隔设置为间隔天数。默认值为一周。间隔“0”表示将对每个消息发送答复,间隔“infinite”(实际上是任何非数字字符)将永远不会发送多个答复。应当注意的是,间隔“0”非常危险,因为它使邮件发送程序进入“我在休假”循环。
-x 从标准输入中读取地址列表,每行一个,并将其添加到Vacation数据库。来自这些排除地址的邮件将不会得到答复。可以使用语法“@domain”排除整个域。
-l 打印休假数据库文件的内容。对于每个条目,答复已发送到的地址以及相关的时间将被打印到标准输出中。

当开始时不带任何参数时,Vacation将引导用户完成配置过程。

除非登录(或使用-a选项提供的别名)是邮件的“To:”或“Cc:”标头的一部分,否则不会发送任何消息。从“无消息??? - REQUEST”,“邮政”,“UUCP”,“MAILER”或“MAILER-DAEMON”将回复至(其中这些字符串是不区分大小写),也不是,如果一个“发送的通知优先级:邮件标题中包含“:批量”,“优先级:列表”或“优先级:垃圾”行。.vacation.db在主目录中。

假期需要一个文件.vacation.msg,在你的主目录,包含一个消息被发送回每个发件人。它应该是完整的消息(包括标题)。例如,它可能包含:

From: eric@CS.Berkeley.EDU (Eric Allman)
Subject: I am on vacation
Delivered-By-The-Graces-Of: The Vacation program
Precedence: bulk
I am on vacation until July 22. If you have something urgent,
please contact Keith Bostic .
--eric

字符串出现的任何$ SUBJECT在.vacation.msg将被触发的休假计划消息的主题所取代。

Vacation从标准输入中读取传入的消息,检查UNIX的“From”行或“Return-Path”头的消息头,以确定发送者。如果两者都存在,则使用“Return-Path”标头中的发送者。Sendmail自动包含此“发件人”行。

致命错误(例如,使用不正确的参数调用vacation或不存在的登录名)使用syslog记录在标准错误输出和系统日志文件中。

vacation -i [-r interval]
vacation -l
vacation -x
vacation [-a alias] [-d] [-f db] [-m msg] [-j] [-z] login
Options
-a alias Handle messages for alias in the same manner as those received for the user's loginn ame.
-d Print messages to stderr (standard error) instead of syslog (the system log).
-f db Uses db as the database file.
-m msg Uses msg as the message file.
-j Reply to the message even if our address cannot be found in the "To:" or "Cc:" headers. This option is very dangerous and should be used with extreme care.
-z Set the envelope sender of the reply message to "<>".
-i Initialize the vacation database files. It should be used before you modify your .forward file.
-r interval Set the reply interval to interval days. The default is one week. An interval of "0" means that a reply is sent to each message, and an interval of "infinite" (actually, any non-numeric character) will never send more than one reply. It should be noted that intervals of "0" are quite dangerous, as it allows mailers to get into "I am on vacation" loops.
-x Reads a list of addresses from standard input, one per line, and adds them to the vacation database. Mail coming from these excluded addresses will not get a reply. Whole domains can be excluded using the syntax "@domain".
-l Print the contents of the vacation database files. For each entry, the address the reply has been sent to and the associated time will be printed to standard output.

When started without any arguments, vacation will guide the user through the configuration process.

No message will be sent unless login (or an alias supplied using the -aoption) is part of either the "To:" or "Cc:" headers of the mail. No messages from "???-REQUEST", "Postmaster", "UUCP", "MAILER", or "MAILER-DAEMON" will be replied to (where these strings are case insensitive) nor is a notification sent if a "Precedence: bulk", "Precedence: list" or "Precedence: junk" line is included in the mail headers. The people who have sent you messages are maintained as a database in the file .vacation.db in your home directory.

vacation expects a file .vacation.msg, in your home directory, containing a message to be sent back to each sender. It should be an entire message (including headers). For example, it might contain:

From: eric@CS.Berkeley.EDU (Eric Allman)
Subject: I am on vacation
Delivered-By-The-Graces-Of: The Vacation program
Precedence: bulk
I am on vacation until July 22. If you have something urgent,
please contact Keith Bostic .
--eric

Any occurrence of the string $SUBJECT in .vacation.msg will be replaced by the subject of the message that triggered the vacation program.

vacation reads the incoming message from standard input, checking the message headers for either the UNIX "From" line or a "Return-Path" header to determine the sender. If both are present the sender from the "Return-Path" header is used. Sendmail includes this "From" line automatically.

Fatal errors, such as calling vacation with incorrect arguments, or with non-existent logins, are logged on the standard error output and in the system log file, using syslog.

查看英文版

查看中文版

vacation 示例

vacation

提示您配置应在您缺席时发送的自动电子邮件响应。

vacation

Prompts you to configure the automatic e-mail responses that should be sent in your absence.

查看英文版

查看中文版

其他命令行

vmstat | visudo | vim\gview\gvim | vgrind | vipw | vi |

如此好文,分享给朋友
发表评论
验证码:
评论列表
共0条