欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 财经 > 金融 > RHEL---定时发布邮件

RHEL---定时发布邮件

2024/10/26 1:20:46 来源:https://blog.csdn.net/2201_75364744/article/details/143019716  浏览:    关键词:RHEL---定时发布邮件

请添加图片描述
挂载磁盘

[root@localhost zzy]# mount /dev/sr0  /mnt
mount: /mnt: /dev/sr0 already mounted on /run/media/zzy/RHEL-9-3-0-BaseOS-x86_64.

下载邮件工具

[root@localhost zzy]# cat /etc/yum.repos.d/base.repo
[BaseOS]
name=BaseOS
baseurl=file:///mnt/BaseOS
gpgcheck=0[AppStream]
name=AppStream
baseurl=file:///mnt/AppStream
gpgcheck=0[root@localhost zzy]# dnf install s-nail -y
Updating Subscription Management repositories.
Unable to read consumer identityThis system is not registered with an entitlement server. You can use subscription-manager to register.BaseOS                                    2.7 MB/s | 2.7 kB     00:00    
AppStream                                 3.1 MB/s | 3.2 kB     00:00    
Package s-nail-14.9.22-6.el9.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete![root@localhost zzy]# tail -5 |  /etc/s-nail.rcset from=15305218527@163.com
set smtp=smtp.163.com
set smtp-auth-user=15305218527@163.com
set smtp-auth-password=GEcgtf9Eaf3Mg8eg
set smtp-auth=login
[root@localhost zzy]# 

编写定时邮件

[root@localhost zzy]# crontab -e
crontab: installing new crontab
[root@localhost zzy]# crontab -l
9 15 * * * echo ww | mail -s nn 15305218527@163.com

结果请添加图片描述

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com