郵箱超出配額小腳本
內容如下
#!/bin/bash
cd /home/test
postqueue -p | grep "quota" > quota
if [ ` ls -l quota | awk '{print $5}' ` -eq 0 ]
then
echo "there is no quota user" | mail -s quota [email protected]
else
mail -s "quota" [email protected] < quota
fi
上面的腳本也可以這樣寫
#!/bin/bash
cd /backup/mysqlbak
postqueue -p | grep "quota" > quota
if [[ ! -s quota ]]
then
echo "there is no quota user" | mail -s quota [email protected]
else
mail -s "quota" [email protected] < quota
fi
郵件超出配額小腳本
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
mail服務
chunsheng666
2019-02-23 00:42:48
郵件頭中幾個參數的明晰
sa2004
2019-02-23 00:35:11
python腳本簡化jar操作命令
神牛003
2019-02-23 17:41:06
解壓tomcat二進制包出錯
隨風上升
2019-02-23 13:57:36
JavaScript input type=file 獲取文件大小及類型限制
wangyong191212
2019-02-23 13:37:47
secure日誌錯誤提示
心碎小胖子
2019-02-23 13:34:47
makefile介紹
清風徐來918
2019-02-23 00:39:16
SQL Server 2005 筆記
simyang
2019-02-23 00:38:26
異常The file cannot be validated as the XML definition "http://www.opensymphony.com/
heishu007
2019-02-23 00:23:05
保存view到本地圖片
wutongkege
2019-02-23 00:20:32
linux下cat命令詳解
lyong689
2019-02-23 00:19:28
Ansible5:常用模塊
tianjun1990
2019-02-23 00:16:07
用戶密碼管理
arvinlinux
2019-02-23 00:11:30
磁盤分區及管理
arvinlinux
2019-02-23 00:11:28