centos 内网实现mail发送

文章目录

1、frp 穿透公网和内网

参考地址:https://zhaosongbin.blog.csdn.net/article/details/88865890

frps端部署在内网,frpc端部署在外网

frps端配置和上面文章中的一样,frpc端配置如下:

这里以163邮箱为例

注意邮件协议有三种:SMTP、IMAP、POP三种协议。这三种都属于tcp

xml 复制代码
# mail
[163_mail_server]
type = tcp
local_ip = smtp.163.com
local_port = 25
remote_port = 25
use_encryption = false
use_compression = false

2、邮件 配置

在服务区中邮件服务一般都是自带的,这里简单写下yum安装命令,不多做其他叙述

shell 复制代码
$ yum install mailx -y

2.1、mail配置文件

修改mail的配置文件,在最下面添加以下内容

shell 复制代码
$ vim /etc/mail.rc
xml 复制代码
# 在行添加内容
set bsdcompat
set sendcharsets=iso-8859-1,utf-8
# 发件邮箱
set from=***@163.com
set smtp=frps端的ip:25
set smtp-auth-user=***@163.com
set smtp-auth-password=VLOOTQAQXGTWDPOK
set smtp-auth=login
set ssl-verify=ignore
set nss-config-dir=/etc/pki/nssdb/

3、测试

shell 复制代码
 $ echo "邮件代理测试,这里是mail服务器" | mailx -v -s "mail代理测试" ***@163.com
相关推荐
阿里云大数据AI技术4 小时前
阿里云 EMR AI 助手正式发布:从问答工具到全栈智能运维助手
运维·人工智能
orion571 天前
Missing Semester Class1:course overview and introduction of shell
linux
SkyWalking中文站1 天前
认识 Horizon UI · 6/17:Trace 探索器
运维·监控·自动化运维
用户120487221611 天前
Linux驱动编译与加载
linux·嵌入式
火车叼位1 天前
写给初级开发者:SSL、SSH、HTTPS 与证书体系全解析
运维
用户805533698031 天前
Input 子系统架构:Core、Handler、Driver 三层是怎么协作的
linux·嵌入式
用户805533698031 天前
RK-Forge外设系列开篇 - 把板子从「能启动」变成「能用」:Ethernet/SPI/MMC 三个纯接线外设
linux·github·嵌入式
小猿姐2 天前
唯品会大规模数据库云原生实践:基于 KubeBlocks 管理数千实例的统一运维之路
运维·elasticsearch·云原生
七歌杜金房2 天前
我终于又有了自己的 Linux 电脑
linux·debian·mac
SkyWalking中文站2 天前
认识 Horizon UI · 5/17:3D 基础设施地图
运维·监控·自动化运维