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

LINUX 使用sendmail邮件备份

Watrt5年前 (2020-07-09)LINUX19870

首先安装:

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


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

相关文章

基于 debootstrap 和 busybox 构建 mini ubuntu

基于 debootstrap 和 busybox 构建 mini ubuntu

最近的工作涉及到服务器自动安装和网络部署操作系统,然后使用 ansible 和 saltsatck 进行配置并安装 openstack 。难点在于服务器的自动安装,由于不单只是通过 PXE 安装服务器,还需要能够安装时进行分区、配置网卡等工作,因此需要在开始安装前,必须先收集服务器的硬件信息。调研了一下目前的开源项目中,提供此类功能的有 tinycorelinux 、 puppet razor-el-mk 可做类似的工作。tinycorelinux 是个很好的工具,整个系统在 PXE 之后在内存...

荔枝派Nano 全流程指南

荔枝派Nano 全流程指南

u-boot 初体验安装交叉编译链首先需要安装交叉编译链:# 此处为获取7.2.1版本,您可获取其他版本或者通过链接直接下载 wget http://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/arm-linux-gnueabi/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz tar -vxJf gcc-li...

 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&...

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开发板,没有链接任何外设,本文是编译所有启动所需的三大件。(只要编...

荔枝派Nano的linux5.2版本主线下载及编译(支持USB设备与主机模式)

荔枝派Nano的linux5.2版本主线下载及编译(支持USB设备与主机模式)

安装必须的库:sudo apt-get install gcc make cmake rsync wget unzip build-essential git bc swig libncurses-dev libpython3-dev libssl-dev python3-distutils android-tools-mkbo...

发表评论

访客

看不清,换一张

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