linux下發郵件的配置
linux 5環境下
1.解壓安裝郵件軟體
1. # tar jxvf mailx-12.4.tar.bz2
2. # cd mailx-12.4
3. # make
4. # make install UCBINSTALL=/usr/bin/install
2.配置郵件軟體
在/etc/nail.rc最後幾行加上如下資訊
# vi /etc/nail.rc
*********add the below in the end of nail.rc
set from=mdssysmail@mdsets.cn smtp=10.98.10.120
set smtp-auth-user=mdssysmail@mdsets.cn
set smtp-auth-password=Mitacmds5202
set smtp-auth=login
或者只加set from=mdssysmail@mic.com.tw smtp=10.98.0.211也可以,
如果只加set from=mdssysmail@mic.com.tw smtp=10.98.0.211不行就需要加上使用者名稱密碼和login
3.測試郵件傳送
#echo `date` |/usr/local/bin/mailx -s "Linux 10.4"luxus.liao@mic.com.tw
--linux 5下面不能直接使用mailx,因為which mailx時這個mailx是/bin/mailx,是不會讀取/etc/nail.rc檔案內容的
linux 6環境下
直接配置/etc/mail.rc檔案,新增如下
set from=db_alert@hrq.com smtp=mail.hrq.com
set smtp-auth-user=db_alert@hrq.com
set smtp-auth-password=1qaz@WSX
set smtp-auth=login
測試郵件傳送
#echo `date` |mailx -s "Linux 10.4"luxus.liao@mic.com.tw
1.解壓安裝郵件軟體
1. # tar jxvf mailx-12.4.tar.bz2
2. # cd mailx-12.4
3. # make
4. # make install UCBINSTALL=/usr/bin/install
2.配置郵件軟體
在/etc/nail.rc最後幾行加上如下資訊
# vi /etc/nail.rc
*********add the below in the end of nail.rc
set from=mdssysmail@mdsets.cn smtp=10.98.10.120
set smtp-auth-user=mdssysmail@mdsets.cn
set smtp-auth-password=Mitacmds5202
set smtp-auth=login
或者只加set from=mdssysmail@mic.com.tw smtp=10.98.0.211也可以,
如果只加set from=mdssysmail@mic.com.tw smtp=10.98.0.211不行就需要加上使用者名稱密碼和login
3.測試郵件傳送
#echo `date` |/usr/local/bin/mailx -s "Linux 10.4"luxus.liao@mic.com.tw
--linux 5下面不能直接使用mailx,因為which mailx時這個mailx是/bin/mailx,是不會讀取/etc/nail.rc檔案內容的
linux 6環境下
直接配置/etc/mail.rc檔案,新增如下
set from=db_alert@hrq.com smtp=mail.hrq.com
set smtp-auth-user=db_alert@hrq.com
set smtp-auth-password=1qaz@WSX
set smtp-auth=login
測試郵件傳送
#echo `date` |mailx -s "Linux 10.4"luxus.liao@mic.com.tw
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/30126024/viewspace-2139889/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux下使用Perl來發信郵件過程Linux
- Laravel 郵件配置Laravel
- sql 郵件配置SQL
- seafile QQ郵件的配置
- linux mail利用外部郵箱地址發郵件LinuxAI
- Linux下避免生成系統郵件的方法Linux
- 郵件開發:接收解析郵件
- 配置linux使用mail傳送郵件到163郵箱LinuxAI
- 發郵件的例子
- Linux伺服器---郵件服務postfix配置Linux伺服器
- 郵件開發:複雜郵件的一個示例
- Nagios警告郵件的特殊配置iOS
- 郵件客戶端的配置使用客戶端
- 群發郵件
- shell發郵件
- oracle 發郵件Oracle
- Linux伺服器---郵件伺服器openwebmail配置Linux伺服器WebAI
- linux下設定郵件自動傳送Linux
- Linux發郵件磁碟空間監控Linux
- 發郵件的SMTP配置(smtpserver = ''192.168.1.100')Server
- Linux配置msmtp+mutt傳送郵件(可放在指令碼中定時傳送郵件)Linux指令碼
- 谷歌郵箱,配置傳送郵件密碼谷歌密碼
- prometheus配置MySQL郵件報警PrometheusMySql
- Alertmanager傳送告警郵件配置
- Linux 下如何用 mutt 設定郵件報警Linux
- 多部門下發補貼?假的!Coremail郵件安全提醒:詐騙型釣魚郵件正在活躍!REMAI
- 如何用 Linux 命令列發電子郵件Linux命令列
- [linux]linux傳送郵件Linux
- SMTP協議初探(二)----linux下c程式設計實現發郵件協議LinuxC程式程式設計
- 用Oracle發郵件Oracle
- 用 vscode 配置 java 開發環境發 qq 郵件VSCodeJava開發環境
- Mantis基本配置及郵件伺服器配置伺服器
- Linux自動下傳送HTML格式並帶附件的郵件LinuxHTML
- 如何在Mac郵件客戶端配置使用S/MIME郵件證書Mac客戶端
- linux下sendmail郵件系統安裝操作記錄LinuxAI
- 【Redmine】郵件觸發以及附件圖片預覽,配置摘要
- 【Grafana】告警配置併傳送郵件Grafana
- 為GitLab配置郵件服務Gitlab