Monday, May 26, 2008

Check user mailbox

以往測end user有沒有收到信時,總是習慣切到此使用者執行mail看看有沒有收到信件,今天發現了兩個方法可以不用這麼地麻煩的切換到此使用者,方法如下:

[root@vir1 ~]# mail -u lawrence
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/lawrence": 2 messages 1 new
1 MAILER-DAEMON@vir1.e Mon May 26 13:42 13/552 "DON'T DELETE THIS MES"
>N 2 root@vir1.example.co Mon May 26 17:35 20/714 "test1"
&
Message 2:
From root@vir1.example.com Mon May 26 17:35:49 2008
X-Original-To: qa@vir1.example.com
Delivered-To: qa@vir1.example.com
Date: Mon, 26 May 2008 17:35:48 +0800
From: root
To: qa@vir1.example.com
Subject: test1

CentOS release 5 (Final)
Kernel \r on an \m

or

[root@vir1 ~]# mail -f /var/spool/mail/lawrence
Mail version 8.1 6/6/93. Type ? for help.
"/var/spool/mail/lawrence": 2 messages 1 new
1 MAILER-DAEMON@vir1.e Mon May 26 13:42 13/552 "DON'T DELETE THIS MES"
>N 2 root@vir1.example.co Mon May 26 17:35 20/714 "test1"
&
Message 2:
From root@vir1.example.com Mon May 26 17:35:49 2008
X-Original-To: qa@vir1.example.com
Delivered-To: qa@vir1.example.com
Date: Mon, 26 May 2008 17:35:48 +0800
From: root
To: qa@vir1.example.com
Subject: test1

CentOS release 5 (Final)
Kernel \r on an \m

No comments: