linux Centos8邮件服务器的搭建和使用

PHPer 2020-04-18 1427 0 0

echo "content" | mail -s "title" xxx@gmail.com

vi /etc/postfix/master.cf

更改配置文件把#smtps inet n - - - - smtpd 注释去掉

保存退出,重启postfix服务,报错

[root@vultrguest ~]# sudo systemctl restart postfix

Job for postfix.service failed because the control process exited with error code.

See "systemctl status postfix.service" and "journalctl -xe" for details.

运行命令

journalctl -xe

部分内容如下

Apr 18 16:04:10 vultrguest sshd[29021]: Disconnected from 49.88.112.114 port 63364 [preauth]

Apr 18 16:04:16 vultrguest sshd[29069]: Invalid user sh from 111.229.150.48 port 41000

Apr 18 16:04:16 vultrguest sshd[29069]: pam_unix(sshd:auth): check pass; user unknown

后面用的webmin搭建的,也安装配置和启动了postfix,

然后在系统运行

[root@vultrguest ~]# echo "content" | mail -s "title" 1295409558@qq.com

结果报错

-bash: mail: command not found

怎么会没有安装mail服务呢,不是安装了吗?网上查了这个命令要安装mailx工具

yum -y install mailx

安装后,再试试,还是没收到,发现在postfix的mail queue,邮件队列里,什么情况。 20200418

后面在webmin的postfix mail queue里看到Status是无内容的,后面查看了下,状态显示

connect to mx1.qq.com[58.251.110.111]:25: Connection timed out

连接超时

换一个目标邮箱地址试试

[root@vultrguest ~]# echo "content" | mail -s "title" xxx@gmail.com

看看,gmail.com能不能收到邮件

connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:4003:c13::1b]:25: Connection timed out

也是不行,怎么默认发的都是25端口。网上说要在postfix配置里更改stmps,于是去更改

vi /etc/postfix/master.cf

更改配置文件把#smtps inet n - - - - smtpd 注释去掉...

立即注册

webmin和postfix

接之前postfix启动还是失败,我决定重启centos服务器,重启后,发现postfix可以正常启动了,但是发现网页打不开webmin了,本地看了显示10000端口打开的

firewall-cmd --zone=public --list-ports(查看开启的端口)

后面我想是不是哪里搞错了,整了20分钟,我才想起来可能webmin没启动。。结果启动了,ok了...

立即注册

更新于:2020-04-19 00:16:40
相关内容

用QueryList采集B站个人空间的内容受阻

$url="https://space.bilibili.com/90183256/channel/collectiondetail?sid=595";//采集个人空间内容受阻,B站会跳转要求登录 ,即使我是带着cookie也不行20211225

JS 报错 Uncaught SyntaxError: missing ) after argument list

e.clipboardData.setData('text/plain', selecttion + 作者:syh0418链接:https://wokan.chawen.org/note/112来源:查问网著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。) 这里代码开始这样写的 e.clipboardData.setData('text/plai...

Yii debug报错Call to undefined function Opis\Closure\unserialize()

不能用debug工具还是很不方便的,更新最新的debug扩展php composer.phar require --prefer-dist yiisoft/yii2-debug 运行报错了PHP Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in phar:composer.phar/src/Composer/Dependency...

今天给电脑上安装Office2003遇到表格打不开,去下载office2007时用到了坑搜网

百度网盘资源的采集还是要学习下
推荐内容

如何注册Spotify,注册中遇到的问题

起因是找阿特拉斯耸耸肩3里片尾的歌曲,后面用谷歌插件 aha music找到了歌曲名字和作曲人:The Beginning Elia Cmiral,然后资料在spotify有,于是就注册,甚至通过远程服务器,在服务器上打开浏览器也...

Spotify无法注册,想了很多办法后无果于是联系客服

Spotify无法注册,想了很多办法后无果于是联系客服

客服回答中国地区现在无法注册 If you still need help, contact Spotify Support.

mysql8使用自带全文索引(带中文分词)

如果之前建立全文索引,要先删除建立的索引,然后用下面的重新建立索引,亲测有效,nice 20200408 1307 ALTER TABLE `w_note` DROP INDEX content ALTER TABLE `w_note` ADD FULLT...

MySQL如何重建索引

总结一下MySQL索引重建的方法:1: DROP INDEX + RECREATE INDEX.2: ALTER TABLE方法3: REPAIR TABLE方法,这种方法对于InnoDB存储引擎的表无效。4: OPTI...

微信备份文件,备份在电脑端的愈来愈大了

大小有21.8G,也就备份了2年的聊天数据。

华为mate20手机设置里恢复出厂设置无效