forked from aqzt/kjyw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
## IMAP方式批量删除邮箱邮件 2017-08-05 | ||
## http://www.aqzt.com | ||
## email: [email protected] | ||
## robert yu | ||
## centos 7 | ||
## crontab定时 0 */20 * * * bash /opt/sh/mail1.sh 500 | telnet imap.189.cn 143 | ||
### [email protected] 替换为你的邮箱 | ||
### password123 替换为你的邮箱密码 | ||
### bash /opt/sh/mail1.sh 500 | telnet imap.189.cn 143 | ||
|
||
MAX_MESS=$1 | ||
[ $# -eq 0 ] && exit 1 || : | ||
sleep 2 | ||
echo "A01 login [email protected] 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 |