发送邮件:

[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. MySQL数据源驱动报错

    报错信息:MySQL数据源驱动报错: 1.mysql8.0以上版本需要连接数据库的JDBC驱动也是8.0版本以上 com.mysql.cj.jdbc.Driver 2.MySQL高版本需要指明是否需要 ...

  2. CentOS6.5下连网以及输入法下载

    宽带拨号连网: 1.系统--首选项--网络连接(或点击桌面右上角连网图标--VPN连接--VPN配置)       2.添加--选择DSL--勾自动连接(也可不勾)--DSL下填写用户名.密码--应用 ...

  3. gulp快速将css中的px替换成rem

    1.Gulp安装配置 1.全局安装gulp 1.1 安装 命令提示符执行cnpm install gulp -g; 1.2 查看是否正确安装:命令提示符执行gulp -v,出现版本号即为正确安装. 2 ...

  4. 【javascript】javasrcipt设计模式之策略模式

    策略模式支持在运行时由使用者选择合适的算法,对于使用者而言不用关心背后的具体事项,而使用者自动根据当前程序执行的上下文和配置,从已有的算法列表中选择出合适的算法来处理当前任务. 1.要解决的问题 2. ...

  5. PHP匿名函数(闭包)

    匿名函数(Anonymous functions),也叫闭包函数(closures),允许 临时创建一个没有指定名称的函数.最经常用作回调函数(callback)参数的值.当然,也有其它应用的情况. ...

  6. Creating dynamic/configurable parameterized queries in Entity Framework

    https://dillieodigital.wordpress.com/2013/05/09/creating-dynamicconfigurable-parameterized-queries-i ...

  7. restful知识点之五解析器_响应器_分页器

    解析器 request.post:当数据时content-type urlencoded类型时才有数据 当content-type:是formdata时需要从request.body里取数据 requ ...

  8. Git与Github。

    Git是一款免费,开源的分布是版本,用于敏捷高效的处理任何或小或大的项目.分布式相对于集中式的最大区别在于开发者可以提到本地,每个开发者通过克隆,在本地磁盘内拷贝一个完整的GIt仓库. Git的功能特 ...

  9. MySql 时间处理

    纸上得来终觉浅,绝知此事要躬行 博客园 首页 新闻 新随笔 联系 管理 随笔- 490  文章- 0  评论- 65  MySql 时间处理 这里是一个使用日期函数的例子.下面的查询选择了所有记录,其 ...

  10. 我的JS历史知识

    话说在那long long ago的1995以前,绝大多数因特网用户都使用速度仅28.8kbit/s的猫(调制调解器)上网,人们注册成为某个网站的用户时,填写好资料,发送给服务器去验证,如果某一资料填 ...