zoukankan      html  css  js  c++  java
  • linux报错汇总

    一、出现cannot send message: Process exited with a non-zero status错误

     查看log文件:sudo cat /var/log/mail.err,发现存在如下问题:Sep 19 10:07:35 ubuntu postfix/sendmail[38195]: fatal: open /etc/postfix/main.cf: No such file or directory

     方法:

    sudo dpkg-reconfigure postfix
    

     配置选择:Internet Site=>System mail name:保持默认(如:ubuntu)=>其他的都选默认的,配置完成后就存在/etc/postfix/main.cf文件了

     然后就可以使用mail命令了

    二、mail命令的使用

    #将d3.csv文件内容发送给314104490,邮件主题是hello
    mail -s 'hello' 314104490@qq.com < d3.csv
    
    #在linux下使用mail命令发送附件:首先需要安装uuencode软件包,这个程序是对二进制文件进行编码使其适合通过邮件进行发送
    sudo apt-get install sharutils
    #uuencode 需要两个参数,第一个是你要发送的文件,第二个是附件显示的文件名
    uuencode d3.csv D3.csv | mail -s 'This is 3D' 314104490@qq.com < d3.csv
    #将文件d3.csv以附件发送,附件名为D3.csc,邮件内容为d3.csv(邮件内容部分)
    
    #发送图片
    

     目前没找到合适的发送图片的方法,如果有看到发送图片邮件方法的还请留言

    三、ssh localhost

     出错:ssh_exchange_identification: read: Connection reset by peer

    sudo vi /etc/hosts.deny#注释掉all
    sudo vi /etc/hosts.allow
    
  • 相关阅读:
    答读者问(10):有关对博客的评价及个人技术发展路线等问题
    EasyUI学习之menu and button(菜单和按钮)
    二分查找
    【Android UI】色板
    很好的理解遗传算法的样例
    关于提高UDP发送效率的方法
    Log4cpp介绍及使用
    四个好看的CSS样式表格
    SpringMVC+easyUI 分页,查询 (完整的CRUD)
    [MODX] 1. Template *
  • 原文地址:https://www.cnblogs.com/always-fight/p/9674116.html
Copyright © 2011-2022 走看看