導航:首頁 > 文件教程 > msmtp配置文件

msmtp配置文件

發布時間:2023-03-10 13:28:22

『壹』 linux 中mutt msmtp發附件出錯

這一般是設置文件出現問題了(我使用的軟體包msmtp-1.4.17.tar.bz2

1、確保你的 /root/.msmtprc 文件中關於郵箱的設置正確
正確設置格式(我這里使用的是126郵箱):
defaults
logfile /var/log/msmtp/msmtp.log #日誌文件,需要手動建立
account wang5 #賬號
host smtp.126.com #使用的轉發郵箱
port 25
from [email protected] #要從哪個郵箱發出
auth login #認證方式,不要使用on ,會報錯
tls off
user wang5 #郵箱用戶名
password xxxxxxxxx #郵箱密碼
account default : wang5
修改後改變許可權:chmod 600 /root/.msmtprc
2、對mutt進行設置
先安裝:yum install -y mutt
安裝完成後修改配置文件
vim /etc/Muttrc
在最後添加:
set sendmail="/usr/local/msmtp/bin/msmtp" #你的msmtp命令路徑,我這里是源碼安裝
set use_from=yes
set realname="[email protected]"
set editor="vim"
3、確保無誤後可以進行測試了
[root@localhost~]#echo "郵件1" | mutt -s "測試" 136000101XX@qq.com

內容 標題 目標郵箱

運行後可以到[email protected]郵箱看到郵件內容了

『貳』 如何用git-am來合並git format-patch生成patch git回退

多發patch,多產生一些好的idea,才可以在open software community中越混越好。 首先配置git。這里有兩種配置文件,一個是全局的,在用戶的home目錄下,一個是相應git倉庫的。如果你設置了全局的,那麼可以用在各個git倉庫上。查看一下我已經配置好的配置文件: hacker@hacker:~/qemu-kvm$cat~/.gitconfig[user]name = Wanpeng Li email = [email protected] [sendemail] chainreplyto = falsesmtpserver=/usr/bin/msmtp 我們可以使用命令來配置:$git config --global user.name 'Wanpeng Li' $git config --global user.name '[email protected]' $git config --global sendemail. chainreplyto false $git config --global sendemail. smtpserver/usr/bin/msmtp

『叄』 怎麼實現郵件報警通知以及免費簡訊報警通知

可以通過如下方法實現:
1 下載並且安裝msmtp軟體,以msmtp-1.4.32.tar.bz2
tar jxvf msmtp-1.4.32.tar.bz2
cd msmtp-1.4.32
./configure--prefix=/usr/local/msmtp
Make
Make install

2、手動建立配置文件,輸入外部smtp地址
mkdir –p /usr/local/msmtp/etc
vi /usr/local/msmtp/etc/msmtprc
添加以下內容
account default
host smtp.sohu.com #你的發送郵件伺服器
port 25
from [email protected] #要從哪個郵箱發出
auth login
tls off
user zabbix2014 #郵箱用戶名
password xxxxx-xxx #郵箱密碼,如果你覺得不安全可以把文件改為600屬性
logfile /var/log/mmlog
保存退出。

3、簡單測試一下

/usr/local/msmtp/bin/msmtp [email protected]
hello,test
ctrl d
cat /usr/local/msmtp/msmtp.log 看看有沒有成功。
然後再到sohu郵箱中,看看信收到沒有

報錯如下
[root@cache-2 msmtp-1.4.32]# /usr/local/msmtp/bin/msmtp [email protected]
msmtp: authentication failed (method LOGIN)
msmtp: server message: 535 5.7.0 Invalid result
msmtp: could not send mail (account default from /usr/local/msmtp/etc/msmtprc)

Google之後,需要安裝 mutt組件
4、下面開始安裝 MUTT如果是CentOS的話直接用yum就好了
yum install mutt
安裝完成後要手動給他建立一個配置文件,
vim /etc/Muttrc
setsendmail="/usr/local/msmtp/bin/msmtp" #你的msmtp命令路徑
set use_from=yes
set realname="[email protected]"
set editor="vim"
簡單的4行就可以了
好了,讓我們來測試一下吧!

測試一下:echo"test mail" | mutt -s "test" [email protected]

OK,測試了下,能收到已經發送的email,如下所示:
echo"test mail 2014 content tom 2" | mutt -s "test 2014 title2" [email protected]

『肆』 linux能收取163郵箱發來的郵件嗎(非圖形化界面)如果能,該如何配置

mutt+msmtp 可以做到發郵件,目前還沒有在tty下收取商業郵箱的工具,mail -e只能收取系統管理員發送的郵件,而不是商業郵箱。
修改~/.msmtprc:
account qqmail
#設置認證方式, 此處為登錄
auth login
#發送郵件的主機名
host smtp.163.com
from [email protected]
#你在你所使用的郵箱系統中的用戶名
user [email protected]
#郵箱密碼, 當然在這里我的密碼是隨便寫的
password 123456
#日誌文件
logfile ~/.msmtprc.log
#參數指定發送賬戶, 具體參數名請看msmtp的man page
account default:163mail

配置文件寫好, 要將其許可權修改為 chmod ~/.msmtprc 0600, 然後修改mutt的配置文件, 它的配置文件名為 ~/.muttrc:
#此處填寫msmtp的絕對路徑名, 可使用 which msmtp 命令得到
set sendmail="/usr/bin/msmtp"
set use_from=yes
#收件人看到的郵件發送人姓名
set realname="xxx"
set [email protected]
#郵件內容使用vi編寫
set editor="vi"

兩個配置文件都寫好後, 嘗試發送一封郵件來測試. 在命令行中輸入
mutt -s 'just a test' [email protected]
郵件內容寫好後, 按 :wq 保存退出, 進入另一個界面,按a可添加附件, 按y正式發送郵件。

『伍』 有人會使用linux腳本發送郵件嗎

1.開啟郵件服務
echo "郵件內容" | mail -s 「主題」 郵箱地址

閱讀全文

與msmtp配置文件相關的資料

熱點內容
maya粒子表達式教程 瀏覽:84
抖音小視頻如何掛app 瀏覽:283
cad怎麼設置替補文件 瀏覽:790
win10啟動文件是空的 瀏覽:397
jk網站有哪些 瀏覽:134
學編程和3d哪個更好 瀏覽:932
win10移動硬碟文件無法打開 瀏覽:385
文件名是亂碼還刪不掉 瀏覽:643
蘋果鍵盤怎麼打開任務管理器 瀏覽:437
手機桌面文件名字大全 瀏覽:334
tplink默認無線密碼是多少 瀏覽:33
ipaddgm文件 瀏覽:99
lua語言編程用哪個平台 瀏覽:272
政采雲如何導出pdf投標文件 瀏覽:529
php獲取postjson數據 瀏覽:551
javatimetask 瀏覽:16
編程的話要什麼證件 瀏覽:94
錢脈通微信多開 瀏覽:878
中學生學編程哪個培訓機構好 瀏覽:852
榮耀路由TV設置文件共享錯誤 瀏覽:525

友情鏈接