[Linux] mutt+msmtp sendmail
以前也寫過mutt+msmtp sendmail的文章,現在重新寫一次吧。
1.download msmtp software
直接輸入如下地址,可以獲得software
2.install msmtp
[root@oracle6 opt]# tar -xvf msmtp-1.4.31.tar.bz2
[root@oracle6 opt]# cd msmtp-1.4.31
[root@oracle6 msmtp-1.4.31]# ./configure --prefix=/opt/msmtp --with-ssl=openssl
[root@oracle6 msmtp-1.4.31]# make
[root@oracle6 msmtp-1.4.31]# make install
3.配置配置檔案
[root@oracle6 etc]# pwd
/opt/msmtp/etc
[root@oracle6 etc]# more msmtprc
account default
host smtp.163.com
port 25
from tolilong@163.com
auth login
tls off
user tolilong@163.com
password xxxxxx
logfile /var/log/mmlog
[root@oracle6 ~]# more /etc/Muttrc
set from="tolilong@163.com"
set sendmail="/opt/msmtp/bin/msmtp"
set use_from=yes
set realname="SystemInfo"
set editor="vi"
4.sendmail
[root@oracle6 ~]# echo "Log" | mutt -s "Log Info" -a /root/install.log.syslog tolilong@163.com
[root@oracle6 ~]# cat install.log.syslog | mutt -s "Log Info" -a /root/install.log.syslog tolilong@163.com
[root@oracle6 ~]# cat install.log.syslog | mutt -s "Log Info" -a /root/install.log.syslog tolilong@163.com,bruce_xxxx@163.com
-s=subject(主題)
-a=attachment(附件)
多個maillist中間用逗號","分開
*******************************************************************
[root@oracle6 ~]# cat install.log.syslog | mutt -s "Log Info" -a test tolilong@163.com
Can't stat tolilong@163.com: No such file or directory
tolilong@163.com: unable to attach file.
遇到如上一個問題,即傳送帶附件的mail的時候報瞭如上這個錯誤。
將mail list放到 -a 引數即可以。
[root@oracle6 ~]# cat install.log.syslog | mutt -s "Log Info" tolilong@163.com -a test
[root@oracle6 ~]# cat install.log.syslog | mutt -s "Log Info" tolilong@163.com,bruce_xxxxx@163.com -a /root/install.log.syslog
*******************************************************************
1.download msmtp software
直接輸入如下地址,可以獲得software
2.install msmtp
[root@oracle6 opt]# tar -xvf msmtp-1.4.31.tar.bz2
[root@oracle6 opt]# cd msmtp-1.4.31
[root@oracle6 msmtp-1.4.31]# ./configure --prefix=/opt/msmtp --with-ssl=openssl
[root@oracle6 msmtp-1.4.31]# make
[root@oracle6 msmtp-1.4.31]# make install
3.配置配置檔案
[root@oracle6 etc]# pwd
/opt/msmtp/etc
[root@oracle6 etc]# more msmtprc
account default
host smtp.163.com
port 25
from tolilong@163.com
auth login
tls off
user tolilong@163.com
password xxxxxx
logfile /var/log/mmlog
[root@oracle6 ~]# more /etc/Muttrc
set from="tolilong@163.com"
set sendmail="/opt/msmtp/bin/msmtp"
set use_from=yes
set realname="SystemInfo"
set editor="vi"
4.sendmail
[root@oracle6 ~]# echo "Log" | mutt -s "Log Info" -a /root/install.log.syslog tolilong@163.com
[root@oracle6 ~]# cat install.log.syslog | mutt -s "Log Info" -a /root/install.log.syslog tolilong@163.com
[root@oracle6 ~]# cat install.log.syslog | mutt -s "Log Info" -a /root/install.log.syslog tolilong@163.com,bruce_xxxx@163.com
-s=subject(主題)
-a=attachment(附件)
多個maillist中間用逗號","分開
*******************************************************************
[root@oracle6 ~]# cat install.log.syslog | mutt -s "Log Info" -a test tolilong@163.com
Can't stat tolilong@163.com: No such file or directory
tolilong@163.com: unable to attach file.
遇到如上一個問題,即傳送帶附件的mail的時候報瞭如上這個錯誤。
將mail list放到 -a 引數即可以。
[root@oracle6 ~]# cat install.log.syslog | mutt -s "Log Info" tolilong@163.com -a test
[root@oracle6 ~]# cat install.log.syslog | mutt -s "Log Info" tolilong@163.com,bruce_xxxxx@163.com -a /root/install.log.syslog
*******************************************************************
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24237320/viewspace-2040198/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- linux下關閉sendmailLinuxAI
- Linux下停止SendMail程式[Linux基礎]LinuxAI
- Linux下的sendmail簡介(轉)LinuxAI
- sendmail配置AI
- Linux基礎命令---sendmail傳送郵件LinuxAI
- sendmail settingAI
- [Linux] mutt+msmtp傳送mail時出現瞭如下錯誤(msmtp: cannot locate host)LinuxAI
- linux下sendmail郵件系統安裝操作記錄LinuxAI
- 在紅旗Linux Server4.1中配置sendmail(轉)LinuxServerAI
- Sendmail relay規則及配置檔案用法彙總 sendmail配置 (轉)AI
- 安裝和配置sendmailAI
- ebs12 sendmail配置AI
- [20160828]Linux SendMail服務啟動慢解決LinuxAI
- linux 啟動 sendmail 和 sm-client 慢的解決辦法LinuxAIclient
- REDHAT 7.1 sendmail配置FAQ (轉)RedhatAI
- [Developer] Oracle sendmail procedure(1)(轉載)DeveloperOracleAI
- sendmail出現"MXlistforhostnamepointsbacktohostname"問(轉)AI
- [轉]Linux開機時停在 Starting sendmail 不動了的解決方案LinuxAI
- linux安全設定(升級SSH,關閉telnet,停止FTP,停止sendmail等)LinuxFTPAI
- [Shell] monitor oracle alert.log file and sendmailOracleAI
- linux 啟動 sendmail 和 sm-client 慢的解決辦法之補充LinuxAIclient
- linux 啟動sendmail和sm-client慢的解決辦法 及報錯LinuxAIclient
- 8.Monitor oracle alert.log file and sendmailOracleAI
- php不能呼叫sendmail發信的解決方法PHPAI
- CentOS下使用MSMTP代替Sendmail傳送郵件CentOSAI
- 用sendmail傳送HTML格式的郵件(轉)AIHTML
- 把JavaMail包裝成簡單的Sendmail (轉)JavaAI
- Linux啟動時在sendmail出現make: warning: Clock skew detected.的解決辦法LinuxAI
- HP-UX啟動停止配置sendmail服務方法UXAI
- 在Perl中使用sendmail傳送MIME郵件 (轉)AI
- 選擇代替Sendmail的郵件伺服器軟體AI伺服器
- sendmail的log裡面maybeforged是什麼意思?(轉)AI
- Redhat中sendmail只監聽127.0.0.1怎麼辦(轉)RedhatAI127.0.0.1
- 在 CentOS 7 中使用 Sendmail 通過 PHP 傳送郵件CentOSAIPHP
- crond不斷喚起sendmail導致資源耗盡的排查AI
- 在CentOS7中使用Sendmail通過PHP傳送郵件CentOSAIPHP
- 為什麼當系統啟動到Sendmail時會暫停(轉)AI
- ipf導致sendmail不能正確轉發郵件的問題解決AI