postfix常用命令及故障处理

查看日志:

测试postfix配置

/etc/init.d/postfix start

chkconfig postfix on

netstat -tunlp

ps -ef |grep postfix

tail -f /var/log/maillog

dovecot安装与基本配置

/etc/init.d/dovecot start

chkconfig dovecot on

/etc/init.d/portreserve stop

chkconfig portreserve off

查看进程

netstat -tunlp

ps -ef |grep postfix

列出所有端口

netstat -ntlp

查mysql在哪个文件夹中

ps -ef | grep mysql

看下有没socket文件

ll /www/server/mysql/

没有的话再查

ll -a /tmp/

看看这个/tmp/mysql.sock指向哪

posfix能不能指定socket的文件配置

应该指向/tmp/mysql.socket

ll /var/lib/mysql/mysql.sock

看下posfix是不是可以配置这个链接路径

/var/lib/mysql/mysql.sock是centos默认路径

cat /usr/local/etc/authlib/authmysqlrc

cat /etc/authlib/authmysqlrc

ll /etc/postfix

要找到 authlib才可以改sock路径

CentOS下关闭Sendmail服务的方法

Sendmail是CentOS最重要的邮件传输代理程序。理解电子邮件的工作模式是非常重要的。一般情况下,我们把电子邮件程序分解成用户代理,传输代理和投递代理。 关闭Sendmail服务具体命令实现如下:


关闭sendmail服务

(1)[root@sample ~]# /etc/rc.d/init.d/sendmail stop  ← 关闭sendmail服务
或者[root@sample ~]# service sendmail stop  ← 关闭sendmail服务
Shutting down sendmail: [ OK ]
Shutting down sm-client: [ OK ]

(2)[root@sample ~]# chkconfig sendmail off  ← 关闭sendmail自启动

(3)[root@sample ~]# chkconfig --list sendmail  ← 确认sendmail自启动已被关闭(都为off就OK)
sendmail 0:off 1:off 2:off 3:off 4:off 5:off 6:off

今天配邮件服务器,service postfix start总是FAILED.

最后没办法

vi /etc/postfix/main.cf

发现配置为:

inet_interfaces = localhost

inet_protocols = all

改成:

inet_interfaces = 127.0.0.1 #只能接受内部邮件,其它邮件不接受

inet_protocols = all

然后重启服务就好了,特此记录!

后记:20171208如何在装SSR后收不到信,详见和小伙伴的聊天对话最后

猜你喜欢

转载自my.oschina.net/u/2294923/blog/818804