linux-ubuntu添加定时任务发送邮件(heirloom-mailx、s-nail、crontab)


前言

如题:完成了ubuntu定时发送邮件任务。
其中包括:apt install无源报错、apt-get update 无公钥报错、获取邮箱 smtp 授权码、发送邮件、编辑shell、crontab设置


以下是本篇文章正文内容,下面案例可供参考

一、配置邮件工具(heirloom-mailx 或 s-nail 或 mailx 等,选其一即可,)

建议安装s-nail

(1)安装heirloom-mailx

sudo apt install heirloom-mailx 
#如果报错package has no installation candidate

在这里插入图片描述
#则需要添加源 这里可以选择添加其它源 此处仅为例子

sudo vim /etc/apt/sources.list
	deb http://cz.archive.ubuntu.com/ubuntu xenial main universe
sudo apt-get update
#如果报错GPG error:The following signatures couldn‘t be verified because the public

在这里插入图片描述

#需要添加公钥
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值