NetWorker:如何在Linux設定電子郵件通知

Summary: 如何在Linux設定電子郵件通知

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

部署在 Linux 上的 NetWorker 伺服器使用 Linux 郵件 image.png命令,透過電子郵件傳送 NetWorker 記錄。此功能視非 NetWorker 環境組態而定。

郵件指令的基本語法:

mail [-s <mail server hostname or IP>] -s “<subject>” -r <sender_email> <recipient_email1> [<recipient_email2>]


不一律需要指定郵件伺服器。在某些環境中,郵件伺服器會由指定的收件者電子郵件位址接收。 

範例: 

mail -s “${NSR} ${policy} ${workflow} ${status}” -r bkupadmin@emclab.local backupadmin@dell.com


在 NetWorker 中設定電子郵件通知之前,郵件命令應從 NetWorker 伺服器的命令行執行,以確保已收到電子郵件。

例子:

image.png
當您執行郵件命令時,該命令會下降到新的行,沒有提示。您可以輸入測試訊息 (如上所示)。在新線路上輸入 (期間),將返回 EOT。 

收件者的電子郵件位址應收到電子郵件訊息。如果收到電子郵件,您可以在 NetWorker 中設定通知:

 

故障診斷:

如果未收到電子郵件訊息,則可執行一些步驟來識別問題。

1.是伺服器上執行的修正程式後服務:
a.若要檢查 Postfix 是否正在執行,請執行:
systemctl 狀態 postfix

B。如果未執行,可以啟動:
systemctl 啟動 postfix

c. 如果發現任何問題,請檢查:
systemctl 狀態 postfix
journalctl -xe

d. 確認 Postfix 是否已設定為在系統重新啟動後啟動:
systemctl enable postfix
 
注意:如果未啟用,您會看到一則訊息,說明為系統建立的 symlink。如果已啟用,則不會輸出任何訊息,並傳回提示。

 
2.如果您已指定「<郵件伺服器主機名或IP>」,請確認您可從 NetWorker 伺服器連至郵件伺服器。
a.NetWorker 隨附 nsrports 命令,可用於測試名稱解析度和網路連線能力。確認您可以在郵件伺服器上連接連接埠 25 (預設 SMTP):
nsrports -t mailserver_hostname -p 25

例子:
image.png

其他疑難解答解決方法和連線能力的方法:
 
B。主機名解析是否有效: 
nslookup mailserver_fqdn
nslookup mailserver_shortname
nslookup
mailserver_ip

c. 檢查 /etc/host 檔案是否有郵件伺服器的任何專案。如果發現任何不正確的專案,請設定正確的IP位址或移除專案:
cat /etc/hosts
 
d. 連接埠 25 是否使用 curl 命令回應:
curl -v mailserver_hostname:25

例子:
image.png
 
3.檢查信件佇列以檢視是否傳回任何錯誤: 
mailq

例子:
image.png
如果 mailq 命令未傳回任何內容,則郵件隊列為空白。 

上述步驟中發現的任何問題,都必須由環境中適當的系統管理員解決。 
 

Affected Products

NetWorker

Products

NetWorker
Article Properties
Article Number: 000019459
Article Type: How To
Last Modified: 07 Aug 2025
Version:  7
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.