当前位置:首页 > 技术 > LINUX > 正文内容

LINUX 使用sendmail邮件备份

Watrt6年前 (2020-07-09)LINUX23160

首先安装:

sudo apt-get install sendmail

然后在终端可以使用mail来发邮件

echo "ESP32固件"|mail -s "esp32" -A "./fw.bin" -r "bak@xxx.com" xb100@qq.com

注意很有可能收到的邮件在垃圾箱里面。把发件地址加到白 名单中


echo ""  =>邮件内容

-s=>邮件标题

-A=>附件(注意要大写)

-r =>发件人

最后是后件人邮箱


修改附件大小限制:

编辑vi /etc/mail/sendmail.mc文件

找到

define ('UUCP_MAILER_MAX','2000000')dnl

修改为你想要的大小,默认的是2000000B即20M,假如想修改为50M,改成51200000

然后

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
service sendmail restart


注意:

m4必须要安装最应的包:sendmail-cf

sudo apt-get install sendmail-cf


打赏 支付宝打赏 微信打赏
分享给朋友:

相关文章

Deepin Linux修复grub引导

Deepin Linux修复grub引导

环境说明:一直使用的是Win7+Deepin 15.5。后来全新安装了Win 10,需要修复grub第一步:在Windows操作系统下使用深度官方的U盘启动制作器 制作U盘第二步:开机U盘启动进入Deepin linux安装界面,待进入到安装界面选择语言时,按住Crtl+Alt+F2/F1进入Linux tty终端。并执行以下命令完成修复sudo fdisk -l/*根据查询结果确定deepin 的/目录和/boot目录所在的分区编号*/sudo mount&nbs...

buildroot编译中的问题

buildroot编译中的问题

在编译中遇到flex 报错。一直过不了。后来发现安装flex bison两个包后解决sudo apt-get install flex bison...

 Debian 9.9 (stretch) 文件系统制作

Debian 9.9 (stretch) 文件系统制作

0. 准备工作:sudo apt install qemu-user-static -y sudo apt install debootstrap -y mkdir rootfs1. debootstrapdebootstrap --foreign --verbose --arch=armhf  stretch rootfs http...

debootstrap报"Release signed by unknown key"错误的解决方法

debootstrap报"Release signed by unknown key"错误的解决方法

1、下载最新的ASC文件:wget https://ftp-master.debian.org/keys/release-11.asc -qO- | gpg --import --no-default-keyring --keyring ./debian-release-11.gpg注意这里的11对应debian的版本号。我这里是debian11 (bullseye)2、debootstrap指定asc文件sudo&...

老是提示:newer kernel available 解决方法

老是提示:newer kernel available 解决方法

这个是由于没有正确的安装内核造成的。可以直接关掉提示 sudo apt purge needrestart...

Configure & Build

Configure & Build

Configure and build Linux kernel for Surface RTEditing kernel build configurationFirst run the command make ARCH=arm tegra_defconfigThis will create a standard kernel config for tegra SoC's.Open the file .config in the kernel source directory wit...

f1c100s编译启动所需的uboot,kernel,rootfs

f1c100s编译启动所需的uboot,kernel,rootfs

 https://github.com/Icenowy/linux.git 有f1c100s-480272lcd-test和f1c100s分支, 然后自己手动修复一个 USB 问题,驱动就比较全了https://github.com/Lichee-Pi/linux.git 有nano-4.14-exp和nano-5.2-flash分支,用哪个合适个人画了块没有连接任何其他模块的F1C100S开发板,没有链接任何外设,本文是编译所有启动所需的三大件。(只要编...

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。