Metrics
0
Watch 426 Star 1.1k Fork 526

aqztcom / kjywShell

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

https://bbs.aqzt.com/forum-39-1.html

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 )

You need to Sign in for post a comment

Help Search