发送邮件:

[root@itfswelog123]# echo '测试邮件标题' | mail -s "数据库挂啦、挂啦、起床啦 "   xx@163.com

出现异常:

[root@itfswelog123]# send-mail: fatal: parameter inet_interfaces: no local interface found for ::1

查看centos中的postfix日志

more  /var/log/maillog

postfix: fatal: parameter inet_interfaces: no local interface found for ::1

解决方法:

vim  /etc/postfix/main.cf

将:

inet_interfaces = localhost

inet_protocols = all

改成:

inet_interfaces = all

inet_protocols = all

inet_interfaces 参数指定postfix系统监听的网络接口。缺省地,postfix监听所有的网络接口。如果你的postfix运行在一个虚拟的ip地址上,则必须指定其监听的地址。如:

inet_interfaces = all 
inet_interface = 192.168.1.1

重新启动

service postfix start

然后测试就可以了

mail发邮件报错 "send-mail: fatal: parameter inet_interfaces: no local interface found for ::1"的更多相关文章

  1. send-mail: fatal: parameter inet_interfaces: no local interface found for ::1

    转载:http://blog.csdn.net/csdnones/article/details/50717934 发送邮件: [root@iZ23whn33jnZ log]# echo '这是邮件标 ...

  2. fatal: parameter inet_interfaces: no local interface found for ::1

    https://codinfox.github.io/dev/2015/04/08/postfix-cannot-start/ Solution is straightforward: open /e ...

  3. CentOS 7下启动postfix服务报错:fatal: parameter inet_interfaces: no local interface found for ::1

    sed -i 's/inet_interfaces = localhost/inet_interfaces = all' /etc/postfix/main.cf service postfix re ...

  4. 解决send-mail: fatal: parameter inet_interfaces: no local interface found for ::1

    1:检查sendmail服务的状态 service sendmail status 2:开启sendmail服务 service sendmail start3:关闭sendmail服务 servic ...

  5. 关于163发邮件报错535 Error:authentication failed解决方法

    关于发邮件报错535 Error:authentication failed解决方法 调用163邮箱服务器来发送邮件,我们需要开启POP3/SMTP服务,这时163邮件会让我们设置客户端授权码,这个授 ...

  6. 关于发邮件报错535 Error:authentication failed解决方法

    写在最前面 相信看到535报错的同学代码编写方面都没有问题,只是不明白为什么填写了帐号密码后还是报535错误,这里我以163邮箱为例,并使用Python讲解怎么解决535问题 代码如下: import ...

  7. 解决mailx发邮件报错:esmtp-server: 504 5.7.4 Unrecognized authentication type [HK2PR02CA0167.apcprd02.prod.outlook.com] "/root/dead.letter" 11/302 . . . message not sent.

    报错信息: esmtp-server: 504 5.7.4 Unrecognized authentication type [HK2PR02CA0167.apcprd02.prod.outlook. ...

  8. AttributeError: module 'yagmail' has no attribute 'SMTP',关于使用yagmail发邮件报错的解决方法

    想用yagmail,发送自动化测试结果邮件,发现运行的时候报错.最后发现是自己的脚本名称用的yagmail.py,更改成另一个就好,换了my_yagmail.py 再运行OK啦!!!!

  9. python smtp发邮件报错“[Errno -2] Name or service not known”的解决

    最近给ss-py-mu写了个检查用户是否到期,并在到期前的第2天邮件提醒的功能. 配置存储在ini文件中,通过configparser模块获取,但尝试发送邮件的时候发现报错[Errno -2] Nam ...

随机推荐

  1. java多线程(一)-五种线程创建方式

    简单使用示例 Java 提供了三种创建线程的方法: 通过实现 Runnable 接口: 通过继承 Thread 类本身: 通过 Callable 和 Future 创建线程. 还有 定时器 线程池 下 ...

  2. Java基础之JDK的下载与安装

    做Java开发已经很长一段时间了,最近在回顾Java的基础知识,感觉好多都是知道这个概念,能说个皮毛,但是往深了说又不知道怎么说,所以打算对Java从头做一个回顾,算是对自己所学知识的一个巩固和深入了 ...

  3. 5.Resource注解解析

    Resource有两种使用场景 1.Resource 当Resource后面没带参数的时候是根据它所注释的属性名称到applicationContext.xml文件中查找是否有bean的id与之匹配, ...

  4. MVC 事物同时保存,更新数据库

    本人小白一枚,第一次写博,主要用作笔记,怕以后忘记了,大神尙可路过,也可多多指教 事物用在同时保存更新数据时,及只要在事物块的范围内,有一个操作出错则事物块所有更新,保存等操作都不会执行        ...

  5. Vue指令的钩子函数使用方法

    在Vue 中可以把一系列复杂的操作包装为一个指令. 什么是复杂的操作? 我的理解是:复杂逻辑功能的包装.违背数据驱动的 DOM 操作以及对一些 Hack 手段的掩盖等.我们总是期望以操作数据的形式来实 ...

  6. csharp: SQL Server 2005 Database Backup and Restore using C#

    1.第一种方式: using SQLDMO;//Microsoft SQLDMO Object Library 8.0 /// <summary> /// 数据库的备份 /// 涂聚文注: ...

  7. [ZJOI2008]杀蚂蚁 Solution

    题目太长,不在此显示,见洛谷P2586 http://daniu.luogu.org/problem/show?pid=2586 模拟, 那就模拟呗: 各种WA, 然后好久才A了: 一种被社会报复了的 ...

  8. jQuery处理JSONP

    http://www.g7blogs.com/?p=821 作为一枚前端,提起jsonp大家都不会陌生.特别是在我们组内的业务中,和服务器端交互的数据几乎都是采用这种形式.但假如要让你用原生的JS写出 ...

  9. 【es6】Generator 函数

    1. 基本概念 状态机,封装了多个内部状态 2. 应用 返回一个遍历器对象. 3. 代码形式 function* helloWorldGenertor() { yield 'hello'; yield ...

  10. logback配置文件---logback.xml详解

    一.参考文档 1.官方文档 http://logback.qos.ch/documentation.html 2.博客文档 http://www.cnblogs.com/warking/p/57103 ...