忍者ブログ

◆当blogは、Linuxサーバ構築する際の実際の設定手順を個人的メモとして記載しております。LinuC試験の役に立つ情報があるかも…?

LinuC(Linux技術者認定資格)&リナックスサーバ構築設定事例

   

【mailコマンド】の使用例

[root]# mail←未読メールを読む場合
Mail version 8.1 6/6/93.  Type ? for help.
"/var/spool/mail/root": 5 messages 5 new
>N  1 root@reverie.example  Fri Oct 15 23:42  19/819   "Anacron job 'cron.daily'"
 N  2 root@reverie.example  Tue Oct 19 22:30  56/1735  "LogWatch for reverie.example.com"
 N  3 root@reverie.example  Tue Oct 19 22:31  19/821   "Anacron job 'cron.daily'"
 N  4 root@reverie.example  Mon Nov  1 14:52  19/818   "Anacron job 'cron.daily'"
 N  5 root@dgx.example.com  Wed Nov  3 15:29  19/796   "Anacron job 'cron.daily'"
& t1←メールを選択
Message 1:
From root@reverie.example.com  Fri Oct 15 23:42:19 2010
Date: Fri, 15 Oct 2010 23:42:18 +0900
From: root@reverie.example.com (Anacron)
To: root@reverie.example.com
Subject: Anacron job 'cron.daily'

/etc/cron.daily/tripwire-check:
****    Error: Tripwire database for reverie.example.com not found.    ****
**** Run /etc/tripwire/twinstall.sh and/or tripwire --init. ****

[root]# ls -al mbox
-rw-------    1 root     root         5044 11月  3 15:38 mbox

[root]# mail -f←既読メールを読む場合

[root]# mail -s test-mail reverie@example.com←メールを作成して送る
TEST MAIL.
.
Cc:

[root]# tail /var/log/maillog←メールのログ確認
Nov  3 15:43:11 reverie sendmail[1764]: oA36hBj5001764: from=root, size=55, class=0, nrcpts=1, msgid=<201011030643.oA36hBj5001764@reverie.example.com>, relay=root@localhost
Nov  3 15:43:11 reverie sendmail[1766]: oA36hB0K001766: from=<root@reverie.example.com>, size=346, class=0, nrcpts=1, msgid=<201011030643.oA36hBj5001764@reverie.example.com>, proto=ESMTP, daemon=Daemon0, relay=localhost.localdomain [127.0.0.1]
Nov  3 15:43:11 reverie sendmail[1764]: oA36hBj5001764: to=reverie@example.com, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30044, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (oA36hB0K001766 Message accepted for delivery)
Nov  3 15:43:11 reverie sendmail[1767]: oA36hB0K001766: to=<reverie@example.com>, ctladdr=<root@reverie.example.com> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=pmlocal, pri=30549, dsn=2.0.0, stat=Sent

PR

COMMENT

Name
Title
Mail(非公開)
URL
Color
Emoji Vodafone絵文字 i-mode絵文字 Ezweb絵文字
Comment
Pass   コメント編集に必要です
 管理人のみ閲覧

TRACKBACK

Trackback URL:

更新日付

03 2025/04 05
S M T W T F S
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30

RECOMMEND

プロフィール

HN:
Account
HP:
性別:
非公開
職業:
--- NODATA ---
趣味:
--- NODATA ---
自己紹介:
◆当blogは、Linuxサーバ構築する際の実際の設定手順を個人的メモとして記載しております。LinuC試験の役に立つ情報があるかも…?

リンク

<<【WWWサーバ】の設定メモ  | HOME |  【pop3有効化】の設定メモ>>
Copyright ©  -- LinuC(Linux技術者認定資格)&リナックスサーバ構築設定事例 --  All Rights Reserved
Design by CriCri / Photo by Melonenmann / powered by NINJA TOOLS / 忍者ブログ / [PR]