[index] CentreCOM x330シリーズ コマンドリファレンス 5.5.1
awplus(config)# mail from manager@bulbul.example.com ↓
awplus(config)# mail smtpserver 172.17.28.1 ↓ または awplus(config)# mail smtpserver smtp.example.com ↓
awplus(config)# end ↓ awplus# show mail ↓ Mail Settings ------------------------------------------------------------ State : Alive SMTP Server : 172.17.28.1 Host Name : manager@bulbul.example.com Debug : Disabled Messages ------------------------------------------------------------ There is no mail in the queue.
Note必須ではありませんが、システム時刻とタイムゾーンも正しく設定しておくことをおすすめします。詳細は「運用・管理」の「システム」をご覧ください(「システム時刻の設定」)。
awplus# mail to admin@example.com subject test1 ↓ Type the message below and finish with a CTRL-d This is a test. ↓ <Ctrl/D> Sending /var/spool/mqueue/20120814091804.8319... ok.
Noteメール本文を対話的に入力する場合は、本文中で疑問符(?)を使用しないでください。本文に疑問符を使いたいときは、メール本文を別途テキストファイルとして用意しfileパラメーターで該当テキストファイルを指定してください(次項を参照)。
Return-Path: <manager@bulbul.example.com> Received: from bulbul.example.com ([172.17.28.187]) by thrush.example.com (8.11.6/8.11.6) with SMTP id l7E0IwE15347 for <admin@example.com>; Tue, 17 Jan 2012 09:18:58 +0900 (JST) (envelope-from manager@bulbul.example.com) Message-Id: <201201170018.l7E0IwE15347@thrush.example.com> Received: by bulbul.example.com (nbSMTP-1.00) for uid 0 manager@bulbul.example.com; Tue, 17 Jan 2012 09:18:04 +0900 (JST) Subject: test1 From: <manager@bulbul.example.com> To: <admin@example.com> Date: Tue, 17 Jan 2012 09:18:58 +0900 (JST) This is a test.
awplus# mail to admin@example.com subject test2 file mailbody.txt ↓ Sending /var/spool/mqueue/20120202043556.13821... ok.
Noteリダイレクションを使用し、任意のコマンド出力をファイルに書き出すことで、該当ファイルをメール本文として送ることもできます。
awplus# show mail ↓ Mail Settings ------------------------------------------------------------ State : Alive SMTP Server : 172.17.28.1 Host Name : manager@bulbul.example.com Debug : Disabled Messages ------------------------------------------------------------ To : admin@example.com Subject : test3 Message-ID : 20120202043645.30177
awplus# delete mail mail-id 20120202043645.30177 ↓ awplus# show mail ↓ Mail Settings ------------------------------------------------------------ State : Alive SMTP Server : 172.17.28.1 Host Name : manager@bulbul.example.com Debug : Disabled Messages ------------------------------------------------------------ There is no mail in the queue.
awplus(config)# mail smtpserver authentication crammd5 username manager password terCe2u2T1m!h ↓
awplus(config)# no mail smtpserver authentication ↓
awplus(config)# mail smtpserver port 587 ↓
awplus(config)# no mail smtpserver port ↓
%N | ホスト名。hostnameコマンドで設定したもの |
%S | シリアル番号。show system serialnumberコマンドで表示されるものと同じ |
%T | システム日時(ローカル時刻) |
%D | システム日時(ローカル時刻) |
%L | システム日時(ローカル時刻) |
%U | システム日時(UTC) |
Note%T、%D、%L は同じ内容です。また、タイムゾーン(clock timezoneコマンド)がUTCの場合は %U も同じ内容になります。
box301# mail to manager@example.com subject "%N (%S) %T" ↓
box301 (X000000000000000) 2018-06-28T10:04:32+0900
(C) 2021 アライドテレシスホールディングス株式会社
PN: 613-003032 Rev.B