可以创建一个 .forward.hostname 文件,以重定向发送至特定主机的邮件。例如,如果用户的别名已从 sandy@phoenix.example.com 更改为 sandy@example.com,请在 sandy 的起始目录中放入一个 .forward.phoenix 文件。
% cat .forward.phoenix sandy@example.com "|/usr/bin/vacation sandy" % cat .vacation.msg From: sandy@example.com (via the vacation program) Subject: my alias has changed My alias has changed to sandy@example.com. Please use this alias in the future. The mail that I just received from you has been forwarded to my new address. Sandy |
在本示例中,在通知发件人发生别名更改后,可将邮件转发至正确地址。由于 vacation 程序仅允许一个邮件文件,因此每次仅能转发一封邮件。但是,如果邮件不是特定于主机,则 .forward 文件可将一个休假邮件文件用于多台主机。