Score
0
608 Unstar Star 2.1K Fork 964

aqztcom / kjywShellMIT

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
快捷运维,代号kjyw,项目基于shell、python,运维脚本工具库,收集各类运维常用工具脚本,实现快速安装nginx、mysql、php、redis、nagios、运维经常使用的脚本等等... spread retract

https://aq2.cn/c/kjyw

  • Shell 93.1%
  • Makefile 4.4%
  • Batchfile 1.8%
  • Python 0.4%
  • VBScript 0.2%
  • Other 0.1%
Clone or download
mail1.sh 667 Bytes
Copy Edit Web IDE Raw Blame History
ppabc authored 2017-08-05 20:09 . update
#!/bin/bash
## IMAP方式批量删除邮箱邮件 2017-08-05
## http://www.aqzt.com
## email: ppabc@qq.com
## robert yu
## centos 7
## crontab定时 0 */20 * * * bash /opt/sh/mail1.sh 500 | telnet imap.189.cn 143
### 181503xxx@189.cn 替换为你的邮箱
### password123 替换为你的邮箱密码
### bash /opt/sh/mail1.sh 500 | telnet imap.189.cn 143
MAX_MESS=$1
[ $# -eq 0 ] && exit 1 || :
sleep 2
echo "A01 login 181503xxx@189.cn password123"
sleep 1
echo "A02 LIST '' *"
sleep 2
echo "A03 Select INBOX"
sleep 2
for (( j = 2 ; j <= $MAX_MESS; j++ ))
do
echo "A09 Store $j +FLAGS (\Deleted)"
echo "A10 Expunge"
sleep 1
done
echo QUIT
date >> /tmp/mail1.log

Comment ( 0 )

Sign in for post a comment

Shell
1
https://gitee.com/aqztcom/kjyw.git
git@gitee.com:aqztcom/kjyw.git
aqztcom
kjyw
kjyw
master

Search

131423 f1aaba0b 1899542 094922 1c74bed3 1899542