日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

MAIL (mailed 317 bytes of output but got status 0x004b#012)

發布時間:2023/12/19 综合教程 24 生活家
生活随笔 收集整理的這篇文章主要介紹了 MAIL (mailed 317 bytes of output but got status 0x004b#012) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

當Cron執行命令出錯時,默認會發送郵件給cron任務的所有者.當然,發送郵件時也可能會出錯.我就遇到了如題所示的錯誤.

我使用的機器環境為Centos7.它默認會使用Postfix來發送郵件.

#tail /var/log/cron
Feb 24 16:37:16 iZbp16mm6oot8Z CROND[20862]: (root) MAIL (mailed 317 bytes of output but got status 0x004b#012)
Feb 24 16:37:21 iZbp16mm6oot8Z CROND[20861]: (root) MAIL (mailed 317 bytes of output but got status 0x004b#012)
Feb 24 16:37:26 iZbp16mm6oot8Z CROND[20860]: (root) MAIL (mailed 317 bytes of output but got status 0x004b#012)
Feb 24 16:37:31 iZbp16mm6oot8Z CROND[20859]: (root) MAIL (mailed 317 bytes of output but got status 0x004b#012)
Feb 24 16:37:36 iZbp16mm6oot8Z CROND[20858]: (root) MAIL (mailed 317 bytes of output but got status 0x004b#012)

#cat /var/log/maillog

Feb 24 16:36:06 iZbp16mm6oot8Z postfix/sendmail[20327]: fatal: parameter inet_interfaces: no local interface found for ::1
Feb 24 16:36:11 iZbp16mm6oot8Z postfix/sendmail[20386]: fatal: parameter inet_interfaces: no local interface found for ::1
Feb 24 16:36:16 iZbp16mm6oot8Z postfix/sendmail[20434]: fatal: parameter inet_interfaces: no local interface found for ::1
Feb 24 16:36:21 iZbp16mm6oot8Z postfix/sendmail[20481]: fatal: parameter inet_interfaces: no local interface found for ::1
Feb 24 16:36:26 iZbp16mm6oot8Z postfix/sendmail[20534]: fatal: parameter inet_interfaces: no local interface found for ::1
Feb 24 16:36:31 iZbp16mm6oot8Z postfix/sendmail[20570]: fatal: parameter inet_interfaces: no local interface found for ::1
Feb 24 16:36:36 iZbp16mm6oot8Z postfix/sendmail[20614]: fatal: parameter inet_interfaces: no local interface found for ::1
Feb 24 16:36:41 iZbp16mm6oot8Z postfix/sendmail[20660]: fatal: parameter inet_interfaces: no local interface found for ::1
Feb 24 16:36:46 iZbp16mm6oot8Z postfix/sendmail[20711]: fatal: parameter inet_interfaces: no local interface found for ::1

vi /etc/postfix/main.cf

發現配置為:

inet_interfaces = localhost

inet_protocols = all

改成:

inet_interfaces = all

inet_protocols = all

重新啟動

service postfix start

==========================================================

這個其實是postfix的配置問題,是計劃任務在執行完之后會通過postfix發郵件給執行完的用戶郵箱,現在發不出去導致的,修改下配置就行了,但是與本次錯誤無關。

也可以設置下定時器執行后不發郵件

# crontab -e
MAILTO="" #設置MAILTO參數為空

*/1 * * * * curl http://dr.host.com/cronTab/queryCurrentBill
3 4 * * * curl http://dr.host.com/cronTab/yesterDayOrders

* * * * * curl http://dr.host.com/cronTab/queryLastMonthOrder
* * * * * sleep 5; curl http://dr.host.com/cronTab/queryLastMonthOrder
* * * * * sleep 10; curl http://dr.host.com/cronTab/queryLastMonthOrder
* * * * * sleep 15; curl http://dr.host.com/cronTab/queryLastMonthOrder
* * * * * sleep 20; curl http://dr.host.com/cronTab/queryLastMonthOrder
* * * * * sleep 25; curl http://dr.host.com/cronTab/queryLastMonthOrder

這樣就再也不會發郵件了。。。。。。當然也不會有那個錯誤了。

總結

以上是生活随笔為你收集整理的MAIL (mailed 317 bytes of output but got status 0x004b#012)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。